Skip to content

zwave-bridge 0.2.0

Choose a tag to compare

@github-actions github-actions released this 20 Nov 03:06
· 20 commits to main since this release

zwave-bridge 0.2.0 adds Z-Wave Long Range, device firmware updates, Z-Wave JS device files, and NVM restore with conversion between 700 and 800 series controllers.

Status: early. Everything is tested in CI against a Serial API controller simulator, but no release has been tested on real hardware yet. Back up keys.json before upgrading, and please report how it goes. zwave-bridge is not certified by the Z-Wave Alliance.

New

  • Z-Wave Long Range. With a Long Range capable 800 series controller, Long Range devices join by SmartStart (provision their QR code or DSK). They get node ids from 256 up and use S2 Authenticated or Access Control keys of their own, which are added to an existing keys.json on first start.
  • Device firmware updates. Put a firmware file in <store dir>/firmware/ and send firmware_update with the node and file name. Intel HEX is converted; .gbl, .bin and .ota files are sent as they are. Progress and the result come as events. Tested against the simulator only: try one device first.
  • Z-Wave JS device files. Point [devices] dir at the config/devices directory of an @zwave-js/config release, read as published. Nodes get their device's name, their parameters are published on zwave/nodes/<id>/parameters, and the configure request sets them by key, partial parameters included. See Device files.
  • NVM restore. The restore request writes a backup from the backup request onto a controller, converting it between 700 and 800 series and SDKs as Z-Wave JS's NVM migration does. It refuses a backup in a format newer than the controller can read. The bridge then exits for its service manager to restart it on the restored network.
  • Matching answers to questions. Every response echoes the request's transaction.

Fixed

  • Home Assistant notification sensors now show the notification's state, not the value's name.
  • The zwave-sim binary keeps serving when its standard input closes.
  • Store writes no longer race when the bridge flushes on shutdown.

For developers

In zwave-host: Controller::replace_failed_node, factory_reset, set_region, configure_raw (settings by parameter key without a device file), close (releases the serial port), queued and last_route; ValueUpdate.rssi; NodeRecord::dsk kept for nodes included with S2 Authenticated or Access Control; and nvm3::convert. In zwave-serial: probe::identify on a running link. The Serial API builders take the node id width (a breaking change, for Long Range).

Upgrading

Replace the binary and restart. Configuration files from 0.1.0 work unchanged; [devices] is optional. Static binaries of zwave-bridge and zwave-sim for x86_64, aarch64 and mipsel, with SHA256SUMS, are attached below; the quick start covers a new install.

All changes

Added

  • zwave-host: nvm3::convert turns a backup into an image for another
    controller: 700 to 800 series and back, or another SDK of the same series,
    repacking the backup's files in the target's layout with the target's
    application version and RF configuration, as Z-Wave JS's migrateNVM does.
    It refuses a protocol format newer than the target's SDK reads and images
    whose format cannot be told. Controller::restore_nvm converts as needed.
  • zwave-host: a node included with S2 Authenticated or Access Control
    keeps its full DSK in its record (NodeRecord::dsk), as SmartStart nodes
    already did.
  • zwave-host: Controller::close stops the controller and releases the
    serial port (SerialApi::close underneath); before, a dropped controller
    kept the port open, so a restart in the same process could not reopen it.
  • zwave-serial: probe::identify on a running link. zwave-host:
    Controller::factory_reset, set_region, and configure_raw (settings by
    parameter key without a device file, sizes read from the device).
  • zwave-host: Controller::replace_failed_node gives a failed node's id to
    a new node, with security and an interview; zwave-sim can power a node off
    and replace it.
  • zwave-host: ValueUpdate.rssi (the carrying frame's RSSI), Controller::queued
    (requests waiting for a sleeping node) and Controller::last_route.
  • zwave-host: device_config reads Z-Wave JS device files as published
    (JSON5, $import, $if, partial parameters, associations, compat flags)
    from a directory or an in-memory map; Controller::configure writes
    settings by parameter key, merging partial parameters. CI loads every file
    of the latest @zwave-js/config release.
  • zwave-host: nvm3 reads and writes NVM3 images (700 and 800 series,
    checked against real backups in CI); Controller::restore_nvm writes a
    backup back after checking it matches the controller's series and SDK.
    zwave-bridge: restore request.
  • zwave-cc: Firmware Update Meta Data (version 8).
  • zwave-host: Controller::update_firmware: CRC-checked fragments sized for
    the node's security, activation, Intel HEX images; progress events.
  • zwave-bridge: firmware_update request; [devices] dir, device names in Home Assistant, the
    parameters topic and the configure request.

Changed

  • Long Range: 16-bit node ids on the Serial API when the controller offers
    them, the Long Range node list, SmartStart inclusion over Long Range,
    separate Long Range S2 keys (Authenticated and Access Control only), no
    routing information for Long Range nodes. zwave-serial builders and
    frame encoders take the node id width (a breaking change).

Fixed

  • zwave-sim: the binary kept serving only while its stdin was open, so a
    quick start that typed press from a script or FIFO lost the host
    mid-inclusion. It now serves until stopped; a test drives the binary over TCP.
  • zwave-bridge: Home Assistant shows a notification sensor's state, not the
    value's name; responses echo the request's transaction.
  • zwave-host: store writes are serialized; flush racing the background
    writer could fail on the shared temporary file or leave an older snapshot.