HARDWARIO Host Tool¶
This multi-platform Python tool is a “Swiss knife” to control the radio and nodes.
Install & Upgrade¶
sudo pip3 install --upgrade --no-cache-dir bch
Usage examples¶
Subscribe to all MQTT topics (#)¶
bch sub
Subscribe to MQTT broker running on hub.local
host¶
bch -H hub.local sub
Subscribe to specific topic¶
bch sub node/kitchen/#
Publish MQTT message on MQTT broker running localhost¶
bch pub node/kitchen/thermometer/0:0/temperature 21.70
Start pairing mode¶
1 2 | bch pairing --start
bch -H hub.local pairing --start
|
Stop pairing mode¶
1 2 | bch pairing --stop
bch -H hub.local pairing --stop
|
Rename node¶
1 2 | bch node rename generic-node:0 kitchen
bch node rename 836d19831c4a garden
|
List paired nodes¶
bch node list
Remove node. By name or ID¶
1 2 | bch node remove garden
bch node remove 836d19831c4a
|
bch –help¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | Usage: bch [OPTIONS] COMMAND [ARGS]...
Options:
--gateway TEXT Gateway name [default: usb-dongle].
-H, --mqtt-host TEXT MQTT host to connect to [default: 127.0.0.1].
-P, --mqtt-port INTEGER RANGE MQTT port to connect to [default: 1883].
--mqtt-username TEXT MQTT username.
--mqtt-password TEXT MQTT password.
--mqtt-cafile PATH MQTT cafile.
--mqtt-certfile PATH MQTT certfile.
--mqtt-keyfile PATH MQTT keyfile.
-v, --verbosity LVL Either CRITICAL, ERROR, WARNING, INFO or
DEBUG
--version Show the version and exit.
-h, --help Show this message and exit.
Commands:
gw Gateway
node
pairing
pub
sub Subscribe topic.
|