-
Notifications
You must be signed in to change notification settings - Fork 299
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
Support custom clusters #1019
Support custom clusters #1019
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll try to give this a closer look later, seems a lot more involved than I originally expected it to be. Which was already pretty involved 😅
OK, what I've learned is that the custom cluster needs to be injected at the Device Level. Can you provide an example to help people like me who are not familiar with Z2M better understand? Thank you! |
@liubotongs This is really work in progress so far. I believe you need to wait a bit before the full setup is explained by the devs as they are just in the process to implement it. Especially if you are not yet familiar with z2m, better wait for official documentation. |
5e151b7
to
82993e4
Compare
Ready for review! These 2 tests show the API, the idea is that you can use this from the zhc definition |
It's a bit late so I'll give this a proper look tomorrow (if I am home on time) So the idea is to inject them via the onEvent every time the device sends a message ? If so, how did we inject them before we send a message? |
|
Ah that makes more sense, when this is merged I'll use it to fix the vindstyrka, I'll make a generic modernExtend for it and then it will be nicely abstracted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm less confident on my understanding of the inner workings of ZH, I certainly could not have implemented this myself.
But after going over the changes they seem to make sense. I do think I found one bug that I flagged, I also left a note for myself for when I will start using this.
I also have a question that popped in my head whole going over the code and thinking about how I would use it.
Currently the frontend seems to somehow gather the cluster, attribute info for the reporting, binding and dev tabs from it's dependency on zh. I think this somehow will also need to be changed in some way so that it can query the 'cluster.attribute' view a device has. Otherwise it will IIRC from experience, revert back to numeric displays of the cluster and attribute. Which is probably not very user friendly.
LGTM |
I have a bit of time this weekend, so I'll take a go at adding a modernExtend to add a cluster/override a cluster so I can fix the vindstyrke. |
* Support custom clusters * WIP * updates * updates * updates * update * updates * Process feedback * fix lint
Created a PR to use the custom cluster for sonoff devices Koenkk/zigbee-herdsman-converters#7432 🥳 |
…ent for testing. But will probably not do a PR to origin repo if this is ok, and only work in ZHC. Pending changes to happen in frontend part too
…ent for testing. But will probably not do a PR to origin repo if this is ok, and only work in ZHC. Pending changes to happen in frontend part too
Adding attributes for manuSpecificYokisLightControl and new commands: moveToPosition and LongOn. Updating logger to latest changes. Adding additional missing command definition Some eslint cleaning Some cleaning and deactivating some clusters as we are pending firmware fix Migrating Custom cluster definition after Koenkk/zigbee-herdsman#1019. Adding some types Fix for default package zigbee-herdsman
Adding attributes for manuSpecificYokisLightControl and new commands: moveToPosition and LongOn. Updating logger to latest changes. Adding additional missing command definition Some eslint cleaning Some cleaning and deactivating some clusters as we are pending firmware fix Migrating Custom cluster definition after Koenkk/zigbee-herdsman#1019. Adding some types Fix for default package zigbee-herdsman
* feat: Add optional `inclSleepyZED` parameter * feat: Add `inclSleepyZED` to z-stack * feat: Add `inclSleepyZED` to ezsp * feat: Add `inclSleepyZED` to zigate * feat: Add `inclSleepyZED` to ember * feat: Add `inclSleepyZED` to deconz * fix: Add test for z-stack * fix: Additional test for z-stack * Support custom clusters (#1019) * Support custom clusters * WIP * updates * updates * updates * update * updates * Process feedback * fix lint * fix: Add `destinationBroadcastAddress` * Update zStackAdapter.ts * Update emberAdapter.ts * Update ezspAdapter.ts * Update zigateAdapter.ts * Update deconzAdapter.ts * Update adapter.ts * Add broadcast ability from device. Add `zspec` folder. * Rename `triggerBroadcast` to `broadcastCommand` * Get `manufacturerCode` from provided `clusterKey` * Get cluster from `clusterKey` * Test for specific`manufacturerCode` * Refactor `broadcastCommand` based on `zclCommand` * Add missing `Options` interface * Updates * Feedback update. --------- Co-authored-by: Koen Kanters <koenkanters94@gmail.com> Co-authored-by: Nerivec <62446222+Nerivec@users.noreply.github.com>
When I updated Z2M 1.37.0 to version 1.37.1, the ZBMicro device of sonoff.js still had the problem that custom clusters 64529 did not exist, but it was normal in the previous version 1.37.0. Can you tell me what's going on here? What are the solutions? For example, version rollback. thank you. |
It seems that sonoff.js in zigbee-herdsman-converters has not been updated using the latest version. |
Can you check with version of ZHC you have if your installation ? This was added 2 weeks ago as part as release 19.38.0 |
I found that the ZHC version under my current Z2M is 19.37.2. How do I individually update the ZHC version to the latest version? Thank you! |
Requires #1011, implements #971