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

[Bug] problem after upgrading zigbee2mqtt to 1.35 #794

Closed
1 task done
Ropuh opened this issue Jan 1, 2024 · 37 comments
Closed
1 task done

[Bug] problem after upgrading zigbee2mqtt to 1.35 #794

Ropuh opened this issue Jan 1, 2024 · 37 comments
Assignees
Labels
bug Something isn't working

Comments

@Ropuh
Copy link

Ropuh commented Jan 1, 2024

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

@Ropuh Ropuh added the bug Something isn't working label Jan 1, 2024
@itavero
Copy link
Owner

itavero commented Jan 1, 2024

Are you using a device that's unsupported by Zigbee2MQTT?

Can you share (e.g. attach) your device list from zigbee2mqtt/bridge/devices (or at least the entry of the device triggering this error)?

@itavero
Copy link
Owner

itavero commented Jan 1, 2024

Potentially a duplicate of #782

@itavero
Copy link
Owner

itavero commented Jan 1, 2024

Seems that I have implemented this check incorrectly.
It also seems that there are now (e.g. starting the latest Zigbee2MQTT release) devices that do not contain a vendor.

If someone can share the entries from zigbee2mqtt/bridge/devices that do not contain a vendor, that would be great. Not sure when I'll have time to patch this though, but I do want to make sure that there's no other keys missing/optional now.

@puijken
Copy link

puijken commented Jan 1, 2024

Rolling back to zigbee2mqtt 1.34 fixes the issue .. so it's for sure related to the new release. Support was added for "unsupported" devices to have basic functionality working even if it is not officially supported by zigbee2mqtt.

Probably related? - https://github.com/Koenkk/zigbee2mqtt/releases

Weird tho as I, as far as I know, do not have unsupported devices in zigbee2mqtt.

@Ropuh
Copy link
Author

Ropuh commented Jan 1, 2024

{"attribute":"currentSummDelivered","cluster":"seMetering","maximum_report_interval":3600,"minimum_report_interval":5,"reportable_change":[1,1]}],"scenes":[]},"242":{"bindings":[],"clusters":{"input":[],"output":["greenPower"]},"configured_reportings":[],"scenes":[]}},"friendly_name":"Salon Choinka","ieee_address":"0xa4c1385d85a35265","interview_completed":true,"interviewing":false,"manufacturer":"_TZ3000_gjnozsaz","model_id":"TS011F","network_address":58994,"power_source":"Mains (single phase)","supported":true,"type":"Router"},
works zigbee2mqtt 1.34 and crash after upgrading to 1.35

@Jeepmg
Copy link

Jeepmg commented Jan 1, 2024

Rolling back to zigbee2mqtt 1.34 fixes the issue .. so it's for sure related to the new release. Support was added for "unsupported" devices to have basic functionality working even if it is not officially supported by zigbee2mqtt.

Same problem with Profalux devices

[01/01/2024, 18:08:18] TypeError: Cannot read properties of null (reading 'vendor')
    at isDeviceDefinition (/var/lib/homebridge/node_modules/homebridge-z2m/src/z2mModels.ts:294:73)
    at Zigbee2mqttAccessory.updateDeviceInformation (/var/lib/homebridge/node_modules/homebridge-z2m/src/platformAccessory.ts:290:30)
    at new Zigbee2mqttAccessory (/var/lib/homebridge/node_modules/homebridge-z2m/src/platformAccessory.ts:82:10)
    at Zigbee2mqttPlatform.addAccessory (/var/lib/homebridge/node_modules/homebridge-z2m/src/platform.ts:419:19)
    at Zigbee2mqttPlatform.configureAccessory (/var/lib/homebridge/node_modules/homebridge-z2m/src/platform.ts:319:10)
    at /var/lib/homebridge/node_modules/homebridge/src/bridgeService.ts:328:25
    at Array.filter (<anonymous>)
    at BridgeService.restoreCachedPlatformAccessories (/var/lib/homebridge/node_modules/homebridge/src/bridgeService.ts:288:69)
    at Server.start (/var/lib/homebridge/node_modules/homebridge/src/server.ts:188:24)

How to roll back to 1.34 ?

Thank you

@puijken
Copy link

puijken commented Jan 1, 2024

Rolling back to zigbee2mqtt 1.34 fixes the issue .. so it's for sure related to the new release. Support was added for "unsupported" devices to have basic functionality working even if it is not officially supported by zigbee2mqtt.

Same problem with Profalux devices

How to roll back to 1.34 ?

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..

@Rene1695
Copy link

Rene1695 commented Jan 1, 2024

Hey,

same issue for me. I was on v1.9 and upgraded to 1.9.2. Why are you on 1.34? I can even select this in the child bridge "version tab"

image

However, once I go back to 1.9 or any version below, I have still the same issue. Somebody has an idea why this is the case?

@puijken
Copy link

puijken commented Jan 1, 2024

Hey,

same issue for me. I was on v1.9 and upgraded to 1.9.2. Why are you on 1.34? I can even select this in the child bridge "version tab"

However, once I go back to 1.9 or any version below, I have still the same issue. Somebody has an idea why this is the case?

I'm talking about the Zigbee2MQTT version - not the Homebridge version and not the homebridge-z2m version. The issue probably lies in a change done in Zigbee2MQTT as referenced to a couple of posts above.

@Wrangler-93
Copy link

I went back to "koenkk/zigbee2mqtt:1.34.0" but still the same , had an error on a EW-Link device, removed it from zigbee2mqtt but Homebridge still gives the error on that device?!?!
Any ideas how to remove that device from homebridge??

@puijken
Copy link

puijken commented Jan 1, 2024

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)

@Rene1695
Copy link

Rene1695 commented Jan 1, 2024

Hey,
same issue for me. I was on v1.9 and upgraded to 1.9.2. Why are you on 1.34? I can even select this in the child bridge "version tab"
However, once I go back to 1.9 or any version below, I have still the same issue. Somebody has an idea why this is the case?

I'm talking about the Zigbee2MQTT version - not the Homebridge version and not the homebridge-z2m version. The issue probably lies in a change done in Zigbee2MQTT as referenced to a couple of posts above.

Oh sorry, didn't catched that. Thank you!

@Wrangler-93
Copy link

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)

This worked for me, all up and running again!!

Thanx

@Veldkornet
Copy link

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.

@itavero
Copy link
Owner

itavero commented Jan 2, 2024

For me, I noticed that there was a new "Coordinator" device added after the new z2m release.

If I remember correctly this was there before as well, but I had some code to ignore it.

I was hoping to dive into this issue yesterday evening, but unfortunately I got an ocular migraine attack, so no screens for me.

Hopefully I'll manage this evening. It sounds like it should be an easy fix.

PS: not yet sure if I'll first patch v1.9.2 (and make a v1.9.3) and then merge it into master or the other way around.

@itavero
Copy link
Owner

itavero commented Jan 2, 2024

Any chance that someone still has an export of zigbee2mqtt/bridge/devices from when the system was running the latest Zigbee2MQTT release?

I'd love to see the entry of the coordinator.
It was there before, so I'm curious what changed.

I'm running Zigbee2MQTT v1.34.0 and it looks more or less like this:

{
  "definition": null,
  "disabled": false,
  "endpoints": {
    /* lots of endpoints here */
    }
  },
  "friendly_name": "Coordinator",
  "ieee_address": "0x00124b001caa69fc",
  "interview_completed": true,
  "interviewing": false,
  "network_address": 0,
  "supported": false,
  "type": "Coordinator"
}

@itavero
Copy link
Owner

itavero commented Jan 2, 2024

Got this from the log from @mrmaximas. It seems that the supported flag changed.

{
  "definition": null,
  "disabled": false,
  "endpoints": {
    /* lots of endpoints */
  },
  "friendly_name": "Coordinator",
  "ieee_address": "0x00124b002a1aa3c4",
  "interview_completed": true,
  "interviewing": false,
  "network_address": 0,
  "supported": true,
  "type": "Coordinator"
}

Probably I made the assumption when writing the plugin that supported devices would always have a device model, which might no longer be true.

@fiftysomethingguy
Copy link

Thanks for looking into this.Z2M 1.35.0 killed my install as well. Reverted back to 1.34.0 and works again. Will be really grateful this can be fixed as 1.35.0 supports the new Ikea Parasoll contact sensors that I'd like to purchase.

@mrmaximas
Copy link

Thanks for looking into this.Z2M 1.35.0 killed my install as well. Reverted back to 1.34.0 and works again. Will be really grateful this can be fixed as 1.35.0 supports the new Ikea Parasoll contact sensors that I'd like to purchase.

add ieee address of coordinator to exclusions and enjoy 1.35.0

@puijken
Copy link

puijken commented Jan 2, 2024

For me the "workaround" of @Veldkornet seemed to work -> #794 (comment)

image

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 :)

@Jeepmg
Copy link

Jeepmg commented Jan 2, 2024

For me the "workaround" of @Veldkornet seemed to work -> #794 (comment)

+1

@itavero
Copy link
Owner

itavero commented Jan 2, 2024

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.

@fiftysomethingguy
Copy link

I'll try it. No problem.

@itavero
Copy link
Owner

itavero commented Jan 2, 2024

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.

@fiftysomethingguy
Copy link

v1.9.3-rc.0 works fine with the workaround removed. Many thanks.

@jfcabral
Copy link

jfcabral commented Jan 2, 2024

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.

I have Zigbee2MQTT 1.35.0 and after updating homebridge-z2m to v1.9.3-rc.0 the issue was solved without any further change!

Thank you @itavero for the quick fix! 😄

@itavero
Copy link
Owner

itavero commented Jan 3, 2024

Thanks for the feedback. I'll try to make it a "regular" release and to merge it into the beta versions later today.

@Jeepmg
Copy link

Jeepmg commented Jan 3, 2024

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.

@Wrangler-93
Copy link

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.

works here too, great work 👍

@Ropuh
Copy link
Author

Ropuh commented Jan 3, 2024

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.

I just installed version V 1.9.3 rc.0 everything seems to be OK.
Thank you

@itavero itavero mentioned this issue Jan 3, 2024
1 task
@itavero
Copy link
Owner

itavero commented Jan 3, 2024

Just promoted v1.9.3-rc.0 to a regular release (v1.9.3) and pushed it to the latest tag.

I'll merge it back to master now and start working on making a v1.11.0-beta.3.

@jfcabral
Copy link

jfcabral commented Jan 3, 2024

Just promoted v1.9.3-rc.0 to a regular release (v1.9.3) and pushed it to the latest tag.

I'll merge it back to master now and start working on making a v1.11.0-beta.3.

I've just upgraded to Release 1.9.3 and it seems to be working properly ✔️

Before I was using Release 1.11.0-beta.2 but I had to downgrade due to this issue... So when you create v1.11.0-beta.3 I volunteer to test it 😄

Thank you once again @itavero

@itavero
Copy link
Owner

itavero commented Jan 3, 2024

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.

@itavero
Copy link
Owner

itavero commented Jan 4, 2024

Release v1.11.0-beta.3 has also been published.

I've installed it myself and also updated Zigbee2MQTT. No noticeable issues so far.

@jfcabral
Copy link

jfcabral commented Jan 4, 2024

Release v1.11.0-beta.3 has also been published.

I've installed it myself and also updated Zigbee2MQTT. No noticeable issues so far.

Thank you @itavero, I too have just installed it, and so far so good 👍

@nefh
Copy link

nefh commented Jan 5, 2024

I have also problems after upgrading to 1.35 that seem to be connected with homebridge-z2m. Please have a look on issue from zigbee2mqtt github:
Koenkk/zigbee2mqtt#20526

The issue is still present with v.1.11.0-beta.3, here are the logs from zigbee2mqtt:
log.txt

@itavero
Copy link
Owner

itavero commented Jan 6, 2024

I have also problems after upgrading to 1.35 that seem to be connected with homebridge-z2m.

The issue is still present with v.1.11.0-beta.3, here are the logs from zigbee2mqtt:

@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).

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

No branches or pull requests