Skip to main content

Crate zigbee_bridge

Crate zigbee_bridge 

Source
Expand description

§zigbee-bridge

A standalone Zigbee to MQTT bridge on the zigbee-host stack.

run opens the coordinator, starts (or resumes, or restores) the network, connects to the MQTT broker and bridges until told to stop. The topic scheme is in bridge; Home Assistant discovery is in exposes.

Part of zigbee-bridge, maintained by Pulzar. See the user guide, the library guide and the API documentation.

License: MIT.

Re-exports§

pub use config::Config;

Modules§

bridge
The bridge: host events to MQTT, MQTT requests to the host.
config
The bridge’s configuration file (TOML).
exposes
What a device’s standard clusters mean as JSON fields, and the Home Assistant discovery that describes them.
mqtt
The MQTT session: one connection, re-established by rumqttc’s event loop, with the bridge’s availability as the last will.
network
The network file: the keys and PAN ids the bridge runs, in the data directory, readable by its owner only. The bridge writes it with random values on first start; a platform that manages keys writes it before.

Enums§

RunError
Why the bridge stopped.

Constants§

BACKUP_FILE
The latest backup’s file name in the data directory.
RESTORE_FILE
A backup staged by zigbee-bridge restore, restored on the next start.
STORE_FILE
The device store’s file name in the data directory.

Functions§

run
Run the bridge until stop resolves.
stage_restore
Stage a backup to be restored onto the coordinator on the next start.