Adventures in CheapML - GarageCam
With Scrypted / Thingino up and stable, the next goal is to replace my janky garage door sensor with a camera-based sensor. With some luck, I can extend this to every camera in the house cheaper and more accurately than Frigate, but let's not get ahead of ourselves.
-
What I have:
- Wyze Cam v3
- Scrypted
- Thingino
- HomeKit
- RPi 4 that isn't melting
-
What I need:
- A way to detect when the garage door is open or closed
- A way to update MQTT with the state of the garage door
- A way to update MQTT with the state of the car
So far:
The initial Python script I "vibe coded" was, to put it mildly, very hacky. It used the ONVIF Snapshot protocol to capture a frame every 60 seconds from the camera. While it technically worked with opencv-python and paho-mqtt for a few days, it was brittle and prone to memory leaks on the RPi 4.
The real lesson here was in the data handling—capturing snapshots is easy, but making a reliable sensor out of them required a more robust architecture. This prototype was eventually rewritten to use a more stable event-driven model, which I'll cover in the follow-up post.
