iot-protocols
IoT protocols: Zigbee (mesh), Z-Wave (home), LoRaWAN (long-range), CoAP (lightweight), Matter (interoperable), Thread (I
What this skill does
# iot-protocols
## Purpose
This skill provides tools for interacting with IoT protocols like Zigbee, Z-Wave, LoRaWAN, CoAP, Matter, and Thread, enabling device connectivity, data exchange, and network management in IoT applications.
## When to Use
Use this skill when building IoT systems requiring low-power, mesh networking (e.g., Zigbee for smart homes), long-range communication (e.g., LoRaWAN for sensors in remote areas), or lightweight protocols (e.g., CoAP for constrained devices). Apply it in scenarios like smart home automation, industrial IoT monitoring, or interoperable ecosystems with Matter.
## Key Capabilities
- Establish connections to devices using specific protocols: e.g., Zigbee for mesh networks or Thread for IPv6-based low-power wireless.
- Send/receive data payloads: e.g., query sensor data via CoAP or control Z-Wave devices.
- Configure network settings: e.g., set up LoRaWAN gateways or Matter fabric bridges.
- Handle protocol-specific features: e.g., Zigbee's binding for device pairing or LoRaWAN's adaptive data rate.
- Interoperate across protocols: e.g., bridge Matter devices with Thread networks for seamless integration.
## Usage Patterns
To accomplish tasks, always authenticate first by setting the environment variable `export IOT_API_KEY=your_api_key`. Start with the `openclaw iot init` command to initialize the session, then use subcommands for protocol-specific actions. For example, to connect to a device, specify the protocol and device ID; for data operations, use query flags. Always include error checking in scripts. Pattern: `openclaw iot <subcommand> --protocol <protocol> --device-id <id>`. Use JSON config files for complex setups, e.g., create a file named `config.json` with `{ "protocol": "zigbee", "networkKey": "hex_key" }` and pass it via `--config config.json`.
## Common Commands/API
Use the OpenClaw CLI for quick interactions or REST APIs for programmatic access. Authentication requires the `$IOT_API_KEY` header.
- CLI Command: List protocols
`openclaw iot list --protocol zigbee`
This outputs available Zigbee devices; add `--verbose` for detailed network info.
- CLI Command: Connect to a device
`openclaw iot connect --protocol lorawan --device-id 456 --region EU868`
Use this to establish a LoRaWAN connection; specify region flag for frequency bands.
- API Endpoint: Send data via CoAP
POST /api/iot/send
Body: `{ "protocol": "coap", "endpoint": "/sensors/temp", "payload": "{\"temp\": 25}" }`
Include header: `Authorization: Bearer $IOT_API_KEY`
- API Endpoint: Query Z-Wave status
GET /api/iot/status?protocol=z-wave&device-id=789
Response: JSON object like `{ "status": "online", "nodes": 5 }`; handle with a simple fetch in code:
`fetch('/api/iot/status', { headers: { 'Authorization': process.env.IOT_API_KEY } }) .then(response => response.json())`
- Config Format: For Matter integration, use a YAML file:
`matter-config.yaml: protocol: matter, fabricId: 12345, nodeId: 678`
Load it with: `openclaw iot load-config --file matter-config.yaml`
## Integration Notes
Integrate this skill with other OpenClaw tools by referencing the `iot` cluster in your workflow. For external systems, export `$IOT_API_KEY` and use it in API calls. To combine with a database skill, pipe output: e.g., `openclaw iot get --protocol coap | openclaw db insert`. For Thread integration, ensure IPv6 compatibility in your network stack. Example: In a Node.js app, import OpenClaw SDK and call:
`const openclaw = require('openclaw-sdk'); openclaw.iot.connect({ protocol: 'thread', deviceId: '101' });`
Always validate inputs; for Zigbee, check mesh topology before connecting.
## Error Handling
Handle errors by checking CLI exit codes or API response status. Common errors include authentication failures (HTTP 401) or protocol mismatches (e.g., invalid Zigbee network key). Use try-catch in code:
`try { await openclaw.iot.connect({ protocol: 'z-wave', deviceId: '202' }); } catch (error) { console.error(error.message); // e.g., "Device not found" }`
For CLI, parse output: if `openclaw iot connect` returns non-zero, check stderr for messages like "Protocol not supported". Retry transient errors (e.g., LoRaWAN signal loss) with exponential backoff.
## Concrete Usage Examples
1. **Set up a Zigbee mesh network:** First, export your key: `export IOT_API_KEY=abc123`. Then, initialize: `openclaw iot init --protocol zigbee`. Connect devices: `openclaw iot connect --protocol zigbee --device-id 303 --pan-id 0x1a62`. Send a command to toggle a light: `openclaw iot send --protocol zigbee --endpoint /lights/1 --payload '{"state": "on"}'`. This establishes a mesh for home automation.
2. **Query data from a LoRaWAN sensor:** Authenticate via env var, then: `openclaw iot connect --protocol lorawan --device-id 404 --app-eui 70B3D57EF0000000`. Retrieve data: `openclaw iot get --protocol lorawan --payload-type temp`. In code:
`openclaw.iot.get({ protocol: 'lorawan', deviceId: '404' }).then(data => console.log(data));`
This is useful for monitoring remote environmental sensors.
## Graph Relationships
- Related to: iot-cluster (for broader IoT management), networking-skills (for protocol-agnostic networking).
- Depends on: security-skills (for encryption in protocols like Zigbee).
- Connected via: iot tag, allowing cross-skill queries in OpenClaw's graph.
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.