Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge 🌉, get rid of your proprietary Zigbee bridges 🔨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
11.96k stars 1.67k forks source link

Z2M Starts but cannot start pairing procedure (Sonoff ZBDongle-E 7.4.4 | HA OS 13.1 | z2m 1.40.2-1) #24317

Open thomasvalette opened 2 days ago

thomasvalette commented 2 days ago

What happened?

Hello, i have trouble to get Z2M to start properly.

Here is my setup: Sonoff ZBDongle-E (V2 model, EFR32MG21) HA.OS 13.1 which is running on RPI4 4GB

I flashed my sonoff dongle with this firmware (available on silabs-firmware-builder/firmware_builds/zbdonglee at main · darkxst/silabs-firmware-builder · GitHub 3): ncp-uart-hw-v7.4.4.0-zbdonglee-115200.gbl

Z2M GUI is starting properly and my mqtt broker is receiving messages, but i got these errors (see logs) i cant start pairing procedure. Also my "coordinator revision" is unknown. Something is obviously going wrong but i can't find what.

Searched through the web (and also here) for this exact error but didn't find anything close to what i get. Am i missing something or is it an Z2M bug?

What did you expect to happen?

Z2M nominal start without error logs

How to reproduce it (minimal and precise)

Start Z2M addon with my setup HA OS 13.1 on RPI4, with Sonoff ZBDongle-E dongle flashed with ncp-uart-hw-v7.4.4.0 firmware (i can provide my configuration if needed)

Zigbee2MQTT version

1.40.2-1

Adapter firmware version

unknown

Adapter

ember

Setup

Z2M Addon on HA OS 13.1

Debug log

[14:53:55] INFO: Preparing to start...
[14:53:55] INFO: Socat not enabled
[14:53:58] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT without watchdog.
[2024-10-04 14:54:04] info:     z2m: Logging to console, file (filename: log.log)
[2024-10-04 14:54:04] info:     z2m: Starting Zigbee2MQTT version 1.40.2 (commit #unknown)
[2024-10-04 14:54:04] info:     z2m: Starting zigbee-herdsman (2.1.3)
[2024-10-04 14:54:05] info:     zh:ember: Using default stack config.
[2024-10-04 14:54:05] info:     zh:ember: ======== Ember Adapter Starting ========
[2024-10-04 14:54:05] info:     zh:ember:ezsp: ======== EZSP starting ========
[2024-10-04 14:54:05] info:     zh:ember:uart:ash: ======== ASH Adapter reset ========
[2024-10-04 14:54:05] info:     zh:ember:uart:ash: RTS/CTS config is off, enabling software flow control.
[2024-10-04 14:54:05] info:     zh:ember:uart:ash: Serial port opened
[2024-10-04 14:54:05] info:     zh:ember:uart:ash: ======== ASH starting ========
[2024-10-04 14:54:06] info:     zh:ember:uart:ash: ======== ASH connected ========
[2024-10-04 14:54:06] info:     zh:ember:uart:ash: ======== ASH started ========
[2024-10-04 14:54:06] info:     zh:ember:ezsp: ======== EZSP started ========
[2024-10-04 14:54:06] info:     zh:ember: Adapter EZSP protocol version (13) lower than Host. Switched.
[2024-10-04 14:54:06] info:     zh:ember: Adapter version info: {"ezsp":13,"revision":"7.4.4 [GA]","build":0,"major":7,"minor":4,"patch":4,"special":0,"type":170}
[2024-10-04 14:54:06] info:     zh:ember: [STACK STATUS] Network up.
[2024-10-04 14:54:06] info:     zh:ember: [INIT TC] Adapter network matches config.
[2024-10-04 14:54:06] info:     zh:ember: [CONCENTRATOR] Started source route discovery. 1248ms until next broadcast.
[2024-10-04 14:54:06] info:     z2m: zigbee-herdsman started (resumed)
[2024-10-04 14:54:06] info:     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"}'
[2024-10-04 14:54:06] info:     z2m: Currently 0 devices are joined.
[2024-10-04 14:54:06] info:     z2m: Zigbee: disabling joining new devices.
[2024-10-04 14:54:07] info:     z2m: Connecting to MQTT server at mqtt://core-mosquitto:1883
[2024-10-04 14:54:07] info:     z2m: Connected to MQTT server
[2024-10-04 14:54:07] info:     z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/bridge/state', payload 'online'
[2024-10-04 14:54:07] error:    z2m: Failed to call 'Bridge' 'start' (TypeError: Cannot read properties of undefined (reading 'getDevice')
    at Bridge.publishInfo (/app/lib/extension/bridge.ts:746:69)
    at Bridge.start (/app/lib/extension/bridge.ts:174:20)
    at Controller.callExtensions (/app/lib/controller.ts:399:17)
    at Controller.start (/app/lib/controller.ts:218:9)
    at start (/app/index.js:154:5))
[2024-10-04 14:54:07] info:     z2m: Started frontend on port 8099
[2024-10-04 14:54:07] info:     z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/bridge/config', payload '{"commit":"unknown","coordinator":{"meta":{"build":0,"ezsp":13,"major":7,"minor":4,"patch":4,"revision":"7.4.4 [GA]","special":0,"type":170},"type":"EmberZNet"},"log_level":"info","network":{"channel":11,"extendedPanID":13368757625167469000,"panID":11483},"permit_join":false,"version":"1.40.2"}'
[2024-10-04 14:54:07] error:    z2m: Failed to call 'HomeAssistant' 'start' (TypeError: Cannot read properties of undefined (reading 'deviceIeeeAddress')
    at HomeAssistant.getBridgeEntity (/app/lib/extension/homeassistant.ts:2016:78)
    at HomeAssistant.start (/app/lib/extension/homeassistant.ts:476:28)
    at Controller.callExtensions (/app/lib/controller.ts:399:17)
    at Controller.start (/app/lib/controller.ts:218:9)
    at start (/app/index.js:154:5))
[2024-10-04 14:54:07] info:     z2m: Zigbee2MQTT started!
Koenkk commented 1 day ago

Could you provide your data/database.db file?

thomasvalette commented 1 day ago

Sure, it only contains this line:

{"id":1,"type":"Coordinator","ieeeAddr":"0xe8e07efffe7c5dcc","nwkAddr":0,"manufId":4169,"epList":[],"endpoints":{},"interviewCompleted":true,"meta":{}}

chenyixi1997 commented 10 hours ago

Hello, I also have a similar problem, although the adapter is different, but it is the same log: error: z2m: Failed to call 'Bridge' 'start' I feel that the bridge startup failed.Can anyone help us?

Matoxius commented 23 minutes ago

Hello, I had the same issue, after halve a day of troubleshooting I had a solution that might help.

I uninstalled the zigbee2mqtt plugin and went into the plugin folder with cd /config/zigbee2mqtt/ via the ssh/terminal plugin. There I removed all files with rm -rf *( make sure to be in the right folder, or you might destroy your installation ) and then reinstalled the mqtt plugin.

For me it's working now, could be worth a try for you guys.