Replacing an Aqara M2 hub with a Sonoff Zigbee 3.0 USB Dongle_Plus to detect zigbee sensors

A.Finally, there is two Sonoff Dongle Plus V2. One is zstack and the other is ember.

Dongle Plus V2 “ZBDongle-E” (based on EFR32MG21) which I had is ember. I had to modify my /home/fl/zigbee2mqtt/configuration.yaml and replace zstack to ember:

serial:
  # Location of the adapter
  # USB adapters - use format "port: /dev/serial/by-id/XXX"
  # Ethernet adapters - use format "port: tcp://192.168.1.12:6638"
  port: /dev/ttyUSB0
  adapter: ember

This helped but there was no write access to the port which was remedied with:

B.Write error: /dev/ttyUSB0

fl@Satellite-Z930:~$ docker compose restart zigbee2mqtt
fl@Satellite-Z930:~$ sudo docker compose logs zigbee2mqtt > logx.txt
fl@Satellite-Z930:~$
[31merrore[39m: 	z2m: Error while starting zigbee-herdsman
zigbee2mqtt  | [2025-05-12 23:09:39] e[31merrore[39m: 	z2m: Failed to start zigbee-herdsman
zigbee2mqtt  | [2025-05-12 23:09:39] e[31merrore[39m: 	z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start_crashes-runtime.html for possible solutions
zigbee2mqtt  | [2025-05-12 23:09:39] e
fl@Satellite-Z930:~$ test -w /dev/ttyUSB0 && echo success || echo failure
failure
fl@Satellite-Z930:~$ sudo chown fl /dev/ttyUSB0
[sudo] password for fl: 
fl@Satellite-Z930:~$ test -w /dev/ttyUSB0 && echo success || echo failure
success
fl@Satellite-Z930:~$

C. Adapter EZSP protocol version (8) is not supported by Host
Error message:

zigbee2mqtt  | [2025-05-12 23:27:44] e[31merrore[39m: 	z2m: Error: Adapter EZSP protocol version (8) is not supported by Host [13-16]

Proposed solution: flashing the sonoff dongle from chrome browser:
https://darkxst.github.io/silabs-firmware-builder/

No more error message:

zigbee2mqtt  | [2025-05-12 23:53:38] e[32minfoe[39m: 	z2m: Starting zigbee-herdsman (3.4.11)
zigbee2mqtt  | [2025-05-12 23:53:38] e[32minfoe[39m: 	zh:ember: Using default stack config.
zigbee2mqtt  | [2025-05-12 23:53:38] e[32minfoe[39m: 	zh:ember: ======== Ember Adapter Starting ========
zigbee2mqtt  | [2025-05-12 23:53:38] e[32minfoe[39m: 	zh:ember:ezsp: ======== EZSP starting ========
zigbee2mqtt  | [2025-05-12 23:53:38] e[32minfoe[39m: 	zh:ember:uart:ash: ======== ASH Adapter reset ========
zigbee2mqtt  | [2025-05-12 23:53:38] e[32minfoe[39m: 	zh:ember:uart:ash: RTS/CTS config is off, enabling software flow control.
zigbee2mqtt  | [2025-05-12 23:53:38] e[32minfoe[39m: 	zh:ember:uart:ash: Serial port opened
zigbee2mqtt  | [2025-05-12 23:53:38] e[32minfoe[39m: 	zh:ember:uart:ash: ======== ASH starting ========
zigbee2mqtt  | [2025-05-12 23:53:39] e[32minfoe[39m: 	zh:ember:uart:ash: ======== ASH connected ========
zigbee2mqtt  | [2025-05-12 23:53:39] e[32minfoe[39m: 	zh:ember:uart:ash: ======== ASH started ========
zigbee2mqtt  | [2025-05-12 23:53:39] e[32minfoe[39m: 	zh:ember:ezsp: ======== EZSP started ========
zigbee2mqtt  | [2025-05-12 23:53:39] e[32minfoe[39m: 	zh:ember: Adapter EZSP protocol version (13) lower than Host. Switched.
zigbee2mqtt  | [2025-05-12 23:53:39] e[32minfoe[39m: 	zh:ember: Adapter version info: {"ezsp":13,"revision":"7.4.4 [GA]","build":0,"major":7,"minor":4,"patch":4,"special":0,"type":170}
zigbee2mqtt  | [2025-05-12 23:53:39] e[32minfoe[39m: 	zh:ember: [STACK STATUS] Network up.
zigbee2mqtt  | [2025-05-12 23:53:39] e[32minfoe[39m: 	zh:ember: [INIT TC] Adapter network matches config.
zigbee2mqtt  | [2025-05-12 23:53:39] e[32minfoe[39m: 	zh:ember: [CONCENTRATOR] Started source route discovery. 1248ms until next broadcast.
zigbee2mqtt  | [2025-05-12 23:53:39] e[32minfoe[39m: 	z2m: zigbee-herdsman started (resumed)
zigbee2mqtt  | [2025-05-12 23:53:39] e[32minfoe[39m: 	z2m: Coordinator firmware version: '{"meta":{"build":0,"ezsp":13,"major":7,"minor":4,"patch":4,"revision":"7.4.4 [GA]","special":0,"type":170},"type":"EmberZNet"}'
zigbee2mqtt  | [2025-05-12 23:53:39] e[32minfoe[39m: 	z2m: Currently 0 devices are joined.
zigbee2mqtt  | [2025-05-12 23:53:39] e[32minfoe[39m: 	z2m: Connecting to MQTT server at mqtt://mosquitto:1883
zigbee2mqtt  | [2025-05-12 23:53:39] e[32minfoe[39m: 	z2m: Connected to MQTT server
zigbee2mqtt  | [2025-05-12 23:53:39] e[32minfoe[39m: 	z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/bridge/state', payload '{"state":"online"}'
zigbee2mqtt  | [2025-05-12 23:53:39] e[32minfoe[39m: 	z2m: Started frontend on port 8080
zigbee2mqtt  | [2025-05-12 23:53:39] e[32minfoe[39m: 	z2m: Zigbee2MQTT started!

1 Like

Now I can access to http://your.ip.address:8088 - in zigbee2mqtt’s UI

Settings > Serial`.

The Portis/dev/ttyUSB0
Adapter ember.

I have set baud rate: 57 600

Now I have to discover my aqara zigbee devices.

Thanks.

1 Like

My computer with its attached sonoff zigbee dongle plus type E was off all night. Everything worked well yesterday.

This morning the interface does not work anymore.
http://xx.x.x.xx.local:8088/#/settings/settings

new error log:
Essentially it seems to be:

Failed to start EZSP layer with status=HOST_FATAL_ERROR.

The complete error log:

zigbee2mqtt  | [2025-05-13 07:38:47] e[32minfoe[39m: 	zh:ember:uart:ash: ======== ASH starting ========
zigbee2mqtt  | [2025-05-13 07:38:50] e[31merrore[39m: 	z2m: Error while starting zigbee-herdsman
zigbee2mqtt  | [2025-05-13 07:38:50] e[31merrore[39m: 	z2m: Failed to start zigbee-herdsman
zigbee2mqtt  | [2025-05-13 07:38:50] e[31merrore[39m: 	z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start_crashes-runtime.html for possible solutions
zigbee2mqtt  | [2025-05-13 07:38:50] e[31merrore[39m: 	z2m: Exiting...
zigbee2mqtt  | [2025-05-13 07:38:50] e[31merrore[39m: 	z2m: Error: Failed to start EZSP layer with status=HOST_FATAL_ERROR.
zigbee2mqtt  |     at EmberAdapter.initEzsp (/app/node_modules/.pnpm/zigbee-herdsman@3.4.11/node_modules/zigbee-herdsman/src/adapter/ember/adapter/emberAdapter.ts:672:19)
zigbee2mqtt  |     at EmberAdapter.start (/app/node_modules/.pnpm/zigbee-herdsman@3.4.11/node_modules/zigbee-herdsman/src/adapter/ember/adapter/emberAdapter.ts:1538:24)
zigbee2mqtt  |     at Controller.start (/app/node_modules/.pnpm/zigbee-herdsman@3.4.11/node_modules/zigbee-herdsman/src/controller/controller.ts:136:29)
zigbee2mqtt  |     at Zigbee.start (/app/lib/zigbee.ts:69:27)
zigbee2mqtt  |     at Controller.start (/app/lib/controller.ts:104:13)
zigbee2mqtt  |     at start (/app/index.js:149:5)
zigbee2mqtt  | Using '/app/data' as data directory
zigbee2mqtt  | Starting Zigbee2MQTT without watchdog.
zigbee2mqtt  | [2025-05-13 07:38:51] e[32minfoe[39m: 	z2m: Logging to console, file (filename: log.log)
zigbee2mqtt  | [2025-05-13 07:38:51] e[32minfoe[39m: 	z2m: Starting Zigbee2MQTT version 2.2.1 (commit #a14feef8c13f5ce49b0ac358d98d3234d21d7ff4
zigbee2mqtt  | )
zigbee2mqtt  | [2025-05-13 07:38:51] e[32minfoe[39m: 	z2m: Starting zigbee-herdsman (3.4.11)
zigbee2mqtt  | [2025-05-13 07:38:52] e[32minfoe[39m: 	zh:ember: Using default stack config.
zigbee2mqtt  | [2025-05-13 07:38:52] e[32minfoe[39m: 	zh:ember: ======== Ember Adapter Starting ========
zigbee2mqtt  | [2025-05-13 07:38:52] e[32minfoe[39m: 	zh:ember:ezsp: ======== EZSP starting ========
zigbee2mqtt  | [2025-05-13 07:38:52] e[32minfoe[39m: 	zh:ember:uart:ash: ======== ASH Adapter reset ========
zigbee2mqtt  | [2025-05-13 07:38:52] e[32minfoe[39m: 	zh:ember:uart:ash: RTS/CTS config is off, enabling software flow control.
zigbee2mqtt  | [2025-05-13 07:38:52] e[32minfoe[39m: 	zh:ember:uart:ash: Serial port opened
zigbee2mqtt  | [2025-05-13 07:38:52] e[32minfoe[39m: 	zh:ember:uart:ash: ======== ASH starting ========

The problem has nothing to do with the previous write access to /des/ttyUSB0

fl@Satellite-Z930:~$ test -w /dev/ttyUSB0 && echo success || echo failure
success
fl@Satellite-Z930:~$ 

I found that solution by ialdalaimi:
https://github.com/Koenkk/zigbee2mqtt/issues/25637

*I solved my problem by deleting the following files:*

*    Delete the database.db, coordinator_backup.json and state.json files.*
*    Clean up the configuration.json file.*
*    Deleted the zigbee2mqtt topic in MQTT (using MQTT Explorer)*
*    Restart my Intel Nuc*

Before trying that solution, I have tried to restart my modem by unplugging it for 10 secs. It did not worked.

Looking at the files to be deleted on my linuxbox I find:

fl@Satellite-Z930:~$ sudo updatedb
fl@Satellite-Z930:~$ sudo locate database.db
/home/fl/zigbee2mqtt/database.db
fl@Satellite-Z930:~$ sudo locate coordinator_backup.json
/home/fl/zigbee2mqtt/coordinator_backup.json
fl@Satellite-Z930:~$ locate configuration.json
fl@Satellite-Z930:~$ 

There is no configuration.json file. So it will not be cleaned.

FOR state.json it seems more complicated
fl@Satellite-Z930:~$ sudo locate state.json I would retain only one to delete
/home/fl/zigbee2mqtt/state.json

/home/fl/openhab/oh4/userdata/cache/org.eclipse.osgi/19/data/state.json
/home/fl/openhab/userdata/cache/org.eclipse.osgi/19/data/state.json
/home/fl/snap/firefox/common/.cache/mozilla/firefox/2bga6lat.default/personality-provider/nb_model_build_attachment_real_estate.json
/home/fl/snap/firefox/common/.mozilla/firefox/2bga6lat.default/datareporting/session-state.json
/home/fl/snap/firefox/common/.mozilla/firefox/2bga6lat.default/datareporting/state.json
/home/fl/zigbee2mqtt/state.json
/var/lib/docker/overlay2/9e009de10e940808a3e76af0affa2b63fc8d76748386c624c6af8f84cf858a56/merged/app/node_modules/.pnpm-workspace-state.json
/var/lib/docker/overlay2/db895ece44048a38ae892ab60e398c7f01a61fc1a218e0333ea0b9b4a280b6c9/diff/app/node_modules/.pnpm-workspace-state.json
/var/lib/snapd/state.json
fl@Satellite-Z930:~$ 

post update:
/home/fl/zigbee2mqtt/state.json is the only file to be removed.

Questions:
Should I follow the proposed solution of ialdalaimi?
Which state.json do I remove? (only one, the /home/fl/zigbee2mqtt/state.json, or all or some others too)?
How do I clean up the configuration.json file? (google did not gave me the exact solution).

Not encountered this issue and tried this solution but as an answer to one of your questions: only consider only the files in the zigbee2mqtt directory. Ignore the others.

And create a copy/backup before deleting them so you can return to your current state if this solution makes more trouble. Just to be on the safe side. Or if it does work, use them as a reference to recreate your current configuration.

Before deleting them, I would open them first. The json file is probably a plain text file with json. Maybe you can see the error in it, an incomplete line or missing { or }. Maybe the others are also text based like a yaml or property file.

I will do what you propose.

fl@Satellite-Z930:~$ ls
compose.yml  config  Desktop  Documents  Downloads  log2.txt  mosquitto  openhab  Pictures  Public  Templates  tuya-mqtt  zigbee2mqtt
fl@Satellite-Z930:~$ 

There is not much in the /home/fl/ folder.

Another problem is that I am unable to enter the openhab UI,
http://xx-0-0-xx.local:8080/auth

As I have a docker openhab installation, is there a way to find command line the login and password for the openhab UI, or to reset it?

Well, I know nothing about docker but if both openhab and mqtt are unreachable it sounds like this the entire thing crashed. So I would restart the entire docker container and see what happens.

I had to reinitialize openhab main UI login and password:
https://community.openhab.org/t/howto-reset-login-and-password-of-main-ui/164127

Then resuming Zigbee2mqtt:

fl@Satellite-Z930:~/openhab/userdata/jsondb/backup$ docker compose restart zigbee2mqtt
[+] Restarting 1/1
 ✔ Container zigbee2mqtt  Started                                                                                                                          0.4s 
fl@Satellite-Z930:~/openhab/userdata/jsondb/backup$ docker compose logs --tail 100 zigbee2mqtt > logx.txt
fl@Satellite-Z930:~/openhab/userdata/jsondb/backup$ 

error in the log:
permission issue with /dev/ttyUSB0
So I applied the same solution as above B. Write error

fl@Satellite-Z930:~$ test -w /dev/ttyUSB0 && echo success || echo failure
failure
fl@Satellite-Z930:~$ sudo chown fl /dev/ttyUSB0
[sudo] password for fl: 
fl@Satellite-Z930:~$ test -w /dev/ttyUSB0 && echo success || echo failure
success
fl@Satellite-Z930:~$

Another run:

zigbee2mqtt  | [2025-05-17 15:52:20] e[32minfoe[39m: 	zh:ember:uart:ash: ======== ASH Adapter reset ========
zigbee2mqtt  | [2025-05-17 15:52:20] e[32minfoe[39m: 	zh:ember:uart:ash: RTS/CTS config is off, enabling software flow control.
zigbee2mqtt  | [2025-05-17 15:52:20] e[32minfoe[39m: 	zh:ember:uart:ash: Serial port opened
zigbee2mqtt  | [2025-05-17 15:52:20] e[32minfoe[39m: 	zh:ember:uart:ash: ======== ASH starting ========
zigbee2mqtt  | [2025-05-17 15:52:23] e[32minfoe[39m: 	zh:ember:uart:ash: ======== ASH Adapter reset ========
zigbee2mqtt  | [2025-05-17 15:52:23] e[32minfoe[39m: 	zh:ember:uart:ash: ======== ASH starting ========
zigbee2mqtt  | [2025-05-17 15:52:25] e[32minfoe[39m: 	zh:ember:uart:ash: ======== ASH Adapter reset ========
zigbee2mqtt  | [2025-05-17 15:52:25] e[32minfoe[39m: 	zh:ember:uart:ash: ======== ASH starting ========
zigbee2mqtt  | [2025-05-17 15:52:28] e[32minfoe[39m: 	zh:ember:uart:ash: ======== ASH Adapter reset ========
zigbee2mqtt  | [2025-05-17 15:52:28] e[32minfoe[39m: 	zh:ember:uart:ash: ======== ASH starting ========
zigbee2mqtt  | [2025-05-17 15:52:30] e[32minfoe[39m: 	zh:ember:uart:ash: ======== ASH Adapter reset ========
zigbee2mqtt  | [2025-05-17 15:52:30] e[32minfoe[39m: 	zh:ember:uart:ash: ======== ASH starting ========
zigbee2mqtt  | [2025-05-17 15:52:33] e[31merrore[39m: 	z2m: Error while starting zigbee-herdsman
zigbee2mqtt  | [2025-05-17 15:52:33] e[31merrore[39m: 	z2m: Failed to start zigbee-herdsman
zigbee2mqtt  | [2025-05-17 15:52:33] e[31merrore[39m: 	z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start_crashes-runtime.html for possible solutions
zigbee2mqtt  | [2025-05-17 15:52:33] e[31merrore[39m: 	z2m: Exiting...
zigbee2mqtt  | [2025-05-17 15:52:33] e[31merrore[39m: 	z2m: Error: Failed to start EZSP layer with status=HOST_FATAL_ERROR.
zigbee2mqtt  |     at EmberAdapter.initEzsp (/app/node_modules/.pnpm/zigbee-herdsman@3.4.11/node_modules/zigbee-herdsman/src/adapter/ember/adapter/emberAdapter.ts:672:19)
zigbee2mqtt  |     at EmberAdapter.start (/app/node_modules/.pnpm/zigbee-herdsman@3.4.11/node_modules/zigbee-herdsman/src/adapter/ember/adapter/emberAdapter.ts:1538:24)
zigbee2mqtt  |     at Controller.start (/app/node_modules/.pnpm/zigbee-herdsman@3.4.11/node_modules/zigbee-herdsman/src/controller/controller.ts:136:29)
zigbee2mqtt  |     at Zigbee.start (/app/lib/zigbee.ts:69:27)
zigbee2mqtt  |     at Controller.start (/app/lib/controller.ts:104:13)
zigbee2mqtt  |     at start (/app/index.js:149:5)
zigbee2mqtt  | Using '/app/data' as data directory
zigbee2mqtt  | Starting Zigbee2MQTT without watchdog.
zigbee2mqtt  | [2025-05-17 15:52:34] e[32minfoe[39m: 	z2m: Logging to console, file (filename: log.log)
zigbee2mqtt  | [2025-05-17 15:52:34] e[32minfoe[39m: 	z2m: Starting Zigbee2MQTT version 2.2.1 (commit #a14feef8c13f5ce49b0ac358d98d3234d21d7ff4
zigbee2mqtt  | )
zigbee2mqtt  | [2025-05-17 15:52:34] e[32minfoe[39m: 	z2m: Starting zigbee-herdsman (3.4.11)
zigbee2mqtt  | [2025-05-17 15:52:35] e[32minfoe[39m: 	zh:ember: Using default stack config.
zigbee2mqtt  | [2025-05-17 15:52:35] e[32minfoe[39m: 	zh:ember: ======== Ember Adapter Starting ========
zigbee2mqtt  | [2025-05-17 15:52:35] e[32minfoe[39m: 	zh:ember:ezsp: ======== EZSP starting ========
zigbee2mqtt  | [2025-05-17 15:52:35] e[32minfoe[39m: 	zh:ember:uart:ash: ======== ASH Adapter reset ========
zigbee2mqtt  | [2025-05-17 15:52:35] e[32minfoe[39m: 	zh:ember:uart:ash: RTS/CTS config is off, enabling software flow control.
zigbee2mqtt  | [2025-05-17 15:52:35] e[32minfoe[39m: 	zh:ember:uart:ash: Serial port opened
zigbee2mqtt  | [2025-05-17 15:52:35] e[32minfoe[39m: 	zh:ember:uart:ash: ======== ASH starting ========
zigbee2mqtt  | [2025-05-17 15:52:37] e[32minfoe[39m: 	zh:ember:uart:ash: ======== ASH Adapter reset ========
zigbee2mqtt  | [2025-05-17 15:52:37] e[32minfoe[39m: 	zh:ember:uart:ash: ======== ASH starting ========
zigbee2mqtt  | [2025-05-17 15:52:40] e[32minfoe[39m: 	zh:ember:uart:ash: ======== ASH Adapter reset ========
zigbee2mqtt  | [2025-05-17 15:52:40] e[32minfoe[39m: 	zh:ember:uart:ash: ======== ASH starting ========
zigbee2mqtt  | [2025-05-17 15:52:42] e[32minfoe[39m: 	zh:ember:uart:ash: ======== ASH Adapter reset ========
zigbee2mqtt  | [2025-05-17 15:52:42] e[32minfoe[39m: 	zh:ember:uart:ash: ======== ASH starting ========
zigbee2mqtt  | [2025-05-17 15:52:45] e[32minfoe[39m: 	zh:ember:uart:ash: ======== ASH Adapter reset ========
zigbee2mqtt  | [2025-05-17 15:52:45] e[32minfoe[39m: 	zh:ember:uart:ash: ======== ASH starting ========
zigbee2mqtt  | [2025-05-17 15:52:47] e[31merrore[39m: 	z2m: Error while starting zigbee-herdsman
zigbee2mqtt  | [2025-05-17 15:52:47] e[31merrore[39m: 	z2m: Failed to start zigbee-herdsman
zigbee2mqtt  | [2025-05-17 15:52:47] e[31merrore[39m: 	z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start_crashes-runtime.html for possible solutions
zigbee2mqtt  | [2025-05-17 15:52:47] e[31merrore[39m: 	z2m: Exiting...
zigbee2mqtt  | [2025-05-17 15:52:47] e[31merrore[39m: 	z2m: Error: Failed to start EZSP layer with status=HOST_FATAL_ERROR.
zigbee2mqtt  |     at EmberAdapter.initEzsp (/app/node_modules/.pnpm/zigbee-herdsman@3.4.11/node_modules/zigbee-herdsman/src/adapter/ember/adapter/emberAdapter.ts:672:19)
zigbee2mqtt  |     at EmberAdapter.start (/app/node_modules/.pnpm/zigbee-herdsman@3.4.11/node_modules/zigbee-herdsman/src/adapter/ember/adapter/emberAdapter.ts:1538:24)
zigbee2mqtt  |     at Controller.start (/app/node_modules/.pnpm/zigbee-herdsman@3.4.11/node_modules/zigbee-herdsman/src/controller/controller.ts:136:29)
zigbee2mqtt  |     at Zigbee.start (/app/lib/zigbee.ts:69:27)
zigbee2mqtt  |     at Controller.start (/app/lib/controller.ts:104:13)
zigbee2mqtt  |     at start (/app/index.js:149:5)
zigbee2mqtt  | Using '/app/data' as data directory
zigbee2mqtt  | Starting Zigbee2MQTT without watchdog.
zigbee2mqtt  | [2025-05-17 15:53:00] e[32minfoe[39m: 	z2m: Logging to console, file (filename: log.log)
zigbee2mqtt  | [2025-05-17 15:53:00] e[32minfoe[39m: 	z2m: Starting Zigbee2MQTT version 2.2.1 (commit #a14feef8c13f5ce49b0ac358d98d3234d21d7ff4
zigbee2mqtt  | )
zigbee2mqtt  | [2025-05-17 15:53:00] e[32minfoe[39m: 	z2m: Starting zigbee-herdsman (3.4.11)
zigbee2mqtt  | [2025-05-17 15:53:00] e[32minfoe[39m: 	zh:ember: Using default stack config.
zigbee2mqtt  | [2025-05-17 15:53:00] e[32minfoe[39m: 	zh:ember: ======== Ember Adapter Starting ========
zigbee2mqtt  | [2025-05-17 15:53:00] e[32minfoe[39m: 	zh:ember:ezsp: ======== EZSP starting ========
zigbee2mqtt  | [2025-05-17 15:53:00] e[32minfoe[39m: 	zh:ember:uart:ash: ======== ASH Adapter reset ========
zigbee2mqtt  | [2025-05-17 15:53:00] e[32minfoe[39m: 	zh:ember:uart:ash: RTS/CTS config is off, enabling software flow control.
zigbee2mqtt  | [2025-05-17 15:53:00] e[32minfoe[39m: 	zh:ember:uart:ash: Serial port opened
zigbee2mqtt  | [2025-05-17 15:53:00] e[32minfoe[39m: 	zh:ember:uart:ash: ======== ASH starting ========
zigbee2mqtt  | [2025-05-17 15:53:03] e[32minfoe[39m: 	zh:ember:uart:ash: ======== ASH Adapter reset ========
zigbee2mqtt  | [2025-05-17 15:53:03] e[32minfoe[39m: 	zh:ember:uart:ash: ======== ASH starting ========
zigbee2mqtt  | [2025-05-17 15:53:05] e[32minfoe[39m: 	zh:ember:uart:ash: ======== ASH Adapter reset ========
zigbee2mqtt  | [2025-05-17 15:53:05] e[32minfoe[39m: 	zh:ember:uart:ash: ======== ASH starting ========
zigbee2mqtt  | [2025-05-17 15:53:08] e[32minfoe[39m: 	zh:ember:uart:ash: ======== ASH Adapter reset ========
zigbee2mqtt  | [2025-05-17 15:53:08] e[32minfoe[39m: 	zh:ember:uart:ash: ======== ASH starting ========
zigbee2mqtt  | [2025-05-17 15:53:10] e[32minfoe[39m: 	zh:ember:uart:ash: ======== ASH Adapter reset ========
zigbee2mqtt  | [2025-05-17 15:53:10] e[32minfoe[39m: 	zh:ember:uart:ash: ======== ASH starting ========
zigbee2mqtt  | [2025-05-17 15:53:13] e[31merrore[39m: 	z2m: Error while starting zigbee-herdsman
zigbee2mqtt  | [2025-05-17 15:53:13] e[31merrore[39m: 	z2m: Failed to start zigbee-herdsman
zigbee2mqtt  | [2025-05-17 15:53:13] e[31merrore[39m: 	z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start_crashes-runtime.html for possible solutions
zigbee2mqtt  | [2025-05-17 15:53:13] e[31merrore[39m: 	z2m: Exiting...
zigbee2mqtt  | [2025-05-17 15:53:13] e[31merrore[39m: 	z2m: Error: Failed to start EZSP layer with status=HOST_FATAL_ERROR.
zigbee2mqtt  |     at EmberAdapter.initEzsp (/app/node_modules/.pnpm/zigbee-herdsman@3.4.11/node_modules/zigbee-herdsman/src/adapter/ember/adapter/emberAdapter.ts:672:19)
zigbee2mqtt  |     at EmberAdapter.start (/app/node_modules/.pnpm/zigbee-herdsman@3.4.11/node_modules/zigbee-herdsman/src/adapter/ember/adapter/emberAdapter.ts:1538:24)
zigbee2mqtt  |     at Controller.start (/app/node_modules/.pnpm/zigbee-herdsman@3.4.11/node_modules/zigbee-herdsman/src/controller/controller.ts:136:29)
zigbee2mqtt  |     at Zigbee.start (/app/lib/zigbee.ts:69:27)
zigbee2mqtt  |     at Controller.start (/app/lib/controller.ts:104:13)
zigbee2mqtt  |     at start (/app/index.js:149:5)
zigbee2mqtt  | Using '/app/data' as data directory
zigbee2mqtt  | Starting Zigbee2MQTT without watchdog.
zigbee2mqtt  | [2025-05-17 15:53:14] e[32minfoe[39m: 	z2m: Logging to console, file (filename: log.log)
zigbee2mqtt  | [2025-05-17 15:53:14] e[32minfoe[39m: 	z2m: Starting Zigbee2MQTT version 2.2.1 (commit #a14feef8c13f5ce49b0ac358d98d3234d21d7ff4
zigbee2mqtt  | )
zigbee2mqtt  | [2025-05-17 15:53:14] e[32minfoe[39m: 	z2m: Starting zigbee-herdsman (3.4.11)
zigbee2mqtt  | [2025-05-17 15:53:14] e[32minfoe[39m: 	zh:ember: Using default stack config.
zigbee2mqtt  | [2025-05-17 15:53:14] e[32minfoe[39m: 	zh:ember: ======== Ember Adapter Starting ========
zigbee2mqtt  | [2025-05-17 15:53:14] e[32minfoe[39m: 	zh:ember:ezsp: ======== EZSP starting ========
zigbee2mqtt  | [2025-05-17 15:53:14] e[32minfoe[39m: 	zh:ember:uart:ash: ======== ASH Adapter reset ========
zigbee2mqtt  | [2025-05-17 15:53:14] e[32minfoe[39m: 	zh:ember:uart:ash: RTS/CTS config is off, enabling software flow control.
zigbee2mqtt  | [2025-05-17 15:53:14] e[32minfoe[39m: 	zh:ember:uart:ash: Serial port opened
zigbee2mqtt  | [2025-05-17 15:53:14] e[32minfoe[39m: 	zh:ember:uart:ash: ======== ASH starting ========

Same error as before:
z2m: Error: Failed to start EZSP layer with status=HOST_FATAL_ERROR.
And there is no access to zigbee2mqtt user interface.

C. HOST_FATAL_ERROR
Solution applied above by ialdalaimi is not pertinent as there is no files to be removed:

database.db, coordinator_backup.json and state.json files. and configuration.json file
fl@Satellite-Z930:~/zigbee2mqtt$ sudo locate database.db
/home/fl/.local/share/Trash/files/database.db
/home/fl/.local/share/Trash/info/database.db.trashinfo
fl@Satellite-Z930:~/zigbee2mqtt$ sudo locate coordinator_backup.json
/home/fl/.local/share/Trash/files/coordinator_backup.json
/home/fl/.local/share/Trash/info/coordinator_backup.json.trashinfo
fl@Satellite-Z930:~/zigbee2mqtt$ sudo locate state.json
/home/fl/.local/share/Trash/files/state.json
/home/fl/.local/share/Trash/info/state.json.trashinfo
/home/fl/openhab/oh4/userdata/cache/org.eclipse.osgi/19/data/state.json
/home/fl/openhab/userdata/cache/org.eclipse.osgi/19/data/state.json
/home/fl/snap/firefox/common/.cache/mozilla/firefox/4fclfzum.default/personality-provider/nb_model_build_attachment_real_estate.json
/home/fl/snap/firefox/common/.mozilla/firefox/4fclfzum.default/datareporting/session-state.json
/home/fl/snap/firefox/common/.mozilla/firefox/4fclfzum.default/datareporting/state.json
/var/lib/docker/overlay2/db895ece44048a38ae892ab60e398c7f01a61fc1a218e0333ea0b9b4a280b6c9/diff/app/node_modules/.pnpm-workspace-state.json
/var/lib/snapd/state.json
fl@Satellite-Z930:~/zigbee2mqtt$ sudo locate configuration.json
fl@Satellite-Z930:~/zigbee2mqtt$ 

chris-1243 on github gave the solution:

https://github.com/Koenkk/zigbee2mqtt/discussions/27372
Baud rate was wrong in the configuration.yaml
It had to be changed to

serial:
  port: /dev/ttyUSB0
  adapter: ember
  baudrate: 115200

or simply to be removed

serial:
  port: /dev/ttyUSB0
  adapter: ember

Once more I got the /dev/ttyUSB0 writing permission failure, though my linux box was up all nite. Is it the restarting of the zigbee2mqqt docker container at the origin of that failure?

fl@Satellite-Z930:~$ test -w /dev/ttyUSB0 && echo success || echo failure
failure
failure
failure: command not found
fl@Satellite-Z930:~$ sudo chown fl /dev/ttyUSB0
[sudo] password for fl: 
fl@Satellite-Z930:~$ test -w /dev/ttyUSB0 && echo success || echo failure
success

I need to get the effect of sudo chown fl /dev/ttyUSB0 permanent .How do I achieve that?

Is there some new error log?

fl@Satellite-Z930:~$ docker compose restart zigbee2mqtt
fl@Satellite-Z930:~$ sudo docker compose logs --tail 100 zigbee2mqtt
fl@Satellite-Z930:~$

Yes! The FATAL error is back. How come this has to be fixed everytime there is the /dev/ttyUSB0 writing permission failure?

*** to be done: ***
A. fix fatal error, and new run, see results, if ok go to zigbee2mqqt UI and try pairing

B. If not:
verify /dev/ttyUSB0 writing permission failure
and go back to A

You are in no luck. Still don’t know anything about docker but it seems it doesn’t hold your configuration changes. Every time repeating the same steps doesn’t sound good. So my guess, maybe one of the other things is also back to original. Maybe the baudrate again?

It has been working fine for many days now.But today the zigbee2mqqt user interface was down.

Fatal error in the log.

fl@Satellite-Z930:~$ test -w /dev/ttyUSB0 && echo success || echo failure
failure
fl@Satellite-Z930:~$ docker stop zigbee2mqtt
zigbee2mqtt
fl@Satellite-Z930:~$ sudo chown fl /dev/ttyUSB0
fl@Satellite-Z930:~$ docker compose restart zigbee2mqtt
[+] Restarting 1/1
 ✔ Container zigbee2mqtt  Started                                                                                                                0.2s 
fl@Satellite-Z930:~$ test -w /dev/ttyUSB0 && echo success || echo failure
success
fl@Satellite-Z930:~$

Looking for a permanent fix for the fl user permission read-write, I found:
chatter -i
https://www.howtogeek.com/790679/how-to-use-the-chattr-command-on-linux/
sudo chatter -i /dev/ttyUSB0
But I am not too sure that this is the solution.

1 Like

If you run zigbee2mqtt as root you probably won’t have this problem.