← 返回 Skills 市场
maverick-2

Living Room Smoke Detector

作者 Igor · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
516
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install living-room-smoke-detector
功能描述
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 broadc...
使用说明 (SKILL.md)

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

  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": {
    "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)
  • say and ffmpeg (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

Use both for complete coverage: air monitor for data logging, smoke detector for focused alerting.

安全使用建议
This skill appears to do what it claims: poll your local Dirigera hub and play an alert on macOS. Before installing or running it, consider the following: 1) The script reads a local token file (~/.openclaw/workspace/.dirigera_token) — ensure that file contains only the expected Dirigera token and has restrictive file permissions (chmod 600) so other users can't read it. 2) The script disables TLS certificate validation for the hub connection (accepts self-signed certs) — on untrusted networks this raises a MITM risk; prefer to configure it to trust the hub certificate or run only on a trusted LAN. 3) Paths in the SKILL.md (cron entry, /Users/macmini, /opt/homebrew/bin/python3) are user-specific — update them for your system. 4) The alert loop will play sound continuously until readings clear (and may be loud); ensure this behavior is acceptable and that ffmpeg/say/afplay are installed. 5) If you need portability or stricter security, modify the script to accept the hub IP and token path via command-line args or environment variables and re-enable certificate validation. Finally, test manually (run the script interactively) before adding to crontab so you can verify behavior and that it uses the correct token and hub.
功能分析
Type: OpenClaw Skill Name: living-room-smoke-detector Version: 1.0.0 The skill is classified as suspicious due to a significant security vulnerability in `scripts/smoke_detector.py`. The script disables SSL certificate verification (`ssl.CERT_NONE` and `ssl_context.check_hostname = False`) when communicating with the local Dirigera hub. While this might be a common workaround for local IoT devices with self-signed certificates, it creates a Man-in-the-Middle (MITM) vulnerability on the local network, allowing an attacker to intercept or alter communication with the hub. Although this is a vulnerability rather than direct malicious intent (e.g., no evidence of data exfiltration to external endpoints or unauthorized remote control), it represents a meaningful security risk.
能力评估
Purpose & Capability
Name/description (living-room smoke detector) match the code and SKILL.md: the script polls a Dirigera hub, checks PM2.5/CO2 thresholds, saves a minimal local state file, and plays alerts on macOS. No unrelated services, credentials, or binaries are requested.
Instruction Scope
SKILL.md and the script both direct the agent/user to read a local token file (~/.openclaw/workspace/.dirigera_token), contact a local hub at 192.168.1.100:8443, write a small state file under the skill data directory, and optionally copy an alert mp3 from another skill — all are within the stated purpose. Notes: the cron example and file paths are heavily Mac-/user-specific (e.g., /Users/macmini and /opt/homebrew/bin/python3) and will need adjustment. The continuous alert loop behavior (repeating every 5s until cleared) is explicit and may be noisy but is intentional.
Install Mechanism
No install spec (instruction-only + a single script) — lowest-risk distribution model. Nothing is downloaded or extracted at install time.
Credentials
No environment variables are requested; the script reads a single local token file and uses a hard-coded local hub IP. That token file requirement is declared in SKILL.md (so the access is proportional), but the script disables SSL certificate checks for the hub (ssl_context.verify_mode = CERT_NONE), which weakens TLS protections and could allow MITM on untrusted networks. The hard-coded IP and token path reduce portability and should be configurable by the user.
Persistence & Privilege
Skill does not request always:true, does not modify other skills or system-wide configuration, and only writes its own small state file under the skill directory. Cron installation is suggested but is a user action (not automatic).
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install living-room-smoke-detector
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /living-room-smoke-detector 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release - smoke detection with continuous Mac speaker alerts
元数据
Slug living-room-smoke-detector
版本 1.0.0
许可证
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Living Room Smoke Detector 是什么?

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 broadc... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 516 次。

如何安装 Living Room Smoke Detector?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install living-room-smoke-detector」即可一键安装,无需额外配置。

Living Room Smoke Detector 是免费的吗?

是的,Living Room Smoke Detector 完全免费(开源免费),可自由下载、安装和使用。

Living Room Smoke Detector 支持哪些平台?

Living Room Smoke Detector 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Living Room Smoke Detector?

由 Igor(@maverick-2)开发并维护,当前版本 v1.0.0。

💬 留言讨论