Interact with IoT devices via the jettyd platform. Read sensor data, send commands, manage rules, and list devices.
Use this skill when the user asks about:
Reads API key from ~/.openclaw/openclaw.json:
{
"skills": {
"entries": {
"jettyd": {
"apiKey": "tk_xxxx",
"baseUrl": "https://api.jettyd.com/v1"
}
}
}
}
Or from env: JETTYD_API_KEY
All operations go through scripts/jettyd-cli.js.
node skills/jettyd/scripts/jettyd-cli.js <command> [args]
| Command | Description |
|---|---|
| --------- | ------------- |
list | List all devices with status |
device | Device detail + all sensor readings |
telemetry | Historical readings (1h/6h/24h/7d) |
command | Send command to device |
push_config | Push JettyScript rules |
webhooks | List webhook subscriptions |
create_webhook | Create webhook |
"What devices do I have?"
→ node .../jettyd-cli.js list
"What's the temperature on my greenhouse sensor?"
→ node .../jettyd-cli.js list to find device ID, then device
"Turn on the relay on device abc123"
→ node .../jettyd-cli.js command abc123 relay.on
"Blink the LED 3 times"
→ node .../jettyd-cli.js command abc123 led.blink '{"count":3,"interval_ms":300}'
"Alert me if temperature goes above 30°C"
→ Compose JettyScript JSON and run push_config
"Show me temperature history for the last 24 hours"
→ node .../jettyd-cli.js telemetry abc123 temperature 24h
Use push_config to deploy rules to a device. Rules run on the jettyd cloud and fire webhooks / alerts when conditions are met.
Temperature alert example — alert when temperature exceeds 30 °C:
{
"rules": [
{
"id": "temp-high-alert",
"trigger": {
"type": "threshold",
"metric": "temperature",
"operator": ">",
"value": 30
},
"cooldown_seconds": 300,
"actions": [
{
"type": "alert",
"severity": "warning",
"message": "Temperature is {{temperature}}°C — above threshold of 30°C"
}
]
}
]
}
Push it:
node skills/jettyd/scripts/jettyd-cli.js push_config <device-id> '{"rules":[...]}'
# or from a file:
node skills/jettyd/scripts/jettyd-cli.js push_config <device-id> ./rules.json
Supported trigger operators: > < >= <= == !=
Supported action types: alert webhook command
共 1 个版本