home-assistant / addons

:heavy_plus_sign: Docker add-ons for Home Assistant
https://home-assistant.io/hassio/
Apache License 2.0
1.58k stars 1.52k forks source link

Update Zwave-JS to 1.46 crashing HA heavely #2252

Closed canedje closed 3 years ago

canedje commented 3 years ago

The problem

Zwave-js update to 1.46 did heavely crash the system. Even a restore of a backup is not working Updating the VM running HA gives an error the zwave USB is not recognized anymore. I had to run a working backup at HA and restart the NUC for getting up and running

Environment

version core-2021.11.1
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.9.7
os_name Linux
os_version 5.10.75
arch x86_64
timezone Europe/Amsterdam
Home Assistant Community Store GitHub API | ok -- | -- Github API Calls Remaining | 4268 Installed Version | 1.16.0 Stage | running Available Repositories | 889 Installed Repositories | 29
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | failed to load: timeout
Home Assistant Supervisor host_os | Home Assistant OS 6.6 -- | -- update_channel | stable supervisor_version | supervisor-2021.10.8 docker_version | 20.10.8 disk_total | 48.5 GB disk_used | 7.6 GB healthy | true supported | true board | ova supervisor_api | ok version_api | ok installed_addons | File editor (5.3.3), NGINX Home Assistant SSL proxy (3.0.2), Node-RED (10.0.1), Samba share (9.5.1), Terminal & SSH (9.2.1), Z-Wave JS (0.1.45), Samba Backup (5.0.0), ESPHome (2021.10.3), Duck DNS (1.14.0)
Lovelace dashboards | 3 -- | -- resources | 21 views | 97 mode | storage

Problem-relevant configuration

Traceback/Error logs

image

   manufacturer ID:     0x86
                                    product type:        0x01
                                    product ID:          0x5a
                                    supported functions: 
                                    · GetSerialApiInitData (0x02)
                                    · FUNC_ID_SERIAL_API_APPL_NODE_INFORMATION (0x03)
                                    · ApplicationCommand (0x04)
                                    · GetControllerCapabilities (0x05)
                                    · SetSerialApiTimeouts (0x06)
                                    · GetSerialApiCapabilities (0x07)
                                    · SoftReset (0x08)
                                    · UNKNOWN_FUNC_UNKNOWN_0x09 (0x09)
                                    · SetRFReceiveMode (0x10)
                                    · UNKNOWN_FUNC_SET_SLEEP_MODE (0x11)
                                    · FUNC_ID_ZW_SEND_NODE_INFORMATION (0x12)
                                    · SendData (0x13)
                                    · SendDataMulticast (0x14)
                                    · GetControllerVersion (0x15)
                                    · SendDataAbort (0x16)
                                    · FUNC_ID_ZW_R_F_POWER_LEVEL_SET (0x17)
                                    · UNKNOWN_FUNC_SEND_DATA_META (0x18)
                                    · 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)
                                    · UNKNOWN_FUNC_FlashAutoProgSet (0x27)
                                    · GetNVMId (0x29)
                                    · ExtNVMReadLongBuffer (0x2a)
                                    · ExtNVMWriteLongBuffer (0x2b)
                                    · ExtNVMReadLongByte (0x2c)
                                    · ExtExtWriteLongByte (0x2d)
                                    · 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_CREATE_NEW_PRIMARY (0x4c)
                                    · FUNC_ID_ZW_CONTROLLER_CHANGE (0x4d)
                                    · 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)
                                    · FUNC_ID_ZW_EXPLORE_REQUEST_INCLUSION (0x5e)
                                    · RequestNodeInfo (0x60)
                                    · RemoveFailedNode (0x61)
                                    · IsFailedNode (0x62)
                                    · ReplaceFailedNode (0x63)
                                    · UNKNOWN_FUNC_UNKNOWN_0x66 (0x66)
                                    · UNKNOWN_FUNC_UNKNOWN_0x67 (0x67)
                                    · GetRoutingInfo (0x80)
                                    · UNKNOWN_FUNC_LOCK_ROUTE_RESPONSE (0x90)
                                    · UNKNOWN_FUNC_GET_PRIORITY_ROUTE (0x92)
                                    · UNKNOWN_FUNC_SET_PRIORITY_ROUTE (0x93)
                                    · UNKNOWN_FUNC_UNKNOWN_0x98 (0x98)
                                    · UNKNOWN_FUNC_UNKNOWN_0xB4 (0xb4)
                                    · UNKNOWN_FUNC_WATCH_DOG_ENABLE (0xb6)
                                    · UNKNOWN_FUNC_WATCH_DOG_DISABLE (0xb7)
                                    · UNKNOWN_FUNC_WATCH_DOG_KICK (0xb8)
                                    · UNKNOWN_FUNC_UNKNOWN_0xB9 (0xb9)
                                    · UNKNOWN_FUNC_RF_POWERLEVEL_GET (0xba)
                                    · 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 (0xee)
                                    · UNKNOWN_FUNC_UNKNOWN_0xEF (0xef)
2021-11-05T20:07:50.014Z CNTRLR   Performing soft reset...
2021-11-05T20:07:50.033Z CNTRLR   Waiting for the controller to reconnect...
2021-11-05T20:07:51.535Z CNTRLR   Re-opening serial port...
2021-11-05T20:08:00.554Z DRIVER   Failed to open the serial port: Error: No such file or directory, cannot open 
                                  /dev/ttyACM0
Error in driver ZWaveError: Failed to open the serial port: Error: No such file or directory, cannot open /dev/ttyACM0 (ZW0100)
    at Driver.tryOpenSerialport (/usr/src/node_modules/zwave-js/src/lib/driver/Driver.ts:874:17)
    at Driver.ensureSerialAPI (/usr/src/node_modules/zwave-js/src/lib/driver/Driver.ts:1846:4)
    at Driver.softResetInternal (/usr/src/node_modules/zwave-js/src/lib/driver/Driver.ts:1810:9)
    at Driver.initializeControllerAndNodes (/usr/src/node_modules/zwave-js/src/lib/driver/Driver.ts:959:6)
    at Immediate.<anonymous> (/usr/src/node_modules/zwave-js/src/lib/driver/Driver.ts:817:5) {
  code: 100,
  context: undefined,
  transactionSource: undefined
}
Shutting down
2021-11-05T20:08:00.562Z CNTRLR   Waiting for the Serial API to start...
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

Additional information

Mkay505 commented 3 years ago

Not working. 1.47, unRAID, USB not found :( Message like: Try setup again: none

No config possible

When I try to start: Device '/dev/serial/by-id/usb-0658_0200-if00' does not exists! in Z-Wave JS (core_zwave_js).

What did I tried: Update the Zwave and Zwave mqtt Rebooted the unRAID Host

MartinHjelmare commented 3 years ago

Which add-on are you running? The fix was only done for the official zwave_js add-on. If you're running the community zwavejs2mqtt add-on you need to disable soft-reset manually in the zwavejs2mqtt settings.

Mkay505 commented 3 years ago

Thank you. It was the zwave2mqtt addon. Great :)

Martin Hjelmare @.***> schrieb am Di., 9. Nov. 2021, 20:35:

Which add-on are you running. The fix was only done for the official zwave_js add-on. If you're running the community zwavejs2mqtt add-on you need to disable soft-reset manually in the zwavejs2mqtt settings.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/home-assistant/addons/issues/2252#issuecomment-964471760, or unsubscribe https://github.com/notifications/unsubscribe-auth/AR4KG2YQX4FULQVADIDK6N3ULFZZ5ANCNFSM5HOUVEXQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

tuday2 commented 3 years ago

Thanks so much!

I can confirm that 0.1.47 is working fine.

ESXi 7.0.3 Hassos 6.6 VM

Mkay505 commented 3 years ago

Good news in front: Zwave_js module is working, but the system logs show cyclically:

21-11-10 11:29:41 ERROR (SyncWorker_3) [supervisor.docker.interface] Container addon_core_zwave_js is not running 21-11-10 11:29:57 WARNING (MainThread) [supervisor.misc.tasks] Watchdog found a problem with core_zwave_js!

The warning is repeated every 30 seconds. The error is repeated every 5 minutes.

21-11-10 11:44:04 WARNING (MainThread) [supervisor.misc.tasks] Watchdog found a problem with core_zwave_js! 21-11-10 11:44:04 INFO (SyncWorker_2) [supervisor.docker.interface] Cleaning addon_core_zwave_js application 21-11-10 11:44:04 INFO (SyncWorker_2) [supervisor.docker.addon] Starting Docker add-on homeassistant/amd64-addon-zwave_js with version 0.1.47 21-11-10 11:44:05 INFO (MainThread) [supervisor.api.middleware.security] /host/info access from core_zwave_js 21-11-10 11:44:34 WARNING (MainThread) [supervisor.misc.tasks] Watchdog found a problem with core_zwave_js! 21-11-10 11:44:35 INFO (SyncWorker_3) [supervisor.docker.interface] Cleaning addon_core_zwave_js application 21-11-10 11:44:35 INFO (SyncWorker_3) [supervisor.docker.addon] Starting Docker add-on homeassistant/amd64-addon-zwave_js with version 0.1.47 21-11-10 11:44:35 INFO (MainThread) [supervisor.api.middleware.security] /host/info access from core_zwave_js 21-11-10 11:44:49 ERROR (SyncWorker_0) [supervisor.docker.interface] Container addon_core_zwave_js is not running

What´s going wrong?

z-wave js 0.1.47 z-wave js 2mqtt 0.28 supervisor-2021.10.8

MartinHjelmare commented 3 years ago

You can't run both the official add-on core_zwave_js and the community add-on for zwavejs2mqtt connecting to the same controller at the same time.

If you have set up the integration to use the official add-on the integration will manage the add-on and try to install and upgrade it if it detects it not running.

If you don't want to use the official add-on you need to re-configure the server in the integration configuration panel to not use the official add-on and enter the websocket URL to the community zwavejs2mqtt add-on manually.

This problem is not related to this issue, so please continue troubleshooting in our help channels if needed: https://www.home-assistant.io/help/#communication-channels

cdu913 commented 3 years ago

Hi,

I have the same issue like reported here (with 1.46 or 1.47), however, in a non-VM env.

System Health (after fallback to 1.45)

version core-2021.10.6
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.9.7
os_name Linux
os_version 5.10.17-v8
arch aarch64
timezone Europe/Berlin
Home Assistant Community Store GitHub API | ok -- | -- Github API Calls Remaining | 4978 Installed Version | 1.15.2 Stage | running Available Repositories | 900 Installed Repositories | 2
Home Assistant Cloud logged_in | true -- | -- subscription_expiration | 24. November 2021, 01:00 relayer_connected | true remote_enabled | false remote_connected | false alexa_enabled | true google_enabled | true remote_server | eu-central-1-1.ui.nabu.casa can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 6.6 -- | -- update_channel | stable supervisor_version | supervisor-2021.10.8 docker_version | 20.10.8 disk_total | 13.9 GB disk_used | 5.3 GB healthy | true supported | true board | rpi4-64 supervisor_api | ok version_api | ok installed_addons | Mosquitto broker (6.0.1), ESPHome (2021.10.3), Terminal & SSH (9.2.1), AppDaemon 4 (0.7.0), File editor (5.3.3), Z-Wave JS (0.1.45)
Lovelace dashboards | 2 -- | -- resources | 1 views | 6 mode | storage

The Z-Wave JS log below (with 1.47)

021-11-10T11:49:03.522Z DRIVER   ███████╗ ██╗    ██╗  █████╗  ██╗   ██╗ ███████╗             ██╗ ███████╗
                                  ╚══███╔╝ ██║    ██║ ██╔══██╗ ██║   ██║ ██╔════╝             ██║ ██╔════╝
                                    ███╔╝  ██║ █╗ ██║ ███████║ ██║   ██║ █████╗   █████╗      ██║ ███████╗
                                   ███╔╝   ██║███╗██║ ██╔══██║ ╚██╗ ██╔╝ ██╔══╝   ╚════╝ ██   ██║ ╚════██║
                                  ███████╗ ╚███╔███╔╝ ██║  ██║  ╚████╔╝  ███████╗        ╚█████╔╝ ███████║
                                  ╚══════╝  ╚══╝╚══╝  ╚═╝  ╚═╝   ╚═══╝   ╚══════╝         ╚════╝  ╚══════╝
2021-11-10T11:49:03.531Z DRIVER   version 8.7.5
2021-11-10T11:49:03.532Z DRIVER   
2021-11-10T11:49:03.634Z CONFIG   version 8.7.5
2021-11-10T11:49:05.005Z CNTRLR   querying controller IDs...
2021-11-10T11:49:05.350Z CNTRLR   received controller IDs:
                                    home ID:     0xeb55cf3d
                                    own node ID: 1
2021-11-10T11:49:05.351Z CNTRLR   querying API capabilities...
2021-11-10T11:49:05.383Z CNTRLR   received API capabilities:
                                    serial API version:  15.1
                                    manufacturer ID:     0x0109
                                    product type:        0x1001
                                    product ID:          0x0201
                                    supported functions: 
                                    · GetSerialApiInitData (0x02)
                                    · FUNC_ID_SERIAL_API_APPL_NODE_INFORMATION (0x03)
                                    · ApplicationCommand (0x04)
                                    · GetControllerCapabilities (0x05)
                                    · SetSerialApiTimeouts (0x06)
                                    · GetSerialApiCapabilities (0x07)
                                    · SoftReset (0x08)
                                    · UNKNOWN_FUNC_UNKNOWN_0x09 (0x09)
                                    · SerialAPIStarted (0x0a)
                                    · SetRFReceiveMode (0x10)
                                    · UNKNOWN_FUNC_SET_SLEEP_MODE (0x11)
                                    · FUNC_ID_ZW_SEND_NODE_INFORMATION (0x12)
                                    · SendData (0x13)
                                    · SendDataMulticast (0x14)
                                    · GetControllerVersion (0x15)
                                    · SendDataAbort (0x16)
                                    · FUNC_ID_ZW_R_F_POWER_LEVEL_SET (0x17)
                                    · UNKNOWN_FUNC_SEND_DATA_META (0x18)
                                    · 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)
                                    · UNKNOWN_FUNC_FlashAutoProgSet (0x27)
                                    · UNKNOWN_FUNC_UNKNOWN_0x28 (0x28)
                                    · GetNVMId (0x29)
                                    · ExtNVMReadLongBuffer (0x2a)
                                    · ExtNVMWriteLongBuffer (0x2b)
                                    · ExtNVMReadLongByte (0x2c)
                                    · ExtExtWriteLongByte (0x2d)
                                    · 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_CREATE_NEW_PRIMARY (0x4c)
                                    · FUNC_ID_ZW_CONTROLLER_CHANGE (0x4d)
                                    · 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)
                                    · FUNC_ID_ZW_EXPLORE_REQUEST_INCLUSION (0x5e)
                                    · RequestNodeInfo (0x60)
                                    · RemoveFailedNode (0x61)
                                    · IsFailedNode (0x62)
                                    · ReplaceFailedNode (0x63)
                                    · UNKNOWN_FUNC_UNKNOWN_0x66 (0x66)
                                    · UNKNOWN_FUNC_UNKNOWN_0x67 (0x67)
                                    · GetRoutingInfo (0x80)
                                    · UNKNOWN_FUNC_LOCK_ROUTE_RESPONSE (0x90)
                                    · UNKNOWN_FUNC_GET_PRIORITY_ROUTE (0x92)
                                    · UNKNOWN_FUNC_SET_PRIORITY_ROUTE (0x93)
                                    · UNKNOWN_FUNC_UNKNOWN_0x98 (0x98)
                                    · UNKNOWN_FUNC_UNKNOWN_0xB4 (0xb4)
                                    · UNKNOWN_FUNC_WATCH_DOG_ENABLE (0xb6)
                                    · UNKNOWN_FUNC_WATCH_DOG_DISABLE (0xb7)
                                    · UNKNOWN_FUNC_WATCH_DOG_KICK (0xb8)
                                    · UNKNOWN_FUNC_UNKNOWN_0xB9 (0xb9)
                                    · UNKNOWN_FUNC_RF_POWERLEVEL_GET (0xba)
                                    · 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 (0xee)
                                    · UNKNOWN_FUNC_UNKNOWN_0xEF (0xef)
2021-11-10T11:49:05.391Z CNTRLR   Performing soft reset...
2021-11-10T11:49:05.414Z CNTRLR   Waiting for the controller to reconnect...
2021-11-10T11:49:06.919Z CNTRLR   Waiting for the Serial API to start...

Should I open an new issue ?

MartinHjelmare commented 3 years ago

What's the problem symptom? I don't see any error in the log.

cdu913 commented 3 years ago

sorry, below the missing lines. It goes in a loop and I looe my z-wave devices. It actually seems to be a different issue with 1.47 in my case

2021-11-10T20:17:17.633Z CNTRLR Did not receive notification that Serial API has started, checking if it respo nds... 2021-11-10T20:17:17.659Z CNTRLR Failed to execute controller command after 1/3 attempts. Scheduling next try i n 100 ms. 2021-11-10T20:17:17.765Z CNTRLR Failed to execute controller command after 2/3 attempts. Scheduling next try i n 1100 ms. 2021-11-10T20:17:18.885Z CNTRLR Serial API did not respond, trying again in 2 seconds... [21:17:19] INFO: Successfully send discovery information to Home Assistant. 2021-11-10T20:17:22.002Z DRIVER ███████╗ ██╗ ██╗ █████╗ ██╗ ██╗ ███████╗ ██╗ ███████╗ ╚══███╔╝ ██║ ██║ ██╔══██╗ ██║ ██║ ██╔════╝ ██║ ██╔════╝ ███╔╝ ██║ █╗ ██║ ███████║ ██║ ██║ █████╗ █████╗ ██║ ███████╗ ███╔╝ ██║███╗██║ ██╔══██║ ╚██╗ ██╔╝ ██╔══╝ ╚════╝ ██ ██║ ╚════██║ ███████╗ ╚███╔███╔╝ ██║ ██║ ╚████╔╝ ███████╗ ╚█████╔╝ ███████║ ╚══════╝ ╚══╝╚══╝ ╚═╝ ╚═╝ ╚═══╝ ╚══════╝ ╚════╝ ╚══════╝ 2021-11-10T20:17:22.012Z DRIVER version 8.7.5 2021-11-10T20:17:22.013Z DRIVER
2021-11-10T20:17:22.122Z CONFIG version 8.7.5

cdu913 commented 3 years ago

with1.45 image

with 1.47 image

MartinHjelmare commented 3 years ago

@cdu913 please open a new issue in our core repo. It's not clear that your problem has the same cause as this issue.

Please be sure to include the full driver debug level log in the issue.

Thanks!