mqopen
Hardware
Backbone
Processing
Development
mqopen
Hardware
Backbone
Processing
Development
This page describes MQTT topic structure. Topics are divided into data topics and service topics.
Data topics represents main data exchange in network. They main purpose is deliver data payload to other subscribers.
There are two data topics.
<location>/<quantity>
- Main device sensor measurement.<location>/<quantity>/error
- Error code indicating sensor read failure. This is used to simplify parsing error codes at other sensors which subscribes to some topic.Where:
<location>
- Location in designated area (example: living-room
).<quantity>
- Measurement physical quantity (example: temperature
).Purpose of service topics is provide metadata about network infrastructure and allow its management and health monitoring. Service messages are sent only if device goes online. All service topics should set retain flag to allow any future subscriber to obtain this data.
Service topics should start with i
topic path.
There are several service topics. New topics can be added in future:
i/<devname>/hwversion
- HW version.i/<devname>/fwversion
- FW version.i/<devname>/presence
- Presence message.online
- Device is online.offline
- Device is offline. This message is sent by the broker using last will message.i/<devname>/arch
- Device architecture.avr
- AVR based devices.esp
- ESP based devices.i/<devname>/variant
- Procesor model.atmega328p
- ATMega 328p chip.esp8266
- ESP8266 chip.i/<devname>/link
- Link information.ethernet
- Ethernet connection.wifi
- Wi-Fi connection.nrf24
- NRF24 wireless connection.i/<devname>/voltage
- Input voltage. For battery powered devices.i/<devname>/ip
- Device IP address. Make network debugging easier.i/<devname>/class
- Device class.sensor
- Sensor device.reactor
- Reactor device.i/<devname>/sensor
- Connected sensor. For sensor
class devices only.i/<devname>/sync
- Sensor data transmition synchronization. For sensor
class devices only.sync
- Synchronous sensor.async
- Asynchronous sensor.i/<devname>/reactor
- Reactor type. For reactor
class devices only.pinstate
Where:
<devname>
- Device name.