Steven B.
254a9af5c1
Update DiscoveryResult to use Mashumaro instead of pydantic ( #1231 )
...
Mashumaro is faster and doesn't come with all versioning problems that
pydantic does.
A basic perf test deserializing all of our discovery results fixtures
shows mashumaro as being about 6 times faster deserializing dicts than
pydantic. It's much faster parsing from a json string but that's likely
because it uses orjson under the hood although that's not really our use
case at the moment.
```
PYDANTIC - ms
=================
json dict
-----------------
4.7665 1.3268
3.1548 1.5922
3.1130 1.8039
4.2834 2.7606
2.0669 1.3757
2.0163 1.6377
3.1667 1.3561
4.1296 2.7297
2.0132 1.3471
4.0648 1.4105
MASHUMARO - ms
=================
json dict
-----------------
0.5977 0.5543
0.5336 0.2983
0.3955 0.2549
0.6516 0.2742
0.5386 0.2706
0.6678 0.2580
0.4120 0.2511
0.3836 0.2472
0.4020 0.2465
0.4268 0.2487
```
2024-11-12 22:00:04 +01:00
Steven B.
331baf6bc4
Prepare 0.7.7 ( #1229 )
...
## [0.7.7](https://github.com/python-kasa/python-kasa/tree/0.7.7 ) (2024-11-04)
[Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.7.6...0.7.7 )
**Release summary:**
- Bugfix for child device device creation error with credentials_hash
- PIR support for iot dimmers and wall switches.
- Various small enhancements and project improvements.
**Implemented enhancements:**
- Add PIR&LAS for wall switches mentioning PIR support [\#1227](https://github.com/python-kasa/python-kasa/pull/1227 ) (@rytilahti)
- Expose ambient light setting for iot dimmers [\#1210](https://github.com/python-kasa/python-kasa/pull/1210 ) (@rytilahti)
- Expose PIR enabled setting for iot dimmers [\#1174](https://github.com/python-kasa/python-kasa/pull/1174 ) (@rytilahti)
- Add childprotection module [\#1141](https://github.com/python-kasa/python-kasa/pull/1141 ) (@rytilahti)
- Initial trigger logs implementation [\#900](https://github.com/python-kasa/python-kasa/pull/900 ) (@rytilahti)
**Fixed bugs:**
- Fix AES child device creation error [\#1220](https://github.com/python-kasa/python-kasa/pull/1220 ) (@sdb9696)
**Project maintenance:**
- Update TC65 fixture [\#1225](https://github.com/python-kasa/python-kasa/pull/1225 ) (@rytilahti)
- Update smartcamera fixtures from latest dump\_devinfo [\#1224](https://github.com/python-kasa/python-kasa/pull/1224 ) (@sdb9696)
- Add component queries to smartcamera devices [\#1223](https://github.com/python-kasa/python-kasa/pull/1223 ) (@sdb9696)
- Update try\_connect\_all to be more efficient and report attempts [\#1222](https://github.com/python-kasa/python-kasa/pull/1222 ) (@sdb9696)
- Use stacklevel=2 for warnings to report on callsites [\#1219](https://github.com/python-kasa/python-kasa/pull/1219 ) (@rytilahti)
- parse\_pcap\_klap: various code cleanups [\#1138](https://github.com/python-kasa/python-kasa/pull/1138 ) (@rytilahti)
2024-11-04 15:57:43 +00:00
Steven B.
530cf4b523
Prepare 0.7.6 ( #1213 )
...
## [0.7.6](https://github.com/python-kasa/python-kasa/tree/0.7.6 ) (2024-10-29)
[Full Changelog](https://github.com/python-kasa/python-kasa/compare/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](https://github.com/python-kasa/python-kasa/issues/436 )
- Add stream\_rtsp\_url to camera module [\#1197](https://github.com/python-kasa/python-kasa/pull/1197 ) (@sdb9696)
- Try default logon credentials in SslAesTransport [\#1195](https://github.com/python-kasa/python-kasa/pull/1195 ) (@sdb9696)
- Allow enabling experimental devices from environment variable [\#1194](https://github.com/python-kasa/python-kasa/pull/1194 ) (@sdb9696)
- Add core device, child and camera modules to smartcamera [\#1193](https://github.com/python-kasa/python-kasa/pull/1193 ) (@sdb9696)
- Fallback to get\_current\_power if get\_energy\_usage does not provide current\_power [\#1186](https://github.com/python-kasa/python-kasa/pull/1186 ) (@Fulch36)
- Add https parameter to device class factory [\#1184](https://github.com/python-kasa/python-kasa/pull/1184 ) (@sdb9696)
- Add discovery list command to cli [\#1183](https://github.com/python-kasa/python-kasa/pull/1183 ) (@sdb9696)
- Add Time module to SmartCamera devices [\#1182](https://github.com/python-kasa/python-kasa/pull/1182 ) (@sdb9696)
- Add try\_connect\_all to allow initialisation without udp broadcast [\#1171](https://github.com/python-kasa/python-kasa/pull/1171 ) (@sdb9696)
- Update dump\_devinfo for smart camera protocol [\#1169](https://github.com/python-kasa/python-kasa/pull/1169 ) (@sdb9696)
- Enable newer encrypted discovery protocol [\#1168](https://github.com/python-kasa/python-kasa/pull/1168 ) (@sdb9696)
- Initial TapoCamera support [\#1165](https://github.com/python-kasa/python-kasa/pull/1165 ) (@sdb9696)
- Add waterleak alert timestamp [\#1162](https://github.com/python-kasa/python-kasa/pull/1162 ) (@rytilahti)
- Create common Time module and add time set cli command [\#1157](https://github.com/python-kasa/python-kasa/pull/1157 ) (@sdb9696)
**Fixed bugs:**
- Only send 20002 discovery request with key included [\#1207](https://github.com/python-kasa/python-kasa/pull/1207 ) (@sdb9696)
- Fix SslAesTransport default login and add tests [\#1202](https://github.com/python-kasa/python-kasa/pull/1202 ) (@sdb9696)
- Fix device\_config serialisation of https value [\#1196](https://github.com/python-kasa/python-kasa/pull/1196 ) (@sdb9696)
**Added support for devices:**
- Add S200B\(EU\) fw 1.11.0 fixture [\#1205](https://github.com/python-kasa/python-kasa/pull/1205 ) (@sdb9696)
- Add TC65 fixture [\#1200](https://github.com/python-kasa/python-kasa/pull/1200 ) (@rytilahti)
- Add P304M\(UK\) test fixture [\#1185](https://github.com/python-kasa/python-kasa/pull/1185 ) (@Fulch36)
- Add H200 experimental fixture [\#1180](https://github.com/python-kasa/python-kasa/pull/1180 ) (@sdb9696)
- Add S200D button fixtures [\#1161](https://github.com/python-kasa/python-kasa/pull/1161 ) (@rytilahti)
**Project maintenance:**
- Fix mypy errors in parse_pcap_klap [\#1214](https://github.com/python-kasa/python-kasa/pull/1214 ) (@sdb9696)
- Make HSV NamedTuple creation more efficient [\#1211](https://github.com/python-kasa/python-kasa/pull/1211 ) (@sdb9696)
- dump\_devinfo: query get\_current\_brt for iot dimmers [\#1209](https://github.com/python-kasa/python-kasa/pull/1209 ) (@rytilahti)
- Add trigger\_logs and double\_click to dump\_devinfo helper [\#1208](https://github.com/python-kasa/python-kasa/pull/1208 ) (@sdb9696)
- Fix smartcamera childdevice module [\#1206](https://github.com/python-kasa/python-kasa/pull/1206 ) (@sdb9696)
- Add H200\(EU\) fw 1.3.2 fixture [\#1204](https://github.com/python-kasa/python-kasa/pull/1204 ) (@sdb9696)
- Do not pass None as timeout to http requests [\#1203](https://github.com/python-kasa/python-kasa/pull/1203 ) (@sdb9696)
- Update SMART test framework to use fake child protocols [\#1199](https://github.com/python-kasa/python-kasa/pull/1199 ) (@sdb9696)
- Allow passing an aiohttp client session during discover try\_connect\_all [\#1198](https://github.com/python-kasa/python-kasa/pull/1198 ) (@sdb9696)
- Add test framework for smartcamera [\#1192](https://github.com/python-kasa/python-kasa/pull/1192 ) (@sdb9696)
- Rename experimental fixtures folder to smartcamera [\#1191](https://github.com/python-kasa/python-kasa/pull/1191 ) (@sdb9696)
- Combine smartcamera error codes into SmartErrorCode [\#1190](https://github.com/python-kasa/python-kasa/pull/1190 ) (@sdb9696)
- Allow deriving from SmartModule without being registered [\#1189](https://github.com/python-kasa/python-kasa/pull/1189 ) (@sdb9696)
- Improve supported module checks for hub children [\#1188](https://github.com/python-kasa/python-kasa/pull/1188 ) (@sdb9696)
- Update smartcamera to support single get/set/do requests [\#1187](https://github.com/python-kasa/python-kasa/pull/1187 ) (@sdb9696)
- Add S200B\(US\) fw 1.12.0 fixture [\#1181](https://github.com/python-kasa/python-kasa/pull/1181 ) (@sdb9696)
- Add T110\(US\), T310\(US\) and T315\(US\) sensor fixtures [\#1179](https://github.com/python-kasa/python-kasa/pull/1179 ) (@sdb9696)
- Enforce EOLs for \*.rst and \*.md [\#1178](https://github.com/python-kasa/python-kasa/pull/1178 ) (@rytilahti)
- Convert fixtures to use unix newlines [\#1177](https://github.com/python-kasa/python-kasa/pull/1177 ) (@rytilahti)
- Add motion sensor to known categories [\#1176](https://github.com/python-kasa/python-kasa/pull/1176 ) (@rytilahti)
- Drop urllib3 dependency and create ssl context in executor thread [\#1175](https://github.com/python-kasa/python-kasa/pull/1175 ) (@sdb9696)
- Expose smart child device map as a class constant [\#1173](https://github.com/python-kasa/python-kasa/pull/1173 ) (@sdb9696)
2024-10-29 18:05:22 +00:00
Steven B.
885a04d24f
Prepare 0.7.5 ( #1160 )
...
## [0.7.5](https://github.com/python-kasa/python-kasa/tree/0.7.5 ) (2024-10-08)
[Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.7.4...0.7.5 )
**Release summary:**
- Fix for KP303 on Firmware 1.0.6
- Fix for `on_since` value jitter
- Various maintenance items
**Breaking changes:**
- Make iot time timezone aware [\#1147](https://github.com/python-kasa/python-kasa/pull/1147 ) (@sdb9696)
**Fixed bugs:**
- Use tzinfo in time constructor instead of astime for iot devices [\#1158](https://github.com/python-kasa/python-kasa/pull/1158 ) (@sdb9696)
- Send empty dictionary instead of null for iot queries [\#1145](https://github.com/python-kasa/python-kasa/pull/1145 ) (@sdb9696)
- Stabilise on\_since value for smart devices [\#1144](https://github.com/python-kasa/python-kasa/pull/1144 ) (@sdb9696)
- parse\_pcap\_klap: require source host [\#1137](https://github.com/python-kasa/python-kasa/pull/1137 ) (@rytilahti)
- parse\_pcap\_klap: use request\_uri for matching the response [\#1136](https://github.com/python-kasa/python-kasa/pull/1136 ) (@rytilahti)
**Project maintenance:**
- Cache zoneinfo for smart devices [\#1156](https://github.com/python-kasa/python-kasa/pull/1156 ) (@sdb9696)
- Correctly define SmartModule.call as an async function [\#1148](https://github.com/python-kasa/python-kasa/pull/1148 ) (@sdb9696)
- Remove async magic patch from tests [\#1146](https://github.com/python-kasa/python-kasa/pull/1146 ) (@sdb9696)
- Move feature initialization from \_\_init\_\_ to \_initialize\_features [\#1140](https://github.com/python-kasa/python-kasa/pull/1140 ) (@rytilahti)
2024-10-08 13:59:01 +01:00
Steven B.
9641edcbc0
Make iot time timezone aware ( #1147 )
...
Also makes on_since for iot devices use device time.
Changes the return value for device.timezone to be tzinfo instead of a dict.
2024-10-08 08:16:51 +01:00
Steven B.
2922c3f574
Prepare 0.7.4 ( #1135 )
...
## [0.7.4](https://github.com/python-kasa/python-kasa/tree/0.7.4 ) (2024-09-27)
[Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.7.3...0.7.4 )
**Release summary:**
- KL135 color temp range corrected to 9000k max
- Minor enhancements and project maintenance
**Implemented enhancements:**
- Add factory\_reset\(\) to iotdevice [\#1125](https://github.com/python-kasa/python-kasa/pull/1125 ) (@rytilahti)
- Add reboot\(\) to the device interface [\#1124](https://github.com/python-kasa/python-kasa/pull/1124 ) (@rytilahti)
- Add factory-reset command to cli [\#1108](https://github.com/python-kasa/python-kasa/pull/1108 ) (@rytilahti)
**Fixed bugs:**
- Extend KL135 ct range up to 9000K [\#1123](https://github.com/python-kasa/python-kasa/pull/1123 ) (@rytilahti)
- Fix cli command for device off [\#1121](https://github.com/python-kasa/python-kasa/pull/1121 ) (@sdb9696)
**Project maintenance:**
- Use pytest-socket to ensure no tests are performing io [\#1133](https://github.com/python-kasa/python-kasa/pull/1133 ) (@sdb9696)
- Enable ruff lint pycodestyle warnings [\#1132](https://github.com/python-kasa/python-kasa/pull/1132 ) (@sdb9696)
- Add autouse fixture to patch asyncio.sleep [\#1131](https://github.com/python-kasa/python-kasa/pull/1131 ) (@sdb9696)
- Mock asyncio.sleep for klapprotocol tests [\#1130](https://github.com/python-kasa/python-kasa/pull/1130 ) (@rytilahti)
- Add fixture for T110 fw 1.9.0 [\#1129](https://github.com/python-kasa/python-kasa/pull/1129 ) (@rytilahti)
- Speed up and simplify github workflows [\#1128](https://github.com/python-kasa/python-kasa/pull/1128 ) (@sdb9696)
- Add KS200M\(US\) fw 1.0.12 fixture [\#1127](https://github.com/python-kasa/python-kasa/pull/1127 ) (@GatorEG)
- Add stale PR/Issue github workflow [\#1126](https://github.com/python-kasa/python-kasa/pull/1126 ) (@sdb9696)
- Add fixture for KL135\(US\) fw 1.0.15 [\#1122](https://github.com/python-kasa/python-kasa/pull/1122 ) (@rytilahti)
2024-09-27 18:28:58 +01:00
Steven B.
b4aba36b73
Use pytest-socket to ensure no tests are performing io ( #1133 )
2024-09-27 17:20:25 +01:00
Steven B.
038b6993ca
Speed up and simplify github workflows ( #1128 )
...
- Enable parallel tests in the CI with pytest-xdist
- Migrate to the official `astral-sh/setup-uv` github action
- Call `pre-commit` run as a single job in CI instead of relisting each
check
- Use `uv` version 0.4.16
- Fix bug with pre-commit cache
- Update `publish.yml` to use `astral-sh/setup-uv`
2024-09-27 10:27:53 +01:00
Steven B.
5df6c769b8
Prepare 0.7.3 ( #1116 )
...
## [0.7.3](https://github.com/python-kasa/python-kasa/tree/0.7.3 ) (2024-09-10)
[Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.7.2...0.7.3 )
**Release summary:**
- Migrate from `poetry` to `uv` for package/project management.
- Various minor code improvements
**Project maintenance:**
- Do not regenerate aes key pair [\#1114](https://github.com/python-kasa/python-kasa/pull/1114 ) (@sdb9696)
- Fix tests due to yarl URL str output change [\#1112](https://github.com/python-kasa/python-kasa/pull/1112 ) (@sdb9696)
- Add missing type hints to alarm module [\#1111](https://github.com/python-kasa/python-kasa/pull/1111 ) (@rytilahti)
- Add KH100 EU fixtures [\#1109](https://github.com/python-kasa/python-kasa/pull/1109 ) (@rytilahti)
- Migrate from poetry to uv for dependency and package management [\#986](https://github.com/python-kasa/python-kasa/pull/986 ) (@sdb9696)
2024-09-10 17:55:39 +01:00
Steven B.
a967d5cd3a
Migrate from poetry to uv for dependency and package management ( #986 )
2024-09-06 15:48:43 +01:00