homebridge-z2m: [Bug] problem after upgrading zigbee2mqtt to 1.35
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
Crash of the plugin
[1/1/2024, 12:58:42 PM] [homebridge-z2m] Publish to 'zigbee2mqtt/0x680ae2fffe3fdfe4/get': '{"state":0}'
[1/1/2024, 12:58:42 PM] [homebridge-z2m] Publish to 'zigbee2mqtt/0xa4c1385d85a35265/get': '{"state":0}'
TypeError: Cannot read properties of null (reading 'vendor')
at isDeviceDefinition (/usr/lib/node_modules/homebridge-z2m/src/z2mModels.ts:294:73)
at Zigbee2mqttAccessory.updateDeviceInformation (/usr/lib/node_modules/homebridge-z2m/src/platformAccessory.ts:290:30)
at new Zigbee2mqttAccessory (/usr/lib/node_modules/homebridge-z2m/src/platformAccessory.ts:82:10)
at Zigbee2mqttPlatform.addAccessory (/usr/lib/node_modules/homebridge-z2m/src/platform.ts:419:19)
at Zigbee2mqttPlatform.configureAccessory (/usr/lib/node_modules/homebridge-z2m/src/platform.ts:319:10)
at /usr/lib/node_modules/homebridge/src/bridgeService.ts:328:25
at Array.filter ()
at BridgeService.restoreCachedPlatformAccessories (/usr/lib/node_modules/homebridge/src/bridgeService.ts:288:69)
at ChildBridgeFork.startBridge (/usr/lib/node_modules/homebridge/src/childBridgeFork.ts:186:24)
[1/1/2024, 12:58:43 PM] [homebridge-z2m] Child bridge process ended
[1/1/2024, 12:58:43 PM] [homebridge-z2m] Process Ended. Code: 1, Signal: null
[1/1/2024, 12:58:50 PM] [homebridge-z2m] Restarting Process...
[1/1/2024, 12:58:54 PM] [homebridge-z2m] Launched child bridge with PID 3760
[1/1/2024, 12:58:55 PM] Registering platform 'homebridge-z2m.zigbee2mqtt'
[1/1/2024, 12:58:55 PM] [homebridge-z2m] Loaded homebridge-z2m v1.9.2 child bridge successfully
[1/1/2024, 12:58:56 PM] Loaded 70 cached accessories from cachedAccessories.0E9CACDE5EA2.
[1/1/2024, 12:58:57 PM] [homebridge-z2m] Connecting to MQTT server at mqtt://127.0.0.1:1883
[1/1/2024, 12:58:58 PM] [homebridge-z2m] Restoring accessory: Sypialnia Computer Switch (0x00158d0004506dde)
Related devices
No response
Related Devices
No response
Steps To Reproduce
No response
Expected behavior
No response
Device entry
No response
Status update
No response
Messages from this plugin
No response
This plugin
1.9.2
Homebridge
1.7.0
Zigbee2MQTT
1.35
Homebridge Config UI X (if applicable)
4.54.1
About this issue
- Original URL
- State: open
- Created 6 months ago
- Reactions: 5
- Comments: 37 (13 by maintainers)
Just promoted
v1.9.3-rc.0
to a regular release (v1.9.3
) and pushed it to thelatest
tag.I’ll merge it back to
master
now and start working on making av1.11.0-beta.3
.For me the “workaround” of @Veldkornet seemed to work -> https://github.com/itavero/homebridge-z2m/issues/794#issuecomment-1873518037
I’m back on Z2M 1.35.0 but with the “Coordinator” device exluded in the homebridge-z2m plugin in homebridge.
EDIT: mrmaximas was a little bit quicker, but same solution 😃
Seems like I introduced another bug on the
master
branch earlier this week, so no new beta just yet. I expect it will be relatively easy to solve, just a matter of finding some time to do so 😅Update: The thing I thought to be a bug, actually wasn’t a bug… I’ll probably be able to push a new beta release later today.
I just installed version V 1.9.3 rc.0 everything seems to be OK. Thank you
Got this from the log from @mrmaximas. It seems that the
supported
flag changed.Probably I made the assumption when writing the plugin that supported devices would always have a device model, which might no longer be true.
works here too, great work 👍
I just installed version V 1.9.3 rc and removed the workaround. Everything seems to be back to normal.
thank you very much for your responsiveness and this quick repair.
v1.9.3-rc.0 works fine with the workaround removed. Many thanks.
Just published v1.9.3-rc.0 to NPM.
I believe this should solve the problem, but unfortunately I don’t have time to update Zigbee2MQTT on my production environment now to test it with the latest Zigbee2MQTT release.
If you tried it (can even be on a separate machine connecting to the same MQTT broker that your production environment is connected to), let me know if it works without the aforementioned workaround.
This worked for me, all up and running again!!
Thanx
You can remove it from the “cached accessories”
Homebridge GUI -> 3 dots at the top right -> Homebridge Settings -> Remove Single Cached Accessory (almost at the bottom of the page)
@nefh This is an issue in Zigbee2MQTT. Not the issue being discussed here.
From what I can tell it’s also not caused by homebridge-z2m. It just gets more visible because the plugin starts requesting information from devices (like blinds).
Thanks for the feedback. I’ll try to make it a “regular” release and to merge it into the beta versions later today.
I have Zigbee2MQTT 1.35.0 and after updating
homebridge-z2m
tov1.9.3-rc.0
the issue was solved without any further change!Thank you @itavero for the quick fix! 😄
Anyone here that’s still running v1.9.2 of the plugin thats willing to try a version that should include the fix for this?
Still need to make that release though, just checking if someone’s up for it.
Based on earlier findings I’m pretty sure it will fix it, but it would be nice to get some confirmation from others.
For me, I noticed that there was a new “Coordinator” device added after the new z2m release. I just added this to the excluded devices in the HomeBridge plugin settings, and then it started up fine.
Oh sorry, didn’t catched that. Thank you!
Depens on your setup … I have all running in containers so just change the tag from “koenkk/zigbee2mqtt:latest” to “koenkk/zigbee2mqtt:1.34.0” did the trick for me 😃
If you’re not running it in containers it might be more difficult…