zigbee2mqtt icon indicating copy to clipboard operation
zigbee2mqtt copied to clipboard

Zigbee2mqtt devices becomes unavailable in HA in version 1.27

Open redpixy opened this issue 4 years ago • 97 comments

What happened?

Zigbee2mqtt devices becomes unavailable in HA after short period (around 15 - 30 mins). zigbee2mqtt/bridge/state show offline.

Restarting the Zigbee2mqtt temporary restores the function but it becomes unavailable shortly after. HA Controls to switches also experience long delays before action is registered.

I have downgrade back to version 1.26. The issues doesn't seem to occur anymore.

What did you expect to happen?

Zigbee2mqtt device remains available.

How to reproduce it (minimal and precise)

Upgrade to version 1.27 from 1.26.

Zigbee2MQTT version

1.27

Adapter firmware version

20220219

Adapter

Sonoff Itead 3.0

Debug log

No response

redpixy avatar Aug 03 '22 02:08 redpixy

I got the same Problem after upgrading from 1.26 to 1.27. Problem is gone after going back to 1.26.

Schubser avatar Aug 03 '22 03:08 Schubser

Same problem here, can any advise how to downgrade??

jb123567 avatar Aug 03 '22 05:08 jb123567

2 different systems, 2 different coordinators. Both getting devices offline after several hours. Both systems where fine on 1.26, problems started with 1.27

Timminater avatar Aug 03 '22 05:08 Timminater

Same problem here, can any advise how to downgrade??

if you are using docker, grab the previous image by adding :1.26

redpixy avatar Aug 03 '22 06:08 redpixy

Same problem here, can any advise how to downgrade??

if you are using docker, grab the previous image by adding :1.26

Running as an Add-On inside Home Assistant OS.

Looking further at this, Zigbee2MQTT is still functioning correctly, clearly the connection to HA that is failing.

jb123567 avatar Aug 03 '22 06:08 jb123567

Please provide the debug log of this.

See https://www.zigbee2mqtt.io/guide/usage/debug.html on how to enable debug logging.

Koenkk avatar Aug 03 '22 15:08 Koenkk

Same issue here:

[21:21:59] INFO: Handing over control to Zigbee2MQTT Core ...
> [email protected] start
> node index.js
Zigbee2MQTT:info  2022-08-03 21:22:06: Logging to console and directory: '/config/zigbee2mqtt/log/2022-08-03.21-22-06' filename: log.txt
Zigbee2MQTT:info  2022-08-03 21:22:06: Starting Zigbee2MQTT version 1.27.0 (commit #unknown)
Zigbee2MQTT:info  2022-08-03 21:22:06: Starting zigbee-herdsman (0.14.46)
Zigbee2MQTT:error 2022-08-03 21:22:07: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2022-08-03 21:22:07: Failed to start zigbee
Zigbee2MQTT:error 2022-08-03 21:22:07: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
Zigbee2MQTT:error 2022-08-03 21:22:07: Exiting...
Zigbee2MQTT:error 2022-08-03 21:22:07: Error: Error while opening serialport 'Error: Error: No such file or directory, cannot open /dev/ttyUSB0'
    at SerialPort.<anonymous> (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:146:28)
    at SerialPort._error (/app/node_modules/@serialport/stream/lib/index.js:198:14)
    at /app/node_modules/@serialport/stream/lib/index.js:242:12

I also have the "Bad gateway" thing going on as described here: https://github.com/zigbee2mqtt/hassio-zigbee2mqtt/issues/366

EDIT: Holy crap, the Zigbee USB Gateway was somehow disconnected from the HAOS VM in my case. Shut down the VM and passing through the Zigbee USB Gateway to the VM again solved the issue in my case.

Grandma-Betty avatar Aug 03 '22 19:08 Grandma-Betty

Mhmm I have the same problem. Providing logs tomorrow.

The devices gets unavailable for me when turning them on. (Bulbs) Even the MQTT shows they are on.

b-reich avatar Aug 03 '22 20:08 b-reich

Hello, Same issue for me, all devices become unavalaible under ha even if they are functional under zigbee2mqtt

Minoux78 avatar Aug 04 '22 06:08 Minoux78

Nut sure if this a HomeAssistant Problem

b-reich avatar Aug 04 '22 07:08 b-reich

Not sure if its HA or Z2M but I did notice, If you restart HA while on Z2M 1.27, all the Z2M devices would be shown as unavailable. When execute zigbee2mqtt/bridge/state in MQTT it will show up as offline despite Z2M is running. Having said that, I had tried rolling HA version between 2022.7.7 to 2022.7.4 all encountered the same issue when running with Z2M 1.27.

The other issue is the long delays before an action is registered. example turning On a light or smartplugs.

redpixy avatar Aug 04 '22 08:08 redpixy

There was no issue with 1.26, it's clearly a Z2M 1.27 problem

Minoux78 avatar Aug 04 '22 09:08 Minoux78

@Grandma-Betty this is clearly an issue on your side. The adapter port is incorrect: Zigbee2MQTT:error 2022-08-03 21:22:07: Error: Error while opening serialport 'Error: Error: No such file or directory, cannot open /dev/ttyUSB0'

@ all others, please provide the debug log, without it I cannot do anything.

See https://www.zigbee2mqtt.io/guide/usage/debug.html on how to enable debug logging.

Koenkk avatar Aug 04 '22 15:08 Koenkk

@Koenkk here is my log file. log.txt

One lamp is working. 2 lamps in group doenst work.

b-reich avatar Aug 04 '22 15:08 b-reich

Already had 3 home-assistant installations with this problem. But after a complete reboot and linking the dongle to the VM again the problem has not returned. If the problem returns I will try to grab a debug log @Koenkk

Timminater avatar Aug 04 '22 16:08 Timminater

I host reboot seemed to have sorted my issue

jb123567 avatar Aug 04 '22 17:08 jb123567

@b-reich

  • which lamps aren't working?
  • does it keep working when disabling the availability feature?

Koenkk avatar Aug 04 '22 19:08 Koenkk

@Koenkk "Nachttisch Lampen" wont work as a group (turning them off works, on wont work) "Nachttisch Links" and "Nachttisch Links" can be switched individually without problems

Disabling availability doesnt fix it.

b-reich avatar Aug 04 '22 20:08 b-reich

@Koenkk

I also loose connection between HA and Zigbee2MQTT every day. So I turned on the debug and I believe around 7:03 this morning it happened again. Here is my log log - geen ww.txt

JunghaJungha avatar Aug 05 '22 05:08 JunghaJungha

Happening to me right now, slowly a lot of devices are losing connection.

changed log settings to debug and this is the log file: z2m_log.txt

Timminater avatar Aug 05 '22 05:08 Timminater