Living Room Smoke Detector
Simple smoke/fire detector for living room.
- Rating
- 4.5 (28 reviews)
- Downloads
- 43,558 downloads
- Version
- 1.0.0
Overview
Simple smoke/fire detector for living room.
✨Key Features
Queries Dirigera directly every 5 minutes (not from database)
Simple state only - keeps just the latest reading, no history
Detects danger: PM2.5 > 250 µg/m³ OR CO2 > 2000 ppm
Continuous alert - plays "Attention! Abnormal smoke level detected" on Mac speaker
Loops until cleared - keeps playing every 5 seconds until air quality normalizes
Backup smoke alarm - works alongside your regular smoke detector
Complete Documentation
View Source →
Living Room Smoke Detector
A simple, focused smoke and fire detection system that monitors the living room ALPSTUGA air sensor via the Dirigera hub.
What It Does
- Queries Dirigera directly every 5 minutes (not from database)
- Simple state only - keeps just the latest reading, no history
- Detects danger: PM2.5 > 250 µg/m³ OR CO2 > 2000 ppm
- Continuous alert - plays "Attention! Abnormal smoke level detected" on Mac speaker
- Loops until cleared - keeps playing every 5 seconds until air quality normalizes
- Backup smoke alarm - works alongside your regular smoke detector
Setup
1. Copy Alert Sound (optional)
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.
2. Cron Setup
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
Usage
Manual Check
python3 ~/.openclaw/workspace/skills/living-room-smoke-detector/scripts/smoke_detector.py
View Status
# Latest reading
cat ~/.openclaw/workspace/skills/living-room-smoke-detector/data/detector_state.json
# Log
tail -f /tmp/smoke_detector.log
How It Works
- Cron triggers every 5 minutes
- Fetches data directly from Dirigera hub
- Checks thresholds:
- PM2.5 > 250 µg/m³ (smoke particles)
- CO2 > 2000 ppm (combustion byproduct)
- If danger detected:
- Saves state (alert_active = true)
- Enters alert loop
- Plays alert sound every 5 seconds
- Re-checks sensor between plays
- Exits loop when air clears
- If normal: Updates state and exits
State File
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"
}
Alert Behavior
When danger is detected:
- Mac speaker plays: "Attention! Abnormal smoke level detected"
- Waits 5 seconds
- Checks sensor again
- Repeats until PM2.5 ≤ 250 AND CO2 ≤ 2000
- Press Ctrl+C to stop manually if needed
Files
| File | Purpose |
|---|---|
| scripts/smoke_detector.py | Main detection script |
| data/alert.mp3 | Alert sound file |
| data/detector_state.json | Latest reading and status |
Dependencies
- Python 3.x
- Dirigera hub access (192.168.1.100)
- Auth token at
~/.openclaw/workspace/.dirigera_token - macOS
afplay(built-in) sayandffmpeg(for alert generation)
Differences from Air Monitor Skill
| 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 |
Installation
openclaw install living-room-smoke-detector
💻Code Examples
~/.openclaw/workspace/skills/living-room-smoke-detector/data/alert.mp3
Otherwise it will auto-generate on first run.
### 2. Cron Setup
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
## Usage
### Manual Checktail -f /tmp/smoke_detector.log
## How It Works
1. **Cron triggers** every 5 minutes
2. **Fetches data** directly from Dirigera hub
3. **Checks thresholds:**
- PM2.5 > 250 µg/m³ (smoke particles)
- CO2 > 2000 ppm (combustion byproduct)
4. **If danger detected:**
- Saves state (alert_active = true)
- Enters alert loop
- Plays alert sound every 5 seconds
- Re-checks sensor between plays
- **Exits loop** when air clears
5. **If normal:** Updates state and exits
## State File
`data/detector_state.json`:# Latest reading
cat ~/.openclaw/workspace/skills/living-room-smoke-detector/data/detector_state.json
# Log
tail -f /tmp/smoke_detector.log{
"latest_reading": {
"pm25": 3,
"co2": 525,
"time": "2026-02-25T20:30:00"
},
"alert_active": false,
"last_check": "2026-02-25T20:30:00"
}Tags
Quick Info
Ready to Install?
Get started with this skill in seconds
Related Skills
4claw
4claw — a moderated imageboard for AI agents.
Aap Passport
Agent Attestation Protocol - The Reverse Turing Test.
Acestep Lyrics Transcription
Transcribe audio to timestamped lyrics using OpenAI Whisper or ElevenLabs Scribe API.
Adaptive Suite
A continuously adaptive skill suite that empowers Clawdbot.