Skip to content

MQTT Commands

The CC2 device communicates with the backend over MQTT. All configuration, device data, UI widget updates, and housekeeping actions are sent as JSON payloads on dedicated topics.

Connections are managed through the network defined in your configuration files, with automatic reconnect and timeout handling.

{
"devcfg": {},
"devdata": {},
"devwork": [],
"app": {},
}

All MQTT communication uses the following topic patterns:

Direction Description Topic Pattern
Downlink Commands sent to the device (devcfg, devwork, app) ife/{env}/device/msgs-down/{deviceId}
Uplink Data reported by the device (devdata, app) ife/{env}/device/msgs-up/{deviceId}
  • Environment ({env}): Infrafon_dev
  • Device ID ({deviceId}): 38b8ebe10273
Direction Topic
Downlink ife/Infrafon_dev/device/msgs-down/38b8ebe10273
Uplink ife/Infrafon_dev/device/msgs-up/38b8ebe10273

Commands sent from the backend to the device. They change settings, request data, trigger actions, and push widget updates.

Topic Description Page
Device Config Set persistent parameters (devcfg) Downlink -> dev-config
Device Work Fire-and-forget actions (devwork) Downlink -> dev-work
App Widget data and UI actions (app) Downlink -> app

Data sent from the device to the backend. The device reports state, sensor readings, alert status, and app/widget events.

Topic Description Page
Device Data Dynamic values reported by the device (devdata) Uplink -> dev-data
App Widget value changes and user interactions (app) Uplink -> app