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

Add IEKA Symfonisk Gen2 v1/v2 support #2273

Merged
merged 15 commits into from Mar 25, 2023

Conversation

MattWestb
Copy link
Contributor

@MattWestb MattWestb commented Mar 14, 2023

Add DA for Symfonisk Gen 2 with shipping firmware (V1) and first OTA updated via Dirigera (V2).

The V1 is using raw commands on EP1.
V2 is using Matter Switch ZCL commands on 2 extra EP but with IKEA manufacture cluster then the Matter cluster is not in ZCL R8. V2 also need the 2 extra EP being bounded and one PR is made in ZHA for doing it nice but this version is using OnOff Custer as one temporary solution until the ZHA PR is merged.

Also V1 is using IKEA old battery reporting (100%) and V2 is using Zigbee standard (200%) so have adding new updated power cluster class and also for upcoming OnOff, OpenCloce and ShortCut button Gen 2 that is in the pipe,
Adding more constants for getting Matter Switch functionality working OK.

Toggle have not hold as left and right and only sending one command. Up and down is sending single and repeating the command then being held.
V1 is only sending ShortCut command single, double and held.
V2 is sending initial press for all commands and then single pressed and release double is sending initial multi press multiple reseal with arg 2 (2 presses) and held is sending held and and hold release.

Fixes: #2223
Depends on: home-assistant/core#89623

@coveralls
Copy link

coveralls commented Mar 14, 2023

Pull Request Test Coverage Report for Build 4497921857

  • 37 of 37 (100.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.07%) to 83.988%

Totals Coverage Status
Change from base Build 4497824317: 0.07%
Covered Lines: 6929
Relevant Lines: 8250

💛 - Coveralls

@codecov-commenter
Copy link

codecov-commenter commented Mar 14, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.07 🎉

Comparison is base (5aeee41) 83.91% compared to head (35d0c1b) 83.99%.

📣 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    #2273      +/-   ##
==========================================
+ Coverage   83.91%   83.99%   +0.07%     
==========================================
  Files         260      261       +1     
  Lines        8214     8252      +38     
==========================================
+ Hits         6893     6931      +38     
  Misses       1321     1321              
Impacted Files Coverage Δ
zhaquirks/const.py 100.00% <100.00%> (ø)
zhaquirks/ikea/__init__.py 74.13% <100.00%> (+6.05%) ⬆️
zhaquirks/ikea/symfonisk2.py 100.00% <100.00%> (ø)

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 in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@MattWestb
Copy link
Contributor Author

MattWestb commented Mar 14, 2023

Great thanks to @javicalle and @TheJulianJES for making the code part working and nice implemented and our brave users for testing and feed back !!

And also @MichelBrodatzki for the V1 first version PR that was making the ground for this quirk.

Next up is is the Gen 2 of OnOff, OpenClose and ShortCut buttons then IKEA is releasing them !!

@TheJulianJES TheJulianJES changed the title Adding Symfonisk Gen 2 V1 and V2 Add IEKA Symfonisk Gen2 v1/v2 support Mar 15, 2023
Copy link
Collaborator

@TheJulianJES TheJulianJES left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a few notes.
Hopefully I'll be able to look at the power configuration stuff in the coming days. I'm pretty sure that can be cleaned up, so we don't duplicate it everywhere.
(We might also want to use the non-doubling clusters for other IKEA devices then?)

zhaquirks/ikea/__init__.py Outdated Show resolved Hide resolved
zhaquirks/ikea/__init__.py Outdated Show resolved Hide resolved
zhaquirks/ikea/__init__.py Outdated Show resolved Hide resolved
zhaquirks/ikea/symfonisk2.py Outdated Show resolved Hide resolved
zhaquirks/ikea/symfonisk2.py Outdated Show resolved Hide resolved
zhaquirks/ikea/symfonisk2.py Outdated Show resolved Hide resolved
zhaquirks/ikea/__init__.py Outdated Show resolved Hide resolved
zhaquirks/ikea/__init__.py Outdated Show resolved Hide resolved
zhaquirks/ikea/__init__.py Outdated Show resolved Hide resolved
zhaquirks/ikea/__init__.py Outdated Show resolved Hide resolved
@MattWestb
Copy link
Contributor Author

I have making the no braking things and little more that was failing between the changes with the snaking.
The power part i think its better waiting refactoring and see if IKEA is rolling out the V24.X firmware of TF then its more used and not only some few users that have updating there devices with Dirigera and if they is fixing the not good working one (Styrbar and 255 = not valid reading).

The class naming need being fixed then of 4 named IKEA controllers is 2 different naming used (Starkvind, Shurtcut, Symfonisk) and IKEA is always using upper case for product names (I think its copyright / trademarks thins behind that).

The corde working changes i have not doing then i dont knowing if its working or not and i cant diag it so better you is doing it and i can testing it.

Was finding one more not snaked that have being added in constants:

COMMAND_TILT = "Tilt"

that i think you shall putting on the tOOdOO lIST.

@MattWestb
Copy link
Contributor Author

Have updating my test system and changing the 2 local import (IKEA and constants) and testing all DA for both versions.

V1 13 DA all working OK = I is getting the right zha_events the automatons shall doing.
V2 17 DA all working OK = I is getting the right zha_events the automatons shall doing.

zhaquirks/const.py Outdated Show resolved Hide resolved
@TheJulianJES
Copy link
Collaborator

I've split up the battery clusters part into: #2284 and tried to make it a bit cleaner, so the constant attributes aren't copy-/pasted.

Note: It's still untested if that even works, but if I'm thinking correctly, it should. I'll try to test that in the next few days.

I will rebase this PR once the battery one gets merged, so leave this PR open. (No need for you to do anything)

@TheJulianJES TheJulianJES added the in progress Issue is being worked on, near fix label Mar 20, 2023
@TheJulianJES
Copy link
Collaborator

Alright, I've rebased the PR and made some small changes (that hopefully aren't breaking).
I think everything looks good now. Can you test this "new version"?

@MattWestb
Copy link
Contributor Author

Updating the INIT and the quirk to the latest commit and patching the imports for using the local quirk ones and 4 not working restarts ZHA was starting OK and loading the automatons OK (if getting delay HA is not loading them and cant getting them loaded without restart of HA).

Have testing all V1 and V2 DA and all is working as expected !!

So all is looking OK also battery reporting then reading it from the device:
V1 Clusters DoublingPowerConfig2AAACluster (Endpoint id: 1, Id: 0x0001, Type: in) 100 and in ZHA 100%
V2 Clusters PowerConfig2AAACluster (Endpoint id: 1, Id: 0x0001, Type: in) 168 and in ZHA 81%

Thanks for helping not code warier getting the devices supported !

Copy link
Collaborator

@TheJulianJES TheJulianJES left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MattWestb
Copy link
Contributor Author

You can committing it then its working 100% for V1 and all DAs is working for V2 but no events for EP 2 and 3 until ZHA is fixed and its better then not working at all and its not braking thing and user can doing binding with ZHA toolkit if they like until all is merged and having full working devices in there system.

Also one great thanks to @MichelBrodatzki for the initial V1 code that was making its easier doing the V2 working well and our ZHA devs for helping with the fixing the problems on the road.

@MattWestb
Copy link
Contributor Author

Koenkk/zigbee-herdsman-converters#5583 (comment)
I still wondering how was helping them with V2 and the firmware for updating it to V2 ??

But i understand that other have not getting all in place for both versions and was throng it in without understanding how the V1 and 2 is working and dont have any firmware for upgrading to V2 without Dirigera dresden-elektronik/deconz-rest-plugin#6803

@TheJulianJES TheJulianJES merged commit 38f6362 into zigpy:dev Mar 25, 2023
14 checks passed
@MattWestb MattWestb deleted the Symfoos2-V1-and-V2 branch March 25, 2023 15:38
@MattWestb
Copy link
Contributor Author

Thanks JES !!

@MattWestb
Copy link
Contributor Author

Only for information have IKEA updated the firmware in DIRIGERA for this device to 1.0.35 but i have only trying it on one MG2100L module updated from 1.0.32 and its looks working OK but i have not testing all buttons then i dont have them on the module.
The signature is the same as V2 and the quirk is loading OK but it can being that some DA is not working OK if IKEA have making changes in the firmware.

If its possible i like keeping my 2 remotes with original and and first update then i trying helping our danish friends that making wall switches of IKEA remotes and they looks having problem with then for the moment.

So if getting not working DA with the latest firmware pleas reporting it and we is trying getting it working with some debug logging and testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in progress Issue is being worked on, near fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Device Support Request] Ikea E2123: Symfonisk sound remote Gen2
5 participants