-
-
Notifications
You must be signed in to change notification settings - Fork 223
Add support for plugs with emeters. #154
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
Conversation
Look like linting is failing, I will try to correct it. |
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.
Also the linting errors need to be addressed. Otherwise it looks good to me. I'd appreciate a review from @rytilahti as I haven't looked into the HS300 code.
emeter_rt[field] += value | ||
|
||
# Voltage is averaged | ||
emeter_rt['voltage_mv'] /= count |
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 get the idea here, but have you ever noticed the individual plugs reporting different voltage? Normally you should get the same voltage from each child-plug.
emeter_rt: DefaultDict[int, float] = defaultdict(lambda: 0.0) | ||
count = 0 | ||
for plug in self.children: | ||
if not plug.has_emeter: |
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.
Is this a real-world case, where some sockets on the same strip have and some sockets don't have emeter? If not I think this would be redundant
Testing with changes:
Output shows same data for each plug, unlike the app.
I am guessing this isn't the expected behavior? |
Just wanted to say that it would be great to see kasa officially support tplink powerstrips with emeters. I don't have mine yet, but from the looks of the last comment, it's not reporting real time data correctly. |
Last I checked it didn't report any emeter data.
On Sep 7, 2021 9:44 AM, Einsteinjr84 ***@***.***> wrote:
Just wanted to say that it would be great to see kasa officially support tplink powerstrips with emeters. I don't have mine yet, but from the looks of the last comment, it's not reporting real time data correctly.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#154 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AJAXMXWYI7ITTI6DAGLVLCTUAYQNFANCNFSM42NCXWSA>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Looks like the PR has gone stale, so you'd need to manually add the changes from the PR to your local codebase to test it. Unfortunately we don't have the device at all in Europe, so people who have the device (I think it's available only in the US) should provide at minimum a json dump and do the real-world testing. |
Superseded by #203, thanks for the PR though :-) |
This fixes #64