Inovelli LZW31 State Reporting Error with Z-Wave JS

Long-time HA user here and Inovelli fan. Just migrated my system over to Z-wave JS running on a Home Assistant OS in a VirtualBox. I am having specific issues with my LZW31 switch where the state report of the light is not appropriately communicating with the z-wave controller. When I turn the light on via home assistant, the light turns on in the room, but the light switch in HA immediately switches back to off. The state of the light also does not update in HA when I turn the light on manually at the switch. Basically it seems to be an issue where the Inovelli switch is not properly reporting its state back to HA. I have pasted my configuration data below and tried a number of different changes here, to no avail. Perhaps @Eric_Inovelli can help weigh in here, but I have not found any other issues in the forums to help address this. Thank you!

If this is helpful, this is what I am getting in my Zwave JS logs:

2021-09-07T20:13:39.876Z SERIAL » 0x010f001324086c0184042601ffff250f2f (17 bytes)
2021-09-07T20:13:39.878Z DRIVER » [Node 036] [REQ] [SendData]
│ transmit options: 0x25
│ callback id: 15
└─[SupervisionCCGet]
│ session id: 4
│ request updates: true
└─[MultilevelSwitchCCSet]
target value: 255
duration: default
2021-09-07T20:13:39.901Z SERIAL « [ACK] (0x06)
2021-09-07T20:13:39.905Z SERIAL « 0x0104011301e8 (6 bytes)
2021-09-07T20:13:39.908Z SERIAL » [ACK] (0x06)
2021-09-07T20:13:39.909Z DRIVER « [RES] [SendData]
was sent: true
2021-09-07T20:13:39.952Z SERIAL « 0x010500130f00e6 (7 bytes)
2021-09-07T20:13:39.954Z SERIAL » [ACK] (0x06)
2021-09-07T20:13:39.956Z DRIVER « [REQ] [SendData]
callback id: 15
transmit status: OK
2021-09-07T20:13:40.031Z SERIAL « 0x010b00040024056c0204ff0044 (13 bytes)
2021-09-07T20:13:40.033Z SERIAL » [ACK] (0x06)
2021-09-07T20:13:40.038Z DRIVER « [Node 036] [REQ] [ApplicationCommand]
└─[SupervisionCCReport]
session id: 4
more updates follow: false
status: Success
duration: 0s
2021-09-07T20:13:40.219Z SERIAL « 0x0109000400240326036494 (11 bytes)
2021-09-07T20:13:40.222Z SERIAL » [ACK] (0x06)
2021-09-07T20:13:40.224Z DRIVER « [Node 036] [REQ] [ApplicationCommand]
└─[MultilevelSwitchCCReport]
current value: undefined
2021-09-07T20:13:45.046Z SERIAL » 0x01090013240226022510d2 (11 bytes)
2021-09-07T20:13:45.050Z DRIVER » [Node 036] [REQ] [SendData]
│ transmit options: 0x25
│ callback id: 16
└─[MultilevelSwitchCCGet]
2021-09-07T20:13:45.075Z SERIAL « [ACK] (0x06)
2021-09-07T20:13:45.082Z SERIAL « 0x0104011301e8 (6 bytes)
2021-09-07T20:13:45.085Z SERIAL » [ACK] (0x06)
2021-09-07T20:13:45.087Z DRIVER « [RES] [SendData]
was sent: true
2021-09-07T20:13:45.126Z SERIAL « 0x010500131000f9 (7 bytes)
2021-09-07T20:13:45.129Z SERIAL » [ACK] (0x06)
2021-09-07T20:13:45.131Z DRIVER « [REQ] [SendData]
callback id: 16
transmit status: OK
2021-09-07T20:13:45.202Z SERIAL « 0x0109000400240326036494 (11 bytes)
2021-09-07T20:13:45.216Z SERIAL » [ACK] (0x06)
2021-09-07T20:13:45.223Z DRIVER « [Node 036] [REQ] [ApplicationCommand]
└─[MultilevelSwitchCCReport]
current value: undefined

Did you include the switch with s2 security? If so there is a bug with that and it will not recognize all the commands from an S2 device - https://github.com/zwave-js/node-zwave-js/issues/3201. Until the bug is fixed I would include the switch with no security.

I did include it without security - thanks for asking. I initially did it with security but thought maybe this was the issue and then removed the node, factory reset the switch, and paired with no security. Still, no dice, unfortunately.

Someone else had a similar issue recently and ultimately a developer got involved and advised them to file a github issue. Here’s the link to their thread

I have an lzw31 and it is working fine, but I paired it awhile ago. Its a red series though, do you have a red series or black series? I’m not really sure what else the issue could be.

Thanks I may end up doing that. Interestingly it is a black series. I have a number of Red series switches that are working perfectly, so I suspect this is something specific to this switch version. It seems that the controller is not receiving state data here:

└─[MultilevelSwitchCCReport]
current value: undefined

When I toggle my Red switches that data comes back appropriately as such:

└─[MultilevelSwitchCCReport]
current value: 99
target value: 99
duration: 0s

Not sure if it makes a difference, but are you running the latest firmware for the switch?

Ah this could be it. I have firmware 1.35. Rookie question here - do you know how to update the firmware in Zwave JS, if it is possible? I cannot find a way to access the XML file manually to make changes.

Sorry…confusing the firmware and configuration files. Looks like I just need to up-pair the device and go through the Z-wave PC controller.

Unfortunately I dont believe you can update firmware with just zwavejs. I couldn’t find it in the documentation or going through the screens.

I use zwavejs2mqtt and if you use zwavejs2mqtt instead of zwavejs it includes a control panel where you can update the firmware that way.

If you don’t want to go to zwavejs2mqtt, you can leave the device paired and just plug the zstick into a windows computer using the silicon labs program to update the firmware. If paired unsecure it will recognize it still without removing the device from the stick. Follow the instructions on the Inovelli website.

Got the firmware updated. I think I have narrowed it down to an issue with security. I want to add that when I add the node via the ZWave integration (WITHOUT using secure inclusion), I get the following error in the logs:

2021-09-08T00:06:12.951Z DRIVER Unexpected error during SerialAPI command: ZWaveError: The network key for the
security class S2_Unauthenticated has not been set up yet!
at SecurityManager2.getKeysForSecurityClass (/usr/src/node_modules/@zwave-
js/core/src/security/Manager2.ts:117:10)
at SecurityManager2.initializeSPAN (/usr/src/node_modules/@zwave-js/core/s
rc/security/Manager2.ts:220:21)
at Security2CCMessageEncapsulation.serialize (/usr/src/node_modules/zwave-
js/src/lib/commandclass/Security2CC.ts:932:34)
at SendDataRequest.serialize (/usr/src/node_modules/zwave-js/src/lib/contr
oller/SendDataMessages.ts:99:37)
at getSerialAPICommandMachineConfig (/usr/src/node_modules/zwave-js/src/li
b/driver/SerialAPICommandMachine.ts:143:18)
at Object.createSerialAPICommandMachine (/usr/src/node_modules/zwave-js/sr
c/lib/driver/SerialAPICommandMachine.ts:385:3)
at executeSerialAPICommand (/usr/src/node_modules/zwave-js/src/lib/driver/
CommandQueueMachine.ts:226:14)
at Interpreter.exec (/usr/src/node_modules/xstate/lib/interpreter.js:844:6
1)
at Interpreter.execute (/usr/src/node_modules/xstate/lib/interpreter.js:20
3:14)
at Interpreter.update (/usr/src/node_modules/xstate/lib/interpreter.js:229
:12)

I have a 32-digit network key in the settings of the Open ZWave add-on configuration. I’m not sure exactly what is causing this error. I cannot seem to find online with this error log. Now feeling stuck again.

Finally got it connected with multiple attempts, and back at square one. It does now show the updated firmware version at 1.45 for LZW31, but still not reporting the state of the light correctly and giving the same error:

2021-09-08T00:22:58.319Z SERIAL » [ACK] (0x06)
2021-09-08T00:22:58.324Z DRIVER « [Node 041] [REQ] [ApplicationCommand]
└─[MultilevelSwitchCCReport]
current value: undefined

And to confirm, when you use zwavejs to include, you have “use secure inclusion” toggled off?

Also, are you on the absolute latest home assistant 2021.9.4? And latest zwavejs? I see a recent PR that might have fixed this issue. https://github.com/home-assistant-libs/zwave-js-server-python/pull/289

Yes - confirming the secure inclusion is toggled off and I am on the latest version of both core and supervisor.

It looks like your device is including as s2_unauthenticated even though you have secure inclusion toggled off, which it shouldn’t be doing. Then it’s not getting the updates to the controller due to the issue about not deserializing commands that I linked above.

I’m also assuming it’s limited to the black series switches. I just excluded a red series switch and included it with no issues, and it has no security and status updates fine.

At this point I would file a github issue and include all relevant logs and info.

1 Like

Interestingly I uninstalled and did a complete reboot of the ZWave JS add-on in the supervisor so that I could take a look at the log outputs. One of the first log errors is:

[services.d] starting services
[services.d] done.
[18:43:24] INFO: Successfully send discovery information to Home Assistant.
The networkKey option is deprecated in favor of securityKeys option. To eliminate this warning, move your networkKey into the securityKeys.S0_Legacy option. Refer to the Z-Wave JS docs for more information

I’m not sure what to make of this but it seems to tie in with some of the issues above.

You probably can specify those keys in yaml somehow in the add on configuration for the supervisor, but I’m not sure how to format it exactly. It would be here.

Zwavejs should have 4 security keys configured per its documentation.

https://zwave-js.github.io/node-zwave-js/#/getting-started/security-s2

Zwavejs2mqtt let’s you configure the keys in the UI in the control panel, but I’m not sure how to specify the keys for the zwavejs add on without the control panel. Hopefully someone else can chime in.

1 Like

Yeah I swapped over to ZWave2MQTT and had no issues with the switch reporting data. So it is a problem that seems to be narrowed down to something having to do with the security keys and ZWaveJS.

I think it’s a problem with the actual zwavejs integration/addon in Home Assistant not keeping up with the recent changes in the zwavejs server.

It’s all a bit confusing, and hopefully I’m explaining this right, but basically you have zwavejs, which is a server and driver that manages the ins and outs of the actual zwave network. Then you have zwavejs2mqtt, which includes the zwavejs server, but also has a control panel that sits on top of it. I would think of zwavejs like DOS, and zwavejs2mqtt like early versions of Windows that sits over DOS.

Now you have the zwavejs integration in Home Assistant, which is also basically a small control panel that can manage the zwavejs server within Home Assistant itself(either installed through the zwavejs official addon, the zwavejs2mqtt community addon, or a zwavejs2mqtt docker install even) and also communicate with it to bring your devices into Home Assistant. That integration doesn’t seem to be managing inclusion and security properly at this point, because zwavejs changed it recently and the integration hasn’t caught up yet.

You can see here from the documentation and little video that including a device in zwavejs2mqtt you are given options for no security, s0 security, s2 unauthenticated, and s2 authenticated (where dsk is needed from the device’s barcode)

https://zwave-js.github.io/zwavejs2mqtt/#/guide/nodes-management

Versus including from the Home Assistant integration, you only get a toggle for security or no security, which doesn’t even seem to communicate the choice to zwavejs properly.

This all has created a lot of issues for people recently coming over on fresh zwave setups. I’m sure it will all be sorted out eventually, but there are a lot of moving pieces here. I think the best bet is to just use zwavejs2mqtt right now and use that control panel to add and remove devices until the integration catches up, and avoid S2 inclusion until this PR is merged - https://github.com/zwave-js/node-zwave-js/pull/3240

I think you are spot on with this and I essentially came to the same conclusion after a few hours of trying to process all this. Thanks Tim - people like you make the community great!

1 Like