Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge 🌉, get rid of your proprietary Zigbee bridges 🔨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
11.25k stars 1.6k forks source link

Z2M not starting after update to 1.37.1-1 #22589

Open Aaroneisele55 opened 3 weeks ago

Aaroneisele55 commented 3 weeks ago

What happened?

I did update the HA Addon to 1.37.1-1, then it ididn't start naymore. I restored the backup I had (from the previous version of the addon), but it still doesn't start

What did you expect to happen?

It should have started normally

How to reproduce it (minimal and precise)

No response

Zigbee2MQTT version

1.37.0-1

Adapter firmware version

?, can't access Z2M interface

Adapter

Sonoff ZBDONGLE-P

Setup

Add-On on Home Assistant OS on a Raspberry Pi 4

Debug log

log.log

MKMZ commented 3 weeks ago

I have the same issue also on Sonoff ZBDONGLE-P. Logs say that Checksum check has failed.

vsetotje commented 3 weeks ago

same here sonoff dongle stopped working

KrX3D commented 2 weeks ago

exactly the same here

Aaroneisele55 commented 2 weeks ago

I have now switched back to ZHA because I can't depend on the unstable project Z2M is for me with constant breaking changes without ANY notifications or warnings...

jee67 commented 2 weeks ago

Same problem here, anyone found a solution?

vsetotje commented 2 weeks ago

guess we need to wait for update . Strange thing is that i restored from backup, but it didn't help

Aaroneisele55 commented 2 weeks ago

guess we need to wait for update . Strange thing is that i restored from backup, but it didn't help

I think that it corrupts some of the Z2M data files (/config/zigbee2mqtt/) so unless you have a backup of those, you can't undo it...

jee67 commented 2 weeks ago

I removed z2m completely and reinstalled the latest version. I had to reconnect almost all devices, but by using a backup of configuration.yaml they were recognized instantly.

stefangehn commented 2 weeks ago

From the log it looks like the zigbee communication part works just fine. However the configured MQTT broker does not seem to be reachable from z2m:

Relevant log Excerpt:

[2024-05-11 08:01:02] info:     z2m: Connecting to MQTT server at mqtt://core-mosquitto:1883
[2024-05-11 08:01:02] debug:    z2m: Using MQTT login with username: addons
[2024-05-11 08:01:06] error:    z2m: MQTT error: getaddrinfo ENOTFOUND core-mosquitto
[2024-05-11 08:01:06] error:    z2m: MQTT failed to connect, exiting...

z2m does not manage the MQTT broker at all so either the configure hostname is wrong (ENOTFOUND core-mosquitto more or less means that the hostname core-mosquitto could not be resolved into an IP address) or the host or container normally available under that name is currently not running.

I don't know who maintains that HA-Addon but as far as I know it is not part of z2m.

So TL;DR: looks like a setup issue or a bug in the addon code that configures the MQTT broker.

wastez commented 2 weeks ago

I have now switched back to ZHA because I can't depend on the unstable project Z2M is for me with constant breaking changes without ANY notifications or warnings...

I don’t see the problem. You don’t have to update and if something isn’t working as it should you can revert to the last version. The coders aren’t payed for there work, they do it in there free time and problems can appear if the code will be extended and in the moment there are a lot main changes in the core of z2m, so revert to the last version and wait a few weeks/month. But it’s up to you….

I’m happy that they are working hard to get the code to the latest state.

Pferdebockwurst commented 2 weeks ago

This should be fixed in the development branch because of this commit.

@Koenkk Can you confirm and maybe elaborate the problem? The only change I see is the dependency to mqtt, which you lowered to an even older version as 1.36.1 was using.

Koenkk commented 2 weeks ago

@Pferdebockwurst something is broken in the latest MQTT library, still investigating this.

massimoa01 commented 2 weeks ago

Hi if your specify the mqtt protocol to Server configuration in mqtt section it works. I mean change server: x.y.w.z:1883 in server: mqtt://x.y.w.z:1883

Tonio16 commented 2 weeks ago

Hello

I have something similar. I just updated my sonoff dongle 3.0 P since I had some troubles with some bulbs: no update of state, error ZCL command. https://github.com/Koenkk/zigbee2mqtt/issues/22189#

Before to update my firmware, I was able to use zigbee2mqtt. Now it is not working. A firmware donwgrade did not help. Here the log at start.

zigbee2mqtt@1.37.1 start node index.js [2024-05-17 21:12:45] info: z2m: Logging to console, file (filename: log.log) [2024-05-17 21:12:46] info: z2m: Starting Zigbee2MQTT version 1.37.1 (commit #cda867a3) [2024-05-17 21:12:46] info: z2m: Starting zigbee-herdsman (0.46.6) [2024-05-17 21:12:46] info: zh:zstack:znp: Opening SerialPort with {"path":"/dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_e622bd522f1aec118d0a76e5f01c6278-if00-port0","baudRate":115200,"rtscts":false,"autoOpen":false} [2024-05-17 21:12:46] error: z2m: Error while starting zigbee-herdsman [2024-05-17 21:12:46] error: z2m: Failed to start zigbee [2024-05-17 21:12:46] error: z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions [2024-05-17 21:12:46] error: z2m: Exiting... [2024-05-17 21:12:46] error: z2m: Error: Error Resource temporarily unavailable Cannot lock port

Antoine

Pferdebockwurst commented 2 weeks ago

@Tonio16 I think your problem is not related to this issue. Some other process might be using the port of your coordinator. Maybe it's z2m already running (a second instance) or something else.

Is your coordinator connected at all? Maybe something went wrong when updating the firmware. What's the output of ls -l /dev/serial/by-id?

Tonio16 commented 2 weeks ago

@Tonio16 I think your problem is not related to this issue. Some other process might be using the port of your coordinator. Maybe it's z2m already running (a second instance) or something else.

Is your coordinator connected at all? Maybe something went wrong when updating the firmware. What's the output of ls -l /dev/serial/by-id?

Hello

No, zigbee2mqtt is not running, frontend is not available. My coordinator is connected, the ls command I already tested it, output is OK.

Antoine

Pferdebockwurst commented 2 weeks ago

What's the output?

Tonio16 commented 1 week ago

What's the output?

This one

total 0 lrwxrwxrwx 1 root root 13 May 17 20:06 usb-0658_0200-if00 -> ../../ttyACM0 lrwxrwxrwx 1 root root 13 May 17 20:44 usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_e622bd522f1aec118d0a76e5f01c6278-if00-port0 -> ../../ttyUSB0

Pferdebockwurst commented 1 week ago

Ok, this looks good. Have you tried flashing the stick again? Maybe something went wrong. Are you sure you flashed the right firmware image?

Tonio16 commented 1 week ago

BAsed on flash programmer 2, it's fine:

Initiate access to target: COM3 using 2-pin cJTAG. Reading file: F:/bibliotheques/Mes documents/jeedom/sonoff/CC1352P2_CC2652P_launchpad_coordinator_20240315.hex. Start flash erase ... Erase finished successfully. Start flash programming ... Programming finished successfully. Start flash verify ... Skip verification of unassigned page: 22. Skip verification of unassigned page: 23. Skip verification of unassigned page: 24. Skip verification of unassigned page: 25. Skip verification of unassigned page: 26. Skip verification of unassigned page: 27. Skip verification of unassigned page: 28. Skip verification of unassigned page: 29. Skip verification of unassigned page: 30. Skip verification of unassigned page: 31. Skip verification of unassigned page: 32. Skip verification of unassigned page: 33. Skip verification of unassigned page: 34. Skip verification of unassigned page: 35. Skip verification of unassigned page: 36. Skip verification of unassigned page: 37. Skip verification of unassigned page: 38. Skip verification of unassigned page: 39. Skip verification of unassigned page: 40. Skip verification of unassigned page: 41. Skip verification of unassigned page: 42. Page: 0 verified OK. Page: 1 verified OK. Page: 2 verified OK. Page: 3 verified OK. Page: 4 verified OK. Page: 5 verified OK. Page: 6 verified OK. Page: 7 verified OK. Page: 8 verified OK. Page: 9 verified OK. Page: 10 verified OK. Page: 11 verified OK. Page: 12 verified OK. Page: 13 verified OK. Page: 14 verified OK. Page: 15 verified OK. Page: 16 verified OK. Page: 17 verified OK. Page: 18 verified OK. Page: 19 verified OK. Page: 20 verified OK. Page: 21 verified OK. Page: 43 verified OK. Verification finished successfully. Reset target ... Reset of target successful.

lux73 commented 1 week ago

Hi if your specify the mqtt protocol to Server configuration in mqtt section it works. I mean change server: x.y.w.z:1883 in server: mqtt://x.y.w.z:1883

this should be the default config entry... don't know why people not follow the defaults:

config_mqtt

if someone not follow the Specs, sooner or later it will be problematic ^^

jackyohh commented 1 week ago

WORKAROUND: i changed domain name into FQDN (mqtt:server --> server.myside.com) Now it's working fine.