MQTT

From Yombo
Jump to: navigation, search

Yombo MQTT Broker

Message Queuing Telemetry Transport


MQTT is a light weight messaging protocol used for the Internet of Things (IoT). See MQTT feature for full description and usage.

Overview

Applications can communicate with the gateways to send device commands as well as listen to system events to get a live stream of device status updates and system state changes. The gateways communicate with each other using MQTT to sync these data items:

  • Atom information
  • Device status changes
  • Device commands (a command for a device has been issues/processed/completed)
  • Gateways coming online and going offline
  • System state changes (sunrise/sunset)

MQTT Topics

All MQTT topics use the following format (by example): ybo_gw/{from_id}/{to_gateway_id}/{lib}/{source_name} Broken down this translate to:

  • 'ybo_gw' - all messages start with 'ybo_gw' to designate a message for or from a Yombo gateway instance.
  • {from_id} - The ID of the gateway or software client sending the message. For software that is not a gateway, use 'xyz_' followed by a random 10 character string. This string should be persistent for each client.
  • {to_id} - The ID of the gateway or software client that the message is intended for. 'all' is used for broadcasts.
  • {lib} - To denote the source type of the message. 'lib' is used by gateway libraries, while modules should use 'module'.
  • {source_name} - To note the name of the library or module that message was sent from. For example, 'device_status' would be send by the device library.

Table of contents

Below is a breakdown of the MQTT topics and their message format.

This page was last edited on 12 June 2018.