Koenkk / zigbee-herdsman

A Node.js Zigbee library
MIT License
456 stars 277 forks source link

zigbee2mqtt<->EZSP incompatible with latest Gecko SDK v4.4.0.0 (EmberZNet 7.4.0.0) firmware build #854

Closed xconverge closed 3 months ago

xconverge commented 4 months ago

Updated to the latest silabs firmware (yes I know this is beta but figured I would at least track it here....)

Startup fails:

Zigbee2MQTT:info  2024-01-04 19:45:19: Logging to console only'
Zigbee2MQTT:info  2024-01-04 19:45:19: Starting Zigbee2MQTT version 1.35.0 (commit #b5a90e9)
Zigbee2MQTT:info  2024-01-04 19:45:19: Starting zigbee-herdsman (0.30.0)
Zigbee2MQTT:debug 2024-01-04 19:45:19: Using zigbee-herdsman with settings: '{"adapter":{"concurrent":null,"delay":null,"disableLED":false},"backupPath":"/app/data/coordinator_backup.json","databaseBackupPath":"/app/data/database.db.backup","databasePath":"/app/data/database.db","network":{"channelList":[11],"extendedPanID":[221,221,221,221,221,221,221,221],"networkKey":"HIDDEN","panID":6754},"serialPort":{"adapter":"ezsp","path":"/dev/ttyACM0"}}'
Assertion failed: Command (setConfigurationValue) returned unexpected state: [object Object]
Error: {"address":0,"clusterId":32770,"sequence":2} after 10000ms
    at Timeout._onTimeout (/app/node_modules/zigbee-herdsman/src/utils/waitress.ts:64:35)
    at listOnTimeout (node:internal/timers:569:17)
    at processTimers (node:internal/timers:512:7)
Using '/app/data' as data directory

rolling back to 7.3.2.0 runs great

xconverge commented 4 months ago

@kirovilya I don't have a dev environment setup to check into this too much. I am unsure how to run test changes locally/easily

I wanted to add some logging to see exactly which config failed to set to confirm

kirovilya commented 4 months ago

where can I get ncp firmware 7.4.0.0?

xconverge commented 4 months ago

where can I get ncp firmware 7.4.0.0?

I have a skyconnect so got it here:

https://github.com/NabuCasa/silabs-firmware

I am unsure if you have an adapter with a different pin out or is incompatible with these builds unfortunately

wastez commented 4 months ago

Or here for other adapters (it's a fork of the silabs source)

https://github.com/darkxst/silabs-firmware-builder

NewsGuyTor commented 4 months ago

This is actually pretty urgent, this issue broke a lot of Zigbee2MQTT installations today, and will break more the next time "Silicon Labs Multiprotocol" is updated for HA users.

More info here: https://github.com/Koenkk/zigbee2mqtt/issues/20602

xconverge commented 4 months ago

This is actually pretty urgent, this issue broke a lot of Zigbee2MQTT installations today, and will break more the next time "Silicon Labs Multiprotocol" is updated for HA users.

More info here: Koenkk/zigbee2mqtt#20602

I am surprised the addon pushed a FW update so quickly, I thought I was on the cutting edge here (and I still kind of think I am) and was reporting/looking into it a bit just to be polite/allow developers to get ahead of it (Especially since a lot historically falls onto @kirovilya at least in this project (much appreciated by the way!))

kirovilya commented 4 months ago

image Some commands that were previously used were removed there. so I have to rewrite the code... not quickly

kirovilya commented 4 months ago

See https://github.com/Koenkk/zigbee-herdsman/issues/854, should be fixed in the dev branch.

Changes will be available in the dev branch in a few hours from now.

xconverge commented 4 months ago

@kirovilya fixed it in #858

burntoc commented 4 months ago

I haven't seen the updated release in the dev branch yet, just the commits and testing activity.

wastez commented 4 months ago

Have seen the Update is available in z2m edge. Has anybody tried it?

burntoc commented 4 months ago

Working here.

chris-1243 commented 4 months ago

@kirovilya

I just had a try on the new SDK 4.4.0 and the dev branch of z2m and I had those warnings:

01/10/2024 04:17:14 PM Using '/app/data' as data directory 01/10/2024 04:17:17 PM Assertion failed: Command (setConfigurationValue) returned unexpected state: [object Object] 01/10/2024 04:17:17 PM Assertion failed: exportKey returned unexpected status: 45

Z2m is working. I revert to SDK 4.3.0 (firmware 7.3.0.0, SONOFF DONGLE-E) on which I have no warnings. SDK 4.3.1 and higher provide me this warning only:

Assertion failed: Command (setConfigurationValue) returned unexpected state: [object Object]

Zigbee herdmann below for some debugging if it may help (SDK 4.4.0, firmware 7.4.0.0)

log_herdsman.txt

kirovilya commented 4 months ago

@chris-1243 thanks for checking. yes, there are some warnings, but they not critical... I’ll continue to improve it as soon as I have free time

chris-1243 commented 4 months ago

@kirovilya

Great news. I am going to re-flash my coordinator with the latest SDK and see how it will perform

joe-sydney commented 4 months ago

Just swapped to the Edge Z2M addon on HASS, updated the Silabs Multipan add to latest (with the new Gecko SDK) and also flashed the Sonoff Dongle E to 4.4.0.... all working so far!

ryan77627 commented 4 months ago

I can echo what Chris was experiencing regarding the warnings, as seen below in the startup log (probably redacted more than I needed, oh well):

[18:09:51] INFO: Starting Zigbee2MQTT...
Zigbee2MQTT:debug 2024-01-18 18:09:53: Loaded state from file /config/zigbee2mqtt/state.json
Zigbee2MQTT:info  2024-01-18 18:09:53: Logging to console and directory: '/config/zigbee2mqtt/log/2024-01-18.18-09-53' filename: log.txt
Zigbee2MQTT:debug 2024-01-18 18:09:53: Removing old log directory '/config/zigbee2mqtt/log/2024-01-18.07-45-30'
Zigbee2MQTT:info  2024-01-18 18:09:53: Starting Zigbee2MQTT version 1.35.1-dev (commit #080f3b6)
Zigbee2MQTT:info  2024-01-18 18:09:53: Starting zigbee-herdsman (0.32.6)
Zigbee2MQTT:debug 2024-01-18 18:09:53: Using zigbee-herdsman with settings: '{"adapter":{"concurrent":null,"delay":null,"disableLED":false},"backupPath":"/config/zigbee2mqtt/coordinator_backup.json","databaseBackupPath":"/config/zigbee2mqtt/database.db.backup","databasePath":"/config/zigbee2mqtt/database.db","network":{"channelList":[25],"extendedPanID":[xxx,xxx,xxx,xxx,xxx,xxx,xxx,xxx],"networkKey":"HIDDEN","panID":xxxxx},"serialPort":{"adapter":"ezsp","path":"tcp://core-silabs-multiprotocol:9999"}}'
Assertion failed: Command (setConfigurationValue(1, 255)) returned unexpected state: {"_cls_":"setConfigurationValue","_id_":83,"_isRequest_":false,"status":55}
Assertion failed: Command (setValue) returned unexpected state: {"_cls_":"setValue","_id_":171,"_isRequest_":false,"status":55}
Assertion failed: exportKey returned unexpected status: 45
Zigbee2MQTT:info  2024-01-18 18:09:58: zigbee-herdsman started (resumed)
Zigbee2MQTT:info  2024-01-18 18:09:58: Coordinator firmware version: '{"meta":{"maintrel":"0 ","majorrel":"7","minorrel":"4","product":13,"revision":"7.4.0.0 build 0"},"type":"EZSP v13"}'
Zigbee2MQTT:debug 2024-01-18 18:09:58: Zigbee network parameters: {"channel":25,"extendedPanID":38,"panID":xxxxx}
Zigbee2MQTT:info  2024-01-18 18:09:58: Currently 4 devices are joined:
...

However, (and I'm seeing this with stable as well when I downgrade the SiLabs FW back to 2.3.2, so maybe it's a my network issue), when I attempt to communicate with any devices, I get timeout errors.

Zigbee2MQTT:debug 2024-01-18 18:18:35: Received MQTT message on 'zigbee2mqtt/Main Lights/set' with data '{"state":"OFF"}'
Zigbee2MQTT:debug 2024-01-18 18:18:35: Publishing 'set' 'state' to 'Main Lights'
Zigbee2MQTT:error 2024-01-18 18:18:55: Publish 'set' 'state' to 'Main Lights' failed: 'Error: Command 0x847127fffe003efc/1 genOnOff.off({}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":false,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Timeout - 19628 - 1 - 3 - 6 - 11 after 10000ms)'
Zigbee2MQTT:debug 2024-01-18 18:18:55: Error: Command 0x847127fffe003efc/1 genOnOff.off({}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":false,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Timeout - 19628 - 1 - 3 - 6 - 11 after 10000ms)
    at Object.start (/app/node_modules/zigbee-herdsman/src/utils/waitress.ts:63:23)
    at EZSPAdapter.sendZclFrameToEndpointInternal (/app/node_modules/zigbee-herdsman/src/adapter/ezsp/adapter/ezspAdapter.ts:471:47)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Queue.execute (/app/node_modules/zigbee-herdsman/src/utils/queue.ts:35:20)
    at Request.send (/app/node_modules/zigbee-herdsman/src/controller/helpers/request.ts:79:20)
    at Endpoint.command (/app/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:758:28)
    at Object.convertSet (/app/node_modules/zigbee-herdsman-converters/src/converters/toZigbee.ts:46:17)
    at Object.convertSet (/app/node_modules/zigbee-herdsman-converters/src/converters/toZigbee.ts:1116:32)
    at Publish.onMQTTMessage (/app/lib/extension/publish.ts:249:36)
    at EventEmitter.wrappedCallback (/app/lib/eventBus.ts:174:17)
Zigbee2MQTT:debug 2024-01-18 18:19:53: Saving state to file /config/zigbee2mqtt/state.json

So, unsure if this is a FW issue or a me issue, especially after hearing reports that the latest dev is in fact working for other people, figured I'd drop this here just in case. Sorry for cluttering this topic if this is a my network issue!

Nerivec commented 3 months ago

Anyone in here that has tested EDGE for a decent length of time, could you drop a line here, so we know what errors some people might still be seeing (or if it works great 😄)? Thanks.

xconverge commented 3 months ago

Issue is fixed now that 1.35.2 is released. I am on 7.4.0.0 and will stick it out to see if anything arises, thanks @Nerivec and @kirovilya

newlund commented 3 months ago

Issue is fixed now that 1.35.2 is released. I am on 7.4.0.0 and will stick it out to see if anything arises, thanks @Nerivec and @kirovilya

Is 7.4.0.0 working for you? Thinking of upgrading from 7.3.2.0 :)

chris-1243 commented 3 months ago

7.4.0.0 is working on version 1.35.2 or higher.

Just be carefull. RCP firmware based on SDK 4.4.0 (multi-protocol with silabs addon) is problematic and has been downgraded to SDK 4.3.1.

NCP firmware 7.4.0.0 (Zigbee only) does not seem to be affected by any issues and is working fine. Have a look to this link

newlund commented 3 months ago

Thanks! I only use zigbee for now and run the NCP firmware so guess I could upgrade. But think I will wait a while... Latest is not always greatest... :)

johanymerson commented 3 months ago

Just tested 1.35.3 with a Sonoff ZBDongle-E running NCP 7.4.0.0. It died within 30 minutes with the following error: Error: {"address":64843,"clusterId":32801,"sequence":30} after 10000ms at Object.start (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/src/utils/waitress.ts:63:23) at Driver.zdoRequest (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/src/adapter/ezsp/driver/driver.ts:667:43) at /opt/zigbee2mqtt/node_modules/zigbee-herdsman/src/adapter/ezsp/adapter/ezspAdapter.ts:566:13 at Queue.execute (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/src/utils/queue.ts:35:20) at Endpoint.bind (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:551:13)