github zwave-js/node-zwave-js v5.0.0
Release v5.0.0

latest releases: v12.5.6, v12.5.5, v12.5.4...
3 years ago

Breaking changes

  • The status Alive was added to the NodeStatus enumeration. The node status can no longer switch between all states, only between Dead and Alive, between Asleep and Awake and from and to Unknown.
  • The status property on ZWaveNode is now readonly. To change the status, use the markAsAsleep and similar methods, which only change the status if it is legal to do so.
  • Unsolicited commands are now discarded in accordance with the Z-Wave specs if they are unencrypted but the CC is supported secure only
  • driver.start() now throws if no handler for the "error" is attached

Features

  • A new method withOptions was added to CCAPI, which controls the used SendCommandOptions. For example, this allows changing the priority of each API call for that instance.
  • All interview messages now automatically have a lower priority than most other messages, e.g. the ones created by user interaction. This should make the network feel much more responsive while an interview process is active.
  • The node events asleep, awake, alive and dead now include the previous status aswell.
  • Added the method isEncapsulatedWith to CommandClass to perform checks on the encapsulation stack.
  • In addition to serial ports, serial-over-tcp connections (e.g. by using ser2net) are now supported. You can connect to such a host using a connection string of the form tcp://hostname:port. Use these ser2net settings to host a serial port: <external-port>:raw:0:<path-to-serial>:115200 8DATABITS NONE 1STOPBIT

Bugfixes

  • Improved performance of reading from the Value DB
  • Retransmission of commands now distinguishes between errors on the controller side and missing responses from nodes
  • If a node that is known to be included securely does not respond to the Security CC interview, it is no longer assumed to be non-secure
  • If a node that is assumed to be included non-securely sends secure commands, it is now marked as secure and the interview will be restarted
  • The interview for sensor-type CCs is now skipped if a timeout occurs waiting for a response. Previously the whole interview was aborted.
  • Basic CC values that are mapped to Binary Switch or Binary Sensor are now interpreted correctly.
  • Fixed a crash that could occur when assembling a partial message while the driver is not ready yet.

Changes under the hood

  • The driver has been completely rewritten with state machines for a well-defined program flow and better testability. This should solve issues where communication may get stuck for unknown reasons.
  • A node's status and ready properties are now managed by state machines to have better control over how and when the status changes.
  • Enabled the TypeScript option strictFunctionTypes and the usage of several decorators is now statically enforced
  • Added more fine-grained control over expected responses, and distinguish between responses, callbacks and node updates for sent messages.
  • Many CCs had their log representation improved. If an error occurs during this conversion, this error is now caught and logged.

Don't miss a new node-zwave-js release

NewReleases is sending notifications on new releases.