When my home’s gas heater throws a fault, a tiny red LED lights up — and nothing else happens until I press the reset button. Since this can happen while I’m away, I wanted a small system that notices that red light, notifies me, and (eventually) presses the button automatically.
Enter RedWatch — a simple, Python-based monitoring setup that uses a USB webcam and a Raspberry Pi 3 Model B to detect that LED in real time.
💡 Concept
The idea is straightforward:
- A USB camera points at the heater’s control panel.
- OpenCV analyzes each frame for red pixels in a given HSV color range.
- When the red LED appears, the Pi:
- logs the event,
- takes a snapshot,
- sends an email or push notification to my phone.
Later I’ll add a small servo actuator to physically press the reset/acknowledge button once I confirm the alarm remotely.
🧠 Tech Overview
- Hardware: Raspberry Pi 3 Model B, any USB webcam, stable 5 V power.
- Software: Python 3, OpenCV, NumPy, tmux, and systemd.
- Notifications: SMTP (email) or ntfy.sh push messages.
- Display: A dedicated fullscreen dashboard on
tty8
showing
current IP addresses and live logs.
The entire setup runs automatically on boot — no desktop required.
🧰 Implementation Highlights
- The Python script continuously monitors for red hue clusters (two HSV bands to cover both ends of the red spectrum).
- A debounce timer filters out flicker or reflections.
- Snapshots and timestamps are stored in
/home/heater/redwatch/capture/
. - All messages go into
redwatch.log
. - Two systemd services manage startup:
redwatch.service
runs the OpenCV monitor.redwatch-dashboard.service
launches atmux
session on TTY 8 with:- a dynamic banner (
hostname
, timestamp, IP addresses), - live log streaming via
journalctl -fu redwatch.service
.
- a dynamic banner (
You can return to your normal KDE desktop with Ctrl + Alt + F2,
and back to the RedWatch dashboard with Ctrl + Alt + F8.
🧩 Typical Use Case
Whenever the heater locks out, the LED lights up — RedWatch detects it within a second or two, sends me an email like:
“Red light detected on heater – 2025-10-16 15:42:21”
…and saves a photo of the panel.
From there I can confirm remotely and, in the next phase, trigger a small stepper or servo motor wired to the heater’s reset switch.
🚀 Results
- Reliable detection even under variable lighting.
- No false alarms after HSV tuning.
- Email alerts arrive in < 2 s.
- Dashboard visible on HDMI monitor for local diagnostics.
It’s a surprisingly robust little IoT maintenance sentinel — and the groundwork for a fully automated recovery loop.
🔧 Next Steps
- Add servo/solenoid actuator to press the reset button.
- Optional: MQTT integration for home-automation systems (e.g. Home Assistant).
- Log heater uptime, restart counts, and runtime temperatures.
🏁 TL;DR
RedWatch is a Raspberry Pi-based vision sensor that watches a heater’s fault LED, logs it, alerts you, and can later clear the error automatically.
Source code and setup guide are available in the project’s README (includes full Python, systemd units, and dashboard scripts).