Zigbee2MQTT Aqara E1 TRV publish set error using Sonoff Zigbee Dongle Plus V2 (Dongle-E)

I sometimes get this error when trying to use mqtt publish on my aqara TRV’s:

debug 2022-11-24 10:00:48Received MQTT message on 'zigbee2mqtt/TRV Wohnzimmer/set/system_mode' with data 'off'

debug 2022-11-24 10:00:48Publishing 'set' 'system_mode' to 'TRV Wohnzimmer'

error 2022-11-24 10:01:08Publish 'set' 'system_mode' to 'TRV Wohnzimmer' failed: 'Error: Write 0x54ef4410005ac843/1 aqaraOpple({"625":{"value":0,"type":32}}, {"sendWhen":"immediate","timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":4447,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Timeout - 40375 - 1 - 153 - 64704 - 4 after 10000ms)'

debug 2022-11-24 10:01:08Error: Write 0x54ef4410005ac843/1 aqaraOpple({"625":{"value":0,"type":32}}, {"sendWhen":"immediate","timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":4447,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Timeout - 40375 - 1 - 153 - 64704 - 4 after 10000ms) at Timeout._onTimeout (/app/node_modules/zigbee-herdsman/src/utils/waitress.ts:64:35) at listOnTimeout (node:internal/timers:559:17) at processTimers (node:internal/timers:502:7)
  • When this error occurs the the device still updates itself in z2m when changing its state manually

  • This error seems to occur randomly across all my TRV’s.

  • I am using a experimental coordinator: Sonoff Zigbee Dongle Plus V2 (Dongle-E)

I am suspecting that this issue could be due to the experimental state of my coordinator, but before i buy the dongle-P version i wanted to be sure that this is indeed the case. Hope someone can help me.

Home Assistant 2022.11.4
Supervisor 2022.11.2
Operating System 9.3
Frontend 20221108.0 - latest

Regardless of Zigbee solution used be sure to follow these generic best practice guidelines which apply for all Zigbee Coordinator USB adapters regardless of Zigbee implementation (including Zigbee2MQTT and the ZHA integration) → https://github.com/zigpy/zigpy/wiki/Generic-best-practice-tips-on-improving-Zigbee-network-range-and-general-stability

Note! If feeling brave then also consider upgrading to the latest unofficial 7.1.x community firmware builds on the ZBDongle-E to help them with testing the updated EZSP v9 interface with Zigbee2MQTT.

Newer firmware does contain a few more bug-fixes upstream from the upstream manufacturer’s SDK.

Suggest first report Zigbee2MQTT issues to https://github.com/Koenkk/zigbee2mqtt/issues/ but can be they will referer that fix is needed in zigbee-herdsman-converters https://github.com/Koenkk/zigbee-herdsman-converters/issues as that is what Zibee2MQTT uses to parse messages to and from devices, read → https://www.zigbee2mqtt.io/advanced/support-new-devices/01_support_new_devices.html

Providing detailed descriptions of the issue and ask developers for help if have problems collecting debug logs → https://github.com/Koenkk/zigbee2mqtt/discussions/13373 if possible try to help the ezsp adapter developer troubleshoot the issue before migrating to znp dongle → https://github.com/Koenkk/zigbee-herdsman/issues/319

Thanks for your answer, i opened a issue on the Z2M GitHub. In the mean time i was trying to flash my Dongle E with new firmware but i cant quite get it done.

I’m using my laptop with Ubuntu 20.04.01 LTS to flash the stick.

I tried using the Elelabs and silabs firmware flashers but both are not able to build a connection with the stick although its detectable from Linux. After the connection fails the stick is also not available in Linux anymore, only a reboot fixes this.

Example of process:

jean@JeanLaptop:~$ ls -l /dev/serial/by-id
total 0
lrwxrwxrwx 1 root root 13 Nov 28 16:06 usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20220811184754-if00 -> ../../ttyACM0
jean@JeanLaptop:~$ test -w /dev/ttyACM0 && echo success || echo failure
jean@JeanLaptop:~$ ls /dev/ttyACM0 
jean@JeanLaptop:~$ ls
apptainer                             Music
bin                                   ncp-uart-sw_EZNet6.10.3_V1.0.1.gbl
Desktop                               OneDrive
Documents                             paraview
Downloads                             Pictures
elelabs-zigbee-ezsp-utility-master    Public
GitHubDesktop-linux-3.0.6-linux1.deb  release-3.0.6-linux1
go                                    silabs-flasher-main
GoogleDrive                           snap
googledrive.sh                        Templates
mesh_wing_wt                          uni
ml-cfd                                Videos
ml-cfd-lecture                        Xfoil
jean@JeanLaptop:~$ cd elelabs-zigbee-ezsp-utility-master/
jean@JeanLaptop:~/elelabs-zigbee-ezsp-utility-master$ ls
CHANGELOG.md  Elelabs_EzspFwUtility.py  LICENSE    requirements.txt
data          img                       README.md
jean@JeanLaptop:~/elelabs-zigbee-ezsp-utility-master$ python3 Elelabs_EzspFwUtility.py probe -p /dev/ttyACM0
Traceback (most recent call last):
  File "/home/jean/.local/lib/python3.10/site-packages/serial/serialposix.py", line 398, in _reconfigure_port
    orig_attr = termios.tcgetattr(self.fd)
termios.error: (5, 'Input/output error')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/jean/elelabs-zigbee-ezsp-utility-master/Elelabs_EzspFwUtility.py", line 77, in open
    self.serial = serial.Serial(port=self.port,
  File "/home/jean/.local/lib/python3.10/site-packages/serial/serialutil.py", line 244, in __init__
  File "/home/jean/.local/lib/python3.10/site-packages/serial/serialposix.py", line 332, in open
  File "/home/jean/.local/lib/python3.10/site-packages/serial/serialposix.py", line 401, in _reconfigure_port
    raise SerialException("Could not configure port: {}".format(msg))
serial.serialutil.SerialException: Could not configure port: (5, 'Input/output error')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/jean/elelabs-zigbee-ezsp-utility-master/Elelabs_EzspFwUtility.py", line 798, in <module>
  File "/home/jean/elelabs-zigbee-ezsp-utility-master/Elelabs_EzspFwUtility.py", line 532, in probe
  File "/home/jean/elelabs-zigbee-ezsp-utility-master/Elelabs_EzspFwUtility.py", line 84, in open
    raise Exception("PORT ERROR: %s" % str(e))
Exception: PORT ERROR: Could not configure port: (5, 'Input/output error')
jean@JeanLaptop:~/elelabs-zigbee-ezsp-utility-master$ ls /dev/ttyACM0 
ls: cannot access '/dev/ttyACM0': No such file or directory
jean@JeanLaptop:~/elelabs-zigbee-ezsp-utility-master$ ls -l /dev/serial/by-id
ls: cannot access '/dev/serial/by-id': No such file or directory

I managed to get the stick flashed with (new) firmware, actually it already had the newest firmware ( build 297) but i reflashed the same firmware on it with the help of this post. After that the problems i mentioned in this post went away, i did not change anything except reflashing the firmware. So to anyone who might encounter this, try reflashing it worked for me.

did you have to repair after reflashing
I have a dongle e and find that it works but i have to unplug it once a day and plug it back in as the whole thing stops working.

Hello, did you manage to resolve the issue where the dongle stops to work?

I did. It was IKEA repeaters I had in the network. Removed them and it’s been stabe

Edit still has minor.issues. I also have the original smarththings USB power motion sensors. They kept going offline (they originally didn’t in early days of Mqtt with same dongle plus. ). Stable so far now

@xEcho1 I’m facing very similar timeout error message in debug mode with my Ethernet based SLZB-06 (based on stable CC2652P chipset and the same error pattern of Z2M not being able to send commands to TRV but accepting updates from TRV). It’s also my living room TRV which has is currently in this mode :smile: Just wanted to kindly ask for an update from you, if after one year your E1 TRVs still run flawless? Thanks!

Gerneally yes, although the latest z2m update 1.34.0-1 will break the Aqara E1’s I suggest staying on version 1.33.0. I also suggest getting the Dongle-P and not the Dongle-E.
Supported Adapters | Zigbee2MQTT

1 Like

Hello, I am experiencing this bug currently and with 16 of these TRV’s this has become a realy problem, can you link me to where this has been identified as a bug in z2m update 1.34.0-1 so I can read about it, there may be a work around for me without downgrading zigbee2mqtt.

Active issue: https://github.com/Koenkk/zigbee2mqtt/issues/19747

Issue has, however, not yet aroused developer attention…

@xEcho1 Thank you for your feedback. SInce the last reboot of everything it worked fine for about 2 months. Now the living room TRV again doesn’t accept write commands. I wish there was a workaround at least to get the device responding again, like restarting Zigbee2MQTT and my SLZB-06 coordinator. But unfortunately this doesn’t help…

I was wrong. Rebooting my coordinator and a complete reboot of my Z2M linux server brought the Aqara TRV back into the network and it accepts write commands again. I will experiment with this more the next time one of my TRVs stops responding…