Update smart request parameter handling#1061
Merged
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1061 +/- ##
==========================================
+ Coverage 92.17% 92.33% +0.16%
==========================================
Files 85 85
Lines 5928 5896 -32
Branches 1440 1436 -4
==========================================
- Hits 5464 5444 -20
+ Misses 358 350 -8
+ Partials 106 102 -4 ☔ View full report in Codecov by Sentry. |
rytilahti
reviewed
Jul 14, 2024
rytilahti
approved these changes
Jul 23, 2024
Member
rytilahti
left a comment
There was a problem hiding this comment.
LGTM, cannot test it mysef right now, but it all reads reasonable 👍
Merged
sdb9696
added a commit
that referenced
this pull request
Jul 31, 2024
## [0.7.1](https://github.com/python-kasa/python-kasa/tree/0.7.1) (2024-07-31) [Full Changelog](0.7.0.5...0.7.1) **Release highlights:** - This release consists mainly of bugfixes and project improvements. - There is also new support for Tapo T100 motion sensors. - The CLI now supports child devices on all applicable commands. **Implemented enhancements:** - Expose reboot action [\#1073](#1073) (@rytilahti) - Decrypt KLAP data from PCAP files [\#1041](#1041) (@clstrickland) - Support child devices in all applicable cli commands [\#1020](#1020) (@sdb9696) **Fixed bugs:** - Fix iot light effect brightness [\#1092](#1092) (@sdb9696) - Enable setting brightness with color temp for smart devices [\#1091](#1091) (@sdb9696) - Do not send light\_on value to iot bulb set\_state [\#1090](#1090) (@sdb9696) - Allow erroring modules to recover [\#1080](#1080) (@sdb9696) - Raise KasaException on decryption errors [\#1078](#1078) (@sdb9696) - Update smart request parameter handling [\#1061](#1061) (@sdb9696) - Fix light preset module when list contains lighting effects [\#1048](#1048) (@sdb9696) - Handle module errors more robustly and add query params to light preset and transition [\#1036](#1036) (@sdb9696) - Fix credential hash to return None on empty credentials [\#1029](#1029) (@sdb9696) **Added support for devices:** - Add support for T100 motion sensor [\#1079](#1079) (@rytilahti) **Project maintenance:** - Bump project version to 0.7.0.5 [\#1087](#1087) (@sdb9696) - Fix generate\_supported pre commit to run in venv [\#1085](#1085) (@sdb9696) - Fix intermittently failing decryption error test [\#1082](#1082) (@sdb9696) - Fix mypy pre-commit hook on windows [\#1081](#1081) (@sdb9696) - Update RELEASING.md for patch releases [\#1076](#1076) (@sdb9696) - Use monotonic time for query timing [\#1070](#1070) (@sdb9696) - Fix parse\_pcap\_klap on windows and support default credentials [\#1068](#1068) (@sdb9696) - Add fixture file for KP405 fw 1.0.6 [\#1063](#1063) (@daleye) - Bump project version to 0.7.0.3 [\#1053](#1053) (@sdb9696) - Add KP400\(US\) v1.0.4 fixture [\#1051](#1051) (@gimpy88) - Add new HS220 kasa aes fixture [\#1050](#1050) (@sdb9696) - Add KS205\(US\) v1.1.0 fixture [\#1049](#1049) (@gimpy88) - Add KS200M\(US\) v1.0.11 fixture [\#1047](#1047) (@sdb9696) - Add KS225\(US\) v1.1.0 fixture [\#1046](#1046) (@sdb9696) - Split out main cli module into lazily loaded submodules [\#1039](#1039) (@sdb9696) - Structure cli into a package [\#1038](#1038) (@sdb9696) - Add KP400 v1.0.3 fixture [\#1037](#1037) (@gimpy88) - Add L920\(EU\) v1.1.3 fixture [\#1031](#1031) (@rytilahti) - Update changelog generator config [\#1030](#1030) (@sdb9696)
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Update smart request parameters based on TAPO app requests. Highlights are:
paramsif null. This should stop the issues we've been getting with devices complaining about parameters randomly.get_preset_rulesdoesn't send parameters forpresetcomponent version less than 3 (confirmed version 3 in the de-compiled app)get_led_infono longer sends the wrong parametersget_on_off_gradually_infono longer sends an empty{}parameterrequestIdparameter which the app doesn't send and afaict was added to the py100 library for no reason.get_device_infoonce and then queriesget_device_running_info. We should consider this as I noted when investigating variousJSON_ENCODE_FAIL_ERRORissues thatget_device_running_infocontinued to work whenget_device_infoentered a terminal failure state.get_device_timein the normal course of events. I suspect that for devices not supportingdevice_local_timecomponent this results in an external call.get_latest_fwpretty regularly which could be because I was going into the Device Info page a lot.multiRequestquery 😬 (maybe only for children)Some pcap captures attached, made possible from the great work by @clstrickland in #1041
TAPO L900.json
TAPO P100.json
TAPO L530E.json