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

1bch pairing --start
2bch -H hub.local pairing --start

Stop pairing mode

1bch pairing --stop
2bch -H hub.local pairing --stop

Rename node

1bch node rename generic-node:0 kitchen
2bch node rename 836d19831c4a garden

List paired nodes

bch node list

Remove node. By name or ID

1bch node remove garden
2bch node remove 836d19831c4a

bch –help

 1Usage: bch [OPTIONS] COMMAND [ARGS]...
 2
 3Options:
 4--gateway TEXT                 Gateway name [default: usb-dongle].
 5-H, --mqtt-host TEXT           MQTT host to connect to [default: 127.0.0.1].
 6-P, --mqtt-port INTEGER RANGE  MQTT port to connect to [default: 1883].
 7--mqtt-username TEXT           MQTT username.
 8--mqtt-password TEXT           MQTT password.
 9--mqtt-cafile PATH             MQTT cafile.
10--mqtt-certfile PATH           MQTT certfile.
11--mqtt-keyfile PATH            MQTT keyfile.
12-v, --verbosity LVL            Either CRITICAL, ERROR, WARNING, INFO or
13                                DEBUG
14
15--version                      Show the version and exit.
16-h, --help                     Show this message and exit.
17
18Commands:
19gw       Gateway
20node
21pairing
22pub
23sub      Subscribe topic.