zigbee2mqtt icon indicating copy to clipboard operation
zigbee2mqtt copied to clipboard

Zigbee2MQTT won't start after 2.0.0-1 update with Sonoff ZBDongle-E w/ Ember firmware

Open lbovay opened this issue 1 year ago • 109 comments

What happened?

After updating to Zigbee2MQTT 2.0.0-1, the add-on won't start.

I'm using Home Assistant with a Sonoff ZBDongle-E running Ember 7.4.5.0 firmware. Addon configuration: adapter: ember

I cannot find anything usefull in the Addon logs.

What did you expect to happen?

No response

How to reproduce it (minimal and precise)

Start Zigbee2MMQTT Addon in Home Assistant.

Zigbee2MQTT version

2.0.0-1

Adapter firmware version

Ember: ncp-uart-hw-v7.4.5.0-zbdonglee-115200.gbl

Adapter

Sonoff ZBDongle-E

Setup

Homea Assistant

Debug log

[07:34:58] INFO: Preparing to start...
[07:35:00] INFO: Socat not enabled
[07:35:07] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT without watchdog.
[2025-01-04 07:35:29] debug: 	z2m: Removing old log directory '/config/zigbee2mqtt/log/2025-01-04.06-38-38'
[2025-01-04 07:35:29] info: 	z2m: Logging to console, file (filename: log.log)
[2025-01-04 07:35:29] debug: 	z2m: Loaded state from file /config/zigbee2mqtt/state.json
[2025-01-04 07:35:29] info: 	z2m: Starting Zigbee2MQTT version 2.0.0 (commit #unknown)
[2025-01-04 07:35:29] debug: 	z2m: sd-notify loaded
[2025-01-04 07:35:29] info: 	z2m: Starting zigbee-herdsman (3.2.1)
[2025-01-04 07:35:29] debug: 	z2m: Using zigbee-herdsman with settings: '"{\"network\":{\"panID\":27927,\"extendedPanID\":[224,146,81,167,164,208,140,225],\"channelList\":[26],\"networkKey\":\"HIDDEN\"},\"databasePath\":\"/config/zigbee2mqtt/database.db\",\"databaseBackupPath\":\"/config/zigbee2mqtt/database.db.backup\",\"backupPath\":\"/config/zigbee2mqtt/coordinator_backup.json\",\"serialPort\":{\"path\":\"/dev/serial/by-id/usb-Itead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_V2_e44dfe02b639ef119cf057f454516304-if00-port0\",\"adapter\":\"ember\"},\"adapter\":{\"disableLED\":false}}"'
[2025-01-04 07:35:30] debug: 	zh:adapter:discovery: Connected devices: [{"path":"/dev/ttyS1"},{"path":"/dev/ttyS2"},{"path":"/dev/ttyS3"},{"path":"/dev/ttyUSB0","manufacturer":"Itead","serialNumber":"e44dfe02b639ef119cf057f454516304","pnpId":"usb-Itead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_V2_e44dfe02b639ef119cf057f454516304-if00-port0","vendorId":"10c4","productId":"ea60"}]
[2025-01-04 07:35:30] debug: 	zh:adapter:discovery: Unable to match USB adapter: ember | /dev/serial/by-id/usb-Itead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_V2_e44dfe02b639ef119cf057f454516304-if00-port0
[2025-01-04 07:35:30] info: 	zh:ember: Using default stack config.
[2025-01-04 07:35:30] debug: 	zh:controller: Starting with options '{"network":{"networkKeyDistribute":false,"networkKey":"HIDDEN","panID":27927,"extendedPanID":[224,146,81,167,164,208,140,225],"channelList":[26]},"serialPort":{"path":"/dev/serial/by-id/usb-Itead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_V2_e44dfe02b639ef119cf057f454516304-if00-port0","adapter":"ember"},"adapter":{"disableLED":false},"databasePath":"/config/zigbee2mqtt/database.db","databaseBackupPath":"/config/zigbee2mqtt/database.db.backup","backupPath":"/config/zigbee2mqtt/coordinator_backup.json"}'
[2025-01-04 07:35:30] info: 	zh:ember: ======== Ember Adapter Starting ========
[2025-01-04 07:35:30] info: 	zh:ember:ezsp: ======== EZSP starting ========
[2025-01-04 07:35:30] info: 	zh:ember:uart:ash: ======== ASH Adapter reset ========
[2025-01-04 07:35:30] info: 	zh:ember:uart:ash: RTS/CTS config is off, enabling software flow control.
[2025-01-04 07:35:30] debug: 	zh:ember:uart:ash: Opening serial port with {"path":"/dev/serial/by-id/usb-Itead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_V2_e44dfe02b639ef119cf057f454516304-if00-port0","baudRate":115200,"rtscts":false,"autoOpen":false,"parity":"none","stopBits":1,"xon":true,"xoff":true}

lbovay avatar Jan 04 '25 06:01 lbovay

Same Problem with Sonoff-P USB Stick. / actuall Software

swat33333 avatar Jan 04 '25 06:01 swat33333

same here usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V

port: >-
  /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20231101112552-if00
adapter: ember
baudrate: 115200
rtscts: false

Mark-Muc

Mark-Muc avatar Jan 04 '25 08:01 Mark-Muc

I've got the same problem with Dongle-E.

Tried to switch to zstack even though ember was working fine pre-update, that didn't work. Switched back to ember and set rtscts to true, that didn't work. Set that to false, that didn't work. UArt just refuses to start up.

uniquePWD avatar Jan 04 '25 09:01 uniquePWD

I have the same issue with my UZG-01. Based on the recommendations, I modified the configuration as follows: port: tcp://192.168.1.205:6638 baudrate: 115200 adapter: zstack disable_led: false

However, after applying these changes, I encountered the following error in the logs:

[10:04:42] INFO: Preparing to start... [10:04:42] INFO: Socat not enabled [10:04:42] INFO: Starting Zigbee2MQTT... Starting Zigbee2MQTT without watchdog. [2025-01-04 10:04:45] info: z2m: Logging to console, file (filename: log.log) [2025-01-04 10:04:45] info: z2m: Starting Zigbee2MQTT version 2.0.0 (commit #unknown) [2025-01-04 10:04:45] info: z2m: Starting zigbee-herdsman (3.2.1) [2025-01-04 10:04:45] info: zh:zstack:znp: Opening TCP socket with 192.168.1.205:6638 [2025-01-04 10:04:45] info: zh:zstack:znp: Socket connected [2025-01-04 10:04:45] info: zh:zstack:znp: Socket ready [2025-01-04 10:04:45] info: zh:zstack:znp: Writing CC2530/CC2531 skip bootloader payload [2025-01-04 10:04:46] info: zh:zstack:znp: Skip bootloader for CC2652/CC1352 [2025-01-04 10:05:04] error: z2m: Error while starting zigbee-herdsman [2025-01-04 10:05:04] error: z2m: Failed to start zigbee-herdsman [2025-01-04 10:05:04] error: z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start_crashes-runtime.html for possible solutions [2025-01-04 10:05:04] error: z2m: Exiting... [2025-01-04 10:05:04] error: z2m: Error: Failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms) at ZStackAdapter.start (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/zStackAdapter.ts:113:27) at Controller.start (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/controller/controller.ts:136:29) at Zigbee.start (/app/lib/zigbee.ts:69:27) at Controller.start (/app/lib/controller.ts:142:13) at start (/app/index.js:161:5)

CVKBaca avatar Jan 04 '25 09:01 CVKBaca

I have the same issue with my UZG-01. Based on the recommendations, I modified the configuration as follows:

port: tcp://192.168.1.205:6638 baudrate: 115200 adapter: zstack disable_led: false

However, after applying these changes, I encountered the following error in the logs: [10:04:42] INFO: Preparing to start... [10:04:42] INFO: Socat not enabled [10:04:42] INFO: Starting Zigbee2MQTT... Starting Zigbee2MQTT without watchdog. [2025-01-04 10:04:45] info: z2m: Logging to console, file (filename: log.log) [2025-01-04 10:04:45] info: z2m: Starting Zigbee2MQTT version 2.0.0 (commit #unknown) [2025-01-04 10:04:45] info: z2m: Starting zigbee-herdsman (3.2.1) [2025-01-04 10:04:45] info: zh:zstack:znp: Opening TCP socket with 192.168.1.205:6638 [2025-01-04 10:04:45] info: zh:zstack:znp: Socket connected [2025-01-04 10:04:45] info: zh:zstack:znp: Socket ready [2025-01-04 10:04:45] info: zh:zstack:znp: Writing CC2530/CC2531 skip bootloader payload [2025-01-04 10:04:46] info: zh:zstack:znp: Skip bootloader for CC2652/CC1352 [2025-01-04 10:05:04] error: z2m: Error while starting zigbee-herdsman [2025-01-04 10:05:04] error: z2m: Failed to start zigbee-herdsman [2025-01-04 10:05:04] error: z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start_crashes-runtime.html for possible solutions [2025-01-04 10:05:04] error: z2m: Exiting... [2025-01-04 10:05:04] error: z2m: Error: Failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms) at ZStackAdapter.start (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/zStackAdapter.ts:113:27) at Controller.start (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/controller/controller.ts:136:29) at Zigbee.start (/app/lib/zigbee.ts:69:27) at Controller.start (/app/lib/controller.ts:142:13) at start (/app/index.js:161:5)

That's a different adapter that uses a different software stack. You use zstack, we use ember. I would suggest starting a thread for your specific adapter

uniquePWD avatar Jan 04 '25 09:01 uniquePWD

I'm seeing this in my portainer logs

[2025-01-04 09:19:27] error: 	z2m: Error while starting zigbee-herdsman

[2025-01-04 09:19:27] error: 	z2m: Failed to start zigbee-herdsman

[2025-01-04 09:19:27] error: 	z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start_crashes-runtime.html for possible solutions

[2025-01-04 09:19:27] error: 	z2m: Exiting...

[2025-01-04 09:19:27] error: 	z2m: Error: Adapter EZSP protocol version (12) is not supported by Host [13-16].

    at EmberAdapter.emberVersion (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/adapter/ember/adapter/emberAdapter.ts:1403:19)

    at EmberAdapter.initEzsp (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/adapter/ember/adapter/emberAdapter.ts:674:9)

    at EmberAdapter.start (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/adapter/ember/adapter/emberAdapter.ts:1533:24)

    at Controller.start (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/controller/controller.ts:136:29)

    at Zigbee.start (/app/lib/zigbee.ts:69:27)

    at Controller.start (/app/lib/controller.ts:142:13)

    at start (/app/index.js:161:5)

      
      

uniquePWD avatar Jan 04 '25 09:01 uniquePWD

same here usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V

port: >-
  /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20231101112552-if00
adapter: ember
baudrate: 115200
rtscts: false

Mark-Muc

Same here get this error:

[2025-01-04 10:41:34] error: z2m: Error: Adapter EZSP protocol version (8) is not supported by Host [13-16].

plaiddk avatar Jan 04 '25 10:01 plaiddk

Looks like Dongle-E users need to update their firmware: https://github.com/Koenkk/zigbee2mqtt/issues/24417#issuecomment-2425239430

uniquePWD avatar Jan 04 '25 10:01 uniquePWD

ncp-uart-hw-v7.4.5.0-zbdonglee-115200.gbl

I'm running "ncp-uart-hw-v7.4.5.0-zbdonglee-115200.gbl" as stated in the original post to no avail. Did you have success with a Dongle-E on a different firmware ?

lbovay avatar Jan 04 '25 10:01 lbovay

Update went flawless on my end. My Sonoff Zigbee Dongle-E was already on this firmware (and on EMBER driver):

https://github.com/darkxst/silabs-firmware-builder/releases/download/20241124/zbdonglee_zigbee_ncp_8.0.2.0_sw_flow_115200.gbl

In my configuration.yaml I had the following added prior to the update:

 homeassistant:
  legacy_entity_attributes: false
  legacy_triggers: false`
advanced:
  homeassistant_legacy_triggers: false
  homeassistant_legacy_entity_attributes: false
  legacy_api: false
  legacy_availability_payload: false
  channel: 25
  output: attribute_and_json
  last_seen: ISO_8601
  log_level: error
serial:
  port: >-
    /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20230509114723-if00
  adapter: ember
frontend:
  port: <my portnumber>
device_options:
  legacy: false
permit_join: false`


Unsure on how to update? Follow these instructions:

cd /home
#Identify Stick
ls /dev/serial/by-id

#Returns this: usb-FTDI_FT232R_USB_UART_AM01O7UT-if00-port0  usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20230509114723-if00

#Get Firmware (for above stick = Zigbee Dongle E) - Make sure to select 115200 firmware! (BAUDRATE)
#Find the file via: https://github.com/darkxst/silabs-firmware-builder/releases/
#Run:
wget https://github.com/darkxst/silabs-firmware-builder/releases/<FIRMWARE FILE>

#Current firmware version can be seen in: http://<Z2M-IP:PORT>/#/settings/about (Zigbee2mqtt).

#So for 8.0.2 get the file via this command:
wget https://github.com/darkxst/silabs-firmware-builder/releases/download/20241124/zbdonglee_zigbee_ncp_8.0.2.0_sw_flow_115200.gbl

#Install Python on Pi (or re-run to update to ensure you have the most recent version):
sudo apt install python3-pip -y
# Remove this, updating will fail otherwise:
sudo rm -rf /usr/lib/python3.11/EXTERNALLY-MANAGED

# Install Flash-Tool, ref: [GitHub - NabuCasa/universal-silabs-flasher: Flashes Silicon Labs radios running EmberZNet or CPC multi-pan firmware](https://github.com/NabuCasa/universal-silabs-flasher)
# Re-run command to update the tool, this is required to have support for firmware flashing of version 8.0+
pip install universal-silabs-flasher

# Install firmware update for Zigbee Stick
# MAKE SURE YOU STOP ZIGBEE2MQTT BEFORE RUNNING THIS COMMAND
sudo universal-silabs-flasher --device /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20230509114723-if00 flash --firmware /home/zbdonglee_zigbee_ncp_8.0.2.0_sw_flow_115200.gbl```

awraeven avatar Jan 04 '25 10:01 awraeven

Looks like Dongle-E users need to update their firmware: #24417 (comment)

I am runnig

Zigbee (EZSP) 7.4.4.0 build 0
Sonoff ZBDongle-E

and [(https://darkxst.github.io/silabs-firmware-builder/)] tells me, that's there isn't any newer!!

Mark_Muc

Mark-Muc avatar Jan 04 '25 10:01 Mark-Muc

Looks like Dongle-E users need to update their firmware: #24417 (comment)

I am runnig

Zigbee (EZSP) 7.4.4.0 build 0
Sonoff ZBDongle-E

and [(https://darkxst.github.io/silabs-firmware-builder/)] tells me, that's there isn't any newer!!

Mark_Muc

I got it to work with updating to 7.4.4.0 - So maybe your missing something?

plaiddk avatar Jan 04 '25 10:01 plaiddk

i now have updated to:

Zigbee (EZSP) 8.0.2.0 build 397
Sonoff ZBDongle-E

and z2m won't start.. Log:

[11:41:37] INFO: Preparing to start...
[11:41:37] INFO: Socat not enabled
[11:41:37] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT without watchdog.
AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:
  (0, node_assert_1.default)(result instanceof Object)
    at read (/app/lib/util/yaml.ts:24:15)
    at Object.readIfExists (/app/lib/util/yaml.ts:36:34)
    at readDevicesOrGroups (/app/lib/util/settings.ts:317:38)
    at read (/app/lib/util/settings.ts:325:5)
    at getPersistedSettings (/app/lib/util/settings.ts:393:21)
    at Object.reRead (/app/lib/util/settings.ts:640:5)
    at start (/app/index.js:130:14)

Mark-Muc avatar Jan 04 '25 10:01 Mark-Muc

#How To Fix It:

  1. In Chrome goto https://darkxst.github.io/silabs-firmware-builder/
  2. Press Connect under your device
  3. Press upgrade
  4. When that's finished, it will probably say it failed, don't worry
  5. Restart Z2M
  6. Restart Home Assistant
  7. Wait for things to finish booting up as it may be a little slow.
  8. Smile

uniquePWD avatar Jan 04 '25 10:01 uniquePWD

THX uniquePWD. So I did now the same . switched back the firmware to 7.4.4.0 and still got the same error in the log:

[11:57:56] INFO: Preparing to start...
[11:57:57] INFO: Socat not enabled
[11:57:57] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT without watchdog.
AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:
  (0, node_assert_1.default)(result instanceof Object)
    at read (/app/lib/util/yaml.ts:24:15)
    at Object.readIfExists (/app/lib/util/yaml.ts:36:34)
    at readDevicesOrGroups (/app/lib/util/settings.ts:317:38)
    at read (/app/lib/util/settings.ts:325:5)
    at getPersistedSettings (/app/lib/util/settings.ts:393:21)
    at Object.reRead (/app/lib/util/settings.ts:640:5)
    at start (/app/index.js:130:14)

I think i will switch back to the last working version and WAIT...

Regards Mark-Muc

Mark-Muc avatar Jan 04 '25 11:01 Mark-Muc

Yours is looking like a different issue Mark and reading through your logs, it's looking like an issue with your configuration.yaml

uniquePWD avatar Jan 04 '25 11:01 uniquePWD

i tried with this firmware and still the startup hangs at the same step as originally posted.

Zigbee (EZSP) 8.0.2.0 build 397 Sonoff ZBDongle-E

from this repo: silabs-firmware-builder

Also tried to uninstall and delete the Addon data and re-install it, but nothing seems to work. It still hangs at startup.

lbovay avatar Jan 04 '25 11:01 lbovay

reverted to koenkk/zigbee2mqtt:1.42.0, will wait for this to be fixed in v2

svde avatar Jan 04 '25 11:01 svde

reverted to koenkk/zigbee2mqtt:1.42.0, will wait for this to be fixed in v2

How do you revert the version if I may ask?

plaiddk avatar Jan 04 '25 11:01 plaiddk

reverted to koenkk/zigbee2mqtt:1.42.0, will wait for this to be fixed in v2

How do you revert the version if I may ask?

changed in tag of the docker image from koenkk/zigbee2mqtt:latest to koenkk/zigbee2mqtt:1.42.0

(I run Zigbee2MQTT in docker)

svde avatar Jan 04 '25 11:01 svde