node-zwave-js icon indicating copy to clipboard operation
node-zwave-js copied to clipboard

Older Z-Wave SDKs don't include the route speed in the `GetPriorityRoute` response

Open AlCalzone opened this issue 1 year ago • 0 comments

Discussed in https://github.com/zwave-js/node-zwave-js/discussions/6608

Originally posted by raman325 January 15, 2024

Checklist

  • [X] I have read and followed the above instructions
  • [X] I have checked the troubleshooting section and my problem is not described there.
  • [X] I have read the changelog and my problem was not mentioned there or the fix did not work.

Describe the issue

What is happening?

As reported in https://github.com/home-assistant/core/issues/108021 the HA integration expects protocolDataRate to be provided in the lwr and nlwr statistics objects based on the typing: https://github.com/zwave-js/node-zwave-js/blob/master/packages/zwave-js/src/lib/node/NodeStatistics.ts#L56

So to me it sounds like either the typing is wrong or there is some state that statistics get put in that is incorrect.

What did you expect to happen instead?

I think that either the typing needs to be updated to make protocolDataRate optional or the logic that is leaving the object in a bad state is updated.

Steps to reproduce the behavior:

Hard to say since it is happening on initialization. It's also not a widespread error as this is the first report we've seen.

Anything else we should know?

The user mentioned that it was not an issue in HA 2023.9.X which was released on September 6th. Looking at the zwave-js-server release logs, that suggests that this was introduced in zwave-js 12.x. I did try to run 2023.9.3 using the latest node-zwave-js just to make sure it wasn't some sort of backwards compatibility issue, but I was able to bring up my network fine

cc @maheus

Software versions

Driver (node-zwave-js): 12.4.1 Z-Wave JS UI: 9.6.2.6e369a1

Home Assistant Z-Wave Integration: Home Assistant 2023.11.3

Home Assistant Z-Wave JS Addon: ...

ioBroker.zwave2 Adapter: ...

If you are using something non-standard, tell us here: ...

Device information

Unknown at this time

Manufacturer: ... Model name: ... Node ID: ...

Checklist

  • [X] I made sure to provide a driver log on level debug.
  • [ ] The log includes a re-interview of the problematic device (if applicable).
  • [ ] The log includes the problematic interaction with the device (if applicable).
  • [ ] I provided the node ID of the problematic device (if applicable).

Upload Logfile

Waiting for the user to provide debug logs as they have stated they are worried about leaking personal information, but logging the issue anyway as a placeholder

AlCalzone avatar Jan 19 '24 21:01 AlCalzone