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

Upgrading to 1.42.0-1 removes all the devices #664

Open
Igloczek opened this issue Dec 2, 2024 · 96 comments
Open

Upgrading to 1.42.0-1 removes all the devices #664

Igloczek opened this issue Dec 2, 2024 · 96 comments

Comments

@Igloczek
Copy link

Igloczek commented Dec 2, 2024

Description of the issue

Upgrading the add-on from v1.41.0-1 to 1.42.0-1 removes all the configured devices and possibly other config options, I didn't check it, just run to restore backup ASAP.

Since this is not a major release, it shouldn't introduce any breaking changes.

Addon version

1.42.0-1

Platform

Core 2024.11.3
Supervisor 2024.11.4
Operating System 13.2
Frontend 20241106.2

Logs of the issue (if applicable)

No response

@Igloczek
Copy link
Author

Igloczek commented Dec 2, 2024

Also this is weird, it shows some other release notes than the one you have on Github 🤔

It kinda looks like the add-on was upgraded using code from the master branch, instead of the tagged version, so we get some WIP stuff there.

CleanShot 2024-12-02 at 13 53 15

@Acey-yo
Copy link

Acey-yo commented Dec 2, 2024

Same here....-_-

@JaCoLJcL
Copy link

JaCoLJcL commented Dec 2, 2024

Same here, raspberry pi haos instalation. Some devices working some not, reverse backup dont work. Fix it quick!

@Igloczek
Copy link
Author

Igloczek commented Dec 2, 2024

That's interesting, in my case restoring backup did a trick 🤔

@AppleFlapp
Copy link

My add-on is not even starting. Error while starting zigbee-herdsman

@supermarkert
Copy link

supermarkert commented Dec 2, 2024

Also this is weird, it shows some other release notes than the one you have on Github 🤔

It kinda looks like the add-on was upgraded using code from the master branch, instead of the tagged version, so we get some WIP stuff there.

I had the same question. I had no issues upgrading, but noticed that my config was not actually migrated as indicated in the "unreleased" notes. I think those notes are intended for the upcoming 2.0 release in January, and don't apply to this release.

@Kopetan4egX
Copy link

All devices removed, restoring backup doesn't help at all

@samumar82
Copy link

Same issue here, tried to followup the steps to move the directory but the path is different using the Home Assistant Green devices. All zigbee devices are not responding anymore although I can see all there in the Z2M list

@CodyJon
Copy link

CodyJon commented Dec 2, 2024

Same issues.. .oooof tried all the above still cannot control any Z2M devices..

@Kopetan4egX
Copy link

All zigbee devices are not responding anymore although I can see all there in the Z2M list

Check their names in HA, not in Z2M list. I've already read reports about entities been renamed to their friendly names. Happened to me too. Instead of default IEEE (or whatever it is) name i have something like water_heater_plug. Need to somehow rename them all back... I hope there is another way to fix this, not manually.

@JaCoLJcL
Copy link

JaCoLJcL commented Dec 2, 2024

After reset whole system (red button) and backup zigbee2mqtt start

@MTokarev
Copy link

MTokarev commented Dec 2, 2024

After I updated the system, all my devices disappeared.
Not sure if that will help other, but I left a comment in this topic: Koenkk/zigbee2mqtt#25004 (comment)

@Koenkk
Copy link
Contributor

Koenkk commented Dec 2, 2024

Could you check if this is fixed in the 1.42.0-2 addon? Should be there in a few mins from now.

@GraemeF
Copy link

GraemeF commented Dec 2, 2024

Could you check if this is fixed in the 1.42.0-2 addon? Should be there in a few mins from now.

Looks like that has done the trick! Devices are back

@Damien2407
Copy link

Hi guys
I realized that after the update that in configuration.yaml for each device i had a line like this that was added:

This is for the icon....

Screenshot 2024-12-02 at 22-12-16 Studio Code Server – Home Assistant

@z-master42
Copy link

That was already there before.

@polygon242
Copy link

I had the problem with the huge config file containing device icon data a while back because i ticked the option "Bilder lokalisieren (locize pictures)" in the gui under config/tools. System was unusable so i restored old config file ..

@Pferdebockwurst
Copy link

Could you check if this is fixed in the 1.42.0-2 addon? Should be there in a few mins from now.

@Koenkk Thank you for the fix! But I was able to "fix" the error after upgrading to 1.42.0-1 on my own by simply following the advice and moving the config folder. Can I safely update to 1.42.0-2 anyway or would I have to move the folder back to the former location?

@Sholofly
Copy link

Sholofly commented Dec 2, 2024

Same here, raspberry pi haos instalation. Some devices working some not, reverse backup dont work. Fix it quick!

Fix it quick? It's a free integration, you don't have anything to demand here. It's open surce, if you want quick solutions please consider contributing to this repo.

@billiepreks
Copy link

billiepreks commented Dec 2, 2024

Just spend the day to reappair everything, fix all automations & co. Saw the update, felt stupid, updated z2m, then lost everything again

And revert back to save previous update don't restore my devices. Sad. Will see tommorrow aha

Still, thanks for your work @Koenkk , take the time you need

@zviratkos
Copy link

Hello,

have you seen comment about relocated root directory? I had same experience, but I then moved data from:
/usr/share/hassio/homeassistant/zigbee2mqtt/
to
/usr/share/hassio/addon_configs/45df7312_zigbee2mqtt/zigbee2mqtt/
and started plugin as usual, all data were there, everything is working fine.

BR JS

@Crocmagnon
Copy link

Just came here to mention that I didn’t observe any issue when upgrading to 1.42.0-1. I also upgraded to 1.42.0-2 and things are still running smoothly.

@Tamsy
Copy link

Tamsy commented Dec 3, 2024

I didn’t observe any issue when upgrading to 1.42.0-1. I also upgraded to 1.42.0-2 and things are still running smoothly.

The very same here on two instances here running HA Supervisor. No issues encountered so far.

@billiepreks
Copy link

Hello,

have you seen comment about relocated root directory? I had same experience, but I then moved data from: /usr/share/hassio/homeassistant/zigbee2mqtt/ to /usr/share/hassio/addon_configs/45df7312_zigbee2mqtt/zigbee2mqtt/ and started plugin as usual, all data were there, everything is working fine.

BR JS

The thing is when I updated to 0-1 I still had my devices. It was when I did the migration that I lost them all. I re-paired them all, then saw the 0-2 update, did a save then updated. Lost all devices again, and restoring save dont bring them back.

@axolotls666
Copy link

A lot of these minor updates breaks my system, so I just rollback and the next one usually works. Will try this one. Thanks.

@raphael1688
Copy link

raphael1688 commented Dec 3, 2024

I have the following 'lagecy' settings changed to false ever since version 1.31 or older. No issue upgraded from 1.41.0-1.

homeassistant:
legacy_triggers: false
mqtt:
base_topic: zigbee2mqtt_MAIN
server: mqtt://core-mosquitto
user:
password:
version: 5
serial:
port: tcp://192.168.88.96:6638
baudrate: 230400
adapter: ember
rtscts: false
frontend:
port: 8099
advanced:
homeassistant_legacy_entity_attributes: false
legacy_api: false
legacy_availability_payload: false
log_syslog:
app_name: Zigbee2MQTT
eol: /n
host: localhost
localhost: localhost
path: /dev/log
pid: process.pid
port: 514
protocol: udp4
type: '5424'
channel: 23
transmit_power: 20
adapter_delay: 0
log_level: warn
last_seen: ISO_8601
device_options:
legacy: false

@ds185045
Copy link

ds185045 commented Dec 3, 2024

Yes I can see why, I was aware of this anomaly because I wrote a simple addon a while ago and it stems from the way "map" in the addon setup works, but it is highly confusing when setting up the addon from a point of ignorance - looking at the root dir in terminal, you get

ls -al /                                              
total 132
drwxr-xr-x    1 root     root          4096 Nov 28 11:26 .
drwxr-xr-x    1 root     root          4096 Nov 28 11:26 ..
-rwxr-xr-x    1 root     root             0 Nov 28 11:26 .dockerenv
drwxr-xr-x    7 root     root          4096 Nov  1 11:10 addon_configs
drwxr-xr-x    3 root     root          4096 Oct 22  2023 addons
drwxr-xr-x    3 root     root          4096 Dec  3 09:40 backup
drwxr-xr-x    1 root     root          4096 Sep 10 12:41 bin
drwxr-xr-x    2 root     root         12288 Jun  7 15:55 command
lrwxrwxrwx    1 root     root            14 Nov 28 11:26 config -> /homeassistant
drwxr-xr-x    4 root     root          4096 Nov 28 11:26 data
drwxr-xr-x   19 root     root          3440 Nov 28 11:24 dev
drwxr-xr-x    1 root     root          4096 Nov 28 11:26 etc
drwxr-xr-x    1 root     root          4096 Nov 28 11:26 home
drwxr-xr-x   18 root     root          4096 Dec  3 11:52 homeassistant
-rwxr-xr-x    1 root     root          1012 Jun  7 15:55 init
drwxr-xr-x    1 root     root          4096 Sep 10 12:42 lib
drwxr-xr-x    2 root     root          4096 Sep 10 12:41 lib64
drwxr-xr-x    4 root     root          4096 Sep 10 09:50 media
drwxr-xr-x    2 root     root          4096 Sep  6 12:34 mnt
drwxr-xr-x    2 root     root          4096 Sep  6 12:34 opt
drwxr-xr-x    1 root     root          4096 Jun  7 15:55 package
dr-xr-xr-x  428 root     root             0 Nov 28 11:26 proc
drwxr-xr-x    1 root     root          4096 Dec  3 12:11 root
drwxr-xr-x    1 root     root          4096 Nov 28 11:26 run
drwxr-xr-x    1 root     root          4096 Sep 10 12:42 sbin
drwxr-xr-x    3 root     root          4096 Oct 20  2023 share
drwxr-xr-x    2 root     root          4096 Sep  6 12:34 srv
drwxr-xr-x    3 root     root          4096 Oct 30 21:12 ssl
dr-xr-xr-x   13 root     root             0 Nov 28 11:24 sys
drwxrwxrwt    1 root     root          4096 Dec  3 12:04 tmp
drwxr-xr-x    1 root     root          4096 Sep 10 12:41 usr
drwxr-xr-x    1 root     root          4096 Sep 10 12:41 var
  • so you can see how "/config/zigbee2mqtt" works, but you can't see how "/addon_config/zigbee2mqtt" works, because you can only see "addon_configs" with an "s" in the root dir - but if you know how, you can look in the container
docker exec addon_45df7312_zigbee2mqtt ls -al /            
total 108
drwxr-xr-x    1 root     root          4096 Dec  3 11:42 .
drwxr-xr-x    1 root     root          4096 Dec  3 11:42 ..
-rwxr-xr-x    1 root     root             0 Dec  3 11:42 .dockerenv
drwxr-xr-x    3 root     root          4096 Dec  3 11:27 addon_config
drwxr-xr-x    1 root     root          4096 Dec  2 20:37 app
drwxr-xr-x    1 root     root          4096 Dec  2 20:36 bin
drwxr-xr-x    2 root     root         12288 Nov  8 07:29 command
drwxr-xr-x   18 root     root          4096 Dec  3 11:52 config
drwxr-xr-x    2 root     root          4096 Dec  3 11:42 data
drwxr-xr-x   19 root     root          3440 Nov 28 11:24 dev
-rwxr-xr-x    1 root     root          3671 Dec  2 20:36 docker-entrypoint.sh
drwxr-xr-x    1 root     root          4096 Dec  3 11:42 etc
drwxr-xr-x    2 root     root          4096 Sep  6 12:34 home
-rwxr-xr-x    1 root     root          1012 Nov 20  2023 init
drwxr-xr-x    1 root     root          4096 Dec  2 20:36 lib
drwxr-xr-x    5 root     root          4096 Sep  6 12:34 media
drwxr-xr-x    2 root     root          4096 Sep  6 12:34 mnt
drwxr-xr-x    2 root     root          4096 Sep  6 12:34 opt
drwxr-xr-x    6 root     root          4096 Nov 20  2023 package
dr-xr-xr-x  429 root     root             0 Dec  3 11:42 proc
drwx------    2 root     root          4096 Sep  6 12:34 root
drwxr-xr-x    1 root     root          4096 Dec  3 11:42 run
drwxr-xr-x    1 root     root          4096 Dec  2 20:36 sbin
drwxr-xr-x    3 root     root          4096 Oct 20  2023 share
drwxr-xr-x    2 root     root          4096 Sep  6 12:34 srv
dr-xr-xr-x   13 root     root             0 Dec  3 11:42 sys
drwxrwxrwt    1 root     root          4096 Dec  3 11:42 tmp
drwxr-xr-x    1 root     root          4096 Nov  8 07:30 usr
drwxr-xr-x   12 root     root          4096 Sep  6 12:34 var

and see the directory without the "s" there, which is mapped on to the 45df7312... directory:

docker exec addon_45df7312_zigbee2mqtt ls -al /addon_config
total 12
drwxr-xr-x    3 root     root          4096 Dec  3 11:27 .
drwxr-xr-x    1 root     root          4096 Dec  3 11:42 ..
drwxr-xr-x    3 root     root          4096 Dec  3 11:42 zigbee2mqtt

Thanks for the details. I am running 1.42.0.2 and not performed the copy/move operation

Would this work ?

  1. Stop the addon
  2. Move the zigbee2mqtt directory to addon_configs
    mv -f /homeassistant/zigbee2mqtt /addon_configs/45df7312_zigbee2mqtt
  3. Modify the data_config to point to /addon_config/zigbee2mqtt

How did to get the files in /addon_config/zigbee2mqtt directory ?

@andyblac
Copy link

andyblac commented Dec 3, 2024

for anyone having issue PLEASE make sure you are using the correct docker container id double check it by looking the WEBUI URL like this.

Screenshot 2024-12-03 at 13 18 49

as you see mine is 9336c2b0_zigbee2mqtt

@Daemonentreiber
Copy link

I got it to work by changing the path, but it doesnt seem to perform very well now.

Lights either take forever to switch or cant be reached at all. If i powercycle them they work again for a while. Switching them from the quick panel on my phone (android) takes about a minute now.
Logs arent showing anything out of order though.

@andyblac
Copy link

andyblac commented Dec 3, 2024

also for those using EDGE version the path IS DIFFERENT ie /addon_configs/9336c2b0_zigbee2mqtt_edge

@dpgh947
Copy link

dpgh947 commented Dec 3, 2024

How did to get the files in /addon_config/zigbee2mqtt directory ?

My target dir was initially empty, so I did (no -f needed)

mv /config/zigbee2mqtt /addon_configs/45df7312_zigbee2mqtt

which is effectively the same as the command you gave, /config is just a link to /homeassistant

@dpgh947
Copy link

dpgh947 commented Dec 3, 2024

I got it to work by changing the path, but it doesnt seem to perform very well now.

I am seeing no such delays, all my zigbee stuff (lights and door sensors etc.) is responding/reporting instantly. Does your zigbee map look ok, maybe one or more routers have dropped off for some reason? Maybe try power cycling your zigbee dongle?

@TraipZe
Copy link

TraipZe commented Dec 3, 2024

Is it secure to update to 1.42.0-2 ?

@mballoni
Copy link

mballoni commented Dec 3, 2024

Had this issue as well.
At first I thought it was solely because I've changed the zigbee channel.
It raises the question though: changing the zigbee channel would have the same result?

@Daemonentreiber
Copy link

I got it to work by changing the path, but it doesnt seem to perform very well now.

I am seeing no such delays, all my zigbee stuff (lights and door sensors etc.) is responding/reporting instantly. Does your zigbee map look ok, maybe one or more routers have dropped off for some reason? Maybe try power cycling your zigbee dongle?

Everything looks fine. Already restarted the host multiple times and tried different usb ports.
The (physical) switches are working fine though. I can see them being pressed instantly, but as i said it takes up to minute to switch the corresponding light.
The only other problem i have is that checking for ota updates crashes the addon, no idea if thats related.

Im running the same hardware (and zigbee devices) for over a year now, never had any problems.

@malosaaa
Copy link

malosaaa commented Dec 3, 2024

Lucky i did NOT update at all..

I really don't know why this version has been released.. majority of the people don't even know what to do... so updating from a remote location is a no-no for me now.
so i stay on 1.41.0-1 till everything works automatically...

@Pferdebockwurst
Copy link

Lucky i did NOT update at all..

I really don't know why this version has been released.. majority of the people don't even know what to do... so updating from a remote location is a no-no for me now. so i stay on 1.41.0-1 till everything works automatically...

Maybe take your time to think again and delete this comment. This definitely didn't happen intentionally. Remember, the developers made this great software during their free-time.

@ChristianHannover
Copy link

Same issues here.
The Zigbee2MQTT-config for SLZB 06 M have been updated (1.42.0-1) and running without any issues.
My Sonoff Bridge Pro where not starting at all. I updated Tasmota on the Sonoff Bridge Pro to 14.3.0.7 (coming from Tasmota 14.3.04) and were able to start the bridges under the updated firmware (and Zigbee2MQTT 1.42.0-1) - but without the former Zigbee2MQTT-configuration (which I copied and configured as described in the HA info section) - all devices are lost and obviously have to be repaired.
Also, the Sonoff Bridge Pro is not running stable a long time while dropping off the network regulary (which not happend before the update to Zigbee2MQTT vs. 1.42.0-1).
The Sonoff Bridge Pro first started after I switched from ember to eszp and back to ember in the options (I tried with the options as I was not sure where the connection issues have to be searched). A bit strange. I will try to switch the ZigBee channels for a more stable connection to avoid conflicts with wifi/zigbee from other devices/networks.

The Sonoff Bridge Pro (I am using two of them ) are connected via wifi.
The SLZM 06 M (I am using three of them) are connected via wifi (2x) and via eth0 (1x).

@dpgh947
Copy link

dpgh947 commented Dec 3, 2024

The only other problem i have is that checking for ota updates crashes the addon, no idea if thats related.

Checking for ota updates works ok for me too. Strange...

@johnthomas00
Copy link

I had the issue and solve via:

1. restore from backup

2. copy ENTIRE config directory (example, your setup may be different:  cp -R /homeassistant/zigbee2mqtt/* /root/addon_configs/45df7312_zigbee2mqtt/zigbee2mqtt)

3. Run update again

All devices were present and everything works.

Just further updated to -02 without issues.

The -2 updated seem to have reverted to /homeassistant/zigbee2mqtt/ as that is the folder where data is being updated for me now. I did "mv /root/addon_configs/45df7312_zigbee2mqtt/zigbee2mqtt /root/addon_configs/45df7312_zigbee2mqtt/zigbee2mqtt.old" then rebooted and everything is working still.

@AXEBro
Copy link

AXEBro commented Dec 3, 2024

Hmm restoring from backup didn't work. I'm a bit confused about the unique id ... where do I find mine? I'm running HAOS, via a VM.
image

image

@QaDoPL
Copy link

QaDoPL commented Dec 3, 2024

For me 1.42.0-1 works perfectly without any issued. Will keep this version now.
Lucky me i don't even made backup before update
And glad few of mine devices starting be recognized.

Core 2024.11.3
Supervisor 2024.11.4
Operating System 13.2

ConBee II adapter

@Dominic121282
Copy link

I still have 1.41.0-1.
Should I update to 1.42.0-2 or not?

@AXEBro
Copy link

AXEBro commented Dec 3, 2024

so my path looks like this:
/hassio/addon/45df7312_zigbee2mqtt/config

now - I have to figure out where that addon directory is - or maybe I need to create the whole path? addon/45df7312_zigbee2mqtt/config ?

@vgdh
Copy link

vgdh commented Dec 3, 2024

z2m in docker should check if the /addon_config/zigbee2mqtt is empty and copy all the files from the old /config/zigbee2mqtt directory to the new one.
After that it could change the path in the config automatically and call it a day.
After some time deprecate the old path usage.
And that will be smooth for all the users.

@Koenkk
Copy link
Contributor

Koenkk commented Dec 3, 2024

I still have 1.41.0-1. Should I update to 1.42.0-2 or not?

This upgrade should be fine! I think for users that already upgraded to 1.42.0-1 and now want to upgrade to 1.42.0-2, they should change the data path to /addon_config/zigbee2mqtt (I cannot test it atm, would be nice if someone else could confirm)

@Pferdebockwurst
Copy link

Pferdebockwurst commented Dec 3, 2024

I still have 1.41.0-1. Should I update to 1.42.0-2 or not?

This upgrade should be fine! I think for users that already upgraded to 1.42.0-1 and now want to upgrade to 1.42.0-2, they should change the data path to /addon_config/zigbee2mqtt (I cannot test it atm, would be nice if someone else could confirm)

Does this apply to the users who upgraded to 1.42.0-1 and have a working setup because they moved the files according the release notes?

@Koenkk
Copy link
Contributor

Koenkk commented Dec 3, 2024

Does this apply to the users who upgraded to 1.42.0-1 and have a working setup because they moved the files according the release notes?

Yes (I think)

@dpgh947
Copy link

dpgh947 commented Dec 3, 2024

I had installed 1.42.0-1 in a test HA and without doing anything with it, the data_path field was initially set to the new location /addon_config/zigbee2mqtt

I just installed the 0-2 level there, and it has now reverted to /config/zigbee2mqtt, so I assume from this that we should not have carried out the move yet after all.

What a mess.

@Koenkk
Copy link
Contributor

Koenkk commented Dec 3, 2024

@dpgh947 could you check if if works again after changing the data path to /addon_config/zigbee2mqtt?

@dpgh947
Copy link

dpgh947 commented Dec 3, 2024

@dpgh947 could you check if if works again after changing the data path to /addon_config/zigbee2mqtt?

My main live setup is working fine now with the files in the new location, this is just what I saw when I installed the addon on a test HA - it isn't running or configured at all on there, I was just seeing what the data_path was initially set to. So I assume that any more interim updates to the addon before the big change that is coming will revert the data_path field to /config again??

@stefanuytterhoeven
Copy link

What is going on?
I have hassos on rpi4.
currently mqtt on 1.42.0-1.
homeassistant/zigbee2mqtt as directory
everything works
now i see a FIX ?
what do i have to do????

what is the fix doing? does it create a new directory and copies the files from the original place?
Does anyone know what's happening?

@Delta1977
Copy link

z2m in docker should check if the /addon_config/zigbee2mqtt is empty and copy all the files from the old /config/zigbee2mqtt directory to the new one.

After that it could change the path in the config automatically and call it a day.

After some time deprecate the old path usage.

And that will be smooth for all the users.

The Migration is in v2.0 Branch #649

@Delta1977
Copy link

One hint from my side:

If I move the folders via cli then all is ok. If I move it with vscode add-on then something goes wrong and z2m UI is empty.

@AXEBro
Copy link

AXEBro commented Dec 3, 2024

not sure what's wrong with my install but I moved to addon_config ... but still seeing errors, and zigbee2mqtt is not starting:
Starting Zigbee2MQTT without watchdog.
[2024-12-03 12:18:22] info: z2m: Logging to console, file (filename: log.log)
[2024-12-03 12:18:22] info: z2m: Starting Zigbee2MQTT version 1.42.0 (commit #unknown)
[2024-12-03 12:18:22] info: z2m: Starting zigbee-herdsman (2.1.9)
[2024-12-03 12:18:22] warning: zh:ezsp: 'ezsp' driver is deprecated and will only remain to provide support for older firmware (pre 7.4.x). Migration to 'ember' is recommended. If using Zigbee2MQTT see Koenkk/zigbee2mqtt#21462
[2024-12-03 12:18:22] error: zh:ezsp:ezsp: Connection attempt 1 error: Error: Error: No such file or directory, cannot open /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20220714181458-if00
[2024-12-03 12:18:27] error: zh:ezsp:ezsp: Connection attempt 2 error: Error: Error: No such file or directory, cannot open /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20220714181458-if00
[2024-12-03 12:18:37] error: zh:ezsp:ezsp: Connection attempt 3 error: Error: Error: No such file or directory, cannot open /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20220714181458-if00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests