Skip to main content

Module bridge

Module bridge 

Source
Expand description

The bridge: the host’s events out to MQTT, requests from MQTT in.

Topics, under base (bluetooth by default):

TopicDirectionWhat
base/bridge/stateout, retained{"state":"online"} or offline (the will)
base/bridge/infoout, retainedthe controller and its capabilities
base/scan/<ADDRESS>outevery advertisement after duplicate filtering, parsed
base/device/<ADDRESS>outa device’s decoded readings, for Home Assistant
base/bridge/eventoutconnections, pairing, notifications, GATT writes, periodic reports
base/bridge/request/<op>ina request, JSON, optionally with a transaction id
base/bridge/response/<op>out{"transaction", "status", "data" or "error"}, status ok or error

Addresses in topics are twelve upper-case hex digits, most significant first (BC5729000001).

Functions§

request
Runs one request.
run
Runs the bridge until a signal or a fatal error.
topic_id
The topic form of an address.