Clawctl
Tutorial
6 min

OpenClaw IoT Event Schema: Design Your Device Gateway

A canonical event schema and webhook adapter pattern for connecting any device to OpenClaw. AI brain for your devices.

Clawctl Team

Product & Engineering

OpenClaw IoT Event Schema: Design Your Device Gateway

Once you accept that OpenClaw is event-driven, not device-driven, the next step is a consistent event schema. Here's a practical pattern for any device or platform.

Canonical Event Shape

A simple schema that works across Apple Watch, ESP32, Home Assistant, and MQTT:

{
  "event": "device.event_type",
  "source": "apple_watch | esp32 | home_assistant | mqtt",
  "device_id": "string",
  "timestamp": "ISO8601",
  "payload": {
    "temperature": 26.3,
    "humidity": 41,
    "battery": 78,
    "duration_min": 32,
    "avg_hr": 148
  }
}
  • event — Namespace + action (e.g. sensor.reading, workout.completed)
  • source — Where the event came from
  • device_id — Stable identifier for the device
  • payload — Flexible; device-specific fields

Webhook → Agent Adapter

Your OpenClaw agent receives the raw webhook and can:

  1. Validate — Check signature, timestamp, device_id
  2. Normalize — Map source-specific fields into a common structure
  3. Route — Different event types → different skills or workflows
  4. React — Log, correlate, call tools, make decisions

Example agent logic:

  • sensor.reading + temp > 30 → trigger cooling workflow
  • workout.completed + poor sleep yesterday → suggest rest
  • sensor.offline → open ticket, notify ops

Position: "AI Brain for Your Devices"

OpenClaw isn't the hub. It's the brain. Devices and platforms feed it events. It correlates, decides, and triggers actions. That's the value prop.

Next Steps

  • Define your event namespace (e.g. home.*, health.*, industrial.*)
  • Map each source (Shortcuts, Home Assistant, ESP32) to the schema
  • Add a single webhook endpoint in Clawctl
  • Let your agent handle the rest

Deploy with Clawctl

Clawctl provides a secure webhook URL, authentication, and audit logs. Egress allowlists ensure your agent only contacts approved services.


Deploy your device gateway.

Ready to deploy your OpenClaw securely?

Get your OpenClaw running in production with Clawctl's enterprise-grade security.