home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.4k stars 30.65k forks source link

z-wave js fails to start after upgrading to 0.1.86 #98250

Closed object closed 1 year ago

object commented 1 year ago

The problem

After upgrading Z-Wave JS from version 0.1.85 to 0.1.86 z-wave js add-on no longer starts. It shows "Failed setup, will retry" status in Z-Wave page.

I am using Aeotec Z-Wave Gen 7 USB stick. Device path seems to be corret: /dev/ttyUSB0 ID: /dev/serial/by-id/usb-Silicon_Labs_CP2102N_USB_to_UART_Bridge_Controller_30e744e60555ed11b47c99131d62bc44-if00-port0

I tried to follow various suggestions (re-insterting the USB stick, restarting the plugin, rebooting hardware), nothing helped.

UPDATE: Downgrading to 0.1.85 and restarting the add-on made it work again.

I submitted the logs below.

What version of Home Assistant Core has the issue?

2023.8.1

What was the last working version of Home Assistant Core?

2023.8.1

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Z-Wave JS

Link to integration documentation on our website

https://www.home-assistant.io/integrations/zwave_js/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

· SerialAPIStarted (0x0a)
                                    · SerialAPISetup (0x0b)
                                    · SetRFReceiveMode (0x10)
                                    · FUNC_ID_ZW_SEND_NODE_INFORMATION (0x12)
                                    · SendData (0x13)
                                    · SendDataMulticast (0x14)
                                    · GetControllerVersion (0x15)
                                    · SendDataAbort (0x16)
                                    · FUNC_ID_ZW_GET_RANDOM (0x1c)
                                    · GetControllerId (0x20)
                                    · UNKNOWN_FUNC_MEMORY_GET_BYTE (0x21)
                                    · UNKNOWN_FUNC_MEMORY_PUT_BYTE (0x22)
                                    · UNKNOWN_FUNC_MEMORY_GET_BUFFER (0x23)
                                    · UNKNOWN_FUNC_MEMORY_PUT_BUFFER (0x24)
                                    · EnterBootloader (0x27)
                                    · UNKNOWN_FUNC_UNKNOWN_0x28 (0x28)
                                    · GetNVMId (0x29)
                                    · ExtNVMReadLongBuffer (0x2a)
                                    · ExtNVMReadLongByte (0x2c)
                                    · NVMOperations (0x2e)
                                    · undefined (0x37)
                                    · undefined (0x38)
                                    · UNKNOWN_FUNC_ClearNetworkStats (0x39)
                                    · UNKNOWN_FUNC_GetNetworkStats (0x3a)
                                    · GetBackgroundRSSI (0x3b)
                                    · undefined (0x3c)
                                    · UNKNOWN_FUNC_RemoveNodeIdFromNetwork (0x3f)
                                    · GetNodeProtocolInfo (0x41)
                                    · HardReset (0x42)
                                    · FUNC_ID_ZW_REPLICATION_COMMAND_COMPLETE (0x44)
                                    · FUNC_ID_ZW_REPLICATION_SEND_DATA (0x45)
                                    · AssignReturnRoute (0x46)
                                    · DeleteReturnRoute (0x47)
                                    · RequestNodeNeighborUpdate (0x48)
                                    · ApplicationUpdateRequest (0x49)
                                    · AddNodeToNetwork (0x4a)
                                    · RemoveNodeFromNetwork (0x4b)
                                    · FUNC_ID_ZW_CONTROLLER_CHANGE (0x4d)
                                    · AssignPriorityReturnRoute (0x4f)
                                    · FUNC_ID_ZW_SET_LEARN_MODE (0x50)
                                    · AssignSUCReturnRoute (0x51)
                                    · FUNC_ID_ZW_REQUEST_NETWORK_UPDATE (0x53)
                                    · SetSUCNodeId (0x54)
                                    · DeleteSUCReturnRoute (0x55)
                                    · GetSUCNodeId (0x56)
                                    · UNKNOWN_FUNC_SEND_SUC_ID (0x57)
                                    · AssignPrioritySUCReturnRoute (0x58)
                                    · FUNC_ID_ZW_EXPLORE_REQUEST_INCLUSION (0x5e)
                                    · undefined (0x5f)
                                    · RequestNodeInfo (0x60)
                                    · RemoveFailedNode (0x61)
                                    · IsFailedNode (0x62)
                                    · ReplaceFailedNode (0x63)
                                    · GetRoutingInfo (0x80)
                                    · UNKNOWN_FUNC_LOCK_ROUTE_RESPONSE (0x90)
                                    · GetPriorityRoute (0x92)
                                    · SetPriorityRoute (0x93)
                                    · UNKNOWN_FUNC_UNKNOWN_0x98 (0x98)
                                    · FUNC_ID_SERIAL_API_SLAVE_NODE_INFO (0xa0)
                                    · FUNC_ID_ZW_SEND_SLAVE_NODE_INFO (0xa2)
                                    · FUNC_ID_ZW_SET_SLAVE_LEARN_MODE (0xa4)
                                    · FUNC_ID_ZW_GET_VIRTUAL_NODES (0xa5)
                                    · FUNC_ID_ZW_IS_VIRTUAL_NODE (0xa6)
                                    · BridgeApplicationCommand (0xa8)
                                    · SendDataBridge (0xa9)
                                    · SendDataMulticastBridge (0xab)
                                    · UNKNOWN_FUNC_GET_LIBRARY_TYPE (0xbd)
                                    · UNKNOWN_FUNC_SEND_TEST_FRAME (0xbe)
                                    · UNKNOWN_FUNC_GET_PROTOCOL_STATUS (0xbf)
                                    · UNKNOWN_FUNC_UNKNOWN_0xD2 (0xd2)
                                    · UNKNOWN_FUNC_UNKNOWN_0xD3 (0xd3)
                                    · UNKNOWN_FUNC_UNKNOWN_0xD4 (0xd4)
                                    · undefined (0xd6)
                                    · Shutdown (0xd9)
                                    · undefined (0xda)
                                    · undefined (0xdb)
                                    · undefined (0xdc)
                                    · undefined (0xdd)
                                    · undefined (0xde)
                                    · undefined (0xdf)
                                    · undefined (0xe7)
                                    · undefined (0xe8)
2023-08-11T10:43:13.979Z DRIVER   all queues idle
2023-08-11T10:43:13.994Z DRIVER   Controller identification returned invalid node ID 0
2023-08-11T10:43:13.995Z DRIVER   destroying driver instance...
2023-08-11T10:43:14.019Z DRIVER   driver instance destroyed
[10:43:14] INFO: Service restart after closing
[12:43:15] INFO: Successfully send discovery information to Home Assistant.
2023-08-11T10:43:17.036Z DRIVER   ███████╗ ██╗    ██╗  █████╗  ██╗   ██╗ ███████╗             ██╗ ███████╗
                                  ╚══███╔╝ ██║    ██║ ██╔══██╗ ██║   ██║ ██╔════╝             ██║ ██╔════╝
                                    ███╔╝  ██║ █╗ ██║ ███████║ ██║   ██║ █████╗   █████╗      ██║ ███████╗
                                   ███╔╝   ██║███╗██║ ██╔══██║ ╚██╗ ██╔╝ ██╔══╝   ╚════╝ ██   ██║ ╚════██║
                                  ███████╗ ╚███╔███╔╝ ██║  ██║  ╚████╔╝  ███████╗        ╚█████╔╝ ███████║
                                  ╚══════╝  ╚══╝╚══╝  ╚═╝  ╚═╝   ╚═══╝   ╚══════╝         ╚════╝  ╚══════╝
2023-08-11T10:43:17.039Z DRIVER   version 11.9.2
2023-08-11T10:43:17.039Z DRIVER   
2023-08-11T10:43:17.040Z DRIVER   starting driver...
2023-08-11T10:43:17.040Z DRIVER   opening serial port /dev/ttyUSB0
2023-08-11T10:43:17.097Z DRIVER   serial port opened
2023-08-11T10:43:17.099Z SERIAL » 0x15                                                                 (1 bytes)


### Additional information

_No response_
home-assistant[bot] commented 1 year ago

Hey there @home-assistant/z-wave, mind taking a look at this issue as it has been labeled with an integration (zwave_js) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `zwave_js` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign zwave_js` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


zwave_js documentation zwave_js source (message by IssueLinks)

MerekW commented 1 year ago

I am experiencing the same exact issue after the update last night (On Zooz 800LR stick)

object commented 1 year ago

I am experiencing the same exact issue after the update last night (On Zooz 800LR stick)

Do your logs look like mine? Did you also try to re-insert the stick. I saw another issue when the issue was resolved by re-inserting the USB stick followed by the system restart. But it didn't solve my problem.

MerekW commented 1 year ago

Embarrassingly, I don't have them, as I restored the snapshot from before the ZWaveJS update. It DID, however take a hardware reset, even after the restore (unplug/re-plug the USB stick), so that definitely indicates a hardware lockup.

object commented 1 year ago

Embarrassingly, I don't have them, as I restored the snapshot from before the ZWaveJS update. It DID, however take a hardware reset, even after the restore (unplug/re-plug the USB stick), so that definitely indicates a hardware lockup.

How do you restore snapshots? I have full backup (using Home Assistant Google backup add-on) and it contains Z-Wave JS backup for 0.1.85. But I never ran any restores for a specific add-on.

MerekW commented 1 year ago

From Settings->System->Backups: Select the "addon_core_zwave_js_0.1.85" backup entry (will be there as long as you left "Create backup before updating" checked when you updated the add-on). Select both check boxes on the add-on restore pop-up, and click "Restore". I'd say reboot, but power the machine off and re-seat your USB dongle, then power up and boot.

HA should come back to the snapshot point prior-to the upgrade that locked it up. Screenshot 2023-08-11 074649

object commented 1 year ago

Thanks a lot! I'll give it a try.

philipwhand commented 1 year ago

I was having this issue; finally resolved it by restoring 0.1.85, shutting down my HA VM, rebooting my host, unplugging and replugging my Z-Wave stick, and starting the HA VM back up. I'm guessing it was something with the 86 update so I'll hold off on updating again until there is a new update.

simonthan commented 1 year ago

phyiscally removing the z-wave stick and rebooting the ha vm worked for me to get it working again.

MerekW commented 1 year ago

phyiscally removing the z-wave stick and rebooting the ha vm worked for me to get it working again.

Does that persist through VM reboots?

philipwhand commented 1 year ago

I was having this issue; finally resolved it by restoring 0.1.85, shutting down my HA VM, rebooting my host, unplugging and replugging my Z-Wave stick, and starting the HA VM back up. I'm guessing it was something with the 86 update so I'll hold off on updating again until there is a new update.

After doing the above I reinstalled the latest JS update and everything seems to be working now.

simonthan commented 1 year ago

Mixed Test 1: did a HA restart, Z-Wave is still working Test 2: did a reboot of the host, Z-Wave is not working. Had to phyiscally pull out the stick and plug back in, restart HA to make Z-Wave work again

mikem30303 commented 1 year ago

I have the same problem with Zooz 700 Series (ZST10). Following.

raman325 commented 1 year ago

@AlCalzone any ideas here? Here's the PR for the addon bump to 0.86. We could try to update zwave-js in the addon to 11.10.0 and see if that resolves it but I'm not really clear on what's happening

TonyPTX commented 1 year ago

Have a Zooz 700 Series that also locked up after 0.186 update. Rebooted the Proxmox VM twice, then unplugged and replugged the USB Z-Wave stick, "reloaded" the Z-Wave JS service, then "restarted" HA and everything is working again for now. I have not tired to "reboot" machine, but do have a working back-up copy of VM if I need to resort to that.

AlCalzone commented 1 year ago

It seems that the sticks are still in 16-bit node ID mode when that happens. The driver automatically soft-resets if that is enabled, which fixes the issue. But AFAIK, HA has disabled soft-reset altogether.

Workarounds:

object commented 1 year ago

Looks like it's time to migrate to ZWave JS UI. BTW unplugging the stick didn't help me.

thechrisps commented 1 year ago

I have this problem too. HA 2023.8.2. ZwaveJS 0.1.86. Aeotec Z-Stick 7, ZWA010-C, 700 series.

Logs look similar to above (Controller identification returned invalid node ID 0)

Downgrading to 0.1.85, rebooting host, unplugging / repluging stick worked to fix it

object commented 1 year ago

Needless to say that downgrading to 0.1.85 solved the issue.

julien-vancouver commented 1 year ago

downgrade, unplug & reboot resolved issue for me.

AlCalzone commented 1 year ago

Will be fixed by node-zwave-js version 11.10.1 (releasing now).

BradyRosino commented 1 year ago

@AlCalzone , thank you! I just applied the update and tested with a full reboot of the host to make sure everything came up clean. All is well again.

object commented 1 year ago

@AlCalzone I confirm that the version 0.1.87 resolves the issue. Thank you for the quick response. I am closing the ticket.