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 power configuration cluster to ZLinky_TIC (requires firmware v12.0+) #1962

Merged
merged 5 commits into from
Dec 4, 2022

Conversation

pdecat
Copy link
Contributor

@pdecat pdecat commented Nov 23, 2022

@pdecat pdecat changed the title Add power configuration cluster to ZLinky_TIC (requires firmware 12+) Add power configuration cluster to ZLinky_TIC (requires firmware v12.0+) Nov 23, 2022
@pdecat pdecat force-pushed the lixee_zlinky_tic_power_configuration branch from 36cd28f to 0d6133e Compare November 23, 2022 21:38
@coveralls
Copy link

coveralls commented Nov 23, 2022

Pull Request Test Coverage Report for Build 3558665835

  • 5 of 5 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.009%) to 83.171%

Totals Coverage Status
Change from base Build 3517637706: 0.009%
Covered Lines: 6504
Relevant Lines: 7820

💛 - Coveralls

@codecov-commenter
Copy link

codecov-commenter commented Nov 23, 2022

Codecov Report

Base: 83.16% // Head: 83.17% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (c30ecca) compared to base (ad2eba0).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #1962   +/-   ##
=======================================
  Coverage   83.16%   83.17%           
=======================================
  Files         248      248           
  Lines        7816     7820    +4     
=======================================
+ Hits         6500     6504    +4     
  Misses       1316     1316           
Impacted Files Coverage Δ
zhaquirks/lixee/zlinky.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 at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@pdecat
Copy link
Contributor Author

pdecat commented Nov 23, 2022

I guess it won't cause issues with older firmware as the new cluster is (currently) not in the signature.

Some screenshots how it works with firmware v12.0:

image

image

image

@pdecat pdecat marked this pull request as ready for review November 23, 2022 22:13
@pdecat pdecat marked this pull request as draft November 24, 2022 09:30
@pdecat
Copy link
Contributor Author

pdecat commented Nov 24, 2022

Marked as draft again as the new cluster is supposed to be discoverable: fairecasoimeme/Zlinky_TIC#140 (comment)

@MattWestb
Copy link
Contributor

Make one new device class with the new EP/Cluster setting and it shall working OK.
Also then doing OTA and changing the EP/Cluster setting it can being needed deleting the device and reading it for the system saving the new settings so the quirk can being loaded OK.

@pdecat
Copy link
Contributor Author

pdecat commented Nov 24, 2022

Make one new device class with the new EP/Cluster setting and it shall working OK.

Thanks!

Also then doing OTA and changing the EP/Cluster setting it can being needed deleting the device and reading it for the system saving the new settings so the quirk can being loaded OK.

Is the signature cached somewhere?

@pdecat
Copy link
Contributor Author

pdecat commented Nov 24, 2022

Looks like the cached in clusters information may come from this table:

# sqlite3 config/zigbee.db "SELECT * FROM in_clusters_v10 WHERE ieee = '00:15:8d:00:ff:ff:ff:ff';"
00:15:8d:00:ff:ff:ff:ff|1|0
00:15:8d:00:ff:ff:ff:ff|1|3
00:15:8d:00:ff:ff:ff:ff|1|1794
00:15:8d:00:ff:ff:ff:ff|1|2817
00:15:8d:00:ff:ff:ff:ff|1|2820
00:15:8d:00:ff:ff:ff:ff|1|65382
00:15:8d:00:ff:ff:ff:ff|242|33

@MattWestb
Copy link
Contributor

Dont forget reversing the original device class then that firmware for it dont have power config cluster.

All devices is saved in the zigbee.db in the configure directory and is being used the init devices and applying quirks for it then joining and also the starting the system.

One good example is updating one old IKEA controller or light that was released with ZLL firmware and getting one Zigbee 3 firmware can working OK but some devices must being deleted and rejoined for working OK.

I think to be on the safe side is to recommending deleting the device after OTA update and waiting one minute (ZHA must doing the DB work finished) and doing one new joining of the device so the cluster setting is being OK.

@pdecat
Copy link
Contributor Author

pdecat commented Nov 24, 2022

Was about to open an issue in zigpy, but looks like this was already discussed here: zigpy/zigpy#912 (comment)

@MattWestb
Copy link
Contributor

By the way nice IEEE of your device :-))))

@pdecat
Copy link
Contributor Author

pdecat commented Nov 24, 2022

By the way nice IEEE of your device :-))))

I redacted it :)

@pdecat pdecat force-pushed the lixee_zlinky_tic_power_configuration branch from 976433f to 938c6a6 Compare November 24, 2022 12:02
@pdecat
Copy link
Contributor Author

pdecat commented Nov 24, 2022

I've added a ZLinky_TIC_FW_V12 quirk with power configuration cluster so that both pre-v12 and post-v12 versions are supported:

2022-11-24 13:01:32.046 DEBUG (MainThread) [zigpy.quirks.registry] Checking quirks for LiXee ZLinky_TIC (00:15:8d:00:ff:ff:ff:ff)
2022-11-24 13:01:32.046 DEBUG (MainThread) [zigpy.quirks.registry] Considering <class 'zhaquirks.lixee.zlinky.ZLinkyTICFWV12'>
2022-11-24 13:01:32.046 DEBUG (MainThread) [zigpy.quirks.registry] Fail because input cluster mismatch on at least one endpoint
2022-11-24 13:01:32.046 DEBUG (MainThread) [zigpy.quirks.registry] Considering <class 'zhaquirks.lixee.zlinky.ZLinkyTIC'>
2022-11-24 13:01:32.046 DEBUG (MainThread) [zigpy.quirks.registry] Found custom device replacement for 00:15:8d:00:ff:ff:ff:ff: <class 'zhaquirks.lixee.zlinky.ZLinkyTIC'>

@pdecat pdecat force-pushed the lixee_zlinky_tic_power_configuration branch from 938c6a6 to 1ad7c3f Compare November 24, 2022 12:06
@pdecat pdecat marked this pull request as ready for review November 24, 2022 12:09
zhaquirks/lixee/zlinky.py Outdated Show resolved Hide resolved
@MattWestb
Copy link
Contributor

If changing the model info in the V12 firmware its being OK and i think it one good way to see that the device is running the updated version but normally it shall being enough reading the software version on the basic cluster for getting that.

@dmulcahey dmulcahey merged commit 566141e into zigpy:dev Dec 4, 2022
@pdecat pdecat deleted the lixee_zlinky_tic_power_configuration branch December 4, 2022 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants