MQTT Topics¶
Generic Node Topics¶
A detailed list of topics is in README in GitHub repository bcf-generic-node.
Firmware¶
Explanation |
MQTT Topic |
Payload |
---|---|---|
Firmware info |
node/{id}/info |
|
Battery¶
Explanation |
MQTT Topic |
Payload |
---|---|---|
Battery Module voltage |
node/{id}/battery/standard/voltage |
3.12 |
Mini Battery Module voltage |
node/{id}/battery/mini/voltage |
6.21 |
Sensors¶
Explanation |
MQTT Topic |
---|---|
Illuminance |
node/{id}/lux-meter/0:0/illuminance |
Relative humidity |
node/{id}/hygrometer/0:2/relative-humidity |
Pressure |
node/{id}/barometer/0:0/pressure |
Altitude |
node/{id}/barometer/0:0/altitude |
Temperature (Core Module) |
node/{id}/thermometer/0:1/temperature |
Temperature (Climate Module, Tag) |
node/{id}/thermometer/0:0/temperature |
CO2 meter |
node/{id}/co2-meter/-/concentration |
Note
Values like 0:0
or 0:2
in topics above describe on which I2C bus the sensor is and which revision the sensor is.
First value before :
descibes I2C0
(default) or I2C1
bus. The second number after :
describes the revision of the sensor.
These numbers are fixed and never changes. This corresponds with firmware SDK values.
Relays¶
Important
Only allowed values for payload are true/false
Explanation |
MQTT Topic |
Response |
---|---|---|
Power Module relay set |
node/{id}/relay/-/state/set |
|
Power Module relay get |
node/{id}/relay/-/state/get |
|
Relay Module |
node/{id}/relay/0:0/state/set |
|
Relay Module get |
node/{id}/relay/0:0/state/get |
|
Relay Module pulse |
node/{id}/relay/0:0/pulse/set |
|
Note
You can use 2 relay modules, if you do that you will just change the 0:0
to 0:1
LED¶
Explanation |
MQTT Topic |
---|---|
LED on the Core Module |
|
Button¶
Explanation |
MQTT Topic |
---|---|
Button press |
|
PIR¶
Explanation |
MQTT Topic |
---|---|
Object movement detection |
|
LED Strip¶
Explanation |
MQTT Topic / explanation |
Example |
---|---|---|
Set brightness 0-100% |
|
|
Set color “#250000” or RGBW “#250000(80)” |
|
|
Set compound |
|
|
Set effect |
|
|
Thermometer effect |
|
|
LCD Module¶
Explanation |
MQTT Topic |
Response |
---|---|---|
Left button |
node/{id}/push-button/lcd:left/event-count |
|
Right button |
node/{id}/push-button/lcd:right/event-count |
|
Clear screen |
node/{id}/lcd/-/screen/clear |
|
Write text |
node/{id}/lcd/-/text/set |
|
Gateway Topics¶
A detailed list of topics is in README in GitHub repository bch-gateway
Note
Replace {id}
with id or name of gateway, use “all” for request to all.
Also to see the MQTT responses open the Node-RED debug tab or run this console command mosquitto_sub -t gateway/#
.
Pairing¶
Explanation |
MQTT Topic |
Response |
---|---|---|
Start |
|
|
Stop |
|
|
Paired nodes¶
Explanation |
MQTT Topic |
Response |
---|---|---|
List |
|
|
Purge all nodes |
|
|
Manual add/remove¶
Explanation |
MQTT Topic |
Response |
---|---|---|
Add |
|
|
Remove |
|
|
Aliases¶
Explanation |
MQTT Topic |
---|---|
set |
|
remove |
|
remove alias |
|
Scan wireless¶
Explanation |
MQTT Topic |
Response |
---|---|---|
Start |
|
|
Stop |
|
|
Hint
All these commands are build into the Playground and you can do all this in the Devices Tab.
Mosquitto command examples¶
Send to all connected gateways:
mosquitto_pub -t gateway/all/pairing-mode/start -n
mosquitto_pub -t gateway/all/pairing-mode/stop -n
mosquitto_pub -t gateway/all/nodes/get -n
mosquitto_pub -t gateway/all/nodes/purge -n
Gateway named “usb-dongle”:
mosquitto_pub -t gateway/usb-dongle/pairing-mode/start -n
mosquitto_pub -t gateway/usb-dongle/pairing-mode/stop -n
Gateway named “core-module”:
mosquitto_pub -t gateway/core-module/pairing-mode/start -n
mosquitto_pub -t gateway/core-module/pairing-mode/stop -n