Kasa KP125M basic emeter support#560
Kasa KP125M basic emeter support#560
Conversation
| self._device_type = DeviceType.Plug | ||
| self.modules: Dict[str, Any] = {} | ||
| self.emeter_type = "emeter" | ||
| self.modules["emeter"] = Emeter(self, self.emeter_type) |
There was a problem hiding this comment.
I think we need to rethink the whole modules system for "tapo" devices separately from the legacy protocol, but I suppose this is fine for now.
|
Looks good to me. Might be good to have some tests but it's probably better to wait for #557 for that because it was quite a lift to get the test framework working with the tapo protocol. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #560 +/- ##
==========================================
- Coverage 75.84% 75.75% -0.09%
==========================================
Files 34 34
Lines 2865 2875 +10
Branches 747 750 +3
==========================================
+ Hits 2173 2178 +5
- Misses 635 640 +5
Partials 57 57 ☔ View full report in Codecov by Sentry. |
|
Regarding test harness data for the KP125M, I tried 'poetry run python -m devtools.dump_devinfo -d 192.168.2.170 --username "$USERNAME" --password "$PASSWORD"' and the first lines around the error are: That seems weird, since the main kasa --type tapoplug commands work. |
User error. Attached is the file it produced. The SSID & Nickname are base64 encoded strings that I anonymized as "User Given (SSID|Nickname)". pytest has lots of errors of this form, not just for KP125M. |
Hi. I have a KP125M, and these changes make it produce plausible data that matches the Kasa mobile app.
I know these changes may conflict with how Tapo energy monitoring may work, but hopefully this will help other developers see what's needed to get KP125M energy monitoring operational.
Thanks for the latest Tapo protocol integration!
Example output with these changes: