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.
* Keep connection open and lock to prevent duplicate requests
* option to not update children
* tweaks
* typing
* tweaks
* run tests in the same event loop
* memorize model
* Update kasa/protocol.py
Co-authored-by: Teemu R. <tpr@iki.fi>
* Update kasa/protocol.py
Co-authored-by: Teemu R. <tpr@iki.fi>
* Update kasa/protocol.py
Co-authored-by: Teemu R. <tpr@iki.fi>
* Update kasa/protocol.py
Co-authored-by: Teemu R. <tpr@iki.fi>
* dry
* tweaks
* warn when the event loop gets switched out from under us
* raise on unable to connect multiple times
* fix patch target
* tweaks
* isrot
* reconnect test
* prune
* fix mocking
* fix mocking
* fix test under python 3.7
* fix test under python 3.7
* less patching
* isort
* use mocker to patch
* disable on old python since mocking doesnt work
* avoid disconnect/reconnect cycles
* isort
* Fix hue validation
* Fix latitude_i/longitude_i units
Co-authored-by: Teemu R. <tpr@iki.fi>
* Cleanup discovery & add tests
* discovered_devices_raw is not anymore available, as that can be accessed directly from the device objects
* test most of the discovery code paths
* some minor cleanups to test handling
* update discovery docs
* Move category check to be after the definitions
* skip a couple of tests requiring asyncmock not available on py37
* Remove return_raw usage from cli.discover
* Remove bandit from CI, update poetry.lock&pre-commit-config.yaml
* We don't support python 3.6
* poetry install also on tests flow
* remove pytest-azurepipelines
* Avoid temp array during encrypt
* black
* Update kasa/protocol.py
Co-authored-by: Teemu R. <tpr@iki.fi>
* Update kasa/protocol.py
* update decrypt as well
Co-authored-by: Teemu R. <tpr@iki.fi>
* bulb: allow set_hsv without v, add fallback ct range
* add ColorTempRange and HSV named tuples
* add a fallback color temp range if unknown, log a warning
* set_hsv: the value is now optional
* Fix tests, change fallback range to 2700-5000
* test_cli: provide return values to patched objects to avoid warning about non-awaited calls
* test_cli: restore alias after testing
* smartstrip: remove internal update() calls for turn_{on,off}, set_led
* Make sure power is always a float
* Fix discovery tests
* Make tests runnable on real devices
* Add a note about running tests on a real device
* test_strip: run update against the parent device
Some devices are known to fail when trying to query non-supported modules like emeter information.
This commit makes the initial update() only request the sysinfo, followed up by a second query
if emeter is supported by the device.
* Bug Fix
Temperature is not supported on plugs
* Efficiency on support errors
* Update kasa/cli.py
Co-authored-by: Teemu R. <tpr@iki.fi>
Co-authored-by: Teemu R. <tpr@iki.fi>
* Add real kasa KL430(UN) device dump
* Adjust hue&sat max values
* light strips, as bulbs, have only power for emeter
Co-authored-by: Teemu Rytilahti <tpr@iki.fi>
* Add EP10(US) 1.0 1.0.2 fixture
* Add EP10 fixture to conftest PLUGS list.
* Add EP10 to the list of supported plugs in README
* Revert "Add EP10 to the list of supported plugs in README"
This reverts commit e8bf6551c3.
* Prepare 0.4.0.dev3
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!
* add types-click for mypy hook
* use generator expression for sum
* Update cli.py
Fix crash when kasa cli is called with --month or --year arguments.
* Update cli.py
* Fix crash on emeter monthly, yearly cli calls
* Formatting fix.
* 'Interface' parameter added to discovery process
Some systems (for example dd-wrt) requires specifying the network interface name, otherwise the broadcast does not work
* 'Interface' variable type and check fixed
* Formatting fixed
* Update kasa/discover.py
Co-authored-by: Teemu R. <tpr@iki.fi>
Co-authored-by: Teemu R. <tpr@iki.fi>