Repository navigation
Releases: gmrandazzo/CheapSecurity
Release list
CheapSecurity v1.2.0
What's new
- Automatic camera detection — set
"device": "auto"and"night_device": "auto"and CheapSecurity opens every V4L2 capture device, classifies it from frame content (color/ IR-tinted /mono), and assigns the day camera (color preferred) and the night/IR camera by itself. Content-based, so it works with any camera models, survives/dev/videoNrenumbering, and skips non-camera nodes (e.g. the Raspberry Pibcm2835-codec/bcm2835-ispdevices). - True-to-length recordings on any camera — the sustained fps of each camera is learned while recording and written into the next clips; AVI durations are corrected in place by patching the header (pure Python, no ffmpeg), down to sub-1 fps IR cameras.
- Telegram video captions now report real duration, frame count, and fps (e.g.
🎥 Manual video: 19.1s — 13 frames @ 0.7 fps). - Telegram night-mode replies now state which physical camera is active (day/color or night/IR).
- Web dashboard header shows the running version; the Swagger API info reports the same version.
- README: new Tested hardware section.
Fixed
- Motion and manual clips playing back too fast on cameras whose real fps is lower than the configured one (e.g. 20 s of wall-clock recording playing in ~13 s).
- Sub-1 fps recordings from IR cameras getting a bogus stamped fps (floor lowered from 1.0 to 0.1).
- Race in day/night camera switching that could leave the wrong camera active after rapid toggles.
- AUTO day-camera assignment could pick an IR-tinted sensor; plain color cameras are now preferred for the day slot.
- Negotiated pixel format and (learned/measured) writer fps are now logged per camera for easier debugging.
release.shversion bump failing on macOS (BSD sed portability).
Tested on Raspberry Pi Zero 1 W and Odroid XU4, each with a USB color (day) camera and a USB IR (night) camera.
Changes since v1.1.0:
aa1b5fefix(recording): correct motion clip playback speed, add auto camera detection030c43efix(auto-camera): prefer color camera for day, detect IR-tinted sensors1af03e6fix(camera): race-safe day/night switch, report active camera in Telegram941a3d6fix(recording): correct clip duration without ffmpeg via AVI header patcha2062fefeat(recording): learn sustained per-camera fps, stamp next clips with itdbdaba5feat(telegram): report real recording stats in video captionsb26997ffix(recording): support sub-1fps clips, log negotiated pixel formate51aa98Show CheapSecurity version in web UI header3f41fb8/b7e0aa2docs(readme): tested hardware section273a833fix(release): portable sed patterns in release.sh
v1.1.0
CheapSecurity v1.1.0 🎥
A focused maintenance and quality-of-life release that makes motion-triggered recordings more useful and fixes the dashboard UI.
What’s new
• Smarter motion recordings — Added motion.recording_tail_seconds. After the last detected motion frame, the clip stays open for the configured tail (default 10 s); any new motion resets the timer. This joins short bursts like
door opening followed by someone walking in into a single continuous video, instead of cutting off after the door stops moving.
• Dashboard reliability fix — Removed a duplicate let currentSettings declaration in the dashboard JavaScript that caused a parse error and left the calendar, recordings list, and status badge empty.
• AI Full Disclosure — Added an “AI Full Disclosure” section to the README stating that the project is developed with strong assistance from Kimi 2.7 and Gemini 3.6 flash, with humans leading ideas, testing, and debugging.
• Release automation — Added release.sh to handle version bumping, opening the develop → main PR, tagging, and creating the GitHub release in one step.
Bug fixes
• Fixed import sorting in the test suite for newer ruff/isort rules so the CI lint step passes cleanly.
Upgrade notes
• Your existing config.json keeps working; recording_tail_seconds falls back to cooldown_seconds if not set. To enable the new behavior, add:
"recording_tail_seconds": 10
under the motion section.
• If you expose the dashboard to the internet, remember to put a reverse proxy with HTTPS and authentication in front of Gunicorn.
Full changelog
See the commit history between v1.0.0 and v1.1.0 for all details.
v1.0.0
CheapSecurity 1.0.0
Stable release of the lightweight, self-hosted CCTV solution for Linux SBCs.
What's new
- Night-mode strength profiles — choose
low,normal, oraggressivesoftware low-light enhancement from the dashboard, API, or Telegram. - Optional IR / night camera — configure a second V4L2 device that is opened automatically when night mode is toggled, with automatic fallback to the day camera.
- Telegram bot improvements:
- New commands:
/snapshot,/video,/sent,/delete,/delete_range,/id,/telegram_on/off,/email_on/off,/night_mode_on/off,/night_mode <strength>,/help. - Exponential-backoff retries on network and server errors.
- Sent message IDs are tracked so you can delete recent uploads from chat.
/delete_rangenow deletes every message ID in the requested range.
- New commands:
- Manual video recording fix — re-encoded clips now keep the correct playback duration.
- Dashboard updates — night-mode strength dropdown, active camera indicator (day vs IR/night), and better status feedback.
- GitHub Actions CI pipeline — runs
ruff,mypy, andpyteston pull requests and on pushes tomain/develop. - Camera reconnect resilience — the engine keeps retrying with backoff if the USB camera temporarily drops off the bus, instead of halting.
Configuration highlights
See config.json.example for the new optional camera block:
"camera": {
"night_mode_strength": "low",
"night_device": 1,
"night_device_width": 1280,
"night_device_height": 720,
"night_device_fps": 25,
"night_software_enhance": true
}Requirements
- Python 3.10+
- OpenCV with V4L2 support
- A USB webcam (
/dev/video0by default) - Optional: Telegram bot token, SMTP credentials
Notes
- If you experience USB camera resets on boards like the Odroid XU4, disable USB autosuspend (
usbcore.autosuspend=-1) or use a powered USB hub. - The dual-camera feature keeps only one camera open at a time to avoid saturating the USB bus.
What's Changed
- CheapSecurity 1.0.0 by @gmrandazzo in #3
New Contributors
- @gmrandazzo made their first contribution in #3
Full Changelog: https://github.com/gmrandazzo/CheapSecurity/commits/v1.0.0