-
Notifications
You must be signed in to change notification settings - Fork 728
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
Fix power measurement for Aqara MAEU01 plugs with newer firmware #1656
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
6d61bbb
Add alternative Xiaomi MMEU01 plug signatures
TheJulianJES f092b60
Improve custom Xiaomi ElectricalMeasurementCluster
TheJulianJES 617ae9b
Use custom Xiaomi ElectricalMeasurementCluster, BasicCluter for MAEU0…
TheJulianJES 949271a
Rename quirk file to plug_eu.py
TheJulianJES 64ced42
Temporary test changes
TheJulianJES d6d8f9d
Add custom MeteringCluster for "current summation delivered" sensor i…
TheJulianJES 9c14d93
Fix docs
TheJulianJES a69400c
Add OppleCluster to mmeu01, add alternative mmeu01 signatures, remove…
TheJulianJES 5bdbd44
Simplify common signatures
TheJulianJES 67ca94b
Change endpoint 21 replacement to more likely match actual signature …
TheJulianJES 7bb06ad
Remove stale import
TheJulianJES 413c152
Simplify MAEU01 replacement to use MMEU01 replacement
TheJulianJES 7c74256
Add power_outage_memory
TheJulianJES 78ab39a
Explicitly enable "OppleMode" now (set to 1 instead of 0)
TheJulianJES ffc8002
Add some comments
TheJulianJES ccfa93d
Add small test to validate OppleMode gets enabled on binding
TheJulianJES da5fcef
Remove stale comment
TheJulianJES f3656bc
Add Xiaomi EU plug current power consumption, total power consumption…
TheJulianJES 34913b6
Also remove Xiaomi MMEU01 plug from group 0
TheJulianJES bac7e4a
Use create_catching_task from zigpy instead of asyncio.create_task
TheJulianJES 4658eee
Remove plug from group 0 when binding OppleCluster, update tests
TheJulianJES deeeed6
Use catching task for writing OppleMode attribute, update test
TheJulianJES File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This change made my another aqara outlet (mmeu01 square one) report 10* more usage than normal
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.
That should be fixed by either re-pairing the device or reading the "ac_power_divisor" attribute on the ElectricalMeasurement cluster through ZHA -> Devices -> Plug -> Manage Clusters -> ElectricalMeasurement -> ac_power_divisor -> read attribute.
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.
Reparing is workaround, I don't think this is good user experience to ask user to re-pair working device,
I think the solution is to remove this multiplication and change ac_power_divisor back to 1, I've changed it locally and both devices shows power consumption correctly for me
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 agree. If possible, the "fake" attribute should be re-read automatically. There is another issue with it being left on 1 (different rounding when values like 1.9W are reported which causes a jump from 2W to 1W after some time with unchanged consumption).
If consumption varies a lot when low, it's also nice to see values in between 0W and 1W (and it not constantly jumping around).
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.
The power measurement on LLKZMK11LM (lumi.relay.c2acn01) is also wrong after this change. It's showing 100W for a 10W device.
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.
@hakong No, check the AC power divisor:
0x0605
. It's set to10
instead of1
now. Both of these changes were made so that there's one decimal.