Tags: 349K/python-kasa
Tags
Release 0.5.0 [Full Changelog](python-kasa/python-kasa@0.4.3...0.5.0) This is the first release of 0.5 series which includes converting the code base towards more modular approach where device-exposed modules (e.g., emeter, antitheft, or schedule) are implemented in their separate python modules to decouple them from the device-specific classes. There should be no API breaking changes, but some previous issues hint that there may be as information from all supported modules are now requested during each update cycle (depending on the device type): * Basic system info * Emeter * Time - properties (like `on_since`) use now time from the device for calculation to avoid jitter caused by different time between the host and the device * Usage statistics - similar interface to emeter, but reports on-time statistics instead of energy consumption (new) * Countdown (new) * Antitheft (new) * Schedule (new) * Motion - for configuring motion settings on some dimmers (new) * Ambientlight - for configuring brightness limits when motion sensor actuates on some dimmers (new) * Cloud - information about cloud connectivity (new) For developers, the new functionalities are currently only exposed through the implementation modules accessible through `modules` property. Pull requests improving the functionality of modules as well as adding better interfaces to device classes are welcome! **Breaking changes:** - Drop deprecated, type-specific options in favor of --type [\python-kasa#336](python-kasa#336) (@rytilahti) - Convert the codebase to be more modular [\python-kasa#299](python-kasa#299) (@rytilahti) **Implemented enhancements:** - Improve HS220 support [\python-kasa#44](python-kasa#44) **Fixed bugs:** - Skip running discovery on --help on subcommands [\python-kasa#122](python-kasa#122) - Avoid retrying open\_connection on unrecoverable errors [\python-kasa#340](python-kasa#340) (@bdraco) - Avoid discovery on --help [\python-kasa#335](python-kasa#335) (@rytilahti) **Documentation updates:** - Trying to poll device every 5 seconds but getting asyncio errors [\python-kasa#316](python-kasa#316) - Docs: Smart Strip - Emeter feature Note [\python-kasa#257](python-kasa#257) - Documentation addition: Smartplug access to internet ntp server pool. [\python-kasa#129](python-kasa#129) - Export modules & make sphinx happy [\python-kasa#334](python-kasa#334) (@rytilahti) - Various documentation updates [\python-kasa#333](python-kasa#333) (@rytilahti) **Closed issues:** - "on since" changes [\python-kasa#295](python-kasa#295) - How to access KP115 runtime data? [\python-kasa#244](python-kasa#244) - How to resolve "Detected protocol reuse between different event loop" warning? [\python-kasa#238](python-kasa#238) - Handle discovery where multiple LAN interfaces exist [\python-kasa#104](python-kasa#104) - Hyper-V \(and probably virtualbox\) break UDP discovery [\python-kasa#101](python-kasa#101) - Trying to get extended lightstrip functionality [\python-kasa#100](python-kasa#100) - Can the HS105 be controlled without internet? [\python-kasa#72](python-kasa#72) **Merged pull requests:** - Add fixtures for kl420 [\python-kasa#339](python-kasa#339) (@bdraco)
Release 0.4.3 This release fixes an issue where the bulb state on led strips was not restored properly when turned back on. [Full Changelog](python-kasa/python-kasa@0.4.2...0.4.3) **Fixed bugs:** - Divide by zero when HS300 powerstrip is discovered [\python-kasa#292](python-kasa#292) - Ensure bulb state is restored when turning back on [\python-kasa#330](python-kasa#330) (@bdraco) **Closed issues:** - KL420L5 controls [\python-kasa#327](python-kasa#327) **Merged pull requests:** - Update pre-commit hooks to fix black in CI [\python-kasa#331](python-kasa#331) (@rytilahti) - Fix test\_deprecated\_type stalling [\python-kasa#325](python-kasa#325) (@bdraco)
Release 0.4.2 This is the last release prior restructuring the code to enable easier extendability by moving towards more modular architecture. The most prominent change in 8000 this release is the support for effects on light strips. [Full Changelog](python-kasa/python-kasa@0.4.1...0.4.2) **Implemented enhancements:** - Allow environment variables for discovery target, device type and debug [\python-kasa#313](python-kasa#313) (@rytilahti) - Add 'internal\_state' to return the results from the last update query [\python-kasa#306](python-kasa#306) (@rytilahti) - Drop microsecond precision for on\_since [\python-kasa#296](python-kasa#296) (@rytilahti) - Add effect support for light strips [\python-kasa#293](python-kasa#293) (@bdraco) **Fixed bugs:** - TypeError: \_\_init\_\_\(\) got an unexpected keyword argument 'package\_name' [\python-kasa#311](python-kasa#311) - RuntimeError: Event loop is closed on WSL [\python-kasa#294](python-kasa#294) - Don't crash on devices not reporting features [\python-kasa#317](python-kasa#317) (@rytilahti) **Closed issues:** - SmartDeviceException: Communication error on system:set\_relay\_state [\python-kasa#309](python-kasa#309) - Add Support: ES20M and KS200M motion/light switches [\python-kasa#308](python-kasa#308) - New problem with installing on Ubuntu 20.04.3 LTS [\python-kasa#305](python-kasa#305) - KeyError: 'emeter' when discovering [\python-kasa#302](python-kasa#302) - RuntimeError: Event loop is closed [\python-kasa#291](python-kasa#291) - provisioning format [\python-kasa#290](python-kasa#290) - Fix CI publishing on pypi [\python-kasa#222](python-kasa#222) - LED strips effects are not supported \(was LEDs is not turning on after switching on\) [\python-kasa#191](python-kasa#191) **Merged pull requests:** - Add pyupgrade to CI runs [\python-kasa#314](python-kasa#314) (@rytilahti) - Depend on asyncclick \>= 8 [\python-kasa#312](python-kasa#312) (@rytilahti) - Guard emeter accesses to avoid keyerrors [\python-kasa#304](python-kasa#304) (@rytilahti) - cli: cleanup discover, fetch update prior device access [\python-kasa#303](python-kasa#303) (@rytilahti) - Fix unsafe \_\_del\_\_ in TPLinkSmartHomeProtocol [\python-kasa#300](python-kasa#300) (@bdraco) - Improve typing for protocol class [\python-kasa#289](python-kasa#289) (@rytilahti) - Added a fixture file for KS220M [\python-kasa#273](python-kasa#273) (@mrbetta)
Release 0.4.1 This minor release fixes issues that were found after homeassistant integration got converted over from pyhs100. [Full Changelog](python-kasa/python-kasa@0.4.0...0.4.1) **Implemented enhancements:** - Add --type option to cli [\python-kasa#269](python-kasa#269) ([rytilahti](https://github.com/rytilahti)) - Minor improvements to onboarding doc [\python-kasa#264](python-kasa#264) ([rytilahti](https://github.com/rytilahti)) - Add fixture file for KL135 [\python-kasa#263](python-kasa#263) ([ErikSGross](https://github.com/ErikSGross)) - Add KL135 color temperature range [\python-kasa#256](python-kasa#256) ([rytilahti](https://github.com/rytilahti)) - Add py.typed to flag that the package is typed [\python-kasa#251](python-kasa#251) ([rytilahti](https://github.com/rytilahti)) - Add script to check supported devices, update README [\python-kasa#242](python-kasa#242) ([rytilahti](https://github.com/rytilahti)) - Add perftest to devtools [\python-kasa#236](python-kasa#236) ([rytilahti](https://github.com/rytilahti)) - Add KP401 US fixture [\python-kasa#234](python-kasa#234) ([bdraco](https://github.com/bdraco)) - Add KL60 US KP105 UK fixture [\python-kasa#233](python-kasa#233) ([bdraco](https://github.com/bdraco)) - Make cli interface more consistent [\python-kasa#232](python-kasa#232) ([rytilahti](https://github.com/rytilahti)) - Add KL400, KL50 fixtures [\python-kasa#231](python-kasa#231) ([bdraco](https://github.com/bdraco)) - Add fixture for newer KP400 firmware [\python-kasa#227](python-kasa#227) ([bdraco](https://github.com/bdraco)) - Switch to poetry-core [\python-kasa#226](python-kasa#226) ([fabaff](https://github.com/fabaff)) - Add fixtures for LB110, KL110, EP40, KL430, KP115 [\python-kasa#224](python-kasa#224) ([bdraco](https://github.com/bdraco)) **Fixed bugs:** - Discovery on WSL results in OSError: \[Errno 22\] Invalid argument [\python-kasa#246](python-kasa#246) - New firmware for HS103 blocking local access? [\python-kasa#42](python-kasa#42) - Pin mistune to \<2.0.0 to fix doc builds [\python-kasa#270](python-kasa#270) ([rytilahti](https://github.com/rytilahti)) - Catch exceptions raised on unknown devices during discovery [\python-kasa#240](python-kasa#240) ([rytilahti](https://github.com/rytilahti)) **Closed issues:** - Control device with alias via python api? [\python-kasa#285](python-kasa#285) - Can't install using pip install python-kasa [\python-kasa#255](python-kasa#255) - Kasa Smart Bulb KL135 - Unknown color temperature range error [\python-kasa#252](python-kasa#252) - KL400 Support [\python-kasa#247](python-kasa#247) - Cloud support? [\python-kasa#245](python-kasa#245) - Support for kp401 [\python-kasa#241](python-kasa#241) - LB130 Bulb stopped working [\python-kasa#237](python-kasa#237) - Unable to constantly query bulb in loop [\python-kasa#225](python-kasa#225) - HS103: Unable to query the device: unpack requires a buffer of 4 bytes [\python-kasa#187](python-kasa#187) - Help request - query value [\python-kasa#171](python-kasa#171) - Can't Discover Devices [\python-kasa#164](python-kasa#164) - Concurrency performance question [\python-kasa#110](python-kasa#110) - Define the port by self? [\python-kasa#108](python-kasa#108) - Convert homeassistant integration to use the library [\python-kasa#9](python-kasa#9) **Merged pull requests:** - Publish to pypi on github release published [\python-kasa#287](python-kasa#287) ([rytilahti](https://github.com/rytilahti)) - Relax asyncclick version requirement [\python-kasa#286](python-kasa#286) ([rytilahti](https://github.com/rytilahti)) - Do not crash on discovery on WSL [\python-kasa#283](python-kasa#283) ([rytilahti](https://github.com/rytilahti)) - Add python 3.10 to CI [\python-kasa#279](python-kasa#279) ([rytilahti](https://github.com/rytilahti)) - Use codecov-action@v2 for CI [\python-kasa#277](python-kasa#277) ([rytilahti](https://github.com/rytilahti)) - Add coverage\[toml\] dependency to fix coverage on CI [\python-kasa#271](python-kasa#271) ([rytilahti](https://github.com/rytilahti)) - Allow publish on test pypi workflow to fail [\python-kasa#248](python-kasa#248) ([rytilahti](https://github.com/rytilahti))
Release 0.4.0 This is the first proper python-kasa release since forking from pyhs100. * Improved I/O handling, including asyncio interface, request merging & connection sharing * API improvements throughout the whole package * Support for LED strips * Improved bulb support (transitions, support for more models) * Onboarding is now possible without a mobile app * Improved documentation * And various other improvements, see the full changelog for details! Thanks to all contributors, from testers, and issue reporters to those who have submitted pull requests! Thanks also to those who donated test devices to help to make this release happen! Special thanks for this release go to @basnijholt (initial asyncio port, push to make this fork happen) and @bdraco (fixing the last release blocker, emeter support for powerstrips). If you are using python-kasa in your projects, we would be happy to hear about it. Feel free to post a note on Github discussions! If it is a project that could be interesting for other users and/or developers, feel also free to create a PR to add a short note to the README file.
Release 0.4.0.dev5 This release introduces re-using the device connection to get rid of (sometimes slow) connection establishment. This is especially useful for emeter-enabled smart strips or any other usecases requiring consecutive I/O requests. [Full Changelog](python-kasa/python-kasa@0.4.0.dev4...0.4.0.dev5) **Merged pull requests:** - Add KL130 fixture, initial lightstrip tests [\python-kasa#214](python-kasa#214) ([rytilahti](https://github.com/rytilahti)) - Keep connection open and lock to prevent duplicate requests [\python-kasa#213](python-kasa#213) ([bdraco](https://github.com/bdraco)) - Cleanup discovery & add tests [\python-kasa#212](python-kasa#212) ([rytilahti](https://github.com/rytilahti))
Release 0.4.0.dev4 The most important enhancements in this release are: * Support for emeter on strip sockets * Fix discovery and update() on some devices that do not support multi-module queries (e.g., HS200) * Improved support for bulbs [Full Changelog](python-kasa/python-kasa@0.4.0.dev3...0.4.0.dev4) **Implemented enhancements:** - HS300 Children plugs have emeter [\python-kasa#64](python-kasa#64) - Improve emeterstatus API, move into own module [\python-kasa#205](python-kasa#205) ([rytilahti](https://github.com/rytilahti)) - Avoid temp array during encrypt and decrypt [\python-kasa#204](python-kasa#204) ([bdraco](https://github.com/bdraco)) - Add emeter support for strip sockets [\python-kasa#203](python-kasa#203) ([bdraco](https://github.com/bdraco)) - Add own device type for smartstrip children [\python-kasa#201](python-kasa#201) ([rytilahti](https://github.com/rytilahti)) - bulb: allow set\_hsv without v, add fallback ct range [\python-kasa#200](python-kasa#200) ([rytilahti](https://github.com/rytilahti)) - Improve bulb support \(alias, time settings\) [\python-kasa#198](python-kasa#198) ([rytilahti](https://github.com/rytilahti)) - Improve testing harness to allow tests on real devices [\python-kasa#197](python-kasa#197) ([rytilahti](https://github.com/rytilahti)) - cli: add human-friendly printout when calling temperature on non-supported devices [\python-kasa#196](python-kasa#196) ([JaydenRA](https://github.com/JaydenRA)) **Fixed bugs:** - KL430: Throw error for Device specific information [\python-kasa#189](python-kasa#189) - dump\_devinfo: handle latitude/longitude keys properly [\python-kasa#175](python-kasa#175) ([rytilahti](https://github.com/rytilahti)) **Closed issues:** - Feature Request - Toggle Command [\python-kasa#188](python-kasa#188) - Is It Compatible With HS105? [\python-kasa#186](python-kasa#186) - Cannot use some functions with KP303 [\python-kasa#181](python-kasa#181) - Help needed - awaiting game [\python-kasa#179](python-kasa#179) - Version inconsistency between CLI and pip [\python-kasa#177](python-kasa#177) - Release 0.4.0.dev3? [\python-kasa#169](python-kasa#169) - Discover does not support specifying network interface [\python-kasa#167](python-kasa#167) - Can't command or query HS200 v5 switch [\python-kasa#161](python-kasa#161) **Merged pull requests:** - More CI fixes [\python-kasa#208](python-kasa#208) ([rytilahti](https://github.com/rytilahti)) - Fix CI dep installation [\python-kasa#207](python-kasa#207) ([rytilahti](https://github.com/rytilahti)) - Use github actions instead of azure pipelines [\python-kasa#206](python-kasa#206) ([rytilahti](https://github.com/rytilahti)) - Add KP115 fixture [\python-kasa#202](python-kasa#202) ([rytilahti](https://github.com/rytilahti)) - Perform initial update only using the sysinfo query [\python-kasa#199](python-kasa#199) ([rytilahti](https://github.com/rytilahti)) - Add real kasa KL430\(UN\) device dump [\python-kasa#192](python-kasa#192) ([iprodanovbg](https://github.com/iprodanovbg)) - Use less strict matcher for kl430 color temperature [\python-kasa#190](python-kasa#190) ([rytilahti](https://github.com/rytilahti)) - Add EP10\(US\) 1.0 1.0.2 fixture [\python-kasa#174](python-kasa#174) ([nbrew](https://github.com/nbrew)) - Add a note about using the discovery target parameter [\python-kasa#168](python-kasa#168) ([leandroreox](https://github.com/leandroreox))
Most notable changes: * Devices initialized by discovery are pre-initialized using the discovery response data, so no need for update() directly after discovery * Only the basic information is requested during discovery, as some HS110 and HS220 devices do not respond to multi-module queries * Fix mac address parsing for KL430 * Add support for KL125 color temperature ranges * Documentation updates!
**Implemented enhancements:** - 'Interface' parameter added to discovery process [\python-kasa#79](python-kasa#79) ([dmitryelj](https://github.com/dmitryelj)) **Fixed bugs:** - Simplify device class detection for discovery, fix hardcoded timeout [\python-kasa#112](python-kasa#112) ([rytilahti](https://github.com/rytilahti)) - Update cli.py to addresss crash on year/month calls and improve output formatting [\python-kasa#103](python-kasa#103) ([BuongiornoTexas](https://github.com/BuongiornoTexas))
Major changes since 0.4.0.dev0: * Support for light strips (KL430) * Support for transitions on dimmers & bulbs * Improved documentation Other things changed in this PR: * Add RELEASING.md for release instructions * Generate changelog using github_changelog_generator * Historical pyhs100 changelog is now in HISTORY.md and gets appended automatically to the end
PreviousNext