The gateway protocol

Updated

The contract between a gateway and Synacl is public and machine-readable: synacl.com/protocol. It is what the Synacl ESP32 firmware speaks, and what you implement to bring your own gateway — see connect your own gateway.

The lifecycle in five lines

  1. Connect over TLS with the gateway's credentials and a Last Will on …/status = {"online":false}.
  2. Publish …/status = {"online":true,"ts":…} retained, every 60 s.
  3. Publish a capability report on …/firmware/response.
  4. Publish …/config/request = {"hash":…}; receive the device list on …/config/push; re-send the request with the new hash.
  5. Publish readings on …/devices/{deviceId}/data and presence on …/devices/{deviceId}/status.

… is the gateway's topic prefix, tenants/{tenantId}/sources/gateway/{chipId}, shown in its Connection Info.

What the page covers

Machine-readable: https://synacl.com/protocol/v1/index.json lists the topic prefix, the topic table and the URL of every schema.

A device that connects on its own, without a gateway, uses the shorter tenants/{tenantId}/devices/{deviceId}/… topics with the same message shapes — see connect a direct MQTT device and the actuator command contract.