| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks a lot @Fulch36! I think the tests should pass and this would be ready to be merged after you add the model to WITH_EMETER_SMART and STRIPS_SMART inside kasa/tests/device_fixtures.py.
Sorry, something went wrong.
|
Apologies @rytilahti, I had originally added it to just the STRIPS_SMART category which was when I was seeing test failures. I've now added it to both the categories you've suggested and am still getting 10 test failures I'm afraid. |
Sorry, something went wrong.
|
Looks like the issue is that our fake protocol implementation doesn't implement multipleRequest for control_child command (_handle_control_child in kasa/tests/fakeprotocol_smart.py). I suppose this is not happening on other devices with children due to special handling for hubs (and KS240). @sdb9696 probably has an idea what's the best solution to fix this. The error comes from python-kasa/kasa/tests/fakeprotocol_smart.py Lines 191 to 200 in 048c84d |
Sorry, something went wrong.
|
For some reason I thought the tests were all passing on #1186 before we split out the fixture. Am I mistaken? |
Sorry, something went wrong.
|
N.B. I have been updating this branch to master so you need to pull |
Sorry, something went wrong.
No they were not passing as the fake protocol implementation is missing multi-request support, or that's my understanding (see my last comment). |
Sorry, something went wrong.
Ah so we don't currently have any smart devices that support get_energy_usage on children? |
Sorry, something went wrong.
|
@Fulch36 i’m happy to push a commit to your branch to fix this if you want as the test framework might be a big leap to get your head around. |
Sorry, something went wrong.
From what I can see from the current fixtures, there aren't any existing smart devices that include both energy_monitoring and child_device, in their component_list. p.s. excuse the unexpected branch deletion, should have finished my morning coffee before doing the clean-up... |
Sorry, something went wrong.
I'd be happy with that, I'm definitely lacking the familiarity with the codebase that you guys have so please feel free. |
Sorry, something went wrong.
Codecov ReportAll modified and coverable lines are covered by tests ✅ Additional details and impacted files @@ Coverage Diff @@
## master #1185 +/- ##
==========================================
+ Coverage 92.35% 92.45% +0.09%
==========================================
Files 99 99
Lines 6530 6530
Branches 1614 1614
==========================================
+ Hits 6031 6037 +6
+ Misses 380 375 -5
+ Partials 119 118 -1 ☔ View full report in Codecov by Sentry. |
Sorry, something went wrong.
## [0.7.6](https://github.com/python-kasa/python-kasa/tree/0.7.6) (2024-10-29) [Full Changelog](0.7.5...0.7.6) **Release summary:** - Experimental support for Tapo cameras and the Tapo H200 hub which uses the same protocol. - Better timestamp support across all devices. - Support for new devices P304M, S200D and S200B (see README.md for note on the S200 support). - Various other fixes and minor features. **Implemented enhancements:** - Add support for setting the timezone [\#436](#436) - Add stream\_rtsp\_url to camera module [\#1197](#1197) (@sdb9696) - Try default logon credentials in SslAesTransport [\#1195](#1195) (@sdb9696) - Allow enabling experimental devices from environment variable [\#1194](#1194) (@sdb9696) - Add core device, child and camera modules to smartcamera [\#1193](#1193) (@sdb9696) - Fallback to get\_current\_power if get\_energy\_usage does not provide current\_power [\#1186](#1186) (@Fulch36) - Add https parameter to device class factory [\#1184](#1184) (@sdb9696) - Add discovery list command to cli [\#1183](#1183) (@sdb9696) - Add Time module to SmartCamera devices [\#1182](#1182) (@sdb9696) - Add try\_connect\_all to allow initialisation without udp broadcast [\#1171](#1171) (@sdb9696) - Update dump\_devinfo for smart camera protocol [\#1169](#1169) (@sdb9696) - Enable newer encrypted discovery protocol [\#1168](#1168) (@sdb9696) - Initial TapoCamera support [\#1165](#1165) (@sdb9696) - Add waterleak alert timestamp [\#1162](#1162) (@rytilahti) - Create common Time module and add time set cli command [\#1157](#1157) (@sdb9696) **Fixed bugs:** - Only send 20002 discovery request with key included [\#1207](#1207) (@sdb9696) - Fix SslAesTransport default login and add tests [\#1202](#1202) (@sdb9696) - Fix device\_config serialisation of https value [\#1196](#1196) (@sdb9696) **Added support for devices:** - Add S200B\(EU\) fw 1.11.0 fixture [\#1205](#1205) (@sdb9696) - Add TC65 fixture [\#1200](#1200) (@rytilahti) - Add P304M\(UK\) test fixture [\#1185](#1185) (@Fulch36) - Add H200 experimental fixture [\#1180](#1180) (@sdb9696) - Add S200D button fixtures [\#1161](#1161) (@rytilahti) **Project maintenance:** - Fix mypy errors in parse_pcap_klap [\#1214](#1214) (@sdb9696) - Make HSV NamedTuple creation more efficient [\#1211](#1211) (@sdb9696) - dump\_devinfo: query get\_current\_brt for iot dimmers [\#1209](#1209) (@rytilahti) - Add trigger\_logs and double\_click to dump\_devinfo helper [\#1208](#1208) (@sdb9696) - Fix smartcamera childdevice module [\#1206](#1206) (@sdb9696) - Add H200\(EU\) fw 1.3.2 fixture [\#1204](#1204) (@sdb9696) - Do not pass None as timeout to http requests [\#1203](#1203) (@sdb9696) - Update SMART test framework to use fake child protocols [\#1199](#1199) (@sdb9696) - Allow passing an aiohttp client session during discover try\_connect\_all [\#1198](#1198) (@sdb9696) - Add test framework for smartcamera [\#1192](#1192) (@sdb9696) - Rename experimental fixtures folder to smartcamera [\#1191](#1191) (@sdb9696) - Combine smartcamera error codes into SmartErrorCode [\#1190](#1190) (@sdb9696) - Allow deriving from SmartModule without being registered [\#1189](#1189) (@sdb9696) - Improve supported module checks for hub children [\#1188](#1188) (@sdb9696) - Update smartcamera to support single get/set/do requests [\#1187](#1187) (@sdb9696) - Add S200B\(US\) fw 1.12.0 fixture [\#1181](#1181) (@sdb9696) - Add T110\(US\), T310\(US\) and T315\(US\) sensor fixtures [\#1179](#1179) (@sdb9696) - Enforce EOLs for \*.rst and \*.md [\#1178](#1178) (@rytilahti) - Convert fixtures to use unix newlines [\#1177](#1177) (@rytilahti) - Add motion sensor to known categories [\#1176](#1176) (@rytilahti) - Drop urllib3 dependency and create ssl context in executor thread [\#1175](#1175) (@sdb9696) - Expose smart child device map as a class constant [\#1173](#1173) (@sdb9696)
P304M supports energy monitoring on child SMART devices.
## [0.7.6](https://github.com/python-kasa/python-kasa/tree/0.7.6) (2024-10-29) [Full Changelog](python-kasa/python-kasa@0.7.5...0.7.6) **Release summary:** - Experimental support for Tapo cameras and the Tapo H200 hub which uses the same protocol. - Better timestamp support across all devices. - Support for new devices P304M, S200D and S200B (see README.md for note on the S200 support). - Various other fixes and minor features. **Implemented enhancements:** - Add support for setting the timezone [\python-kasa#436](python-kasa#436) - Add stream\_rtsp\_url to camera module [\python-kasa#1197](python-kasa#1197) (@sdb9696) - Try default logon credentials in SslAesTransport [\python-kasa#1195](python-kasa#1195) (@sdb9696) - Allow enabling experimental devices from environment variable [\python-kasa#1194](python-kasa#1194) (@sdb9696) - Add core device, child and camera modules to smartcamera [\python-kasa#1193](python-kasa#1193) (@sdb9696) - Fallback to get\_current\_power if get\_energy\_usage does not provide current\_power [\python-kasa#1186](python-kasa#1186) (@Fulch36) - Add https parameter to device class factory [\python-kasa#1184](python-kasa#1184) (@sdb9696) - Add discovery list command to cli [\python-kasa#1183](python-kasa#1183) (@sdb9696) - Add Time module to SmartCamera devices [\python-kasa#1182](python-kasa#1182) (@sdb9696) - Add try\_connect\_all to allow initialisation without udp broadcast [\python-kasa#1171](python-kasa#1171) (@sdb9696) - Update dump\_devinfo for smart camera protocol [\python-kasa#1169](python-kasa#1169) (@sdb9696) - Enable newer encrypted discovery protocol [\python-kasa#1168](python-kasa#1168) (@sdb9696) - Initial TapoCamera support [\python-kasa#1165](python-kasa#1165) (@sdb9696) - Add waterleak alert timestamp [\python-kasa#1162](python-kasa#1162) (@rytilahti) - Create common Time module and add time set cli command [\python-kasa#1157](python-kasa#1157) (@sdb9696) **Fixed bugs:** - Only send 20002 discovery request with key included [\python-kasa#1207](python-kasa#1207) (@sdb9696) - Fix SslAesTransport default login and add tests [\python-kasa#1202](python-kasa#1202) (@sdb9696) - Fix device\_config serialisation of https value [\python-kasa#1196](python-kasa#1196) (@sdb9696) **Added support for devices:** - Add S200B\(EU\) fw 1.11.0 fixture [\python-kasa#1205](python-kasa#1205) (@sdb9696) - Add TC65 fixture [\python-kasa#1200](python-kasa#1200) (@rytilahti) - Add P304M\(UK\) test fixture [\python-kasa#1185](python-kasa#1185) (@Fulch36) - Add H200 experimental fixture [\python-kasa#1180](python-kasa#1180) (@sdb9696) - Add S200D button fixtures [\python-kasa#1161](python-kasa#1161) (@rytilahti) **Project maintenance:** - Fix mypy errors in parse_pcap_klap [\python-kasa#1214](python-kasa#1214) (@sdb9696) - Make HSV NamedTuple creation more efficient [\python-kasa#1211](python-kasa#1211) (@sdb9696) - dump\_devinfo: query get\_current\_brt for iot dimmers [\python-kasa#1209](python-kasa#1209) (@rytilahti) - Add trigger\_logs and double\_click to dump\_devinfo helper [\python-kasa#1208](python-kasa#1208) (@sdb9696) - Fix smartcamera childdevice module [\python-kasa#1206](python-kasa#1206) (@sdb9696) - Add H200\(EU\) fw 1.3.2 fixture [\python-kasa#1204](python-kasa#1204) (@sdb9696) - Do not pass None as timeout to http requests [\python-kasa#1203](python-kasa#1203) (@sdb9696) - Update SMART test framework to use fake child protocols [\python-kasa#1199](python-kasa#1199) (@sdb9696) - Allow passing an aiohttp client session during discover try\_connect\_all [\python-kasa#1198](python-kasa#1198) (@sdb9696) - Add test framework for smartcamera [\python-kasa#1192](python-kasa#1192) (@sdb9696) - Rename experimental fixtures folder to smartcamera [\python-kasa#1191](python-kasa#1191) (@sdb9696) - Combine smartcamera error codes into SmartErrorCode [\python-kasa#1190](python-kasa#1190) (@sdb9696) - Allow deriving from SmartModule without being registered [\python-kasa#1189](python-kasa#1189) (@sdb9696) - Improve supported module checks for hub children [\python-kasa#1188](python-kasa#1188) (@sdb9696) - Update smartcamera to support single get/set/do requests [\python-kasa#1187](python-kasa#1187) (@sdb9696) - Add S200B\(US\) fw 1.12.0 fixture [\python-kasa#1181](python-kasa#1181) (@sdb9696) - Add T110\(US\), T310\(US\) and T315\(US\) sensor fixtures [\python-kasa#1179](python-kasa#1179) (@sdb9696) - Enforce EOLs for \*.rst and \*.md [\python-kasa#1178](python-kasa#1178) (@rytilahti) - Convert fixtures to use unix newlines [\python-kasa#1177](python-kasa#1177) (@rytilahti) - Add motion sensor to known categories [\python-kasa#1176](python-kasa#1176) (@rytilahti) - Drop urllib3 dependency and create ssl context in executor thread [\python-kasa#1175](python-kasa#1175) (@sdb9696) - Expose smart child device map as a class constant [\python-kasa#1173](python-kasa#1173) (@sdb9696)
| Back | FazBrowse Home | New Git URL |
First PR as requested in #1166
This just includes the fixture for P304M(UK), tests will fail without changes.