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 Aqara H1 Wireless Remote Double Rocker variant #3357

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

tfranzel
Copy link

Proposed change

This is a variation for the Aqara H1 Double Rocker.

Search led me here: #940 (comment)
and here https://gist.github.com/xuxiaoqiao/6ed8dcb950f26337218d0507733970a0#file-aqara_h1_remote-py

Unfortunately it didn't work because my device quirk somehow wasn't recognized properly.

By looking at the debug messages and tinkering a bit, I found that my device's INPUT_CLUSTERS are slightly different and a single line flip in Variant 3 did the trick for me:

-                INPUT_CLUSTERS: [Basic.cluster_id, PowerConfiguration.cluster_id, Identify.cluster_id,], 
+                INPUT_CLUSTERS: [Basic.cluster_id, Identify.cluster_id, PowerConfiguration.cluster_id,], 

This has been working flawlessly for several months for me.

Sorry if this is not done properly, but I only have a limited understanding what is going on here 😅

  • The changes are tested and work correctly
  • pre-commit checks pass / the code has been formatted using Black
  • Tests have been added to verify that the new code works

Copy link

codecov bot commented Sep 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.49%. Comparing base (acecf70) to head (f743629).
Report is 2 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #3357   +/-   ##
=======================================
  Coverage   88.49%   88.49%           
=======================================
  Files         305      305           
  Lines        9621     9625    +4     
=======================================
+ Hits         8514     8518    +4     
  Misses       1107     1107           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@TheJulianJES
Copy link
Collaborator

The list order doesn't matter, but variant 3 has these empty clusters at the end:

            4: {},
            5: {},
            6: {},

That's probably why it doesn't match. Adding another variant should be fine though.

@tfranzel
Copy link
Author

Hey @TheJulianJES,

I have no idea how the signature matching works, but your statement does not really match my experience here.

I tried those quirks from the gist above and it did not work right away. Only after flipping the INPUT_CLUSTER order, it started working. I basically adapted the "shape" from the HA device info dump into the quirk.

As a matter of fact, I bought the same device again a couple of days ago. Turns out the new device is again different and does indeed have empty clusters 4/5/6. Had to create another one as it was not matching out-of-the box. I should probably add that one also.

Is there by any chance some doc on how all of this zigbee stuff works (without reading some 1000 page specification)?

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.

2 participants