python-kasa 0.7.2__tar.gz → 0.7.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (320) hide show
  1. python_kasa-0.7.3/.gitignore +30 -0
  2. {python_kasa-0.7.2 → python_kasa-0.7.3}/CHANGELOG.md +19 -2
  3. {python_kasa-0.7.2 → python_kasa-0.7.3}/PKG-INFO +30 -27
  4. {python_kasa-0.7.2 → python_kasa-0.7.3}/README.md +3 -2
  5. python_kasa-0.7.3/devtools/README.md +128 -0
  6. python_kasa-0.7.3/devtools/__init__.py +1 -0
  7. python_kasa-0.7.3/devtools/bench/benchmark.py +31 -0
  8. python_kasa-0.7.3/devtools/bench/utils/__init__.py +1 -0
  9. python_kasa-0.7.3/devtools/bench/utils/data.py +140 -0
  10. python_kasa-0.7.3/devtools/bench/utils/original.py +48 -0
  11. python_kasa-0.7.3/devtools/create_module_fixtures.py +63 -0
  12. python_kasa-0.7.3/devtools/dump_devinfo.py +696 -0
  13. python_kasa-0.7.3/devtools/generate_supported.py +261 -0
  14. python_kasa-0.7.3/devtools/helpers/__init__.py +1 -0
  15. python_kasa-0.7.3/devtools/helpers/smartrequests.py +420 -0
  16. python_kasa-0.7.3/devtools/parse_pcap.py +101 -0
  17. python_kasa-0.7.3/devtools/parse_pcap_klap.py +350 -0
  18. python_kasa-0.7.3/devtools/perftest.py +94 -0
  19. python_kasa-0.7.3/docs/Makefile +20 -0
  20. python_kasa-0.7.3/docs/make.bat +35 -0
  21. python_kasa-0.7.3/docs/source/SUPPORTED.md +3 -0
  22. python_kasa-0.7.3/docs/source/_static/copybutton.js +65 -0
  23. python_kasa-0.7.3/docs/source/cli.rst +77 -0
  24. python_kasa-0.7.3/docs/source/codeinfo.md +26 -0
  25. python_kasa-0.7.3/docs/source/conf.py +71 -0
  26. python_kasa-0.7.3/docs/source/contribute.md +86 -0
  27. python_kasa-0.7.3/docs/source/deprecated.md +67 -0
  28. python_kasa-0.7.3/docs/source/guides/connect.md +10 -0
  29. python_kasa-0.7.3/docs/source/guides/device.md +10 -0
  30. python_kasa-0.7.3/docs/source/guides/discover.md +11 -0
  31. python_kasa-0.7.3/docs/source/guides/energy.md +27 -0
  32. python_kasa-0.7.3/docs/source/guides/feature.md +10 -0
  33. python_kasa-0.7.3/docs/source/guides/light.md +26 -0
  34. python_kasa-0.7.3/docs/source/guides/module.md +10 -0
  35. python_kasa-0.7.3/docs/source/guides/strip.md +10 -0
  36. python_kasa-0.7.3/docs/source/guides.md +16 -0
  37. python_kasa-0.7.3/docs/source/index.md +12 -0
  38. python_kasa-0.7.3/docs/source/library.md +15 -0
  39. python_kasa-0.7.3/docs/source/reference.md +173 -0
  40. python_kasa-0.7.3/docs/source/smartbulb.rst +79 -0
  41. python_kasa-0.7.3/docs/source/smartdevice.rst +105 -0
  42. python_kasa-0.7.3/docs/source/smartdimmer.rst +18 -0
  43. python_kasa-0.7.3/docs/source/smartlightstrip.rst +17 -0
  44. python_kasa-0.7.3/docs/source/smartplug.rst +18 -0
  45. python_kasa-0.7.3/docs/source/smartstrip.rst +36 -0
  46. python_kasa-0.7.3/docs/source/topics.md +232 -0
  47. python_kasa-0.7.3/docs/source/tutorial.md +11 -0
  48. python_kasa-0.7.3/docs/tutorial.py +95 -0
  49. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/aestransport.py +11 -2
  50. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/deviceconfig.py +11 -2
  51. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/smart/modules/alarm.py +7 -5
  52. python_kasa-0.7.3/kasa/tests/fixtures/smart/KH100(EU)_1.0_1.2.3.json +255 -0
  53. python_kasa-0.7.3/kasa/tests/fixtures/smart/KH100(EU)_1.0_1.5.12.json +429 -0
  54. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/test_aestransport.py +25 -1
  55. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/test_klapprotocol.py +8 -8
  56. {python_kasa-0.7.2 → python_kasa-0.7.3}/pyproject.toml +70 -60
  57. {python_kasa-0.7.2 → python_kasa-0.7.3}/LICENSE +0 -0
  58. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/__init__.py +0 -0
  59. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/cli/__init__.py +0 -0
  60. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/cli/__main__.py +0 -0
  61. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/cli/common.py +0 -0
  62. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/cli/device.py +0 -0
  63. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/cli/discover.py +0 -0
  64. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/cli/feature.py +0 -0
  65. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/cli/lazygroup.py +0 -0
  66. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/cli/light.py +0 -0
  67. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/cli/main.py +0 -0
  68. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/cli/schedule.py +0 -0
  69. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/cli/time.py +0 -0
  70. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/cli/usage.py +0 -0
  71. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/cli/wifi.py +0 -0
  72. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/credentials.py +0 -0
  73. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/device.py +0 -0
  74. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/device_factory.py +0 -0
  75. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/device_type.py +0 -0
  76. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/discover.py +0 -0
  77. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/emeterstatus.py +0 -0
  78. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/exceptions.py +0 -0
  79. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/feature.py +0 -0
  80. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/httpclient.py +0 -0
  81. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/interfaces/__init__.py +0 -0
  82. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/interfaces/energy.py +0 -0
  83. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/interfaces/fan.py +0 -0
  84. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/interfaces/led.py +0 -0
  85. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/interfaces/light.py +0 -0
  86. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/interfaces/lighteffect.py +0 -0
  87. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/interfaces/lightpreset.py +0 -0
  88. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/iot/__init__.py +0 -0
  89. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/iot/effects.py +0 -0
  90. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/iot/iotbulb.py +0 -0
  91. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/iot/iotdevice.py +0 -0
  92. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/iot/iotdimmer.py +0 -0
  93. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/iot/iotlightstrip.py +0 -0
  94. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/iot/iotmodule.py +0 -0
  95. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/iot/iotplug.py +0 -0
  96. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/iot/iotstrip.py +0 -0
  97. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/iot/modules/__init__.py +0 -0
  98. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/iot/modules/ambientlight.py +0 -0
  99. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/iot/modules/antitheft.py +0 -0
  100. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/iot/modules/cloud.py +0 -0
  101. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/iot/modules/countdown.py +0 -0
  102. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/iot/modules/emeter.py +0 -0
  103. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/iot/modules/led.py +0 -0
  104. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/iot/modules/light.py +0 -0
  105. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/iot/modules/lighteffect.py +0 -0
  106. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/iot/modules/lightpreset.py +0 -0
  107. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/iot/modules/motion.py +0 -0
  108. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/iot/modules/rulemodule.py +0 -0
  109. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/iot/modules/schedule.py +0 -0
  110. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/iot/modules/time.py +0 -0
  111. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/iot/modules/usage.py +0 -0
  112. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/iotprotocol.py +0 -0
  113. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/json.py +0 -0
  114. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/klaptransport.py +0 -0
  115. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/module.py +0 -0
  116. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/modulemapping.py +0 -0
  117. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/modulemapping.pyi +0 -0
  118. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/protocol.py +0 -0
  119. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/py.typed +0 -0
  120. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/smart/__init__.py +0 -0
  121. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/smart/effects.py +0 -0
  122. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/smart/modules/__init__.py +0 -0
  123. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/smart/modules/autooff.py +0 -0
  124. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/smart/modules/batterysensor.py +0 -0
  125. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/smart/modules/brightness.py +0 -0
  126. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/smart/modules/childdevice.py +0 -0
  127. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/smart/modules/cloud.py +0 -0
  128. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/smart/modules/color.py +0 -0
  129. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/smart/modules/colortemperature.py +0 -0
  130. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/smart/modules/contactsensor.py +0 -0
  131. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/smart/modules/devicemodule.py +0 -0
  132. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/smart/modules/energy.py +0 -0
  133. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/smart/modules/fan.py +0 -0
  134. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/smart/modules/firmware.py +0 -0
  135. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/smart/modules/frostprotection.py +0 -0
  136. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/smart/modules/humiditysensor.py +0 -0
  137. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/smart/modules/led.py +0 -0
  138. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/smart/modules/light.py +0 -0
  139. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/smart/modules/lighteffect.py +0 -0
  140. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/smart/modules/lightpreset.py +0 -0
  141. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/smart/modules/lightstripeffect.py +0 -0
  142. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/smart/modules/lighttransition.py +0 -0
  143. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/smart/modules/motionsensor.py +0 -0
  144. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/smart/modules/reportmode.py +0 -0
  145. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/smart/modules/temperaturecontrol.py +0 -0
  146. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/smart/modules/temperaturesensor.py +0 -0
  147. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/smart/modules/time.py +0 -0
  148. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/smart/modules/waterleaksensor.py +0 -0
  149. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/smart/smartchilddevice.py +0 -0
  150. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/smart/smartdevice.py +0 -0
  151. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/smart/smartmodule.py +0 -0
  152. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/smartprotocol.py +0 -0
  153. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/__init__.py +0 -0
  154. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/conftest.py +0 -0
  155. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/device_fixtures.py +0 -0
  156. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/discovery_fixtures.py +0 -0
  157. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fakeprotocol_iot.py +0 -0
  158. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fakeprotocol_smart.py +0 -0
  159. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtureinfo.py +0 -0
  160. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/EP10(US)_1.0_1.0.2.json +0 -0
  161. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/EP40(US)_1.0_1.0.2.json +0 -0
  162. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/ES20M(US)_1.0_1.0.8.json +0 -0
  163. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/HS100(UK)_1.0_1.2.6.json +0 -0
  164. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/HS100(UK)_4.1_1.1.0.json +0 -0
  165. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/HS100(US)_1.0_1.2.5.json +0 -0
  166. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/HS100(US)_2.0_1.5.6.json +0 -0
  167. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/HS103(US)_1.0_1.5.7.json +0 -0
  168. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/HS103(US)_2.1_1.1.2.json +0 -0
  169. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/HS103(US)_2.1_1.1.4.json +0 -0
  170. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/HS105(US)_1.0_1.5.6.json +0 -0
  171. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/HS107(US)_1.0_1.0.8.json +0 -0
  172. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/HS110(EU)_1.0_1.2.5.json +0 -0
  173. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/HS110(EU)_4.0_1.0.4.json +0 -0
  174. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/HS110(US)_1.0_1.2.6.json +0 -0
  175. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/HS200(US)_2.0_1.5.7.json +0 -0
  176. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/HS200(US)_5.0_1.0.2.json +0 -0
  177. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/HS210(US)_1.0_1.5.8.json +0 -0
  178. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/HS220(US)_1.0_1.5.7.json +0 -0
  179. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/HS220(US)_2.0_1.0.3.json +0 -0
  180. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/HS300(US)_1.0_1.0.10.json +0 -0
  181. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/HS300(US)_1.0_1.0.21.json +0 -0
  182. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/HS300(US)_2.0_1.0.12.json +0 -0
  183. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/HS300(US)_2.0_1.0.3.json +0 -0
  184. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/KL110(US)_1.0_1.8.11.json +0 -0
  185. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/KL120(US)_1.0_1.8.11.json +0 -0
  186. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/KL120(US)_1.0_1.8.6.json +0 -0
  187. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/KL125(US)_1.20_1.0.5.json +0 -0
  188. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/KL125(US)_2.0_1.0.7.json +0 -0
  189. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/KL125(US)_4.0_1.0.5.json +0 -0
  190. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/KL130(EU)_1.0_1.8.8.json +0 -0
  191. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/KL130(US)_1.0_1.8.11.json +0 -0
  192. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/KL135(US)_1.0_1.0.6.json +0 -0
  193. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/KL400L5(US)_1.0_1.0.5.json +0 -0
  194. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/KL400L5(US)_1.0_1.0.8.json +0 -0
  195. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/KL420L5(US)_1.0_1.0.2.json +0 -0
  196. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/KL430(UN)_2.0_1.0.8.json +0 -0
  197. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/KL430(US)_1.0_1.0.10.json +0 -0
  198. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/KL430(US)_2.0_1.0.11.json +0 -0
  199. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/KL430(US)_2.0_1.0.8.json +0 -0
  200. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/KL430(US)_2.0_1.0.9.json +0 -0
  201. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/KL50(US)_1.0_1.1.13.json +0 -0
  202. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/KL60(UN)_1.0_1.1.4.json +0 -0
  203. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/KL60(US)_1.0_1.1.13.json +0 -0
  204. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/KP100(US)_3.0_1.0.1.json +0 -0
  205. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/KP105(UK)_1.0_1.0.5.json +0 -0
  206. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/KP105(UK)_1.0_1.0.7.json +0 -0
  207. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/KP115(EU)_1.0_1.0.16.json +0 -0
  208. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/KP115(US)_1.0_1.0.17.json +0 -0
  209. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/KP115(US)_1.0_1.0.21.json +0 -0
  210. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/KP125(US)_1.0_1.0.6.json +0 -0
  211. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/KP200(US)_3.0_1.0.3.json +0 -0
  212. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/KP303(UK)_1.0_1.0.3.json +0 -0
  213. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/KP303(US)_2.0_1.0.3.json +0 -0
  214. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/KP400(US)_1.0_1.0.10.json +0 -0
  215. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/KP400(US)_2.0_1.0.6.json +0 -0
  216. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/KP400(US)_3.0_1.0.3.json +0 -0
  217. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/KP400(US)_3.0_1.0.4.json +0 -0
  218. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/KP401(US)_1.0_1.0.0.json +0 -0
  219. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/KP405(US)_1.0_1.0.5.json +0 -0
  220. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/KP405(US)_1.0_1.0.6.json +0 -0
  221. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/KS200M(US)_1.0_1.0.11.json +0 -0
  222. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/KS200M(US)_1.0_1.0.8.json +0 -0
  223. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/KS220M(US)_1.0_1.0.4.json +0 -0
  224. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/KS230(US)_1.0_1.0.14.json +0 -0
  225. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/LB110(US)_1.0_1.8.11.json +0 -0
  226. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/EP25(US)_2.6_1.0.1.json +0 -0
  227. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/EP25(US)_2.6_1.0.2.json +0 -0
  228. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/H100(EU)_1.0_1.2.3.json +0 -0
  229. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/H100(EU)_1.0_1.5.10.json +0 -0
  230. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/H100(EU)_1.0_1.5.5.json +0 -0
  231. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/HS220(US)_3.26_1.0.1.json +0 -0
  232. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/KH100(UK)_1.0_1.5.6.json +0 -0
  233. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/KP125M(US)_1.0_1.1.3.json +0 -0
  234. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/KS205(US)_1.0_1.0.2.json +0 -0
  235. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/KS205(US)_1.0_1.1.0.json +0 -0
  236. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/KS225(US)_1.0_1.0.2.json +0 -0
  237. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/KS225(US)_1.0_1.1.0.json +0 -0
  238. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/KS240(US)_1.0_1.0.4.json +0 -0
  239. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/KS240(US)_1.0_1.0.5.json +0 -0
  240. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/L510B(EU)_3.0_1.0.5.json +0 -0
  241. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/L510E(US)_3.0_1.0.5.json +0 -0
  242. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/L510E(US)_3.0_1.1.2.json +0 -0
  243. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/L530E(EU)_3.0_1.0.6.json +0 -0
  244. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/L530E(EU)_3.0_1.1.0.json +0 -0
  245. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/L530E(EU)_3.0_1.1.6.json +0 -0
  246. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/L530E(US)_2.0_1.1.0.json +0 -0
  247. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/L900-10(EU)_1.0_1.0.17.json +0 -0
  248. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/L900-10(US)_1.0_1.0.11.json +0 -0
  249. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/L900-5(EU)_1.0_1.0.17.json +0 -0
  250. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/L900-5(EU)_1.0_1.1.0.json +0 -0
  251. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/L920-5(EU)_1.0_1.0.7.json +0 -0
  252. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/L920-5(EU)_1.0_1.1.3.json +0 -0
  253. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/L920-5(US)_1.0_1.1.0.json +0 -0
  254. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/L920-5(US)_1.0_1.1.3.json +0 -0
  255. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/L930-5(US)_1.0_1.1.2.json +0 -0
  256. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/P100_1.0.0_1.1.3.json +0 -0
  257. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/P100_1.0.0_1.3.7.json +0 -0
  258. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/P100_1.0.0_1.4.0.json +0 -0
  259. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/P110(EU)_1.0_1.0.7.json +0 -0
  260. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/P110(EU)_1.0_1.2.3.json +0 -0
  261. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/P110(UK)_1.0_1.3.0.json +0 -0
  262. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/P115(EU)_1.0_1.2.3.json +0 -0
  263. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/P125M(US)_1.0_1.1.0.json +0 -0
  264. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/P135(US)_1.0_1.0.5.json +0 -0
  265. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/P300(EU)_1.0_1.0.13.json +0 -0
  266. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/P300(EU)_1.0_1.0.15.json +0 -0
  267. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/P300(EU)_1.0_1.0.7.json +0 -0
  268. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/S500D(US)_1.0_1.0.5.json +0 -0
  269. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/S505(US)_1.0_1.0.2.json +0 -0
  270. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/S505D(US)_1.0_1.1.0.json +0 -0
  271. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/TP15(US)_1.0_1.0.3.json +0 -0
  272. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/TP25(US)_1.0_1.0.2.json +0 -0
  273. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/child/KE100(EU)_1.0_2.4.0.json +0 -0
  274. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/child/KE100(EU)_1.0_2.8.0.json +0 -0
  275. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/child/KE100(UK)_1.0_2.8.0.json +0 -0
  276. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/child/T100(EU)_1.0_1.12.0.json +0 -0
  277. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/child/T110(EU)_1.0_1.8.0.json +0 -0
  278. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/child/T300(EU)_1.0_1.7.0.json +0 -0
  279. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/child/T310(EU)_1.0_1.5.0.json +0 -0
  280. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/fixtures/smart/child/T315(EU)_1.0_1.7.0.json +0 -0
  281. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/smart/__init__.py +0 -0
  282. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/smart/features/__init__.py +0 -0
  283. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/smart/features/test_brightness.py +0 -0
  284. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/smart/features/test_colortemp.py +0 -0
  285. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/smart/modules/__init__.py +0 -0
  286. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/smart/modules/test_autooff.py +0 -0
  287. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/smart/modules/test_contact.py +0 -0
  288. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/smart/modules/test_fan.py +0 -0
  289. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/smart/modules/test_firmware.py +0 -0
  290. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/smart/modules/test_humidity.py +0 -0
  291. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/smart/modules/test_light_effect.py +0 -0
  292. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/smart/modules/test_light_strip_effect.py +0 -0
  293. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/smart/modules/test_lighttransition.py +0 -0
  294. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/smart/modules/test_motionsensor.py +0 -0
  295. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/smart/modules/test_temperature.py +0 -0
  296. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/smart/modules/test_temperaturecontrol.py +0 -0
  297. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/smart/modules/test_waterleak.py +0 -0
  298. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/test_bulb.py +0 -0
  299. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/test_childdevice.py +0 -0
  300. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/test_cli.py +0 -0
  301. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/test_common_modules.py +0 -0
  302. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/test_device.py +0 -0
  303. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/test_device_factory.py +0 -0
  304. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/test_device_type.py +0 -0
  305. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/test_deviceconfig.py +0 -0
  306. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/test_dimmer.py +0 -0
  307. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/test_discovery.py +0 -0
  308. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/test_emeter.py +0 -0
  309. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/test_feature.py +0 -0
  310. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/test_httpclient.py +0 -0
  311. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/test_iotdevice.py +0 -0
  312. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/test_lightstrip.py +0 -0
  313. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/test_plug.py +0 -0
  314. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/test_protocol.py +0 -0
  315. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/test_readme_examples.py +0 -0
  316. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/test_smartdevice.py +0 -0
  317. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/test_smartprotocol.py +0 -0
  318. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/test_strip.py +0 -0
  319. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/tests/test_usage.py +0 -0
  320. {python_kasa-0.7.2 → python_kasa-0.7.3}/kasa/xortransport.py +0 -0
@@ -0,0 +1,30 @@
1
+ # Compiled python modules.
2
+ __pycache__/
3
+ *.pyc
4
+
5
+ # Setuptools distribution folder.
6
+ /dist/
7
+
8
+ # Python egg metadata, regenerated from source files by setuptools.
9
+ /*.egg-info
10
+ /*.egg
11
+
12
+ # Coverage
13
+ .coverage
14
+
15
+ # Tox
16
+ .tox
17
+ .cache
18
+
19
+ # IntelliJ
20
+ .idea
21
+
22
+ # vscode
23
+ .vscode
24
+
25
+ # VirtualEnvs
26
+ venv
27
+ .venv
28
+
29
+ /build
30
+ docs/build
@@ -1,5 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.7.3](https://github.com/python-kasa/python-kasa/tree/0.7.3) (2024-09-10)
4
+
5
+ [Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.7.2...0.7.3)
6
+
7
+ **Release summary:**
8
+
9
+ - Migrate from `poetry` to `uv` for package/project management.
10
+ - Various minor code improvements
11
+
12
+ **Project maintenance:**
13
+
14
+ - Do not regenerate aes key pair [\#1114](https://github.com/python-kasa/python-kasa/pull/1114) (@sdb9696)
15
+ - Fix tests due to yarl URL str output change [\#1112](https://github.com/python-kasa/python-kasa/pull/1112) (@sdb9696)
16
+ - Add missing type hints to alarm module [\#1111](https://github.com/python-kasa/python-kasa/pull/1111) (@rytilahti)
17
+ - Add KH100 EU fixtures [\#1109](https://github.com/python-kasa/python-kasa/pull/1109) (@rytilahti)
18
+ - Migrate from poetry to uv for dependency and package management [\#986](https://github.com/python-kasa/python-kasa/pull/986) (@sdb9696)
19
+
3
20
  ## [0.7.2](https://github.com/python-kasa/python-kasa/tree/0.7.2) (2024-08-30)
4
21
 
5
22
  [Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.7.1...0.7.2)
@@ -27,11 +44,11 @@
27
44
 
28
45
  **Project maintenance:**
29
46
 
47
+ - Remove top level await xdoctest fixture [\#1098](https://github.com/python-kasa/python-kasa/pull/1098) (@sdb9696)
48
+ - Enable python 3.13, allow pre-releases for CI [\#1086](https://github.com/python-kasa/python-kasa/pull/1086) (@rytilahti)
30
49
  - Add flake8-pytest-style \(PT\) for ruff [\#1105](https://github.com/python-kasa/python-kasa/pull/1105) (@rytilahti)
31
50
  - Add flake8-logging \(LOG\) and flake8-logging-format \(G\) for ruff [\#1104](https://github.com/python-kasa/python-kasa/pull/1104) (@rytilahti)
32
51
  - Add missing typing\_extensions dependency [\#1101](https://github.com/python-kasa/python-kasa/pull/1101) (@sdb9696)
33
- - Remove top level await xdoctest fixture [\#1098](https://github.com/python-kasa/python-kasa/pull/1098) (@sdb9696)
34
- - Enable python 3.13, allow pre-releases for CI [\#1086](https://github.com/python-kasa/python-kasa/pull/1086) (@rytilahti)
35
52
 
36
53
  ## [0.7.1](https://github.com/python-kasa/python-kasa/tree/0.7.1) (2024-07-31)
37
54
 
@@ -1,38 +1,41 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: python-kasa
3
- Version: 0.7.2
4
- Summary: Python API for TP-Link Kasa Smarthome devices
5
- Home-page: https://github.com/python-kasa/python-kasa
6
- License: GPL-3.0-or-later
3
+ Version: 0.7.3
4
+ Summary: Python API for TP-Link Kasa and Tapo devices
5
+ Project-URL: Homepage, https://github.com/python-kasa/python-kasa
6
+ Project-URL: Bug Tracker, https://github.com/python-kasa/python-kasa/issues
7
+ Project-URL: Documentation, https://python-kasa.readthedocs.io
8
+ Project-URL: Repository, https://github.com/python-kasa/python-kasa
7
9
  Author: python-kasa developers
8
- Requires-Python: >=3.9,<4.0
10
+ License: GPL-3.0-or-later
11
+ License-File: LICENSE
9
12
  Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
13
+ Classifier: Operating System :: OS Independent
10
14
  Classifier: Programming Language :: Python :: 3
11
15
  Classifier: Programming Language :: Python :: 3.9
12
16
  Classifier: Programming Language :: Python :: 3.10
13
17
  Classifier: Programming Language :: Python :: 3.11
14
18
  Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Requires-Python: <4.0,>=3.9
21
+ Requires-Dist: aiohttp>=3
22
+ Requires-Dist: async-timeout>=3.0.0
23
+ Requires-Dist: asyncclick>=8.1.7
24
+ Requires-Dist: cryptography>=1.9
25
+ Requires-Dist: pydantic>=1.10.15
26
+ Requires-Dist: typing-extensions<5.0,>=4.12.2
15
27
  Provides-Extra: docs
28
+ Requires-Dist: docutils>=0.17; extra == 'docs'
29
+ Requires-Dist: myst-parser; extra == 'docs'
30
+ Requires-Dist: sphinx-rtd-theme~=2.0; extra == 'docs'
31
+ Requires-Dist: sphinxcontrib-programoutput~=0.0; extra == 'docs'
32
+ Requires-Dist: sphinx~=5.0; extra == 'docs'
16
33
  Provides-Extra: shell
34
+ Requires-Dist: ptpython; extra == 'shell'
35
+ Requires-Dist: rich; extra == 'shell'
17
36
  Provides-Extra: speedups
18
- Requires-Dist: aiohttp (>=3)
19
- Requires-Dist: async-timeout (>=3.0.0)
20
- Requires-Dist: asyncclick (>=8.1.7)
21
- Requires-Dist: cryptography (>=1.9)
22
- Requires-Dist: docutils (>=0.17) ; extra == "docs"
23
- Requires-Dist: kasa-crypt (>=0.2.0) ; extra == "speedups"
24
- Requires-Dist: myst-parser ; extra == "docs"
25
- Requires-Dist: orjson (>=3.9.1) ; extra == "speedups"
26
- Requires-Dist: ptpython ; extra == "shell"
27
- Requires-Dist: pydantic (>=1.10.15)
28
- Requires-Dist: rich ; extra == "shell"
29
- Requires-Dist: sphinx (>=5,<6) ; extra == "docs"
30
- Requires-Dist: sphinx_rtd_theme (>=2,<3) ; extra == "docs"
31
- Requires-Dist: sphinxcontrib-programoutput (>=0,<1) ; extra == "docs"
32
- Requires-Dist: typing-extensions (>=4.12.2,<5.0)
33
- Project-URL: Bug Tracker, https://github.com/python-kasa/python-kasa/issues
34
- Project-URL: Documentation, https://python-kasa.readthedocs.io
35
- Project-URL: Repository, https://github.com/python-kasa/python-kasa
37
+ Requires-Dist: kasa-crypt>=0.2.0; extra == 'speedups'
38
+ Requires-Dist: orjson>=3.9.1; extra == 'speedups'
36
39
  Description-Content-Type: text/markdown
37
40
 
38
41
  # python-kasa
@@ -57,11 +60,12 @@ You can install the most recent release using pip:
57
60
  pip install python-kasa
58
61
  ```
59
62
 
60
- Alternatively, you can clone this repository and use poetry to install the development version:
63
+ Alternatively, you can clone this repository and use `uv` to install the development version:
61
64
  ```
62
65
  git clone https://github.com/python-kasa/python-kasa.git
63
66
  cd python-kasa/
64
- poetry install
67
+ uv sync --all-extras
68
+ uv run kasa
65
69
  ```
66
70
 
67
71
  If you have not yet provisioned your device, [you can do so using the cli tool](https://python-kasa.readthedocs.io/en/latest/cli.html#provisioning).
@@ -264,4 +268,3 @@ See [supported devices in our documentation](SUPPORTED.md) for more detailed inf
264
268
  * [plugp100, another tapo library](https://github.com/petretiandrea/plugp100)
265
269
  * [Home Assistant integration](https://github.com/petretiandrea/home-assistant-tapo-p100)
266
270
  * [rust and python implementation for tapo devices](https://github.com/mihai-dinculescu/tapo/)
267
-
@@ -20,11 +20,12 @@ You can install the most recent release using pip:
20
20
  pip install python-kasa
21
21
  ```
22
22
 
23
- Alternatively, you can clone this repository and use poetry to install the development version:
23
+ Alternatively, you can clone this repository and use `uv` to install the development version:
24
24
  ```
25
25
  git clone https://github.com/python-kasa/python-kasa.git
26
26
  cd python-kasa/
27
- poetry install
27
+ uv sync --all-extras
28
+ uv run kasa
28
29
  ```
29
30
 
30
31
  If you have not yet provisioned your device, [you can do so using the cli tool](https://python-kasa.readthedocs.io/en/latest/cli.html#provisioning).
@@ -0,0 +1,128 @@
1
+ # Tools for developers
2
+
3
+ This directory contains some simple scripts that can be useful for developers.
4
+
5
+ ## dump_devinfo
6
+ * Queries the device (if --host is given) or discover devices and creates fixture files that can be added to the test suite.
7
+
8
+ ```shell
9
+ Usage: python -m devtools.dump_devinfo [OPTIONS]
10
+
11
+ Generate devinfo files for devices.
12
+
13
+ Use --host (for a single device) or --target (for a complete network).
14
+
15
+ Options:
16
+ --host TEXT Target host.
17
+ --target TEXT Target network for discovery.
18
+ --username TEXT Username/email address to authenticate to device.
19
+ --password TEXT Password to use to authenticate to device.
20
+ --basedir TEXT Base directory for the git repository
21
+ --autosave Save without prompting
22
+ -d, --debug
23
+ --help Show this message and exit.
24
+ ```
25
+
26
+ ## create_module_fixtures
27
+
28
+ * Queries the device for all supported modules and outputs module-based fixture files for each device.
29
+ * This could be used to create fixture files for module-specific tests, but it might also be useful for other use-cases.
30
+
31
+ ```shell
32
+ Usage: create_module_fixtures.py [OPTIONS] OUTPUTDIR
33
+
34
+ Create module fixtures for given host/network.
35
+
36
+ Arguments:
37
+ OUTPUTDIR [required]
38
+
39
+ Options:
40
+ --host TEXT
41
+ --network TEXT
42
+ --install-completion Install completion for the current shell.
43
+ --show-completion Show completion for the current shell, to copy it or
44
+ customize the installation.
45
+ --help Show this message and exit.
46
+ ```
47
+
48
+ ## parse_pcap
49
+
50
+ * Requires dpkt (pip install dpkt)
51
+ * Reads a pcap file and prints out the device communications
52
+
53
+ ```shell
54
+ Usage: parse_pcap.py [OPTIONS] FILE
55
+
56
+ Parse pcap file and pretty print the communications and some statistics.
57
+
58
+ Options:
59
+ --help Show this message and exit.
60
+ ```
61
+
62
+ ## perftest
63
+
64
+ * Runs several rounds of update cycles for the given list of addresses, and prints out statistics about the performance
65
+
66
+ ```shell
67
+ Usage: perf_test.py [OPTIONS] [ADDRS]...
68
+
69
+ Options:
70
+ --rounds INTEGER
71
+ --help Show this message and exit.
72
+ ```
73
+
74
+ ```shell
75
+ $ python perf_test.py 192.168.xx.x 192.168.xx.y 192.168.xx.z 192.168.xx.f
76
+ Running 5 rounds on ('192.168.xx.x', '192.168.xx.y', '192.168.xx.z', '192.168.xx.f')
77
+ === Testing using gather on all devices ===
78
+ took
79
+ count mean std min 25% 50% 75% max
80
+ type
81
+ concurrently 5.0 0.097161 0.045544 0.05260 0.055332 0.088811 0.143082 0.145981
82
+ sequential 5.0 0.150506 0.005798 0.14162 0.149065 0.150499 0.155579 0.155768
83
+ === Testing per-device performance ===
84
+ took
85
+ count mean std min 25% 50% 75% max
86
+ id
87
+ <id>-HS110(EU) 5.0 0.044917 0.014984 0.035836 0.037728 0.037950 0.041610 0.071458
88
+ <id>-KL130(EU) 5.0 0.067626 0.032027 0.046451 0.046797 0.048406 0.076136 0.120342
89
+ <id>-HS110(EU) 5.0 0.055700 0.016174 0.042086 0.045578 0.048905 0.059869 0.082064
90
+ <id>-KP303(UK) 5.0 0.010298 0.003765 0.007773 0.007968 0.008546 0.010439 0.016763
91
+ ```
92
+
93
+ ## benchmark
94
+
95
+ * Benchmark the protocol
96
+
97
+ ```shell
98
+ % python3 devtools/bench/benchmark.py
99
+ New parser, parsing 100000 messages took 0.6339647499989951 seconds
100
+ Old parser, parsing 100000 messages took 9.473990250000497 seconds
101
+ ```
102
+
103
+
104
+ ## parse_pcap_klap
105
+
106
+ * A tool to allow KLAP data to be exported, in JSON, from a PCAP file of encrypted requests.
107
+
108
+ * NOTE: must install pyshark (`pip install pyshark`).
109
+ * pyshark requires Wireshark or tshark to be installed on windows and tshark to be installed
110
+ on linux (`apt get tshark`)
111
+
112
+ ```shell
113
+ Usage: parse_pcap_klap.py [OPTIONS]
114
+
115
+ Export KLAP data in JSON format from a PCAP file.
116
+
117
+ Options:
118
+ --host TEXT the IP of the smart device as it appears in the pcap
119
+ file. [required]
120
+ --username TEXT Username/email address to authenticate to device.
121
+ [required]
122
+ --password TEXT Password to use to authenticate to device.
123
+ [required]
124
+ --pcap-file-path TEXT The path to the pcap file to parse. [required]
125
+ -o, --output TEXT The name of the output file, relative to the current
126
+ directory.
127
+ --help Show this message and exit.
128
+ ```
@@ -0,0 +1 @@
1
+ """Devtools package."""
@@ -0,0 +1,31 @@
1
+ """Benchmark the new parser against the old parser."""
2
+
3
+ import json
4
+ import timeit
5
+
6
+ import orjson
7
+ from kasa_crypt import decrypt, encrypt
8
+
9
+ from devtools.bench.utils.data import REQUEST, WIRE_RESPONSE
10
+ from devtools.bench.utils.original import OriginalTPLinkSmartHomeProtocol
11
+
12
+
13
+ def original_request_response() -> None:
14
+ """Benchmark the original parser."""
15
+ OriginalTPLinkSmartHomeProtocol.encrypt(json.dumps(REQUEST))
16
+ json.loads(OriginalTPLinkSmartHomeProtocol.decrypt(WIRE_RESPONSE[4:]))
17
+
18
+
19
+ def new_request_response() -> None:
20
+ """Benchmark the new parser."""
21
+ encrypt(orjson.dumps(REQUEST).decode())
22
+ orjson.loads(decrypt(WIRE_RESPONSE[4:]))
23
+
24
+
25
+ count = 100000
26
+
27
+ time = timeit.Timer(new_request_response).timeit(count)
28
+ print(f"New parser, parsing {count} messages took {time} seconds")
29
+
30
+ time = timeit.Timer(original_request_response).timeit(count)
31
+ print(f"Old parser, parsing {count} messages took {time} seconds")
@@ -0,0 +1 @@
1
+ """Benchmark utils."""
@@ -0,0 +1,140 @@
1
+ """Test data for benchmarks."""
2
+
3
+ import json
4
+
5
+ from .original import OriginalTPLinkSmartHomeProtocol
6
+
7
+ REQUEST = {
8
+ "system": {"get_sysinfo": None},
9
+ "anti_theft": {"get_rules": None, "get_next_action": None},
10
+ "schedule": {
11
+ "get_rules": None,
12
+ "get_next_action": None,
13
+ "get_realtime": None,
14
+ "get_daystat": {"year": 2023, "month": 6},
15
+ "get_monthstat": {"year": 2023},
16
+ },
17
+ "time": {"get_time": None, "get_timezone": None},
18
+ "emeter": {
19
+ "get_realtime": None,
20
+ "get_daystat": {"year": 2023, "month": 6},
21
+ "get_monthstat": {"year": 2023},
22
+ },
23
+ }
24
+ RESPONSE = {
25
+ "anti_theft": {
26
+ "get_next_action": {"err_code": -2, "err_msg": "member not support"},
27
+ "get_rules": {"enable": 0, "err_code": 0, "rule_list": [], "version": 2},
28
+ },
29
+ "emeter": {
30
+ "get_daystat": {
31
+ "day_list": [{"day": 30, "energy_wh": 0, "month": 6, "year": 2023}],
32
+ "err_code": 0,
33
+ },
34
+ "get_monthstat": {
35
+ "err_code": 0,
36
+ "month_list": [{"energy_wh": 0, "month": 6, "year": 2023}],
37
+ },
38
+ "get_realtime": {
39
+ "current_ma": 0,
40
+ "err_code": 0,
41
+ "power_mw": 0,
42
+ "slot_id": 0,
43
+ "total_wh": 0,
44
+ "voltage_mv": 119390,
45
+ },
46
+ },
47
+ "schedule": {
48
+ "get_daystat": {
49
+ "day_list": [{"day": 30, "month": 6, "time": 3, "year": 2023}],
50
+ "err_code": 0,
51
+ },
52
+ "get_monthstat": {
53
+ "err_code": 0,
54
+ "month_list": [{"month": 6, "time": 3, "year": 2023}],
55
+ },
56
+ "get_next_action": {"err_code": 0, "type": -1},
57
+ "get_realtime": {"err_code": -2, "err_msg": "member not support"},
58
+ "get_rules": {"enable": 1, "err_code": 0, "rule_list": [], "version": 2},
59
+ },
60
+ "system": {
61
+ "get_sysinfo": {
62
+ "alias": "TP-LINK_Power Strip_5C33",
63
+ "child_num": 6,
64
+ "children": [
65
+ {
66
+ "alias": "Plug 1",
67
+ "id": "8006AF35494E7DB13DDE9B8F40BF2E001E77031900",
68
+ "next_action": {"type": -1},
69
+ "on_time": 231,
70
+ "state": 1,
71
+ },
72
+ {
73
+ "alias": "Plug 2",
74
+ "id": "8006AF35494E7DB13DDE9B8F40BF2E001E77031901",
75
+ "next_action": {"type": -1},
76
+ "on_time": 231,
77
+ "state": 1,
78
+ },
79
+ {
80
+ "alias": "Plug 3",
81
+ "id": "8006AF35494E7DB13DDE9B8F40BF2E001E77031902",
82
+ "next_action": {"type": -1},
83
+ "on_time": 231,
84
+ "state": 1,
85
+ },
86
+ {
87
+ "alias": "Plug 4",
88
+ "id": "8006AF35494E7DB13DDE9B8F40BF2E001E77031903",
89
+ "next_action": {"type": -1},
90
+ "on_time": 231,
91
+ "state": 1,
92
+ },
93
+ {
94
+ "alias": "Plug 5",
95
+ "id": "8006AF35494E7DB13DDE9B8F40BF2E001E77031904",
96
+ "next_action": {"type": -1},
97
+ "on_time": 231,
98
+ "state": 1,
99
+ },
100
+ {
101
+ "alias": "Plug 6",
102
+ "id": "8006AF35494E7DB13DDE9B8F40BF2E001E77031905",
103
+ "next_action": {"type": -1},
104
+ "on_time": 231,
105
+ "state": 1,
106
+ },
107
+ ],
108
+ "deviceId": "8006AF35494E7DB13DDE9B8F40BF2E001E770319",
109
+ "err_code": 0,
110
+ "feature": "TIM:ENE",
111
+ "hwId": "955F433CBA24823A248A59AA64571A73",
112
+ "hw_ver": "2.0",
113
+ "latitude_i": 297852,
114
+ "led_off": 0,
115
+ "longitude_i": -954074,
116
+ "mac": "C0:06:C3:42:5C:33",
117
+ "mic_type": "IOT.SMARTPLUGSWITCH",
118
+ "model": "HS300(US)",
119
+ "oemId": "32BD0B21AA9BF8E84737D1DB1C66E883",
120
+ "rssi": -41,
121
+ "status": "new",
122
+ "sw_ver": "1.0.3 Build 201203 Rel.165457",
123
+ "updating": 0,
124
+ }
125
+ },
126
+ "time": {
127
+ "get_time": {
128
+ "err_code": 0,
129
+ "hour": 9,
130
+ "mday": 30,
131
+ "min": 32,
132
+ "month": 6,
133
+ "sec": 54,
134
+ "year": 2023,
135
+ },
136
+ "get_timezone": {"err_code": 0, "index": 13},
137
+ },
138
+ }
139
+
140
+ WIRE_RESPONSE = OriginalTPLinkSmartHomeProtocol.encrypt(json.dumps(RESPONSE))
@@ -0,0 +1,48 @@
1
+ """Original implementation of the TP-Link Smart Home protocol."""
2
+
3
+ import struct
4
+ from typing import Generator
5
+
6
+
7
+ class OriginalTPLinkSmartHomeProtocol:
8
+ """Original implementation of the TP-Link Smart Home protocol."""
9
+
10
+ INITIALIZATION_VECTOR = 171
11
+
12
+ @staticmethod
13
+ def _xor_payload(unencrypted: bytes) -> Generator[int, None, None]:
14
+ key = OriginalTPLinkSmartHomeProtocol.INITIALIZATION_VECTOR
15
+ for unencryptedbyte in unencrypted:
16
+ key = key ^ unencryptedbyte
17
+ yield key
18
+
19
+ @staticmethod
20
+ def encrypt(request: str) -> bytes:
21
+ """Encrypt a request for a TP-Link Smart Home Device.
22
+
23
+ :param request: plaintext request data
24
+ :return: ciphertext to be send over wire, in bytes
25
+ """
26
+ plainbytes = request.encode()
27
+ return struct.pack(">I", len(plainbytes)) + bytes(
28
+ OriginalTPLinkSmartHomeProtocol._xor_payload(plainbytes)
29
+ )
30
+
31
+ @staticmethod
32
+ def _xor_encrypted_payload(ciphertext: bytes) -> Generator[int, None, None]:
33
+ key = OriginalTPLinkSmartHomeProtocol.INITIALIZATION_VECTOR
34
+ for cipherbyte in ciphertext:
35
+ plainbyte = key ^ cipherbyte
36
+ key = cipherbyte
37
+ yield plainbyte
38
+
39
+ @staticmethod
40
+ def decrypt(ciphertext: bytes) -> str:
41
+ """Decrypt a response of a TP-Link Smart Home Device.
42
+
43
+ :param ciphertext: encrypted response data
44
+ :return: plaintext response
45
+ """
46
+ return bytes(
47
+ OriginalTPLinkSmartHomeProtocol._xor_encrypted_payload(ciphertext)
48
+ ).decode()
@@ -0,0 +1,63 @@
1
+ """Create fixture files for modules supported by a device.
2
+
3
+ This script can be used to create fixture files for individual modules.
4
+ """
5
+
6
+ import asyncio
7
+ import json
8
+ from pathlib import Path
9
+ from typing import cast
10
+
11
+ import typer
12
+
13
+ from kasa import Discover
14
+ from kasa.iot import IotDevice
15
+
16
+ app = typer.Typer()
17
+
18
+
19
+ def create_fixtures(dev: IotDevice, outputdir: Path):
20
+ """Iterate over supported modules and create version-specific fixture files."""
21
+ for name, module in dev.modules.items():
22
+ module_dir = outputdir / str(name)
23
+ if not module_dir.exists():
24
+ module_dir.mkdir(exist_ok=True, parents=True)
25
+
26
+ sw_version = dev.hw_info["sw_ver"]
27
+ sw_version = sw_version.split(" ", maxsplit=1)[0]
28
+ filename = f"{dev.model}_{dev.hw_info['hw_ver']}_{sw_version}.json"
29
+ module_file = module_dir / filename
30
+
31
+ if module_file.exists():
32
+ continue
33
+
34
+ typer.echo(f"Creating {module_file} for {dev.model}")
35
+ with module_file.open("w") as f:
36
+ json.dump(module.data, f, indent=4)
37
+
38
+
39
+ @app.command()
40
+ def create_module_fixtures(
41
+ outputdir: Path,
42
+ host: str = typer.Option(default=None),
43
+ network: str = typer.Option(default=None),
44
+ ):
45
+ """Create module fixtures for given host/network."""
46
+ devs = []
47
+ if host is not None:
48
+ dev: IotDevice = cast(IotDevice, asyncio.run(Discover.discover_single(host)))
49
+ devs.append(dev)
50
+ else:
51
+ if network is None:
52
+ network = "255.255.255.255"
53
+ devs = asyncio.run(Discover.discover(target=network)).values()
54
+ for dev in devs:
55
+ dev = cast(IotDevice, dev)
56
+ asyncio.run(dev.update())
57
+
58
+ for dev in devs:
59
+ create_fixtures(dev, outputdir)
60
+
61
+
62
+ if __name__ == "__main__":
63
+ app()