Zigbee2MQTT running unstable

Hi there,

I am having sporadic issues with my Zigbee2MQTT LAN coordinated network.

Hardware:
I am running the coordinator via LAN. I build a Sonoff Zigbee 3.0 Dongle bridged by a ESP32-ETH01 and running Tasmota on it. Firmware I use: CC1352P2_CC2652P_launchpad_coordinator_20221226

Without any changes I received various erros in the past, which could be solved after various restarts of Z2M Add-on. Recently I experienced the error of channel mitmatch between adapter (11) and config (25) - without any recent modification.
After returning to 2 days old backup everything worked fine again.

Config (/config/zigbee2mqtt/configuration.yaml):

homeassistant: true
mqtt:
  server: mqtt://192.168.0.11:1883
  user: mqtt_user
  password: xyz
serial:
  port: tcp://192.168.0.19:6638
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'
  last_seen: ISO_8601_local
  log_level: debug
device_options:
  legacy: false
devices:
  '0x04cd15fffe8670d4':
    friendly_name: Szi_Fernbedienung
#15 further entities deleted
groups:
  '1':
    friendly_name: Kellerlicht
    devices:
      - 0xdc8e95fffe22717b/1
availability: true

There is no definition of PanID, Channel, etc. I am wondering, if changes in my config might turn my ZIgbee network a bit more resilient. What should I adopt?

Thanks for your advices!

Do you require any additional information, which might be beneficial to help me with my issue?
Any comment is apprechiated!

what does your z2m-logs say around the time you have to restart it?

Last error with zigbee_herdman_debug enabled:

2023-08-01T12:57:17.871Z zigbee-herdsman:adapter:zStack:adapter Data confirm error (0x04cd15fffebb17bb:56100,205,0)
2023-08-01T12:57:17.872Z zigbee-herdsman:controller:endpoint Read 0x04cd15fffebb17bb/1 genBasic(["zclVersion"], {"sendWhen":"immediate","timeout":10000,"disableResponse":false,"disableRecovery":true,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Data request failed with error: 'No network route' (205))
Zigbee2MQTT:warn  2023-08-01 14:57:17: Failed to ping 'pau_licht' (attempt 1/1, Read 0x04cd15fffebb17bb/1 genBasic(["zclVersion"], {"sendWhen":"immediate","timeout":10000,"disableResponse":false,"disableRecovery":true,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Data request failed with error: 'No network route' (205)))
2023-08-01T12:57:18.620Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,3,68,128,205,1,8,3]
2023-08-01T12:57:18.620Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,3,68,128,205,1,8,3]
2023-08-01T12:57:18.620Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 3 - 2 - 4 - 128 - [205,1,8] - 3
2023-08-01T12:57:18.620Z zigbee-herdsman:adapter:zStack:znp:AREQ <-- AF - dataConfirm - {"status":205,"endpoint":1,"transid":8}
2023-08-01T12:57:18.620Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
2023-08-01T12:57:18.621Z zigbee-herdsman:adapter:zStack:adapter Data confirm error (0xa4c1385ba14d827c:42895,205,2)
2023-08-01T12:57:18.622Z zigbee-herdsman:adapter:zStack:adapter Request network address of '0xa4c1385ba14d827c'
2023-08-01T12:57:18.622Z zigbee-herdsman:adapter:zStack:znp:SREQ --> ZDO - nwkAddrReq - {"ieeeaddr":"0xa4c1385ba14d827c","reqtype":0,"startindex":0}
2023-08-01T12:57:18.623Z zigbee-herdsman:adapter:zStack:unpi:writer --> frame [254,10,37,0,124,130,77,161,91,56,193,164,0,0,59]
2023-08-01T12:57:18.719Z zigbee-herdsman:adapter:zStack:unpi:parser <-- [254,1,101,0,0,100]
2023-08-01T12:57:18.720Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext [254,1,101,0,0,100]
2023-08-01T12:57:18.720Z zigbee-herdsman:adapter:zStack:unpi:parser --> parsed 1 - 3 - 5 - 0 - [0] - 100
2023-08-01T12:57:18.720Z zigbee-herdsman:adapter:zStack:znp:SRSP <-- ZDO - nwkAddrReq - {"status":0}
2023-08-01T12:57:18.721Z zigbee-herdsman:adapter:zStack:unpi:parser --- parseNext []
Zigbee2MQTT:debug 2023-08-01 14:57:20: Active device 'pau_licht' was last seen '103240.35' minutes ago.
2023-08-01T12:57:21.778Z zigbee-herdsman:adapter:zStack:znp:log Port closed
2023-08-01T12:57:21.779Z zigbee-herdsman:controller:log Adapter disconnected'
Zigbee2MQTT:error 2023-08-01 14:57:21: Adapter disconnected, stopping
Zigbee2MQTT:debug 2023-08-01 14:57:21: Saving state to file /config/zigbee2mqtt/state.json
Zigbee2MQTT:info  2023-08-01 14:57:21: MQTT publish: topic 'zigbee2mqtt/bridge/state', payload '{"state":"offline"}'
Zigbee2MQTT:info  2023-08-01 14:57:21: Disconnecting from MQTT server
Zigbee2MQTT:info  2023-08-01 14:57:21: Stopping zigbee-herdsman...
2023-08-01T12:57:21.810Z zigbee-herdsman:controller:database:log Writing database to '/config/zigbee2mqtt/database.db'
2023-08-01T12:57:21.821Z zigbee-herdsman:controller:log Disable joining
2023-08-01T12:57:21.824Z zigbee-herdsman:controller:error Failed to disable join on stop: Error: Cannot request when znp has not been initialized yet
2023-08-01T12:57:21.826Z zigbee-herdsman:controller:database:log Writing database to '/config/zigbee2mqtt/database.db'
2023-08-01T12:57:21.838Z zigbee-herdsman:controller:log Creating coordinator backup
2023-08-01T12:57:21.840Z zigbee-herdsman:adapter:zStack:startup:backup creating backup
Zigbee2MQTT:error 2023-08-01 14:57:21: Failed to stop Zigbee2MQTT

I’m no Z2M over LAN expert but to me it seems you have issues with the connection to the adapter at times hence the restarts are required. Are you hardwired “all the way”? Why your channels are mismatched I cannot say though.

Any instructions on this ?

I use an ESP32-ETH01 (with LAN connect). I connected serial Pins to the Sonoff Zigbee Stick (Rx/Tx crossed) and interrupted the serial connection to USB interface on the Sonoff PCB.

On software side I am running Tasmota as IP Serial interface and deactivated wifi. Any information missing?

Additional question: Do I get it right, that you guys expect my problem in the hardware and not in the configuration? So which LAN operated Zigbee hardware do you recomment insted?

I have a Tube Zigbee Ethernet/USB coordinator (USB for power, Ethernet for connectivity) My Zigbee2MQTT network has been rock solid with it for over the last 2 years.

1 Like

Thanks for the advice.
I have te opportunity to quickly get a EFR32 MGM21 PoE Coordinator to a reasonable price.

I want to run it with Zigbee2MQTT. For this model it is stated: “Alpha/Experimental support is now in Zigbee2mqtt but is untested.” which does not sound very promising to me.
Any update, if this does work or should I rather go for the " CC2652P2 Based Zigbee to PoE Coordinator 2023"?

Thanks for your feedback!

For Zigbee2MQTT, a CC2652 is always best, but a lot of people use the EFR32MGM21 already without problems.

Yes if using Zigbee2MQTT then Texas Instruments adapters are preferred, though EZSP support in Zigbee2MQTT is getting better, follow → https://github.com/Koenkk/zigbee-herdsman/issues/319

Anyway, it is generally not recommended to use Silicon Labs EmberZNet based Zigbee adapter over LAN unless using a rock-solid Ethernet network, so especially do not use WiFi, because the EZSP serial protocol it uses does not have enough fault-tolerance to handle packet loss or latency delays.

Also check out → Guide for Zigbee interference avoidance and network range/coverage optimization

I mention there that possible it will be better to just use a very long USB extension cable instead, and should know you can simply buy inexpensive USB to RJ-45 adapters that will convert any network cable into a USB cable. See for example → https://www.amazon.com/Cat6%EF%BC%8CSNLLMZI-Extender-Extension-Connector-Adapter/dp/B08FMLGNQN

See warnings:

https://www.zigbee2mqtt.io/advanced/remote-adapter/connect_to_a_remote_sonoff_zbbridge.html

https://www.home-assistant.io/integrations/zha#warning-about-wi-fi-based-zigbee-to-serial-bridgesgateways

Thanks for detailled information!

I am coming from an instable setup I would like to get rif of. So in order to set up a rock solid solution I understand the priority:

  1. CC2652P2 Based Zigbee to PoE Coordinator
  2. USB to LAN extension and keep using my Sonoff Zigbee Stick (CC2652P) - Should I expect any issues as my LAN cable is abt 20m long?
  3. EFR32 MGM21 PoE Coordinator

Did I get this right? Any other recommendations?