Commit Graph

49 Commits

Author SHA1 Message Date
Teemu R.
5b8447c940 Prepare 0.11.0 (#1776)
## [0.11.0](https://github.com/python-kasa/python-kasa/tree/0.11.0)
(2026-10-04)

[Full
Changelog](https://github.com/python-kasa/python-kasa/compare/0.10.2...0.11.0)

**Release summary:**

This is a huge and long overdue release, coming more than a year and a
half after the previous one.
Hopefully the next one follows sooner, as the TPAP transport (which did
not make it into this release) is used more and more on newer devices.

This release brings broader camera support, new modules for lights,
vacuums and cameras, and many connectivity fixes for newer firmware
versions. Some other highlights:
- Improved Tapo camera support: login version 3, presets, wifi handling,
last alert detection, and more robust authentication and discovery.
- Selective room cleaning for robot vacuums.
- Configurable light strip length via the new strip segment module, and
an exposed light transition state change flag.
- Basic HomeKit module for Kasa (iot) devices.
- Energy monitoring V2 support (S515D).
- Better hub and thermostat state reporting (hold, summer mode, low
battery).
- Connection fixes for newer Tapo firmware and older SSL devices, plus
KLAP v2 for iot devices.
- More resilient time handling, with failover and UTC fallback for iot
devices.
- Python 3.14 is now supported.
- Inclusion of fixtures for 29 devices or firmware versions, including
the Tapo C460, C200 and C101 cameras and the KH100 hub with KE100/KE110
thermostats.

**Thank you to all contributors!**

A big thank you to everyone who contributed to this release, whether
through code, device fixtures, bug reports or testing.

Special thanks to @ZeliardM for a huge effort on both features and
project maintenance, including but not limited to:
- Features like the HomeKit module for iot devices, iot time module
failover, wifi handling and credential improvements for cameras, Tapo
login version 3, and V2 energy monitoring for S515D.
- A lot of necessary maintenance work including type annotations and
cleanups throughout the test suite, modernized docstrings, CI hardening
with SHA-pinned actions, and many bug fixes. This helps us to keep the
library maintainable and open to new contributions.

A warm welcome to our new contributors, with special thanks to those who
contributed improvements and fixes:
- @alams154: discovery on port 20004
- @bluntman001: iot device classification fix
- @bm1549: KLAP v2 transport for iot devices
- @darylldelfin: cipher support for newer Tapo firmware
- @davidefiocco: vacuum mop water level fix
- @epg-pers: selective room cleaning for vacuums
- @freeKC: camera discovery and authentication fixes
- @gpongelli: extended camera detection
- @Ikstar: KL420 color temperature range
- @juherr: last alert detection module for cameras, camera error codes
and a C200 fixture
- @kad: SSL connections to older devices
- @KaloyanNaumov: multi-request timeout handling
- @loganrosen: KL400L5 color temperature range
- @markvanpraet: Tapo C460 support and camera battery fix
- @monteccarlos: iot timezone mapping fix
- @mrwogu: preset support for Tapo cameras
- @nopoz: strip segment module, light transition flag and credentials
hash fix
- @tk1475: UTC fallback for unset iot device clocks
- @wh1t3f1r3: non-retryable network error handling

Thanks also to our new contributors who provided device fixtures to help
future development efforts: @emanueleg, @fantandrea, @HarryPehkonen,
@ijaron, @Krotu, @LostLuma, @mjbohr and @TheLinuxGuy.

**This release in numbers:**

- 68 merged pull requests from 29 contributors, 27 of them first-time
contributors
- 8 new modules
- 29 new device fixtures
- 203 files changed, with 25,199 lines added and 2,585 removed


**Implemented enhancements:**

- \[Feature Request\] C220 camera line crossing detection on-off switch
[\#1551](https://github.com/python-kasa/python-kasa/issues/1551)
- SslAesTransport: handshake again when a camera answers 401 to
passthrough
[\#1771](https://github.com/python-kasa/python-kasa/pull/1771) (@freeKC)
- Add LastAlertDetection module for smartcam devices
[\#1762](https://github.com/python-kasa/python-kasa/pull/1762) (@juherr)
- Add KL420 to TPLINK\_KELVIN color temperature ranges
[\#1757](https://github.com/python-kasa/python-kasa/pull/1757) (@Ikstar)
- Do not authenticate with a credentials\_hash from a different
transport [\#1749](https://github.com/python-kasa/python-kasa/pull/1749)
(@nopoz)
- Expose the light transition state change flag
[\#1745](https://github.com/python-kasa/python-kasa/pull/1745) (@nopoz)
- Add strip segment module for configurable light strip length
[\#1744](https://github.com/python-kasa/python-kasa/pull/1744) (@nopoz)
- Add KL400L5 color temperature range
[\#1719](https://github.com/python-kasa/python-kasa/pull/1719)
(@loganrosen)
- Update smartcam credential handling and tests
[\#1664](https://github.com/python-kasa/python-kasa/pull/1664)
(@ZeliardM)
- Add support for V2 Energy Monitoring for S515D
[\#1663](https://github.com/python-kasa/python-kasa/pull/1663)
(@ZeliardM)
- Add selective room cleaning to vacuum clean module
[\#1660](https://github.com/python-kasa/python-kasa/pull/1660)
(@epg-pers)
- New Wi-Fi handling for SMARTCAM devices
[\#1639](https://github.com/python-kasa/python-kasa/pull/1639)
(@ZeliardM)
- Add support for tapo login\_version 3 in sslaestransport
[\#1638](https://github.com/python-kasa/python-kasa/pull/1638)
(@ZeliardM)
- Add preset support for Tapo cameras
[\#1615](https://github.com/python-kasa/python-kasa/pull/1615) (@mrwogu)
- Add python 3.14 to supported versions
[\#1599](https://github.com/python-kasa/python-kasa/pull/1599)
(@rytilahti)
- Add discovery port 20004
[\#1595](https://github.com/python-kasa/python-kasa/pull/1595)
(@alams154)
- Implement IOT Time Module Failover
[\#1583](https://github.com/python-kasa/python-kasa/pull/1583)
(@ZeliardM)
- Add bare bones homekit module for iot devices
[\#1566](https://github.com/python-kasa/python-kasa/pull/1566)
(@ZeliardM)
- Extend smartcam detection support
[\#1552](https://github.com/python-kasa/python-kasa/pull/1552)
(@gpongelli)

**Fixed bugs:**

- Time module unavailable for waterleak sensor
[\#1613](https://github.com/python-kasa/python-kasa/issues/1613)
- 'No time zone found with key EST' in debian 13
[\#1579](https://github.com/python-kasa/python-kasa/issues/1579)
- Discovery: accept cameras that only send the encrypt\_type list
[\#1770](https://github.com/python-kasa/python-kasa/pull/1770) (@freeKC)
- Classify IOT devices via sysinfo regardless of transport \(fixes
\#1740\) [\#1769](https://github.com/python-kasa/python-kasa/pull/1769)
(@bluntman001)
- Fall back to UTC for iot time when the device clock is not set
[\#1768](https://github.com/python-kasa/python-kasa/pull/1768) (@tk1475)
- Add UNKNOWN\_USERNAME \(-60502\) camera error code
[\#1761](https://github.com/python-kasa/python-kasa/pull/1761) (@juherr)
- Disable multi requests on timeout during multi-request
[\#1759](https://github.com/python-kasa/python-kasa/pull/1759)
(@KaloyanNaumov)
- Add ECDHE-RSA-AES256 cipher for newer Tapo firmware
[\#1755](https://github.com/python-kasa/python-kasa/pull/1755)
(@darylldelfin)
- Map iot timezone index 18 to America/New\_York instead of EST
[\#1743](https://github.com/python-kasa/python-kasa/pull/1743)
(@monteccarlos)
- fix: use KLAP v2 transport for IOT devices with login version 2
[\#1731](https://github.com/python-kasa/python-kasa/pull/1731) (@bm1549)
- Add ENETUNREACH to non-retryable errors in XorTransport
[\#1668](https://github.com/python-kasa/python-kasa/pull/1668)
(@wh1t3f1r3)
- Fix mop set\_waterlevel sending setCleanAttr without type field
[\#1667](https://github.com/python-kasa/python-kasa/pull/1667)
(@davidefiocco)
- Fix SMARTCAM Time module and update tests
[\#1659](https://github.com/python-kasa/python-kasa/pull/1659)
(@ZeliardM)
- Fix camera login version in CLI
[\#1658](https://github.com/python-kasa/python-kasa/pull/1658)
(@ZeliardM)
- Allow SSL connections to older devices
[\#1654](https://github.com/python-kasa/python-kasa/pull/1654) (@kad)
- waterleaksensor: use parent's Time for alert timestamp
[\#1614](https://github.com/python-kasa/python-kasa/pull/1614)
(@rytilahti)
- Add hold state to thermostatstate
[\#1609](https://github.com/python-kasa/python-kasa/pull/1609)
(@rytilahti)
- Fix thermostat idle reporting on low battery
[\#1598](https://github.com/python-kasa/python-kasa/pull/1598)
(@rytilahti)
- Add shutdown \(summer mode\) to thermostatstate
[\#1588](https://github.com/python-kasa/python-kasa/pull/1588)
(@rytilahti)
- Fix iotstrip child device time handling
[\#1584](https://github.com/python-kasa/python-kasa/pull/1584)
(@ZeliardM)

**Added support for devices:**

- Add C200 device fixture
[\#1760](https://github.com/python-kasa/python-kasa/pull/1760) (@juherr)
- Add P125M fixture for firmware 1.4.4
[\#1746](https://github.com/python-kasa/python-kasa/pull/1746)
(@HarryPehkonen)
- Add fixtures for KH100, KE100 and KE110 and simulate TRV states
[\#1726](https://github.com/python-kasa/python-kasa/pull/1726) (@Krotu)
- Add L530EA\(EU\) device fixture
[\#1694](https://github.com/python-kasa/python-kasa/pull/1694)
(@ZeliardM)
- Add C101 test fixture
[\#1673](https://github.com/python-kasa/python-kasa/pull/1673) (@ijaron)
- Add LB130\(US\) device fixture
[\#1669](https://github.com/python-kasa/python-kasa/pull/1669)
(@ZeliardM)
- Add KL110B\(UN\) device fixture
[\#1657](https://github.com/python-kasa/python-kasa/pull/1657)
(@ZeliardM)
- Add TS15\(US\) device fixture
[\#1649](https://github.com/python-kasa/python-kasa/pull/1649)
(@ZeliardM)
- Add Tapo C460 support
[\#1645](https://github.com/python-kasa/python-kasa/pull/1645)
(@markvanpraet)
- Add P105\(US\) device fixture
[\#1644](https://github.com/python-kasa/python-kasa/pull/1644)
(@ZeliardM)
- Add L430C\(EU\) device fixture
[\#1643](https://github.com/python-kasa/python-kasa/pull/1643)
(@ZeliardM)
- Add L430P\(EU\) device fixture
[\#1607](https://github.com/python-kasa/python-kasa/pull/1607)
(@LostLuma)
- Add S500\(US\)\_1.0\_1.2.0 fixture
[\#1569](https://github.com/python-kasa/python-kasa/pull/1569)
(@ZeliardM)
- Add device fixture for P316M\(US\)
[\#1568](https://github.com/python-kasa/python-kasa/pull/1568)
(@TheLinuxGuy)
- Add L535E\(EU\) 3.0 1.1.8 fixture
[\#1545](https://github.com/python-kasa/python-kasa/pull/1545)
(@fantandrea)
- Adding KL400L10\(US\)\_1.0\_1.0.10 fixture
[\#1539](https://github.com/python-kasa/python-kasa/pull/1539) (@mjbohr)
- Add TP10\(IT\) 1.0 1.2.5 fixture
[\#1538](https://github.com/python-kasa/python-kasa/pull/1538)
(@emanueleg)
- Add LB100\(US\)\_1.0\_1.8.11 fixture file
[\#1515](https://github.com/python-kasa/python-kasa/pull/1515)
(@ZeliardM)
- Add KS225\(US\)\_1.0\_1.1.1 and L930-5\(EU\)\_1.0\_1.2.5
[\#1509](https://github.com/python-kasa/python-kasa/pull/1509)
(@ZeliardM)

**Documentation updates:**

- How to hash credentials to make use of --credentials-hash flag?
[\#1517](https://github.com/python-kasa/python-kasa/issues/1517)
- docs: modernize docstrings across the repository
[\#1682](https://github.com/python-kasa/python-kasa/pull/1682)
(@ZeliardM)
- Add a note to emeter guide being kasa-only
[\#1512](https://github.com/python-kasa/python-kasa/pull/1512)
(@rytilahti)

**Project maintenance:**

- tests: add type annotations to top-level test files
[\#1688](https://github.com/python-kasa/python-kasa/pull/1688)
(@ZeliardM)
- tests: add type annotations to CLI, protocol, and smartcam tests
[\#1687](https://github.com/python-kasa/python-kasa/pull/1687)
(@ZeliardM)
- tests: add type annotations to Smart tests
[\#1686](https://github.com/python-kasa/python-kasa/pull/1686)
(@ZeliardM)
- tests: add type annotations to IoT tests
[\#1685](https://github.com/python-kasa/python-kasa/pull/1685)
(@ZeliardM)
- tests: add type annotations to transport tests
[\#1684](https://github.com/python-kasa/python-kasa/pull/1684)
(@ZeliardM)
- tests: centralize transport and session cleanup in conftest
[\#1683](https://github.com/python-kasa/python-kasa/pull/1683)
(@ZeliardM)
- ci: pin all GitHub Actions to SHA hashes and update versions
[\#1681](https://github.com/python-kasa/python-kasa/pull/1681)
(@ZeliardM)
- tests: fix typos, child device subtype, CLI patch path, and
deprecation test logic
[\#1677](https://github.com/python-kasa/python-kasa/pull/1677)
(@ZeliardM)
- Update GitHub Workflows and Actions
[\#1622](https://github.com/python-kasa/python-kasa/pull/1622)
(@ZeliardM)
- Use log-level debug for smartdevice query error reporting
[\#1587](https://github.com/python-kasa/python-kasa/pull/1587)
(@rytilahti)
- Use Device instead of SmartDevice where feasible
[\#1585](https://github.com/python-kasa/python-kasa/pull/1585)
(@ZeliardM)

**Closed issues:**

- Python 3.14 Support
[\#1597](https://github.com/python-kasa/python-kasa/issues/1597)
- HS300 Child State - Time Module Error
[\#1445](https://github.com/python-kasa/python-kasa/issues/1445)
2026-10-04 20:03:52 +02:00
Teemu R.
8840fc395e Add python 3.14 to supported versions (#1599)
* Add python 3.14 to our supported versions and to our CI
* Convert to use pyproject.toml standard dependency groups
* Fix any issues reported by CI
2026-07-07 20:46:57 +02:00
ZeliardM
c9c80619d7 Fix camera login version in CLI (#1658)
Some checks failed
CI / Perform Lint Checks (3.13) (push) Has been cancelled
CodeQL Checks / Analyze (python) (push) Has been cancelled
CI / Python 3.11 on macos-latest (push) Has been cancelled
CI / Python 3.12 on macos-latest (push) Has been cancelled
CI / Python 3.13 on macos-latest (push) Has been cancelled
CI / Python 3.11 on ubuntu-latest (push) Has been cancelled
CI / Python 3.12 on ubuntu-latest (push) Has been cancelled
CI / Python 3.13 on ubuntu-latest (push) Has been cancelled
CI / Python 3.11 on windows-latest (push) Has been cancelled
CI / Python 3.12 on windows-latest (push) Has been cancelled
CI / Python 3.13 on windows-latest (push) Has been cancelled
Stale / stale (push) Has been cancelled
Fix handling of --login-version/-lv for the CLI with --type "camera".
2026-02-27 00:46:11 +01:00
ZeliardM
30a8fd45a8 New Wi-Fi handling for SMARTCAM devices (#1639)
Some checks failed
CI / Perform Lint Checks (3.13) (push) Has been cancelled
CI / Python 3.11 on macos-latest (push) Has been cancelled
CI / Python 3.12 on macos-latest (push) Has been cancelled
CI / Python 3.13 on macos-latest (push) Has been cancelled
CI / Python 3.11 on ubuntu-latest (push) Has been cancelled
CI / Python 3.12 on ubuntu-latest (push) Has been cancelled
CI / Python 3.13 on ubuntu-latest (push) Has been cancelled
CI / Python 3.11 on windows-latest (push) Has been cancelled
CI / Python 3.12 on windows-latest (push) Has been cancelled
CI / Python 3.13 on windows-latest (push) Has been cancelled
CodeQL Checks / Analyze (python) (push) Has been cancelled
Updated scanning and joining Wi-Fi for SMARTCAM devices that may use a
newer connection process.
2026-02-22 00:03:52 +01:00
ZeliardM
1a89a1c1b9 Use Device instead of SmartDevice where feasible (#1585)
Some checks failed
CI / Perform linting checks (3.13) (push) Has been cancelled
CodeQL checks / Analyze (python) (push) Has been cancelled
CI / Python 3.11 on macos-latest (push) Has been cancelled
CI / Python 3.12 on macos-latest (push) Has been cancelled
CI / Python 3.13 on macos-latest (push) Has been cancelled
CI / Python 3.11 on ubuntu-latest (push) Has been cancelled
CI / Python 3.12 on ubuntu-latest (push) Has been cancelled
CI / Python 3.13 on ubuntu-latest (push) Has been cancelled
CI / Python 3.11 on windows-latest (push) Has been cancelled
CI / Python 3.12 on windows-latest (push) Has been cancelled
CI / Python 3.13 on windows-latest (push) Has been cancelled
Stale / stale (push) Has been cancelled
2025-10-10 18:26:30 +02:00
Teemu R.
668e32d3a5 Do not crash on missing build number in fw version (#1500)
Some checks failed
CI / Perform linting checks (3.13) (push) Has been cancelled
CodeQL checks / Analyze (python) (push) Has been cancelled
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, macos-latest, 3.11) (push) Has been cancelled
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, macos-latest, 3.12) (push) Has been cancelled
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, macos-latest, 3.13) (push) Has been cancelled
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, ubuntu-latest, 3.11) (push) Has been cancelled
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, ubuntu-latest, 3.12) (push) Has been cancelled
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, ubuntu-latest, 3.13) (push) Has been cancelled
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, windows-latest, 3.11) (push) Has been cancelled
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, windows-latest, 3.12) (push) Has been cancelled
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, windows-latest, 3.13) (push) Has been cancelled
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (true, ubuntu-latest, 3.11) (push) Has been cancelled
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (true, ubuntu-latest, 3.12) (push) Has been cancelled
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (true, ubuntu-latest, 3.13) (push) Has been cancelled
Stale / stale (push) Has been cancelled
Co-authored-by: Steven B <51370195+sdb9696@users.noreply.github.com>
2025-02-10 11:13:01 +00:00
Ryan Nitcher
7f2a1be392 Add ADC Value to PIR Enabled Switches (#1263)
Some checks are pending
CI / Perform linting checks (3.13) (push) Waiting to run
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, macos-latest, 3.11) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, macos-latest, 3.12) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, macos-latest, 3.13) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, ubuntu-latest, 3.11) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, ubuntu-latest, 3.12) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, ubuntu-latest, 3.13) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, windows-latest, 3.11) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, windows-latest, 3.12) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, windows-latest, 3.13) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (true, ubuntu-latest, 3.11) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (true, ubuntu-latest, 3.12) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (true, ubuntu-latest, 3.13) (push) Blocked by required conditions
CodeQL checks / Analyze (python) (push) Waiting to run
2025-01-25 10:45:48 +00:00
Steven B.
9b7bf367ae Update ruff to 0.9 (#1482)
Some checks are pending
CI / Perform linting checks (3.13) (push) Waiting to run
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, macos-latest, 3.11) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, macos-latest, 3.12) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, macos-latest, 3.13) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, ubuntu-latest, 3.11) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, ubuntu-latest, 3.12) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, ubuntu-latest, 3.13) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, windows-latest, 3.11) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, windows-latest, 3.12) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, windows-latest, 3.13) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (true, ubuntu-latest, 3.11) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (true, ubuntu-latest, 3.12) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (true, ubuntu-latest, 3.13) (push) Blocked by required conditions
CodeQL checks / Analyze (python) (push) Waiting to run
Ruff 0.9 contains a number of formatter changes for the 2025 style guide.
Update to `ruff>=0.9.0` and apply the formatter fixes.
https://astral.sh/blog/ruff-v0.9.0
2025-01-24 10:53:27 +00:00
Steven B.
09fce3f426 Add common childsetup interface (#1470)
Add a common interface for the `childsetup` module across `smart` and `smartcam` hubs.
Co-authored-by: Teemu R. <tpr@iki.fi>
2025-01-24 08:08:04 +00:00
Teemu R.
7b1b14d1e6 Allow https for klaptransport (#1415)
Some checks failed
CI / Perform linting checks (3.13) (push) Waiting to run
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, macos-latest, 3.11) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, macos-latest, 3.12) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, macos-latest, 3.13) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, ubuntu-latest, 3.11) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, ubuntu-latest, 3.12) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, ubuntu-latest, 3.13) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, windows-latest, 3.11) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, windows-latest, 3.12) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, windows-latest, 3.13) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (true, ubuntu-latest, 3.11) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (true, ubuntu-latest, 3.12) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (true, ubuntu-latest, 3.13) (push) Blocked by required conditions
CodeQL checks / Analyze (python) (push) Has been cancelled
Later firmware versions on robovacs use `KLAP` over https instead of ssltransport (reported as AES)
2025-01-22 10:54:32 +00:00
Teemu R.
a03a4b1d63 Add consumables module for vacuums (#1327)
Some checks failed
CI / Perform linting checks (3.13) (push) Has been cancelled
CodeQL checks / Analyze (python) (push) Has been cancelled
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, macos-latest, 3.11) (push) Has been cancelled
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, macos-latest, 3.12) (push) Has been cancelled
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, macos-latest, 3.13) (push) Has been cancelled
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, ubuntu-latest, 3.11) (push) Has been cancelled
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, ubuntu-latest, 3.12) (push) Has been cancelled
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, ubuntu-latest, 3.13) (push) Has been cancelled
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, windows-latest, 3.11) (push) Has been cancelled
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, windows-latest, 3.12) (push) Has been cancelled
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, windows-latest, 3.13) (push) Has been cancelled
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (true, ubuntu-latest, 3.11) (push) Has been cancelled
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (true, ubuntu-latest, 3.12) (push) Has been cancelled
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (true, ubuntu-latest, 3.13) (push) Has been cancelled
Co-authored-by: Steven B <51370195+sdb9696@users.noreply.github.com>
2025-01-20 12:50:39 +00:00
Teemu R.
05085462d3 Add support for cleaning records (#945)
Some checks are pending
CI / Perform linting checks (3.13) (push) Waiting to run
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, macos-latest, 3.11) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, macos-latest, 3.12) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, macos-latest, 3.13) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, ubuntu-latest, 3.11) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, ubuntu-latest, 3.12) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, ubuntu-latest, 3.13) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, windows-latest, 3.11) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, windows-latest, 3.12) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, windows-latest, 3.13) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (true, ubuntu-latest, 3.11) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (true, ubuntu-latest, 3.12) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (true, ubuntu-latest, 3.13) (push) Blocked by required conditions
CodeQL checks / Analyze (python) (push) Waiting to run
Co-authored-by: Steven B. <51370195+sdb9696@users.noreply.github.com>
2025-01-20 11:41:56 +00:00
Teemu R.
bca5576425 Add support for pairing devices with hubs (#859)
Co-authored-by: Steven B. <51370195+sdb9696@users.noreply.github.com>
2025-01-20 10:36:06 +00:00
Steven B.
d03f535568 Fix discover cli command with host (#1437) 2025-01-14 14:47:52 +00:00
Teemu R.
883d52209e Fix incorrect obd src echo (#1412)
Some checks are pending
CI / Perform linting checks (3.13) (push) Waiting to run
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, macos-latest, 3.11) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, macos-latest, 3.12) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, macos-latest, 3.13) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, ubuntu-latest, 3.11) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, ubuntu-latest, 3.12) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, ubuntu-latest, 3.13) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, windows-latest, 3.11) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, windows-latest, 3.12) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, windows-latest, 3.13) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (true, ubuntu-latest, 3.11) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (true, ubuntu-latest, 3.12) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (true, ubuntu-latest, 3.13) (push) Blocked by required conditions
CodeQL checks / Analyze (python) (push) Waiting to run
2025-01-03 18:07:46 +00:00
Steven B.
296af3192e Handle KeyboardInterrupts in the cli better (#1391)
Addresses an issue with how `asyncclick` deals with `KeyboardInterrupt`
errors. Instead of the `click.main` receiving `KeyboardInterrupt` it
receives `CancelledError` because it's a task running inside the loop.

Also ensures that discovery catches the `CancelledError` and closes the
http clients.
2024-12-20 14:21:38 +01:00
Teemu R.
37ef7b0463 cli: print model, https, and lv for discover list (#1339)
```
kasa --target 192.168.xx.xx discover list

HOST            MODEL     DEVICE FAMILY        ENCRYPT HTTPS LV  ALIAS
192.168.xxx.xxx KP115(EU) IOT.SMARTPLUGSWITCH  XOR     0     -   Fridge
192.168.xxx.xxx L900-5    SMART.TAPOBULB       KLAP    0     2   L900
192.168.xxx.xxx P115      SMART.TAPOPLUG       AES     0     2   Nightdesk
192.168.xxx.xxx TC65      SMART.IPCAMERA       AES     1     2   Tapo_TC65_B593

```

Also handles `TimeoutError` and `Exception` during `update()`

---------

Co-authored-by: Steven B <51370195+sdb9696@users.noreply.github.com>
2024-12-17 21:09:17 +01:00
Steven B.
223f3318ea Use DeviceInfo consistently across devices (#1338)
Some checks are pending
CI / Perform linting checks (3.13) (push) Waiting to run
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, macos-latest, 3.11) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, macos-latest, 3.12) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, macos-latest, 3.13) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, ubuntu-latest, 3.11) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, ubuntu-latest, 3.12) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, ubuntu-latest, 3.13) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, windows-latest, 3.11) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, windows-latest, 3.12) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, windows-latest, 3.13) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (true, ubuntu-latest, 3.11) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (true, ubuntu-latest, 3.12) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (true, ubuntu-latest, 3.13) (push) Blocked by required conditions
CodeQL checks / Analyze (python) (push) Waiting to run
- Make model exclude region for `iot` devices. This is consistent with `smart` and `smartcam` devices.
- Make region it's own attribute on `Device`.
- Ensure that devices consistently use `_get_device_info` static methods for all information relating to device models.
- Fix issue with firmware and hardware being the wrong way round for `smartcam` devices.
2024-12-13 12:37:13 +00:00
Steven B.
7709bb967f Update cli, light modules, and docs to use FeatureAttributes (#1364)
Some checks are pending
CI / Perform linting checks (3.13) (push) Waiting to run
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, macos-latest, 3.11) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, macos-latest, 3.12) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, macos-latest, 3.13) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, ubuntu-latest, 3.11) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, ubuntu-latest, 3.12) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, ubuntu-latest, 3.13) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, windows-latest, 3.11) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, windows-latest, 3.12) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (false, windows-latest, 3.13) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (true, ubuntu-latest, 3.11) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (true, ubuntu-latest, 3.12) (push) Blocked by required conditions
CI / Python ${{ matrix.python-version}} on ${{ matrix.os }}${{ fromJSON('[" (extras)", ""]')[matrix.extras == ''] }} (true, ubuntu-latest, 3.13) (push) Blocked by required conditions
CodeQL checks / Analyze (python) (push) Waiting to run
2024-12-11 15:53:35 +00:00
Steven B.
bf8f0adabe Return raw discovery result in cli discover raw (#1342)
Add `on_discovered_raw` callback to Discover and adds a cli command `discover raw` which returns the raw json before serializing to a `DiscoveryResult` and attempting to create a device class.
2024-12-10 22:42:14 +00:00
Puxtril
cb89342be1 Add LinkieTransportV2 and basic IOT.IPCAMERA support (#1270)
Add LinkieTransportV2 transport used by kasa cameras and a basic
implementation for IOT.IPCAMERA (kasacam) devices.

---------

Co-authored-by: Zach Price <pricezt@ornl.gov>
Co-authored-by: Steven B <51370195+sdb9696@users.noreply.github.com>
Co-authored-by: Teemu Rytilahti <tpr@iki.fi>
2024-12-07 00:06:58 +01:00
Teemu R.
9966c6094a Add ssltransport for robovacs (#943)
This PR implements a clear-text, token-based transport protocol seen on
RV30 Plus (#937).

- Client sends `{"username": "email@example.com", "password":
md5(password)}` and gets back a token in the response
- Rest of the communications are done with POST at `/app?token=<token>`

---------

Co-authored-by: Steven B. <51370195+sdb9696@users.noreply.github.com>
2024-12-01 18:06:48 +01:00
Steven B.
5ef8f21b4d Handle missing mgt_encryption_schm in discovery (#1318) 2024-11-29 15:23:16 +00:00
Teemu R.
69e08c2385 Expose energy command to cli (#1307)
Co-authored-by: Steven B <51370195+sdb9696@users.noreply.github.com>
2024-11-26 09:42:55 +00:00
Steven B.
cae9decb02 Exclude __getattr__ for deprecated attributes from type checkers (#1294) 2024-11-21 18:40:13 +00:00
Steven B.
879aca77d1 Update cli modify presets to support smart devices (#1295) 2024-11-21 19:10:18 +01:00
Steven B.
0058ad9f2e Remove pydantic dependency (#1289)
Remove pydantic dependency in favor of mashumaro.
2024-11-20 15:19:12 +00:00
Steven B.
a01247d48f Remove support for python <3.11 (#1273)
Python 3.11 ships with latest Debian Bookworm. 
pypy is not that widely used with this library based on statistics. It could be added back when pypy supports python 3.11.
2024-11-18 18:46:36 +00:00
Steven B.
fd5258c28b Fix discovery by alias for smart devices (#1260)
Fixes #1259
2024-11-18 13:03:13 +00:00
Steven B.
0d1193ac71 Update cli feature command for actions not to require a value (#1264) 2024-11-15 14:38:41 +00:00
Steven B.
b8f6651d9b Remove experimental support (#1256) 2024-11-14 15:55:02 +01:00
Steven B.
157ad8e807 Update cli energy command to use energy module (#1252) 2024-11-13 15:57:42 +01:00
Steven B.
254a9af5c1 Update DiscoveryResult to use Mashumaro instead of pydantic (#1231)
Mashumaro is faster and doesn't come with all versioning problems that
pydantic does.

A basic perf test deserializing all of our discovery results fixtures
shows mashumaro as being about 6 times faster deserializing dicts than
pydantic. It's much faster parsing from a json string but that's likely
because it uses orjson under the hood although that's not really our use
case at the moment.

```
PYDANTIC - ms
=================
json       dict
-----------------
4.7665     1.3268
3.1548     1.5922
3.1130     1.8039
4.2834     2.7606
2.0669     1.3757
2.0163     1.6377
3.1667     1.3561
4.1296     2.7297
2.0132     1.3471
4.0648     1.4105

MASHUMARO - ms
=================
json       dict
-----------------
0.5977     0.5543
0.5336     0.2983
0.3955     0.2549
0.6516     0.2742
0.5386     0.2706
0.6678     0.2580
0.4120     0.2511
0.3836     0.2472
0.4020     0.2465
0.4268     0.2487
```
2024-11-12 22:00:04 +01:00
Teemu R.
66eb17057e Enable ruff check for ANN (#1139) 2024-11-10 18:55:13 +00:00
Puxtril
4e9a3e6b02 Print formatting for IotLightPreset (#1216)
Now prints presets as such:

```
[0] Hue:   0  Saturation:   0  Brightness/Value: 100  Temp: 6000  Custom: None  Mode: None  Id: None
[1] Hue:   0  Saturation:   0  Brightness/Value: 100  Temp: 2500  Custom: None  Mode: None  Id: None
[2] Hue:   0  Saturation:   0  Brightness/Value:  60  Temp: 2500  Custom: None  Mode: None  Id: None
[3] Hue: 240  Saturation: 100  Brightness/Value: 100  Temp:    0  Custom: None  Mode: None  Id: None
```
2024-11-09 18:03:06 +01:00
Steven B.
77b654a9aa Update try_connect_all to be more efficient and report attempts (#1222) 2024-11-01 18:17:18 +00:00
Teemu R.
70c96b5a5d Initial trigger logs implementation (#900)
Co-authored-by: Steven B. <51370195+sdb9696@users.noreply.github.com>
2024-11-01 15:36:09 +00:00
Steven B.
4aec9d302f Allow enabling experimental devices from environment variable (#1194) 2024-10-29 09:30:30 +00:00
Steven B.
048c84d72c Add https parameter to device class factory (#1184)
`SMART.TAPOHUB` resolves to different device classes based on the https value
2024-10-22 18:09:35 +01:00
Steven B.
3c865b5fb6 Add try_connect_all to allow initialisation without udp broadcast (#1171)
- Try all valid combinations of protocol/transport/device class and attempt to connect. 
- Add cli command `discover config` to return the connection options after connecting via `try_connect_all`.
- The cli command does not return the actual device for processing as this is not a recommended way to regularly connect to devices.
2024-10-22 14:33:46 +01:00
Steven B.
852116795c Add discovery list command to cli (#1183)
Report discovered devices in a concise table format.
2024-10-22 12:15:08 +01:00
Steven B.
dcc36e1dfe Initial TapoCamera support (#1165)
Adds experimental support for the Tapo Camera protocol also used by the H200 hub.
Creates a new SslAesTransport and a derived SmartCamera and SmartCameraProtocol.
2024-10-16 16:53:52 +01:00
Steven B.
380fbb93c3 Enable newer encrypted discovery protocol (#1168) 2024-10-16 15:28:27 +01:00
Steven B.
7fd8c14c1f Create common Time module and add time set cli command (#1157) 2024-10-15 08:59:25 +01:00
Steven B.
9641edcbc0 Make iot time timezone aware (#1147)
Also makes on_since for iot devices use device time.
Changes the return value for device.timezone to be tzinfo instead of a dict.
2024-10-08 08:16:51 +01:00
Steven B.
d1b43f5408 Fix cli command for device off (#1121)
Was previously missed when using the full `kasa device off` command as
opposed to the shortcut.
2024-09-27 17:36:45 +01:00
Teemu R.
b7fa0d2040 Add factory-reset command to cli (#1108)
Allow reseting devices to factory settings using the cli: `kasa device factory-reset`.
2024-09-21 16:52:52 +02:00
Steven B.
ed033679e5 Split out main cli module into lazily loaded submodules (#1039) 2024-07-23 19:13:52 +01:00
Steven B
983aacbc24 Structure cli into a package (#1038)
PR with just the initial structural changes for the cli to be a package.
Subsequent PR will break out `main.py` into modules. Doing it in two
stages ensure that the commit history will be continuous for `cli.py` >
`cli/main.py`
2024-07-04 14:52:01 +02:00