Device contract for a telemetry-only room thermal sensor. Defines SmartClaws topics, payload fields, and master-agent interpretation rules.
编程
Novapm Sds011
试用Device contract for a NovaPM/SDS011 air-quality bridge. Defines SmartClaws telemetry topics, payloads, local serial behavior, and safety rules.
它能做什么
Device contract for a NovaPM/SDS011 air-quality bridge. Defines SmartClaws telemetry topics, payloads, local serial behavior, and safety rules.
技能文档
NovaPM SDS011 Device Contract
This is a device contract skill. It does not install SmartClaws or define an
agent role. Use it with smartclaws-bridge-agent for publishing telemetry and
with smartclaws-master-agent for reading/auditing air-quality data.
Device Identity
- Device family: NovaPM using the SDS011 particulate matter sensor.
- Capability: read PM2.5 and PM10 concentrations.
- Local protocol: SDS011 serial protocol over USB serial.
- Default port in existing setups:
/dev/ttyUSB0. - Default warmup in existing setups:
30seconds; never below15seconds. - Actuation: none. This is telemetry-only hardware.
SmartClaws Channels
The setup must provide channel addresses in SMARTCLAWS.md.
- Outgoing telemetry channel: required.
- Incoming command channel: must be null/absent. SDS011 receives no SmartClaws commands.
Do not invent channel addresses.
Telemetry Topic
Topic: telemetry.air_quality
Payload:
{
"pm25_ug_m3": 12.3,
"pm10_ug_m3": 28.1,
"sensor": "sds011",
"port": "/dev/ttyUSB0",
"ts": ""
}
Fields:
pm25_ug_m3: PM2.5 concentration in micrograms per cubic meter.pm10_ug_m3: PM10 concentration in micrograms per cubic meter.sensor: should besds011for this contract.port: serial port used for the reading.ts: ISO 8601 UTC timestamp for the reading.
Command Topics
None. This device is read-only.
If a setup provides an incoming channel or command topic for this device, treat it as a setup error unless an operator explicitly changes the device contract.
Bridge-Agent Use
A bridge should:
- Wake the sensor.
- Wait the configured warmup duration.
- Read one valid measurement frame.
- Put the sensor back to sleep.
- Validate the values.
- Publish
telemetry.air_qualityto the outgoing channel withsmartclaws_publish. - Log failures instead of publishing bad data.
The bridge should preserve sensor life. Avoid unnecessarily short polling intervals; existing setup guidance used a 5-minute cadence with a 30-second warmup.
Master-Agent Use
A master may:
- Read
telemetry.air_qualityfrom the outgoing channel. - Answer air-quality/status questions.
- Use readings as context for broader decisions.
- Log threshold or stale-data decisions to its own decision channel.
A master must not publish commands to this device.
Sanity Rules
Reject a reading and publish no telemetry when:
pm25_ug_m3 < 0orpm25_ug_m3 > 1000.pm10_ug_m3 < 0orpm10_ug_m3 > 1000.pm25_ug_m3 > pm10_ug_m3, which is physically inconsistent for this sensor.- The sensor returns no valid frame after warmup.
Do not repair, smooth, or invent readings. Bad data is worse than no data.
Human Interpretation
When reporting readings to a person, include raw values and a plain label.
The bands and thresholds below are non-authoritative display reference (drawn
from common EU/EPA/WHO levels) — they help you label a reading, not decide policy.
Actual alert thresholds and what to do about them are the owner's call and
belong in AGENTS.md, not this device contract. Reference only:
- PM2.5 high (EU/EPA alert ≈
35µg/m³; WHO 24h guideline is15). - PM10 high (EU/EPA alert ≈
50µg/m³; WHO 24h guideline is45).
Useful context labels:
- Good: PM2.5
0-5, PM100-20. - Moderate: PM2.5
5-15, PM1020-45. - Elevated: PM2.5
15-35, PM1045-50. - High: PM2.5
>35, PM10>50.
Always check the timestamp. If the latest reading is older than the expected publish cadence, say the data may be stale.
相关技能
Run one SmartClaws bridge cycle for a single device: read the local hardware/API, validate against the device contract, and publish telemetry on-chain — and, in a command-enabled mode, apply on-chain commands. Trigger when asked to read the sensor and publish, run a telemetry/bridge cycle, or apply incoming device commands. Needs the SmartClaws plugin and one device contract skill.
Device contract for Shelly Plug S Gen3. Defines SmartClaws topics, payloads, local Shelly RPC methods, and safety rules for bridge and master agents.
SmartPi 设备绑定、扫码、设备管理与连接故障排查。Use when the user mentions binding SmartPi, SmartPi QR code, 9002, SmartPi connection failure, listing SmartPi devices, or removi...
Run one SmartClaws master control cycle: read device telemetry on-chain, decide under the owner's guidelines, command a device only when allowed, and log the decision on-chain. Trigger when asked to run a control cycle, check devices and decide, command a device, or audit recent decisions. Needs the SmartClaws plugin and a device contract skill per device.
Entry point for SmartClaws on OpenClaw: teaches what SmartClaws is (publish/read IoT telemetry on the SKALE blockchain), jobs and plugin modes, and how its plugin tools work. When the owner wants to start, set up, onboard, or when this agent cannot yet say it has everything as its job, read SETUP.md and iterate until it can. For how messages, roles, and encryption work in depth, read MECHANICS.md.