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

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

Stop pairing mode

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

Rename node

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

List paired nodes

    bch node list

Remove node. By name or ID

    bch node remove garden
    bch node remove 836d19831c4a

bch --help

Usage: bch [OPTIONS] COMMAND [ARGS]...

  --gateway TEXT                 Gateway name [default: usb-dongle].
  -H, --mqtt-host TEXT           MQTT host to connect to [default:].
  -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
  -h, --help                     Show this message and exit.

  gw       Gateway
  sub      Subscribe topic.
  version  Show program's version number and exit.

Chapters in this document:
Edit this page

We will inspire you!

You will get regularly our Clownsletter with real projects from other Makers. Do not miss it!

By sign up you will know how even you can inspire others and get €100 discount coupon!