-
Notifications
You must be signed in to change notification settings - Fork 699
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
Add quirk for IKEA SYMFONISK sound remote gen 2 (E2123) #2236
Add quirk for IKEA SYMFONISK sound remote gen 2 (E2123) #2236
Conversation
Big thanks to @MattWestb for looking over my code and giving feedback!
Without relaying the events from the custom |
Yes, that's correct. The log shows that the server_command was parsed correctly, but no zha_event is generated. |
If i not have reading wrong is the output cluster |
Pull Request Test Coverage Report for Build 4336585690
💛 - Coveralls |
Codecov ReportPatch coverage:
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@
## dev #2236 +/- ##
==========================================
+ Coverage 83.72% 83.76% +0.04%
==========================================
Files 257 257
Lines 8190 8187 -3
==========================================
+ Hits 6857 6858 +1
+ Misses 1333 1329 -4
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
HA! Fixed it! 🎉 |
@MattWestb |
Im very sorry but i dont understand way using the ZCL level cluster for the shortcut commands. Also new 2 gen devices shall having own quirks and not being mixes with gen i devices quirk for not making it one large mess of it. |
Sniff from V1 device command short press:
|
I tried changing the cluster to a We'd need to look at where or why exactly the zha_event does not fire from new clusters. |
Working implementation is here but its using little different commands like rotating and so on. class TuyaSmartRemoteOnOffCluster(OnOff, EventableCluster): |
I've looked at that code and IMO my implementation does the same. The only difference is that Tuya sends their custom commands on the OnOff cluster, so replacing the OnOff cluster with a custom OnOff cluster that only adds the custom commands works. But as you can see in lines 1003 and 1008 they also need to change the command_id of the custom commands to command_ids from the default OnOff cluster. IKEA chose to send their custom commands on a non-standard cluster, so in addition to changing the command_ids I also need to send them to a standard cluster. I think that the zha_events might be fired, but dropped, as ZHA / Home Assistant might not have any handlers for non-standard events. The reason I think that is because if you trigger a standard event the ZHA logs don't log the event string, but a name for that event (e.g. triggering "move_with_on_off" will result in a log entry with "[...] Move With On Off event was fired with parameters: [...]"). If I find the time I might look into the implemention of ZHA to see where the mapping of event string <-> event name happens. Maybe there's a way to convice ZHA to accept our non-standard events. |
So after looking at the ZHA component for a few minutes what I think is happening is the following:
I think the way forward would be to see which cluster_id IKEA will use going forward and opening a pull request at home-assistant/core for adding it to the manufacturer specific channels module Fun fact: my approach with the log file was not correct. It turns out, the logger just replaces underscores with spaces and title cases the string. But my guess that it might be because it's a non-standard (manufacturer specific) cluster IKEA uses turned out to be right. |
Yeah, This PR did it for Inovelli Blue devices: https://github.com/home-assistant/core/pull/79106/files Not sure if we really need it for this IKEA device though(?) |
The right cluster shall being Matter
Its 100% the commands V2 is sending from EP 1 and 2. |
I think we should wait and see which cluster_id IKEA keeps using and then add that to ZHA directly. It's a nice thing to support older firmwares, but that's where quirks shine the most in my opinion. Adding multiple variants of IKEA devices to ZHA even though they get updated to all use the same cluster_id would be a lot of clutter for nearly no benefit (assuming the devices you buy at IKEA will eventually ship with the newer firmware). |
That's an interesting fact that the newer version sticks to the Matter standard. I hope that going forward this will be their standard. V1 does not seem to conform to this standard, that's why "button released" isn't implemented in my code. |
New IKEA devices is using the same function / clusters so do the PM25 cluster implanted in Starkvind shall being moved to INIT and then Vidstyrka can using it then we getting the device. IKEA is the coordinator for Europe of the Matter group so they is having the knowledge and also using it in there products. My feeling V1 its little out of date and can being implanted with level cluster but for V2 and newer is my feeling its better doing it so its working general for future device / firmware versions. The missing part on this device is its not using the Matter media control cluster for the media functions but that can coming in some years. One question is HA implanting Matter 1.0 then we can using that and only changing the cluster type from |
HA Matter shall having support for switch devices !!
So only changing the cluster number and sending the commands to HA ;-)) (if its working). |
@MichelBrodatzki @javicalle was helping and im is using this in IKEA INIT:
And is getting all very nice as zha_event and can doing DA from it.
Perhaps you can using the same approach but spiting the the data in more parms like is being dont for the IKEA Scenes cluster in the INIT:
I dont knowing if its working with V1 data structure but i think its one more clean way doing it and can being worth one try. |
I have made one PR for both versions and have getting the V1 working by adding the shortcut cluster as on both in and out on the EP1 and getting the events working and have making the common DAs in one class and then adding the device specific ones in the device class. Great thanks for your help !! |
Initial support for the new SYMFONISK sound remote gen 2. This might need some testing with more software versions as noted in issue #2223.
Every button can be used as a trigger for automations (and supported buttons even with long press and double press).