MQTT
Station Signals
Real-time data from stations is collected over MQTT, an open-source, lightweight messaging protocol designed for IoT.
The specific types of data accepted by Busroot are called 'Signals'. The following signals are currently supported:
production_count_good
production_count (alias)
The number of new (good) production units created.
production_count_bad
The number of new bad/reject production units created.
line_speed
An arbitrary value indicating the control speed of the station.
productive
A binary value indicating if the station is currently engaged in production.
electrical_kwh
The total cumulative amount of kWh consumed. This is typically from a meter reading.
electrical_kwh_interval
The amount of kWh consumed since the last data point.
rssi
The signal strength of the IoT device.
These signals are accepted as a JSON string published to an MQTT topic for the station. e.g.
MQTT Topic: busroot/v2/[Account ID]/signals/[Station Code]
Payload:
{
"production_count_good": 12.4,
"electrical_kwh": 15774.45
}
MQTT Access
In order for IoT device to communicate with the Busroot MQTT broker, they must use valid credentials consisting of a Device ID
and Access Token
.
The Device ID
is made up of the account ID followed by a /
and a unique value for that device.
When using these credentials with the MQTT broker, a username, password and client ID must be provided as follows:
Username
Device ID
Password
Access Token
Client ID
Device ID
+ /
+ [optional string]
After MQTT authentication, the device is connected but can only publish and subscribe to specific topics:
Busroot Signals Topic: busroot/v1/
+ Device ID
Raw Data Topic: busroot/v1/dau/
+ Device ID
Data published to the Busroot Signals topic will be processed directly by Busroot according to the signals mentioned at the top of this page.
Data published to the topic starting with busroot/v1/dau/
will not be processed by Busroot. The purpose of this topic is to allow raw data to be sent from the device and processed in a second stage (e.g. using Node-RED) which will then re-publish that data to the Busroot Signals topic.
Registering Devices

New Device
The 'Add New' button will create a new device with a unique Device ID
and Access Token
.
Removing Access for a Device
When it is required that a device no longer be able to send data to Busroot, the device ID should be deleted from Busroot. This will cause that device to be immediately disconnected from the MQTT broker.
Last updated