User Tools

Site Tools


topics

This is an old revision of the document!


MQTT topics

This page describes MQTT topic structure. Topics are divided into data topics and service topics.

Data 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.

Where:

  • <location> - Location in designated area (example: living-room).
  • <quantity> - Measurement physical quantity (example: temperature).

Service topics

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 LAN 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.

Where:

  • <devname> - Device name.
topics.1462797840.txt.gz · Last modified: 2016/05/09 12:44 by buben