Simple smoke/fire detector for living room. Queries Dirigera air sensor every 5 minutes, detects dangerous PM2.5 over 250 or CO2 over 2000 levels, and broadcasts emergency alert on Mac speaker continuously until air quality normalizes. Acts as backup to regular smoke alarms.
A simple, focused smoke and fire detection system that monitors the living room ALPSTUGA air sensor via the Dirigera hub.
If you already have the alert sound from the air monitor skill:
cp ~/.openclaw/workspace/skills/living-room-air-monitor/data/smoke_alert_message.mp3 \
~/.openclaw/workspace/skills/living-room-smoke-detector/data/alert.mp3
Otherwise it will auto-generate on first run.
Add to crontab to check every 5 minutes:
*/5 * * * * /opt/homebrew/bin/python3 /Users/macmini/.openclaw/workspace/skills/living-room-smoke-detector/scripts/smoke_detector.py >> /tmp/smoke_detector.log 2>&1
python3 ~/.openclaw/workspace/skills/living-room-smoke-detector/scripts/smoke_detector.py
# Latest reading
cat ~/.openclaw/workspace/skills/living-room-smoke-detector/data/detector_state.json
# Log
tail -f /tmp/smoke_detector.log
data/detector_state.json:
{
"latest_reading": {
"pm25": 3,
"co2": 525,
"time": "2026-02-25T20:30:00"
},
"alert_active": false,
"last_check": "2026-02-25T20:30:00"
}
When danger is detected:
| File | Purpose |
|---|---|
scripts/smoke_detector.py | Main detection script |
data/alert.mp3 | Alert sound file |
data/detector_state.json | Latest reading and status |
~/.openclaw/workspace/.dirigera_tokenafplay (built-in)say and ffmpeg (for alert generation)| Feature | Air Monitor | Smoke Detector |
|---|---|---|
| Data storage | Full SQLite database | Latest reading only |
| Query source | Database | Dirigera directly |
| Frequency | Every 2 min | Every 5 min |
| Purpose | History + charts | Immediate alerting |
| Alert | Single play | Continuous loop |
| Complexity | Multi-feature | Single-purpose |
Use both for complete coverage: air monitor for data logging, smoke detector for focused alerting.