zigbee2MQTT offline Bad Gateway 502

Running zigbee2MQTT on Home Assistant Green with ALL updates up to date

Only thing it is running is zigbee2MQTT, I writes to the zigbee2MQTT on a Home Assistant running on a VM elsewhere.

Been absolutely rock solid for 2-3 weeks

2 -3 days ago started losing devices.

Devices would not respond.

To be clear been through a whole path to get here

 Wifi runs on Wifi channels 6 & 11

  zigbee2MQTT runs on zigbee channel 1

 Hue zigbee runs on zigbee channel 25

Moved the coordinator to an SMLight SLZB-06 on POE Ethernet to put it central and away from everything that might harm the signal.

Everything has been great and solid and lightning fast.

Now zigbee2MQTT can’t be accessed.

Bad Gateway 502 error when trying to access the interface.

The zigbee2MQTT log

[21:52:08] INFO: Preparing to start...
[21:52:10] INFO: Socat not enabled
[21:52:13] ERROR: Got unexpected response from the API: Service not enabled
[21:52:13] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT without watchdog.
[2024-07-30 21:52:23] error: 	z2m: Failed to call 'OnEvent' 'stop' (TypeError: Cannot read properties of undefined (reading 'getDevices')
    at Zigbee.devices (/app/lib/zigbee.ts:334:14)
    at OnEvent.stop (/app/lib/extension/onEvent.ts:34:42)
    at Controller.callExtensions (/app/lib/controller.ts:372:17)
    at Controller.stop (/app/lib/controller.ts:238:9)
    at stop (/app/index.js:165:5)
    at process.handleQuit (/app/index.js:173:13))
TypeError: Cannot read properties of undefined (reading 'getGroupByID')
    at Zigbee.resolveGroup (/app/lib/zigbee.ts:267:37)
    at Zigbee.resolveEntity (/app/lib/zigbee.ts:286:36)
    at /app/lib/state.ts:56:66
    at Array.filter (<anonymous>)
    at State.stop (/app/lib/state.ts:56:14)
    at Controller.stop (/app/lib/controller.ts:242:20)
    at stop (/app/index.js:165:5)
    at process.handleQuit (/app/index.js:173:13)
[21:52:25] INFO: Preparing to start...
[21:52:27] INFO: Socat not enabled
[21:52:30] ERROR: Got unexpected response from the API: Service not enabled
[21:52:30] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT without watchdog.

Everything has been Hard rebooted

The Unifi Network completely rebooted.

Everything is offline, blind controllers, temp/humidity sensors, leak sensors, motion sensors, presence sensor, door/window sensors.

Fortunately 90% of the listing is on Hue so at least they work except for two rooms.

I have not changed any config.

I have confirmed zigbee and wifi channels

The SMLight is online and zigbee2MQTT is not attempting to connect to it.

I have rebuilt this zigbee network several times from the ground since Christmas.

Any ideas on how to fix this?

thanks all

Zigbee channels are counted 11 to 26, there is no channel 1

You are absolutely right, it was a mistype, sorry for the confusion it caused :slight_smile:

Zigbee
Hue 25
zigbee2MQTT 11

Wi-Fi 2.4gHz
6 & 11

But I am pretty sure that the mistype in the post is not the cause of the catastrophic zigbee2MQTT failure.

However, powering downtime the smlight controller AND Home Assistant Green overnight did restore zigbee2MQTT when it was all powered back up in the morning.

So suspect that given both the Home Assistant Green and the SMLight had both been power cycled before I shut them down overnight - there is a benefit that exceeds just a hard reboot in having it offline for a few hours.

Yet to determine if zigbee2MQTT is still unstable.