Strange Zigbee2MQTT behaviour

Hi all,
out of a sudden I am experiencing some strange behaviour with me Zigbee devices.

Everything worked fine until last night when 1 light would not switch off easily but I did not look into it then.
This morning, suddenly none of my devices (I have a couple of plugs, some smoke detectors and a few door/window sensors) showed any LQI value anymore.

What I find very confusing is that I can still send SOME commands. For example I manage to turn ON the plugs but then cannot turn them off again. Having said that, I just found out that this is only true from a Lovelace dashboard.
When I switch it on there, it actually switches ON the plug, but does not show that it is switched on. I can then not turn it off again.
When looking at the same device in the Zigbee2MQTT I can (sometimes) also switch it off again. Just now, while typing this, I tried it a few more times and suddenly the switch stayed on ON and also suddenly displayed the LQI again.

But all the other devices are still not connected, apparently.

Here is the log:

Zigbee2MQTT

debug Received MQTT message on 'zigbee2mqtt/Lidl Mehrfachstecker/l1/set' with data '{"state_l1":"ON"}'
debug Publishing 'set' 'state' to 'Lidl Mehrfachstecker'
debug Received MQTT message on 'zigbee2mqtt/Lidl Mehrfachstecker/l1/set' with data '{"state_l1":"ON"}'
debug Publishing 'set' 'state' to 'Lidl Mehrfachstecker'
error Publish 'set' 'state' to 'Lidl Mehrfachstecker' failed: 'Error: Command 0x842e14fffe52f06b/1 genOnOff.on({}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":false,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (SRSP - AF - dataRequest after 6000ms)'
debug Error: Command 0x842e14fffe52f06b/1 genOnOff.on({}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":false,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (SRSP - AF - dataRequest after 6000ms) at Timeout._onTimeout (/app/node_modules/zigbee-herdsman/dist/utils/waitress.js:46:35) at listOnTimeout (internal/timers.js:554:17) at processTimers (internal/timers.js:497:7)
info MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"Publish 'set' 'state' to 'Lidl Mehrfachstecker' failed: 'Error: Command 0x842e14fffe52f06b/1 genOnOff.on({}, {\"timeout\":10000,\"disableResponse\":false,\"disableRecovery\":false,\"disableDefaultResponse\":false,\"direction\":0,\"srcEndpoint\":null,\"reservedBits\":0,\"manufacturerCode\":null,\"transactionSequenceNumber\":null,\"writeUndiv\":false}) failed (SRSP - AF - dataRequest after 6000ms)'","meta":{"friendly_name":"Lidl Mehrfachstecker"},"type":"zigbee_publish_error"}'
debug Received MQTT message on 'zigbee2mqtt/Lidl Mehrfachstecker/l1/set' with data '{"state_l1":"OFF"}'
debug Publishing 'set' 'state' to 'Lidl Mehrfachstecker'
error Publish 'set' 'state' to 'Lidl Mehrfachstecker' failed: 'Error: Command 0x842e14fffe52f06b/1 genOnOff.on({}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":false,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (SRSP - AF - dataRequest after 6000ms)'
debug Error: Command 0x842e14fffe52f06b/1 genOnOff.on({}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":false,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (SRSP - AF - dataRequest after 6000ms) at Timeout._onTimeout (/app/node_modules/zigbee-herdsman/dist/utils/waitress.js:46:35) at listOnTimeout (internal/timers.js:554:17) at processTimers (internal/timers.js:497:7)
info MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"Publish 'set' 'state' to 'Lidl Mehrfachstecker' failed: 'Error: Command 0x842e14fffe52f06b/1 genOnOff.on({}, {\"timeout\":10000,\"disableResponse\":false,\"disableRecovery\":false,\"disableDefaultResponse\":false,\"direction\":0,\"srcEndpoint\":null,\"reservedBits\":0,\"manufacturerCode\":null,\"transactionSequenceNumber\":null,\"writeUndiv\":false}) failed (SRSP - AF - dataRequest after 6000ms)'","meta":{"friendly_name":"Lidl Mehrfachstecker"},"type":"zigbee_publish_error"}'
error Publish 'set' 'state' to 'Lidl Mehrfachstecker' failed: 'Error: Command 0x842e14fffe52f06b/1 genOnOff.off({}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":false,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (SRSP - AF - dataRequest after 6000ms)'
debug Error: Command 0x842e14fffe52f06b/1 genOnOff.off({}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":false,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (SRSP - AF - dataRequest after 6000ms) at Timeout._onTimeout (/app/node_modules/zigbee-herdsman/dist/utils/waitress.js:46:35) at listOnTimeout (internal/timers.js:554:17) at processTimers (internal/timers.js:497:7)
info MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"Publish 'set' 'state' to 'Lidl Mehrfachstecker' failed: 'Error: Command 0x842e14fffe52f06b/1 genOnOff.off({}, {\"timeout\":10000,\"disableResponse\":false,\"disableRecovery\":false,\"disableDefaultResponse\":false,\"direction\":0,\"srcEndpoint\":null,\"reservedBits\":0,\"manufacturerCode\":null,\"transactionSequenceNumber\":null,\"writeUndiv\":false}) failed (SRSP - AF - dataRequest after 6000ms)'","meta":{"friendly_name":"Lidl Mehrfachstecker"},"type":"zigbee_publish_error"}'
debug Received MQTT message on 'zigbee2mqtt/Lidl Mehrfachstecker/l3/set' with data '{"state_l3":"OFF"}'
debug Publishing 'set' 'state' to 'Lidl Mehrfachstecker'
error Publish 'set' 'state' to 'Lidl Mehrfachstecker' failed: 'Error: Command 0x842e14fffe52f06b/3 genOnOff.off({}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":false,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (SRSP - AF - dataRequest after 6000ms)'
debug Error: Command 0x842e14fffe52f06b/3 genOnOff.off({}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":false,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (SRSP - AF - dataRequest after 6000ms) at Timeout._onTimeout (/app/node_modules/zigbee-herdsman/dist/utils/waitress.js:46:35) at listOnTimeout (internal/timers.js:554:17) at processTimers (internal/timers.js:497:7)
info MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"Publish 'set' 'state' to 'Lidl Mehrfachstecker' failed: 'Error: Command 0x842e14fffe52f06b/3 genOnOff.off({}, {\"timeout\":10000,\"disableResponse\":false,\"disableRecovery\":false,\"disableDefaultResponse\":false,\"direction\":0,\"srcEndpoint\":null,\"reservedBits\":0,\"manufacturerCode\":null,\"transactionSequenceNumber\":null,\"writeUndiv\":false}) failed (SRSP - AF - dataRequest after 6000ms)'","meta":{"friendly_name":"Lidl Mehrfachstecker"},"type":"zigbee_publish_error"}'

I would like to mention that I have not changed anything in the setup recently and definitely not last night.

Any idea what might be going on?

Thanks a lot and cheers,

Merc

I had similar issues where it turned out my adapter was getting overwhelmed and locking up. I originally had the CC2531 chip, which per the zigbee2mqtt documentation is NOT recommended.

https://www.zigbee2mqtt.io/guide/adapters/#not-recommended

I updated to the zzh stick based on the CC2652 chip and the problems went away.

What adapter are you using?

Hi Tim,
same thing here. A non recommended CC2531 which worked for the last 9 months…
I have just ordered the Sonoff.

Let’s see if this solves the problem.

Did it work without repairing for you, as explained on the page?

Thanks,
Merc

I only had a few devices at the time so just re paired everything. I know others have been successful though with upgrading without re pairing.

So I now replaced my previous USB dongle with a Sonoff.

More problems. Now I cannot load the Zigbee2Mqtt dashboard anymore.

Here is the log:

[22:02:46] INFO: Adjusting Zigbee2mqtt core yaml config with add-on quirks ...
[cont-init.d] zigbee2mqtt.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[22:02:48] INFO: Handing over control to Zigbee2mqtt Core ...
> [email protected] start /app
> node index.js
Zigbee2MQTT:debug 2022-04-29 22:02:52: Loaded state from file /config/zigbee2mqtt/state.json
Zigbee2MQTT:info  2022-04-29 22:02:52: Logging to console and directory: '/config/zigbee2mqtt/log/2022-04-29.22-02-51' filename: log.txt
Zigbee2MQTT:debug 2022-04-29 22:02:52: Removing old log directory '/config/zigbee2mqtt/log/2022-04-29.21-58-43'
Zigbee2MQTT:info  2022-04-29 22:02:52: Starting Zigbee2MQTT version 1.18.1 (commit #1.18.1)
Zigbee2MQTT:info  2022-04-29 22:02:52: Starting zigbee-herdsman (0.13.71)
Zigbee2MQTT:debug 2022-04-29 22:02:52: Using zigbee-herdsman with settings: '{"adapter":{"concurrent":null,"delay":null},"backupPath":"/config/zigbee2mqtt/coordinator_backup.json","databaseBackupPath":"/config/zigbee2mqtt/database.db.backup","databasePath":"/config/zigbee2mqtt/database.db","network":{"channelList":[11],"extendedPanID":[221,221,221,221,221,221,221,221],"networkKey":"HIDDEN","panID":6754},"serialPort":{"path":"/dev/ttyUSB0"}}'
Zigbee2MQTT:error 2022-04-29 22:03:12: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2022-04-29 22:03:12: Failed to start zigbee
Zigbee2MQTT:error 2022-04-29 22:03:12: Exiting...
Zigbee2MQTT:error 2022-04-29 22:03:12: Error: Failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms)
    at ZStackAdapter.<anonymous> (/app/node_modules/zigbee-herdsman/dist/adapter/z-stack/adapter/zStackAdapter.js:94:31)
    at Generator.throw (<anonymous>)
    at rejected (/app/node_modules/zigbee-herdsman/dist/adapter/z-stack/adapter/zStackAdapter.js:25:65)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node index.js`

I have googled and read many post with similar issues but did not find a solution that works.

Any idea?

This is my config for Zigbee2Mqtt:

data_path: /config/zigbee2mqtt
external_converters: []
devices: devices.yaml
groups: groups.yaml
homeassistant: true
permit_join: true
mqtt:
  base_topic: zigbee2mqtt
  username: mqqt
  password: mqqt
  server: mqtt://192.168.1.12:1883
serial:
  port: /dev/ttyUSB0
advanced:
  log_level: debug
  pan_id: 6754
  channel: 11
  network_key:
    - 1
    - 3
    - 5
    - 7
    - 9
    - 11
    - 13
    - 15
    - 0
    - 2
    - 4
    - 6
    - 8
    - 10
    - 12
    - 13
  availability_blocklist: []
  availability_passlist: []
device_options: {}
blocklist: []
passlist: []
queue: {}
frontend:
  port: 8099
  host: 0.0.0.0
experimental:
  new_api: false
socat:
  enabled: false
  master: pty,raw,echo=0,link=/tmp/ttyZ2M,mode=777
  slave: tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5
  options: '-d -d'
  log: true

Thanks for any help.

Merc

Zigbee2mqtt is failing to connect to the USB adapter, likely because the port setting under serial is not correct

Replace

serial:
  port: /dev/ttyUSB0

With

serial:
  port: /dev/serial/by-id

Where that path by ID points to your device - ie /dev/serial/by-id/usb-Silicon_Labs_HubZ_Smart_Home_Controller_C0F003D3-if01-port0

A list of available device paths can be found in Configuration > Add-ons & Backups > System > Host > dot menu > Hardware

Hi Tim,
yes this is one of the many things I have done… with no change or success…

Thanks
Merc

After trying loads of things and basically breaking my entire HA setup along that route I installed a backup from about 3 weeks ago, when everything still worked.

Don’t ask me why but now all Zigbee devices work again, including the coordinator (the old one) which did not work anymore. I don’t understand what has happened since all this went haywire over night without any interaction from my side.

Seems that something much deeper in the system must have gotten confused…but why?

Thanks for helping.

Merc

Glad it’s working, but if you’re using the cc2531 is not a matter of if it will lockup, but when.

It’s possible there was a driver or usb pass-through issue from the os to addon that your backup resolved.

However, it’s likely a step might have been missed when you replaced the coordinator. Be sure to follow these directions, including stopping zigbee2mqtt first before upgrading. I would make sure the old usb is removed and use the same plug for the new one (don’t have them both in at once)

https://www.zigbee2mqtt.io/guide/faq/#how-do-i-migrate-from-one-adapter-to-another

It appears you need to copy an IEEE address as well if you are attempting to avoid re pairing (directions in link)

Hi Tim,
everything is working now and another complete backup finished.
Time to break it again… so I will definitely try the Sonoff next…
I had followed these instructions from the first moment, starting with the IEEE copying…lets see if it works now after the backup reinstallation.

Thanks again for the advice.

Merc

Ok, just to share with others who might run into similar problems…

I managed to get it working with the Sonoff stick but it was quite a pain.
I followed the steps from the Zigbee2MQTT page but with the dev\ttyUSB0 option the whole system froze and it took quite a while until it reacted again.
Then I switched to the longer device path and restarted.

At this point the error message changed and now the panID neede to be changed in the configuration. I just increased it by 1 and then restarted again.
After this the Zigbee2Mqtt dashboard loaded…but had no devices. So retaining the devices did not work.
I repaired them all and at least was very happy to see that their clear names were still there and that most of the automations and sensors in HA were not affected. This is good to know.

Now the system is up and running with the Sonoff stick. It took almost a whole day to get it done but now I am happy.

Thanks again for the hints.

Merc