Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All devices missing after upgrading from 1.41.0-1 to 1.42.0-1 #25004

Closed
ki4hrg opened this issue Dec 2, 2024 · 13 comments
Closed

All devices missing after upgrading from 1.41.0-1 to 1.42.0-1 #25004

ki4hrg opened this issue Dec 2, 2024 · 13 comments
Labels
problem Something isn't working

Comments

@ki4hrg
Copy link

ki4hrg commented Dec 2, 2024

What happened?

After upgrading from 1.41.0-1 to 1.42.0-1, all devices are missing from the device list in z2m as well as from the MQTT integration in Home Assistant.

What did you expect to happen?

No response

How to reproduce it (minimal and precise)

No response

Zigbee2MQTT version

1.42.0

Adapter firmware version

7.1.1.0 build 273

Adapter

EZSP v9

Setup

Add-on on Home Assistant OS using Home Assistant Green

Debug log

No response

@ki4hrg ki4hrg added the problem Something isn't working label Dec 2, 2024
@backslashV
Copy link

Same issue!!!

@ki4hrg
Copy link
Author

ki4hrg commented Dec 2, 2024

So, after a bit of working on the issue, I finally got it working. The issue appears to be with the new location for the config required for z2m to be included in HA’s backups - which, incidentally, made this a nightmare to recover from. It was at the top of the release notes for 1.42.0 in HA for me though I can’t find it now, but in short the location for the z2m has to move from the main HA config directory to an addon-specific one.

In my case, I attempted - per the instructions for opening an issue - to switch to the edge version, and in the process uninstalled the stable version. Where I had been able to recover from the pre-upgrade backup, I was unable to after trying unsuccessfully to switch to edge and then switching back to stable - still no devices on stable. This tipped me off, though, since the pre-upgrade backup on inspection clearly didn’t have any of the actual data from z2m.

I finally got my devices back after downloading my last full HA backup, getting the z2m files from there, and reuploading them to the new /addon_config/zigbee2mqtt directory. I’m missing one device I added in the interim and all the devices are missing any HA metadata such as areas and labels, but they’re at least showing up.

I’m guessing the issue can be resolved in the short-term by changing the add-on config to make set data_path to /config/zigbee2mqtt which is where the config files used to live and need to be migrated from. You’ll need to migrate eventually, but hopefully that’ll keep you from being dead in the water in the interim.

Leaving this issue open because it doesn’t seem like expected behavior for that path to get changed without warning that upgrading will break the setup until the manual migration happens.

@ThePatricide
Copy link

ThePatricide commented Dec 2, 2024

Same issue. Wanted to roll back, but half my devices still didn't work in Home Assistant. They are recognized in Z2M, but Home Assistant lists many of them as unavailable. Still figuring out how to restore the working situation. This is quite unconvenient.

Still don't have a working instance yet, unfortunately. It seems HA now recognizes everything again (I restored a backup to 1.40.1) but I get a 'no network route found' and none of my devices seem to work anymore.

Edit:
Some more restarting and refitting the stick, the network finally works again in 1.40.1. Quite reluctant to update again though.

@adekloet
Copy link

adekloet commented Dec 2, 2024

Indeed this happened, I did copy all the files to the new location, changed the Data path but it didn't bring back the devices. It must be something with the last sentence that the new config file location needs to be mounted. I expect that the mounting is done by the add-on itself, but it seems not to do that. I restarted Home Assistant to see if that would force mounting then ew datapath location, but no.

I left a copy of the config files at the new location, but changed the data path back to the /config location and then all works like normal. I will wait a while to see how this works out for others, but be aware of this.

As a note, the version is still on 1.42 I noticed in the front-end config the log path is still show as:
image
Shouldn't that be updated also to the new location or will a later update or virtual directory link fix that?

@demey
Copy link

demey commented Dec 2, 2024

Same issue.
I performed all necessary steps before update by stopping the addon, coping z2m configuration files to
/addon_configs/45df7312_zigbee2mqtt and changing data_path value.
Z2m addon started, but all devices disappeared from Web UI.
No new logs were generated in the new configuration location as well.

I resolved this issue by changing data_path value to previous one.
I think z2m works now with configuration from old location.

@infinity7117
Copy link

Could this migration of the config files not be automated? Read the configs from the old location and write them in the new location? This is not user friendly at all. Am i missing somethig here?

@samumar82
Copy link

Hello, I tried to move the directories as per instructions but looks like in my installation are placed differently.
I'm using the HA Green device.
Anyone can support?

@dpgh947
Copy link

dpgh947 commented Dec 2, 2024

I also updated without doing anything and everything still works, nothing has moved, files still under /config. I do have the new directory under addon_configs, which seems to have been created at the start of November, and it is empty.

Do we have to move manually, should it have happened automatically on this update, or will it be done automatically at some future point? Why is mine still working but others have their installs broken by this release? Notes are very confusing - "Unreleased" ???

@m90att
Copy link

m90att commented Dec 2, 2024

Me too. Tried it twice and both times I lose my devices.

@supermarkert
Copy link

supermarkert commented Dec 2, 2024

@dpgh947

Do we have to move manually, should it have happened automatically on this update, or will it be done automatically at some future point? Why is mine still working but others have their installs broken by this release? Notes are very confusing - "Unreleased" ???

I've since realized that I believe this specific issue only affects HA Add-on users, and that should be discussed in this issue:
zigbee2mqtt/hassio-zigbee2mqtt#664

@ki4hrg
Copy link
Author

ki4hrg commented Dec 2, 2024

Yep, that definitely seems to be the same issue, though it seems like the issue with the add-on not even starting might be separate from the missing devices one.

@MTokarev
Copy link

MTokarev commented Dec 2, 2024

I had the same issue.
I made one deviation from the instructions: instead of setting data_path to /addon_config/zigbee2mqtt, I set it to the actual location /addon_configs/8c77aaed_zigbee2mqtt/zigbee2mqtt.

It works when the folder is moved under your add-on folder /addon_configs/8c77aaed_zigbee2mqtt/zigbee2mqtt, but the data_path is still set to /addon_config/zigbee2mqtt.
This is likely related to the logic that mounts the addons folder into a Docker container.

@Nerivec
Copy link
Collaborator

Nerivec commented Dec 2, 2024

Please see zigbee2mqtt/hassio-zigbee2mqtt#664 (comment)
Closing this one to avoid too much spread-out information.

@Nerivec Nerivec closed this as completed Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problem Something isn't working
Projects
None yet
Development

No branches or pull requests