Expand description
§zwave-host
A Z-Wave controller host stack.
The controller chip runs the radio and the mesh; this crate does the
application side a host has to do, on top of zwave_serial:
- inclusion and exclusion, with S2 (key exchange, DSK PIN check), S0 and SmartStart from a provisioning list;
- the interview: node information, secure command classes, manufacturer, versions, endpoints, and each command class’s capabilities;
- a node store written to disk on change (batched, atomic);
- wake-up queues: commands for sleeping nodes wait for their next Wake Up Notification, and the node is sent back to sleep when idle;
- encapsulation in both directions: Security 0 and 2, Supervision, Multi Channel, Transport Service and CRC-16;
- values from reports, as
Event::Value; - the neighbor tables and the routes transmit reports describe, for topology;
- an NVM backup of the controller.
Start one with Controller::start and read Events from the
returned channel.
Part of zwave-bridge, maintained by Pulzar. See the user guide, the library guide and the API documentation.
License: MIT.
Re-exports§
pub use node::NodeRecord;pub use node::NodeStatus;pub use values::ValueId;pub use values::ValueKind;pub use values::ValueUpdate;
Modules§
- device_
config - Device configuration files in Z-Wave JS’s published format.
- firmware
- Firmware updates over the air (Firmware Update Meta Data command class).
- node
- What the host knows about each node. Persisted in the
store. - nvm3
- NVM3, the flash file system of 700 and 800 series controllers.
- store
- The node store: one JSON file, written atomically and only when something changed (batched over a short delay, so a burst of interview results is one write, and reports never cause a write at all).
- values
- Values: what reports mean, as numbers with units, independent of the command class that carried them.
Structs§
- Controller
- A handle to a running controller. Clones share it.
- Controller
Info - What the controller says about itself.
- Events
- The stream of
Events from a controller. Read it continuously; events beyondMAX_PENDING_EVENTSunread ones are dropped. - Host
Config - Configuration of the host stack.
- Inclusion
Options - How to include a node.
- Inclusion
Result - The outcome of an inclusion.
- Network
Keys - The network keys and the controller’s long-term S2 key pair.
- Topology
- The network’s topology as the host knows it.
- Topology
Node - One node in the topology.
Enums§
- Error
- Errors from the host stack.
- Event
- Something that happened on the network.
- Grant
Policy - Which keys to grant a joining S2 node.
- Security
Class - A Z-Wave security class, the unit in which network keys are granted.
Constants§
- MAX_
PENDING_ EVENTS - Events kept for a consumer that has fallen behind before new ones are dropped.
Functions§
- is_
long_ range - Whether a node id is a Long Range node (256 and up).
Type Aliases§
- NodeId
- A node id. Classic Z-Wave uses 1 to 232; Long Range uses 256 to 4000.