Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zigbee Dongle-E (Sonoff) does not start #24417

Open
clrmsc opened this issue Oct 20, 2024 · 6 comments
Open

Zigbee Dongle-E (Sonoff) does not start #24417

clrmsc opened this issue Oct 20, 2024 · 6 comments
Labels
problem Something isn't working

Comments

@clrmsc
Copy link

clrmsc commented Oct 20, 2024

What happened?

I can't connect to zigbee2mqtt.
config file:

configuration.yaml:
homeassistant: false
permit_join: true
mqtt:
base_topic: zigbee2mqtt
server: mqtt://localhost:1883
serial:
port: /dev/ttyACM0
baudrate: 115200
adapter: ember
rtscts: false
frontend:
port: 8081
advanced:
homeassistant_legacy_entity_attributes: false
legacy_api: false
legacy_availability_payload: false
device_options:
legacy: false

What did you expect to happen?

No response

How to reproduce it (minimal and precise)

No response

Zigbee2MQTT version

1.40.2

Adapter firmware version

Z3RouterUSBDonlge_EZNet6.10.3_V1.0.0.gbl

Adapter

SONOFF Zigbee Dongle-E

Setup

Raspberry Pi 5 (64 bit OS)

Debug log

zigbee2mqtt@1.40.2 start
node index.js

Starting Zigbee2MQTT without watchdog.
[2024-10-19 15:09:37] info: z2m: Logging to console, file (filename: log.log)
[2024-10-19 15:09:37] info: z2m: Starting Zigbee2MQTT version 1.40.2 (commit #e06848d)
[2024-10-19 15:09:37] info: z2m: Starting zigbee-herdsman (2.1.3)
[2024-10-19 15:09:38] info: zh:ember: Using default stack config.
[2024-10-19 15:09:38] info: zh:ember: ======== Ember Adapter Starting ========
[2024-10-19 15:09:38] info: zh:ember:ezsp: ======== EZSP starting ========
[2024-10-19 15:09:38] info: zh:ember:uart:ash: ======== ASH Adapter reset ========
[2024-10-19 15:09:38] info: zh:ember:uart:ash: RTS/CTS config is off, enabling software flow control.
[2024-10-19 15:09:38] info: zh:ember:uart:ash: Serial port opened
[2024-10-19 15:09:38] info: zh:ember:uart:ash: ======== ASH starting ========
[2024-10-19 15:09:40] info: zh:ember:uart:ash: ======== ASH Adapter reset ========
[2024-10-19 15:09:40] info: zh:ember:uart:ash: ======== ASH starting ========
[2024-10-19 15:09:43] info: zh:ember:uart:ash: ======== ASH Adapter reset ========
[2024-10-19 15:09:43] info: zh:ember:uart:ash: ======== ASH starting ========
[2024-10-19 15:09:45] info: zh:ember:uart:ash: ======== ASH Adapter reset ========
[2024-10-19 15:09:45] info: zh:ember:uart:ash: ======== ASH starting ========
[2024-10-19 15:09:48] info: zh:ember:uart:ash: ======== ASH Adapter reset ========
[2024-10-19 15:09:48] info: zh:ember:uart:ash: ======== ASH starting ========
[2024-10-19 15:09:50] error: z2m: Error while starting zigbee-herdsman
[2024-10-19 15:09:50] error: z2m: Failed to start zigbee
[2024-10-19 15:09:50] error: z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
[2024-10-19 15:09:50] error: z2m: Exiting...
[2024-10-19 15:09:50] error: z2m: Error: Failed to start EZSP layer with status=HOST_FATAL_ERROR.
at EmberAdapter.initEzsp (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/src/adapter/ember/adapter/emberAdapter.ts:684:19)
at EmberAdapter.start (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/src/adapter/ember/adapter/emberAdapter.ts:1583:24)
at Controller.start (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/src/controller/controller.ts:137:29)
at Zigbee.start (/opt/zigbee2mqtt/lib/zigbee.ts:69:27)
at Controller.start (/opt/zigbee2mqtt/lib/controller.ts:161:27)
at start (/opt/zigbee2mqtt/index.js:154:5)

@clrmsc clrmsc added the problem Something isn't working label Oct 20, 2024
@camlin
Copy link

camlin commented Oct 20, 2024

For info, I am also using the Sonoff Dongle-E (the one marked Zigbee 3.0 USB Dongle Plus) and it is working fine. I am however on an x86 CPU (not ARM like the Raspberry Pi). But I would be surprised if that was the issue (many other people have used the Sonoff dongle on Raspberry Pi).

I am admittedly using a much simpler config file (and letting it decide what is best to use):

permit_join: false
mqtt:
  base_topic: zigbee2mqtt
  server: mqtt://192.168.2.5
serial:
  port: /dev/ttyACM0
frontend:
  port: 8070
advanced:
  homeassistant_legacy_entity_attributes: false
  legacy_api: false
  legacy_availability_payload: false
device_options:
  legacy: false
availability: true

And my start log is this:

info  2024-10-20 14:52:12: Logging to console and directory: '/app/data/log/2024-10-20.14-52-12' filename: log.txt
info  2024-10-20 14:52:13: Starting Zigbee2MQTT version 1.35.1 (commit #9eaaa0f)
info  2024-10-20 14:52:13: Starting zigbee-herdsman (0.30.0)
info  2024-10-20 14:52:16: zigbee-herdsman started (resumed)
info  2024-10-20 14:52:16: Coordinator firmware version: '{"meta":{"maintrel":"3 ","majorrel":"6","minorrel":"10","product":8,"revision":"6.10.3.0 build 297"},"type":"EZSP v8"}'
...

I have recently tried to use 1.40.2 but found it unstable MQTT wise (it kept reporting MQTT connections timeout), so I have admittedly reverted back to 1.35.1 but the ZigBee part/dongle had no issues with 1.40.2

@camlin
Copy link

camlin commented Oct 20, 2024

Also, are you hinting at the fact it previously worked but suddenly stopped? If that's the case I would check if the user running the process is still the same (it will need to have read & write access on /dev/ttyACM0 and, if I remember, I did ran into some issues when I setup mine a while ago).

@Nerivec
Copy link
Collaborator

Nerivec commented Oct 20, 2024

Update your adapter to 7.4.x to use with ember.
https://github.com/darkxst/silabs-firmware-builder/raw/refs/heads/main/firmware_builds/zbdonglee/ncp-uart-hw-v7.4.4.0-zbdonglee-115200.gbl
You can flash it with:

Then make sure your configuration (port) is correct. If possible, use the unique /dev/serial/by-id/ path, to avoid issues with assignments for tty-type paths.

@clrmsc
Copy link
Author

clrmsc commented Oct 21, 2024

Update your adapter to 7.4.x to use with ember. https://github.com/darkxst/silabs-firmware-builder/raw/refs/heads/main/firmware_builds/zbdonglee/ncp-uart-hw-v7.4.4.0-zbdonglee-115200.gbl You can flash it with:

Then make sure your configuration (port) is correct. If possible, use the unique /dev/serial/by-id/ path, to avoid issues with assignments for tty-type paths.

Thks! I flash it with SecureCRT 9.5 but now led no blinking.
and z2m started. can you say pls its work correct?

Starting Zigbee2MQTT without watchdog.
[2024-10-21 05:50:20] info: z2m: Logging to console, file (filename: log.log)
[2024-10-21 05:50:20] info: z2m: Starting Zigbee2MQTT version 1.40.2 (commit #e06848d)
[2024-10-21 05:50:20] info: z2m: Starting zigbee-herdsman (2.1.3)
[2024-10-21 05:50:20] warning: zh:ezsp: 'ezsp' driver is deprecated and will only remain to provide support for older firmware (pre 7.4.x). Migration to 'ember' is recommended. If using Zigbee2MQTT see #21462
[2024-10-21 05:50:23] info: zh:ezsp:driv: Leaving current network and forming new network
[2024-10-21 05:50:24] info: zh:ezsp:driv: Form network
[2024-10-21 05:50:26] info: zh:controller: Wrote coordinator backup to '/opt/zigbee2mqtt/data/coordinator_backup.json'
[2024-10-21 05:50:26] info: z2m: zigbee-herdsman started (reset)
[2024-10-21 05:50:26] info: z2m: Coordinator firmware version: '{"meta":{"maintrel":"4 ","majorrel":"7","minorrel":"4","product":13,"revision":"7.4.4.0 build 0"},"type":"EZSP v13"}'
[2024-10-21 05:50:26] info: z2m: Currently 0 devices are joined.
[2024-10-21 05:50:26] info: z2m: Zigbee: disabling joining new devices.
[2024-10-21 05:50:26] info: z2m: Connecting to MQTT server at mqtt://192.168.31.16
[2024-10-21 05:50:26] info: z2m: Connected to MQTT server
[2024-10-21 05:50:26] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/bridge/state', payload '{"state":"online"}'
[2024-10-21 05:50:26] info: z2m: Started frontend on port 8070
[2024-10-21 05:50:26] info: z2m: Zigbee2MQTT started!

@camlin
Copy link

camlin commented Oct 21, 2024

From the logs I would say it looks like it is now working correctly.

You just need to enable the join mode (temporarily, via the web-ui) so that you can add zigbee devices to be under its control (the exact procedure is device dependent but they usually have a button you need to press for 5 seconds or similar).

@Nerivec
Copy link
Collaborator

Nerivec commented Oct 21, 2024

Looks good indeed. 👍

You should switch to adapter: ember before going any further, unless you have a good reason not to. adapter: ezsp is deprecated as indicated in your logs.
Then follow the docs to set things up properly:
https://www.zigbee2mqtt.io/guide/configuration/zigbee-network.html#network-config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problem Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants