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.61k stars 30.77k forks source link

Z-Wave Devices (Undefined/Undefined) after restart #33486

Closed Matt-PMCT closed 3 years ago

Matt-PMCT commented 4 years ago

The problem

Either when upgrading from 0.107.6 -> 0.107.7, or when upgrading the supervisor, or just on a random restart I noticed that some of my Z-Wave device stopped working. I have almost 50 devices, and about 15 of them now showed up in the Z-Wave configuration tab as (Node:undefined undefined) instead of the normal node ids.

I tried opening/closing a door sensor and I got the following log entries in the Z-Wave log:

2020-03-31 17:08:37.245 Info, Node028, ApplicationCommandHandler - Unhandled Command Class 0x71
2020-03-31 17:08:44.511 Detail, Node028,   Received: 0x01, 0x12, 0x00, 0x04, 0x00, 0x1c, 0x0a, 0x71, 0x05, 0x00, 0x00, 0x00, 0xff, 0x06, 0x16, 0x00, 0x00, 0xbc, 0x00, 0xd8
2020-03-31 17:08:44.512 Detail,
2020-03-31 17:08:44.512 Info, Node028, ApplicationCommandHandler - Unhandled Command Class 0x71
2020-03-31 17:08:47.444 Detail, Node023,   Received: 0x01, 0x0a, 0x00, 0x04, 0x00, 0x17, 0x02, 0x98, 0x40, 0xc7, 0x00, 0xfb

I then started browsing the forums and found this thread of people having problems with Z-wave, and there was some mention of replacing the zwcfg.xml file from a backup.

I pulled my backup did a WinMerge with the existing file and I found that the existing file that particular node that I was having problems with (Node 28) had nearly all of its CommandClass tags missing in the new file. In fact, all of the nodes that I had listed as undefined undefined were missing data. Attached are my two files below I think some process is deleting data from the zwcfg.xml file in the latest versions of Home Assistant.

Environment

arch | armv7l dev | false docker | true hassio | true os_name | Linux os_version | 4.19.106-v7 python_version | 3.7.7 timezone | America/Los_Angeles version | 0.107.7 virtualenv | false

Problem-relevant configuration.yaml

configuration.yaml.txt

Traceback/Error logs

Additional information

HA107ZwaveXml.txt backupZwaveXml.txt

seichter commented 4 years ago

In a desperate attempt to get my Z-Wave system up an running again I updated to 0.109.0 and now it seems borked beyond repair. The Z-Wave config page only works partially and the log spits out:

2020-04-29 19:54:09.798 Info, mgr,     Manager::WriteConfig completed for driver with home ID of 0xd8146444
2020-04-29 19:54:10.811 Info, mgr,     Driver for controller /dev/ttyACM0 pending removal
2020-04-29 19:54:11.835 Detail, Notification: DriverRemoved
2020-04-29 19:54:11.836 Always, ***************************************************************************
2020-04-29 19:54:11.836 Always, *********************  Cumulative Network Statistics  *********************
2020-04-29 19:54:11.836 Always, *** General
2020-04-29 19:54:11.836 Always, Driver run time: . .  . 2 days, 21 hours, 33 minutes
2020-04-29 19:54:11.836 Always, Frames processed: . . . . . . . . . . . . . . . . . . . . 29
2020-04-29 19:54:11.836 Always, Total messages successfully received: . . . . . . . . . . 29
2020-04-29 19:54:11.836 Always, Total Messages successfully sent: . . . . . . . . . . . . 15
2020-04-29 19:54:11.836 Always, ACKs received from controller:  . . . . . . . . . . . . . 14
2020-04-29 19:54:11.836 Always, *** Errors
2020-04-29 19:54:11.836 Always, Unsolicited messages received while waiting for ACK:  . . 1
2020-04-29 19:54:11.836 Always, Reads aborted due to timeouts:  . . . . . . . . . . . . . 0
2020-04-29 19:54:11.836 Always, Bad checksum errors:  . . . . . . . . . . . . . . . . . . 0
2020-04-29 19:54:11.836 Always, CANs received from controller:  . . . . . . . . . . . . . 1
2020-04-29 19:54:11.836 Always, NAKs received from controller:  . . . . . . . . . . . . . 0
2020-04-29 19:54:11.836 Always, Out of frame data flow errors:  . . . . . . . . . . . . . 0
2020-04-29 19:54:11.836 Always, Messages retransmitted: . . . . . . . . . . . . . . . . . 1
2020-04-29 19:54:11.836 Always, Messages dropped and not delivered: . . . . . . . . . . . 0
2020-04-29 19:54:11.836 Always, ***************************************************************************
2020-04-29 19:54:11.867 Info, mgr,     Driver for controller /dev/ttyACM0 removed
2020-04-29 19:54:12.868 Error, mgr,     Manager::GetDriver failed - Home ID 0xd8146444 is unknown
2020-04-29 19:54:12.868 Warning, Exception: Manager.cpp:373 - 100 - Invalid HomeId passed to GetDriver
2020-04-29 19:54:12.868 Info, mgr,     GetSendQueueCount() failed - _homeId -669752252 not fo
kaijk commented 4 years ago

Looks like per the HA ZW Discord channel, that the new zwave integration may be forthcoming.

At least in the interim make sure that you keep a current copy of your zwcfg* file saved just in case a restart goes wrong and you must replace the corrupted file with a good backup copy.

chrismdann commented 4 years ago

So no solution... Great, just as I need to fully get off Wink. Please someone smart figure this out.

seichter commented 4 years ago

Well, for me the only solution was to:

A few full reboots on the way so that 'junk' gets removed.

However, the ZW networked choked a few tmes on adding non-plus devices which I still have two (out of 20). For instance a device suddenly used the node-ID of another device. In my case a Wall-plug was treated as a thermostat by HA which was weird and survived reboots and resets. Couldn't be solved until I removed both devices again and added them again.

But at the end all working again and I learned to make backup of my config files ;)

fondberg commented 4 years ago

This happened to me with 0.112 and aeonlabs gen 5 stick. I had to restore from backup which took me to 0.111. Another thing that happened after the upgrade was that it wasn't possible to add battery devices.

I will diff the zwcfg file with the 0.112 and see if I can find something.

bagobones commented 4 years ago

I have also been having issues after reboots or shutdowns however it appears to be easily fixed by shutting down the HA docker pulling out the Zwave stick and putting it back in, then starting again.

I SUSPECT that something isn't being released correctly on HA reboot or shutdown.

jantman commented 3 years ago

I've had the same issue, though I (tisk tisk) upgraded directly from 0.94 to 2020.12. Since the upgrade I've had general OZW issues with nodes staying unavailable for hours after a restart, a bunch of node-related entities not working at all, and nodes missing their names. After a restart this morning, all of my Zooz 4-in-1 sensors stopped working... which was a real pain because most of my lights are now motion-controlled using them. I've had this setup for 2 years, for most of the lights in my house, and never had a problem until this upgrade. Post-upgrade, I was also noticing a LOT of "Unknown command class" errors in the log.

Sure enough, going by the earlier replies in this thread, I restored my zwcfg.xml from a 2-week-old (pre-upgrade, I think) backup, and everything seems fixed now, values are showing up correctly, and the "Unknown command class" messages are gone. The zwcfg.xml from backup is nearly twice the size of my current/previous/broken one.

I do daily backups of my HASS config directory. For the time being, I've added an hourly cronjob that calls /api/zwave/saveconfig and then copies the zwcfg.xml to a per-hour file. Hopefully that'll let me retrieve the most recent but good config when needed...

LK-lkbackline commented 3 years ago

im having same isue. no solution yet. Screenshot 2021-01-12 at 21 45 35

github-actions[bot] commented 3 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

adorobis commented 3 years ago

I restored my zwcfg.xml

Same here, after a HA restart today all my zwave entities became "unavailable" and restoring zwcfg.xml from backup (I've had it from 3 days ago) resolved the problem. Have to increase the frequency of config backups as well :)

kaijk commented 3 years ago

Time to consider matriculating to zwave-js/zwjs2mqtt. It's working well.

On Mon, May 10, 2021, 8:57 AM Adam Dorobis @.***> wrote:

I restored my zwcfg.xml

Same here, after a HA restart today all my zwave entities became "unavailable" and restoring zwcfg.xml from backup (I've had it from 3 days ago) resolved the problem. Have to increase the frequency of config backups as well :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/33486#issuecomment-836878642, or unsubscribe https://github.com/notifications/unsubscribe-auth/AL2THYXI2ERKZSKKI2GDYMTTM767BANCNFSM4LYIC27Q .

adorobis commented 3 years ago

Time to consider matriculating to zwave-js/zwjs2mqtt. It's working well.

Yep, just waiting for all key features to be implemented and will migrate :) Maybe also some easier migration path will be there? I'm not keen on renaming over 200 entities (yet)

bagobones commented 3 years ago

I am waiting for a migration option of some kind to zwave-js.. I really don't want to go through all my automations and config files doing manual find replace however I am going to need to anyway most likely as the handling of door / window sensors is so inconsistent between brands..

adorobis commented 3 years ago

@bagobones I think the recommendation for migrating to zwave-js is to rename the new entities rather than updating all automations, template sensors etc to the new names. There are some good posts on how to do that efficiently e.g.: https://community.home-assistant.io/t/home-assistant-core-truenas-core-community-plugin/170542/379

seichter commented 3 years ago

One of the problems I see are that climate entities are probably again just updated partially and not reflecting the typical European setup with thermostats on individual radiators. Maybe the zwave-js developers could be a bit more verbose on what is supported and what not. I am not keen on going through a whole reinstall of the zwave network just to figure out the support is not yet there. I've partially did this once and quickly went back to the original zwave integration because my zwave thermostats were not working, not even showing up in zwave-js.

kaijk commented 3 years ago

I suggest you pose a question on the HA #zwave Discord channel. Developers hang out there. Climate has had work done on it.

On Fri, May 14, 2021 at 3:02 AM Hartmut Seichter @.***> wrote:

One of the problems I see are that climate entities are probably again just updated partially and not reflecting the typical European setup with thermostats on individual radiators. Maybe the zwave-js developers could be a bit more verbose on what is supported and what not. I am not keen on going through a whole reinstall of the zwave network just to figure out the support is not yet there. I've partially did this once and quickly went back to the original zwave integration because my zwave thermostats were not working, not even showing up in zwave-js.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/33486#issuecomment-841145595, or unsubscribe https://github.com/notifications/unsubscribe-auth/AL2THYU35GNGVCXACNGHFX3TNTYLVANCNFSM4LYIC27Q .