Breaking changes
- The status
Alive
was added to theNodeStatus
enumeration. The node status can no longer switch between all states, only betweenDead
andAlive
, betweenAsleep
andAwake
and from and toUnknown
. - The
status
property onZWaveNode
is now readonly. To change the status, use themarkAsAsleep
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 toCCAPI
, which controls the usedSendCommandOptions
. 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
anddead
now include the previous status aswell. - Added the method
isEncapsulatedWith
toCommandClass
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 formtcp://hostname:port
. Use theseser2net
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 toBinary Switch
orBinary 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
andready
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.