Python Kasa Versions Save

🏠🤖 Python API for TP-Link Kasa Smarthome products

0.7.0.dev1

1 week ago

Second dev release.

Full Changelog

Implemented enhancements:

  • Fix set_state for common light modules #929 (@sdb9696)
  • Add state feature for iot devices #924 (@rytilahti)

0.7.0.dev0

1 week ago

First dev release for 0.7.0: add module support for SMART devices, support for introspectable device features and refactoring the library

Full Changelog

Breaking changes:

  • Move SmartBulb into SmartDevice #874 (@sdb9696)
  • Change state_information to return feature values #804 (@rytilahti)
  • Remove SmartPlug in favor of SmartDevice #781 (@rytilahti)
  • Add generic interface for accessing device features #741 (@rytilahti)
  • Rename and deprecate exception classes #739 (@sdb9696)

Implemented enhancements:

  • Radiator support (KE100) #422
  • Add post update hook to module and use in smart LightEffect #921 (@sdb9696)
  • Add LightEffect module for smart light strips #918 (@sdb9696)
  • Improve categorization of features #904 (@rytilahti)
  • Create common interfaces for remaining device types #895 (@sdb9696)
  • Make get_module return typed module #892 (@sdb9696)
  • Add LightEffectModule for dynamic light effects on SMART bulbs #887 (@sdb9696)
  • Implement choice feature type #880 (@rytilahti)
  • Add support for contact sensor (T110) #877 (@rytilahti)
  • Add support for waterleak sensor (T300) #876 (@rytilahti)
  • Add Fan interface for SMART devices #873 (@sdb9696)
  • Improve temperature controls #872 (@rytilahti)
  • Add precision_hint to feature #871 (@rytilahti)
  • Be more lax on unknown SMART devices #863 (@rytilahti)
  • Handle paging of partial responses of lists like child_device_info #862 (@sdb9696)
  • Better firmware module support for devices not connected to the internet #854 (@sdb9696)
  • Re-query missing responses after multi request errors #850 (@sdb9696)
  • Implement action feature #849 (@rytilahti)
  • Add temperature control module for smart #848 (@rytilahti)
  • Add support for KH100 hub #847 (@Adriandorr)
  • Implement feature categories #846 (@rytilahti)
  • Expose IOT emeter info as features #844 (@rytilahti)
  • Add support for feature units #843 (@rytilahti)
  • Add ColorModule for smart devices #840 (@sdb9696)
  • Support for new ks240 fan/light wall switch #839 (@sdb9696)
  • Add colortemp feature for iot devices #827 (@rytilahti)
  • Add support for firmware module v1 #821 (@sdb9696)
  • Add colortemp module #814 (@rytilahti)
  • Revise device initialization and subsequent updates #807 (@rytilahti)
  • Add brightness module #806 (@rytilahti)
  • Support multiple child requests #795 (@sdb9696)
  • Support for on_off_gradually v2+ #793 (@rytilahti)
  • Improve smartdevice update module #791 (@rytilahti)
  • Add --child option to feature command #789 (@rytilahti)
  • Add temperature_unit feature to t315 #788 (@rytilahti)
  • Add feature for ambient light sensor #787 (@shifty35)
  • Add initial support for H100 and T315 #776 (@rytilahti)
  • Generalize smartdevice child support #775 (@rytilahti)
  • Raise CLI errors in debug mode #771 (@sdb9696)
  • Add cloud module for smartdevice #767 (@rytilahti)
  • Add firmware module for smartdevice #766 (@rytilahti)
  • Add fan module #764 (@rytilahti)
  • Add smartdevice module for led controls #761 (@rytilahti)
  • Auto auto-off module for smartdevice #760 (@rytilahti)
  • Add smartdevice module for smooth transitions #759 (@rytilahti)
  • Initial implementation for modularized smartdevice #757 (@rytilahti)
  • Let caller handle SMART errors on multi-requests #754 (@sdb9696)
  • Add 'shell' command to cli #738 (@rytilahti)

Fixed bugs:

  • Fix --help on subcommands #885
  • "Unclosed client session" Trying to set brightness on Tapo Bulb #828
  • TAPO P100 (hw 1.0.0, sw 1.1.3) EU plug with 0.6.2.1 Kasa results JSON_DECODE_FAIL_ERROR #819
  • Cannot add Tapo Plug P110 to Home Assistant 2024.2.3 - Error in debug mode #797
  • KS240 gets discovered but will not authenticate #749
  • Individual errors cause failing the whole query #616
  • Add 'battery_percentage' only when it's available #906 (@rytilahti)
  • Add missing alarm volume 'normal' #899 (@rytilahti)
  • Use Path.save for saving the fixtures #894 (@rytilahti)
  • Fix --help on subcommands #886 (@rytilahti)
  • Improve feature setter robustness #870 (@rytilahti)
  • smartbulb: Limit brightness range to 1-100 #829 (@rytilahti)
  • Fix energy module calling get_current_power #798 (@sdb9696)
  • Fix auto update switch #786 (@rytilahti)
  • Retry query on 403 after successful handshake #785 (@sdb9696)
  • Ensure connections are closed when cli is finished #752 (@sdb9696)
  • Fix for P100 on fw 1.1.3 login_version none #751 (@sdb9696)
  • Pass timeout parameters to discover_single #744 (@sdb9696)
  • Reduce AuthenticationExceptions raising from transports #740 (@sdb9696)
  • Do not crash cli on missing discovery info #735 (@rytilahti)
  • Fix port-override for aes&klap transports #734 (@rytilahti)

Documentation updates:

  • Add tutorial doctest module and enable top level await #919 (@sdb9696)
  • Add warning about tapo watchdog #902 (@rytilahti)
  • Move contribution instructions into docs #901 (@rytilahti)
  • Add rust tapo link to README #857 (@rytilahti)
  • Enable shell extra for installing ptpython and rich #782 (@sdb9696)
  • Add WallSwitch device type and autogenerate supported devices docs #758 (@sdb9696)

Closed issues:

  • Support for T300 and T110 #875
  • Allow exposing extra feature metadata #842
  • Handle modules supported only by children #825
  • Handle child-embedded module data #824
  • TP-Kasa Ks240 smart Switch DOES NOT WORK #823
  • child device component_nego and module queries for dump_devinfo #813
  • Klap protocol needs to retry after 403 error #784
  • Add units to features and convert emeter to use features #772
  • __init__() missing 1 required positional argument: 'backend' #770
  • Be more lax on unknown SMART* devices #768
  • Combine smart{plug,light} into smartdevice #747
  • TP-Link P100 Plug support #742
  • Clean up newfakes #723
  • Discovery does not list all discovered_devices if it times out before it can print them. #672
  • Modularize tapodevice #651
  • Add retry logic to legacy protocol for connection and OSErrors. #648
  • Add timestamp to default logger and remove from log.debug messages #647
  • Need to create common interfaces for legacy and new devices #613
  • Kasa discovery crashes on Windows 10 with Python 3.11.2 #449

Merged pull requests:

  • Fix potential infinite loop if incomplete lists returned #920 (@sdb9696)
  • Deprecate device level light, effect and led attributes #916 (@sdb9696)
  • Update cli to use common modules and remove iot specific cli testing #913 (@sdb9696)
  • Deprecate is_something attributes #912 (@sdb9696)
  • Make Light and Fan a common module interface #911 (@sdb9696)
  • Rename bulb interface to light and move fan and light interface to interfaces #910 (@sdb9696)
  • Make module names consistent and remove redundant module casting #909 (@sdb9696)
  • Add light presets common module to devices. #907 (@sdb9696)
  • Add H100 1.5.10 and KE100 2.4.0 fixtures #905 (@rytilahti)
  • Add child devices from hubs to generated list of supported devices #898 (@sdb9696)
  • Add fixture for waterleak sensor T300 #897 (@rytilahti)
  • Update interfaces so they all inherit from Device #893 (@sdb9696)
  • Fix wifi scan re-querying error #891 (@sdb9696)
  • Update ks240 fixture with child device query info #890 (@sdb9696)
  • Fix smartprotocol response list handler to handle null reponses #884 (@sdb9696)
  • Use pydantic.v1 namespace on all pydantic versions #883 (@rytilahti)
  • Update dump_devinfo to print original exception stack on errors. #882 (@sdb9696)
  • Put modules back on children for wall switches #881 (@sdb9696)
  • Fix pypy39 CI cache on macos #868 (@sdb9696)
  • Do not try coverage upload for pypy #867 (@sdb9696)
  • Add runner.arch to cache-key in CI #866 (@sdb9696)
  • Fix broken CI due to missing python version on macos-latest #864 (@sdb9696)
  • Fix incorrect state updates in FakeTestProtocols #861 (@sdb9696)
  • Embed FeatureType inside Feature #860 (@rytilahti)
  • Include component_nego with child fixtures #858 (@sdb9696)
  • Use brightness module for smartbulb #853 (@rytilahti)
  • Ignore system environment variables for tests #851 (@rytilahti)
  • Remove mock fixtures #845 (@rytilahti)
  • Enable and convert to future annotations #838 (@sdb9696)
  • Update poetry locks and pre-commit hooks #837 (@sdb9696)
  • Cache pipx in CI and add custom setup action #835 (@sdb9696)
  • Fix non python 3.8 compliant test #832 (@sdb9696)
  • Fix CI issue with python version used by pipx to install poetry #831 (@sdb9696)
  • Refactor split smartdevice tests to test_{iot,smart}device #822 (@rytilahti)
  • Add P100 fw 1.4.0 fixture #820 (@sdb9696)
  • Add pre-commit caching and fix poetry extras cache #817 (@sdb9696)
  • Fix slow aestransport and cli tests #816 (@sdb9696)
  • Do not run coverage on pypy and cache poetry envs #812 (@sdb9696)
  • Update test framework for dynamic parametrization #810 (@sdb9696)
  • Put child fixtures in subfolder #809 (@sdb9696)
  • Add iot brightness feature #808 (@sdb9696)
  • Simplify device __repr__ #805 (@rytilahti)
  • Add T315 fixture, tests for humidity&temperature modules #802 (@rytilahti)
  • Add fixture for P110 sw 1.0.7 #801 (@rytilahti)
  • Do not fail fast on pypy CI jobs #799 (@sdb9696)
  • Update dump_devinfo to collect child device info #796 (@sdb9696)
  • Refactor test framework #794 (@sdb9696)
  • Add updated l530 fixture 1.1.6 #792 (@rytilahti)
  • Add missing firmware module import #774 (@rytilahti)
  • Fix dump_devinfo scrubbing for ks240 #765 (@rytilahti)
  • Fix devtools for P100 and add fixture #753 (@sdb9696)
  • Add H100 fixtures #737 (@rytilahti)
  • Refactor devices into subpackages and deprecate old names #716 (@sdb9696)
  • Fix discovery cli to print devices not printed during discovery timeout #670 (@sdb9696)

0.6.2.1

3 months ago

Quick fix to avoid a crash on child device property accesses that require component negotiation.

0.6.2.1 (2024-02-02)

Full Changelog

Fixed bugs:

  • Avoid crashing on childdevice property accesses #732 (@rytilahti)

Merged pull requests:

  • Retain last two chars for children device_id #733 (@rytilahti)
  • Add TP15 fixture #730 (@bdraco)
  • Add TP25 fixtures #729 (@bdraco)
  • Various test code cleanups #725 (@rytilahti)
  • Unignore F401 for tests #724 (@rytilahti)

0.6.2

4 months ago

Full Changelog

Release highlights:

  • Support for tapo power strips (P300)
  • Performance improvements and bug fixes

Implemented enhancements:

  • Implement alias set for tapodevice #721 (@rytilahti)
  • Initial support for tapos with child devices #720 (@rytilahti)
  • Avoid rebuilding urls for every request #715 (@bdraco)
  • Reduce the number of times creating the cipher in klap #712 (@bdraco)
  • Use hashlib for klap #711 (@bdraco)
  • Enable batching of multiple requests #662 (@sdb9696)

Merged pull requests:

  • Update L510E(US) fixture with mac prefix #722 (@sdb9696)
  • Add P300 fixture #717 (@rytilahti)
  • Use hashlib in place of hashes.Hash #714 (@bdraco)
  • Switch from TPLinkSmartHomeProtocol to IotProtocol/XorTransport #710 (@sdb9696)
  • Add concrete XorTransport class with full implementation #646 (@sdb9696)

0.6.1

4 months ago

Full Changelog

Release highlights:

  • Support for tapo wall switches
  • Support for unprovisioned devices
  • Performance and stability improvements

Implemented enhancements:

  • Add support for tapo wall switches (S500D) #704 (@bdraco)
  • Add new cli command 'command' to execute arbitrary commands #692 (@rytilahti)
  • Allow raw-command and wifi without update #688 (@rytilahti)
  • Generate AES KeyPair lazily #687 (@sdb9696)
  • Add reboot and factory_reset to tapodevice #686 (@rytilahti)
  • Try default tapo credentials for klap and aes #685 (@sdb9696)
  • Sleep between discovery packets #656 (@sdb9696)

Fixed bugs:

  • Do not crash on missing geolocation #701 (@rytilahti)
  • Fix P100 error getting conn closed when trying default login after login failure #690 (@sdb9696)

Documentation updates:

  • Add protocol and transport documentation #663 (@sdb9696)
  • Document authenticated provisioning #634 (@rytilahti)

Closed issues:

  • Consider handshake as still valid on ServerDisconnectedError #676
  • AES Transport creates the key even if the device is offline #675
  • how to provision new Tapo plug devices? #565
  • Space out discovery requests #229

Merged pull requests:

  • Add additional L900-10 fixture #707 (@bdraco)
  • Replace rich formatting stripper #706 (@bdraco)
  • Add support for the S500 #705 (@bdraco)
  • Fix overly greedy _strip_rich_formatting #703 (@bdraco)
  • Ensure login token is only sent if aes state is ESTABLISHED #702 (@bdraco)
  • Update readme fixture checker and readme #699 (@rytilahti)
  • Fix test_klapprotocol test duration #698 (@sdb9696)
  • Renew the handshake session 20 minutes before we think it will expire #697 (@bdraco)
  • Add --batch-size hint to timeout errors in dump_devinfo #696 (@sdb9696)
  • Add L930-5 fixture #694 (@bdraco)
  • Add fixtures for L510E #693 (@bdraco)
  • Refactor aestransport to use a state enum #691 (@bdraco)
  • Update transport close/reset behaviour #689 (@sdb9696)
  • Check README for supported models #684 (@rytilahti)
  • Add P100 test fixture #683 (@bdraco)
  • Make dump_devinfo request batch size configurable #681 (@sdb9696)
  • Add updated L920 fixture #680 (@bdraco)
  • Update fixtures from test devices #679 (@bdraco)
  • Show discovery data for state with verbose #678 (@rytilahti)
  • Add L530E(US) fixture #674 (@bdraco)
  • Add P135 fixture #673 (@bdraco)
  • Rename base TPLinkProtocol to BaseProtocol #669 (@sdb9696)
  • Add 1003 (TRANSPORT_UNKNOWN_CREDENTIALS_ERROR) #667 (@rytilahti)

0.6.0.1

4 months ago

0.6.0.1 (2024-01-21)

Full Changelog

A patch release to improve the protocol handling.

Fixed bugs:

  • Fix httpclient exceptions on read and improve error info #655 (@sdb9696)
  • Improve and document close behavior #654 (@bdraco)

Closed issues:

  • Do not redact OUI for fixtures #652

Merged pull requests:

  • Add l900-5 1.1.0 fixture #664 (@rytilahti)
  • Add fixtures with new MAC mask #661 (@sdb9696)
  • Make close behaviour consistent across new protocols and transports #660 (@sdb9696)
  • Fix minor typos in docstrings #659 (@bdraco)
  • dump_devinfo improvements #657 (@rytilahti)

0.6.0

4 months ago

Full Changelog

This major brings major changes to the library by adding support for devices that require authentication for communications, all of this being possible thanks to the great work by @sdb9696!

This release adds support to a large range of previously unsupported devices, including:

  • Newer kasa-branded devices, including Matter-enabled devices like KP125M
  • Newer hardware/firmware versions on some models, like EP25, that suddenly changed the used protocol
  • Tapo-branded devices like plugs (P110), light bulbs (KL530), LED strips (L900, L920), and wall switches (KS205, KS225)
  • UK variant of HS110, which was the first device using the new protocol

If your device that is not currently listed as supported is working, please consider contributing a test fixture file.

Special thanks goes to @SimonWilkinson who created the initial PR for the new communication protocol!

Breaking changes:

  • Add DeviceConfig to allow specifying configuration parameters #569 (@sdb9696)
  • Move connect_single to SmartDevice.connect #538 (@bdraco)

Implemented enhancements:

  • Support for KS225(US) Light Dimmer and KS205(US) Light Switch #589
  • Set timeout using command line parameters #310
  • Implement the new protocol (HTTP over 80/tcp, 20002/udp for discovery) #115
  • Get child emeters with CLI #623 (@Obbay2)
  • Avoid linear search for emeter realtime and emeter_today #622 (@bdraco)
  • Add update-credentials command #620 (@rytilahti)
  • Allow serializing and passing of credentials_hashes in DeviceConfig #607 (@sdb9696)
  • Implement wifi interface for tapodevice #606 (@rytilahti)
  • Add support for KS205 and KS225 wall switches #594 (@gimpy88)
  • Enable multiple requests in smartprotocol #584 (@sdb9696)
  • Improve CLI Discovery output #583 (@sdb9696)
  • Improve smartprotocol error handling and retries #578 (@sdb9696)
  • Request component_nego only once for tapodevice #576 (@rytilahti)
  • Use consistent naming for cli envvars #570 (@rytilahti)
  • Add KP125M fixture and allow passing credentials for tests #567 (@sbytnar)
  • Make timeout configurable for cli #564 (@rytilahti)
  • Update dump_devinfo to produce new TAPO/SMART fixtures #561 (@sdb9696)
  • Kasa KP125M basic emeter support #560 (@sbytnar)
  • Add support for tapo bulbs #558 (@rytilahti)
  • Add klap support for TAPO protocol by splitting out Transports and Protocols #557 (@sdb9696)
  • Update dump_devinfo to include 20002 discovery results #556 (@sdb9696)
  • Set TCP_NODELAY to avoid needless buffering #554 (@bdraco)
  • Add support for the protocol used by TAPO devices and some newer KASA devices. #552 (@sdb9696)
  • Re-add protocol_class parameter to connect #551 (@sdb9696)
  • Update discover single to handle hostnames #539 (@sdb9696)
  • Add klap protocol #509 (@sdb9696)

Fixed bugs:

  • dump_devinfo crashes when credentials are not given #591
  • Fix connection indeterminate state on cancellation #636 (@bdraco)
  • Check the ct range for color temp support #619 (@rytilahti)
  • Fix cli discover bug with None username/password #615 (@sdb9696)
  • Fix hsv setting for tapobulb #573 (@rytilahti)
  • Fix transport retries after close #568 (@sdb9696)

Documentation updates:

  • Update the documentation for 0.6 release #600
  • Update docs for newer devices and DeviceConfig #614 (@sdb9696)
  • Update readme with clearer instructions, tapo support #571 (@rytilahti)
  • Add some more external links to README #541 (@rytilahti)

Closed issues:

  • Convert to use aiohttp instead of httpx #635
  • KS225 support #631
  • Need to do error code checking for new protocols #612
  • Support of last firmware update version 1.3.0 #611
  • Improve test coverage for tapodevice class #608
  • Discover returns dictionary with no 'alias' property #592
  • Sending with the legacy protocol is needlessly delayed #553
  • Issues adding a KP405 device #549
  • Support for L510E bulb #547
  • Support for tapo L530E bulbs? #546
  • Unable to connect to host on different subnet with 0.5.4 #545
  • Discovery/Connect broken when upgrading from 0.5.3 -> 0.5.4 #543
  • PydanticUserError, If you use @root_validator with pre=False (the default) you MUST specify skip_on_failure=True #516
  • Implement energy and usage for individual plugs in HS300 #462
  • KP 125M / support for matter devices #450

Merged pull requests:

  • Remove time logging in debug message #645 (@sdb9696)
  • Migrate http client to use aiohttp instead of httpx #643 (@sdb9696)
  • Encapsulate http client dependency #642 (@sdb9696)
  • Fix broken docs due to applehelp dependency #641 (@sdb9696)
  • Raise SmartDeviceException on invalid config dicts #640 (@sdb9696)
  • Add fixture for L920 #638 (@bdraco)
  • Release 0.6.0.dev2 #633 (@rytilahti)
  • Raise TimeoutException on discover_single timeout #632 (@sdb9696)
  • Add L900-10 fixture and it's additional component requests #629 (@sdb9696)
  • Avoid recreating struct each request in legacy protocol #628 (@bdraco)
  • Return alias as None for new discovery devices before update #627 (@sdb9696)
  • Update config to_dict to exclude credentials if the hash is empty string #626 (@sdb9696)
  • Improve test coverage #625 (@sdb9696)
  • Release 0.6.0.dev1 #624 (@rytilahti)
  • Add P125M and update EP25 fixtures #621 (@bdraco)
  • Use consistent envvars for dump_devinfo credentials #618 (@rytilahti)
  • Mark L900-5 as supported #617 (@rytilahti)
  • Ship CHANGELOG only in sdist #610 (@rytilahti)
  • Release 0.6.0.dev0 #609 (@rytilahti)
  • Cleanup credentials handling #605 (@rytilahti)
  • Update P110(EU) fixture #604 (@rytilahti)
  • Update L530 aes fixture #603 (@rytilahti)
  • Cleanup custom exception kwarg handling #602 (@rytilahti)
  • Pull up emeter handling to tapodevice base class #601 (@rytilahti)
  • Add L530(EU) klap fixture #598 (@sdb9696)
  • Add known smart requests to dump_devinfo #597 (@sdb9696)
  • Update P110(UK) fixture #596 (@sdb9696)
  • Fix dump_devinfo for unauthenticated #593 (@sdb9696)
  • Elevate --verbose to top-level option #590 (@rytilahti)
  • Add optional error code to exceptions #585 (@sdb9696)
  • Fix typo in cli.rst #581 (@alanblake)
  • Do login entirely within AesTransport #580 (@sdb9696)
  • Log smartprotocol requests #575 (@rytilahti)
  • Add new methods to dump_devinfo and mask aliases #574 (@sdb9696)
  • Add EP25 smart fixture and improve test framework for SMART devices #572 (@sdb9696)
  • Re-add regional suffix to TAPO/SMART fixtures #566 (@sdb9696)
  • Add P110 fixture #562 (@rytilahti)
  • Do not do update() in discover_single #542 (@sdb9696)

0.6.0.dev2

4 months ago

0.6.0.dev2 (2024-01-11)

Full Changelog

Documentation updates:

  • Update docs for newer devices and DeviceConfig #614 (@sdb9696)

Merged pull requests:

  • Raise TimeoutException on discover_single timeout #632 (@sdb9696)
  • Add L900-10 fixture and it's additional component requests #629 (@sdb9696)
  • Avoid recreating struct each request in legacy protocol #628 (@bdraco)
  • Return alias as None for new discovery devices before update #627 (@sdb9696)
  • Update config to_dict to exclude credentials if the hash is empty string #626 (@sdb9696)
  • Improve test coverage #625 (@sdb9696)

0.6.0.dev1

4 months ago

Second dev release containing various small improvements here and there.

0.6.0.dev1 (2024-01-05)

Full Changelog

Implemented enhancements:

  • Get child emeters with CLI #623 (@Obbay2)
  • Avoid linear search for emeter realtime and emeter_today #622 (@bdraco)
  • Add update-credentials command #620 (@rytilahti)

Fixed bugs:

  • Check the ct range for color temp support #619 (@rytilahti)
  • Fix cli discover bug with None username/password #615 (@sdb9696)

Closed issues:

  • Need to do error code checking for new protocols #612
  • Support of last firmware update version 1.3.0 #611
  • Implement energy and usage for individual plugs in HS300 #462

Merged pull requests:

  • Add P125M and update EP25 fixtures #621 (@bdraco)
  • Use consistent envvars for dump_devinfo credentials #618 (@rytilahti)
  • Mark L900-5 as supported #617 (@rytilahti)
  • Ship CHANGELOG only in sdist #610 (@rytilahti)

0.6.0.dev0

4 months ago

First dev release for the upcoming 0.6.0 which adds support for devices requiring authentication.

Thanks to great efforts by @sdb9696, this allows the library to support a wide range of previously unsupported devices, including:

  • Newer kasa-branded devices (e.g., matter-enabled devices like KP125M)
  • Newer firmware versions of some devices (EP25)
  • The UK version of HS110 which
  • tapo-branded devices (currently limited to plugs, light bulbs, and wall switches)

There are API-breaking changes in this release which will be detailed in the release notes (and/or in the docs) of the final release.

The release blockers can be found at the github milestone: https://github.com/python-kasa/python-kasa/milestone/7 The corresponding homeassistant PR is https://github.com/home-assistant/core/pull/105143

Feel free to test and report any potential issues!

Special thanks to @SimonWilkinson who created the initial PR for the new encryption protocol!

0.6.0.dev0 (2024-01-03)

Full Changelog

Breaking changes:

  • Add DeviceConfig to allow specifying configuration parameters #569 (@sdb9696)
  • Move connect_single to SmartDevice.connect #538 (@bdraco)

Implemented enhancements:

  • Support for KS225(US) Light Dimmer and KS205(US) Light Switch #589
  • Set timeout using command line parameters #310
  • Implement the new protocol (HTTP over 80/tcp, 20002/udp for discovery) #115
  • Allow serializing and passing of credentials_hashes in DeviceConfig #607 (@sdb9696)
  • Implement wifi interface for tapodevice #606 (@rytilahti)
  • Add support for KS205 and KS225 wall switches #594 (@gimpy88)
  • Enable multiple requests in smartprotocol #584 (@sdb9696)
  • Improve CLI Discovery output #583 (@sdb9696)
  • Improve smartprotocol error handling and retries #578 (@sdb9696)
  • Request component_nego only once for tapodevice #576 (@rytilahti)
  • Use consistent naming for cli envvars #570 (@rytilahti)
  • Add KP125M fixture and allow passing credentials for tests #567 (@sbytnar)
  • Make timeout configurable for cli #564 (@rytilahti)
  • Update dump_devinfo to produce new TAPO/SMART fixtures #561 (@sdb9696)
  • Kasa KP125M basic emeter support #560 (@sbytnar)
  • Add support for tapo bulbs #558 (@rytilahti)
  • Add klap support for TAPO protocol by splitting out Transports and Protocols #557 (@sdb9696)
  • Update dump_devinfo to include 20002 discovery results #556 (@sdb9696)
  • Set TCP_NODELAY to avoid needless buffering #554 (@bdraco)
  • Add support for the protocol used by TAPO devices and some newer KASA devices. #552 (@sdb9696)
  • Re-add protocol_class parameter to connect #551 (@sdb9696)
  • Update discover single to handle hostnames #539 (@sdb9696)
  • Add klap protocol #509 (@sdb9696)

Fixed bugs:

  • dump_devinfo crashes when credentials are not given #591
  • Fix hsv setting for tapobulb #573 (@rytilahti)
  • Fix transport retries after close #568 (@sdb9696)

Documentation updates:

  • Update readme with clearer instructions, tapo support #571 (@rytilahti)
  • Add some more external links to README #541 (@rytilahti)

Closed issues:

  • Discover returns dictionary with no 'alias' property #592
  • Sending with the legacy protocol is needlessly delayed #553
  • Issues adding a KP405 device #549
  • Support for L510E bulb #547
  • Support for tapo L530E bulbs? #546
  • Unable to connect to host on different subnet with 0.5.4 #545
  • Discovery/Connect broken when upgrading from 0.5.3 -> 0.5.4 #543
  • PydanticUserError, If you use @root_validator with pre=False (the default) you MUST specify skip_on_failure=True #516
  • KP 125M / support for matter devices #450

Merged pull requests:

  • Cleanup credentials handling #605 (@rytilahti)
  • Update P110(EU) fixture #604 (@rytilahti)
  • Update L530 aes fixture #603 (@rytilahti)
  • Cleanup custom exception kwarg handling #602 (@rytilahti)
  • Pull up emeter handling to tapodevice base class #601 (@rytilahti)
  • Add L530(EU) klap fixture #598 (@sdb9696)
  • Add known smart requests to dump_devinfo #597 (@sdb9696)
  • Update P110(UK) fixture #596 (@sdb9696)
  • Fix dump_devinfo for unauthenticated #593 (@sdb9696)
  • Elevate --verbose to top-level option #590 (@rytilahti)
  • Add optional error code to exceptions #585 (@sdb9696)
  • Fix typo in cli.rst #581 (@alanblake)
  • Do login entirely within AesTransport #580 (@sdb9696)
  • Log smartprotocol requests #575 (@rytilahti)
  • Add new methods to dump_devinfo and mask aliases #574 (@sdb9696)
  • Add EP25 smart fixture and improve test framework for SMART devices #572 (@sdb9696)
  • Re-add regional suffix to TAPO/SMART fixtures #566 (@sdb9696)
  • Add P110 fixture #562 (@rytilahti)
  • Do not do update() in discover_single #542 (@sdb9696)