Skip to content

Releases: piekstra/tplink-cloud-api

v5.2.0

08 Feb 07:13
7b8773e

Choose a tag to compare

Tapo Cloud Support

This release adds full support for TP-Link Tapo smart home devices alongside the existing Kasa device support.

New features

  • Dual-cloud authentication — the library now authenticates against both the Kasa and Tapo clouds in parallel using the same TP-Link credentials
  • Tapo device discovery — Tapo devices (P100, P110, L530, etc.) are automatically discovered and included in device listings
  • Device deduplication — devices that appear in both clouds are deduplicated, with the Kasa version taking priority
  • cloud_type attribute — every device now has a cloud_type property ("kasa" or "tapo") indicating which cloud it was discovered through
  • include_tapo parameter — pass include_tapo=False to TPLinkDeviceManager to disable Tapo cloud queries

Fixes

  • Added TP-Link Cloud Root CA (ECDSA) to the bundled cert chain, enabling SSL verification against the Tapo cloud API (n-wap.i.tplinkcloud.com)

Notes

  • Tapo login failures are silently caught — the library falls back to Kasa-only mode
  • The Tapo cloud uses a separate ECDSA CA chain from the Kasa cloud's RSA chain
  • Both clouds use the same V2 API signing mechanism (HMAC-SHA1) but with different app identifiers and signing keys

v5.1.0

08 Feb 05:58
9cc4efc

Choose a tag to compare

What's new

Modernization

  • pyproject.toml: Replaced setup.py + pytest.ini with modern PEP 621 config (#110)
  • Python 3.13 + 3.14 support: Added to CI test matrix, updated aiohttp and freezegun deps (#109)
  • Device dispatch cleanup: Replaced 14-branch if/elif chain with dictionary lookup (#110)
  • Removed Windows proactor hack: No longer needed with modern aiohttp (#110)

Developer experience

  • CLAUDE.md: Project architecture guide with V2 API flow, device hierarchy, and usage examples (#108)
  • Contributing guide: Dev setup, testing, how to add new devices (#81)
  • Issue & PR templates: Bug report, feature request, and pull request templates (#81)
  • Integration tests: Real API tests gated behind TPLINK_INTEGRATION_TEST=1 (#111)

README & CI

  • README rework: New "Why cloud control?" section explaining the value vs local-only libraries like python-kasa (#106)
  • CI skips docs-only changes: No more Docker + test suite for markdown edits (#107, #108)

Closed issues

  • #68: P100/P110 compatibility (out of scope — Tapo devices use different protocol)
  • #71: Deprecated authentication method (resolved by V2 migration in v5.0.0)
  • #82: V2 API migration tracking (complete)
  • #94: Modernize codebase for Python 3.10+
  • #95: Update dependencies and drop Python < 3.10
  • #98: Add integration tests with real API
  • #100: V1 backward compatibility (hard break — V5 is V2-only)
  • #105: Add Python 3.13 and 3.14 to CI

All project issues are now closed.

v5.0.0 - V2 API Support

08 Feb 05:23
08b5040

Choose a tag to compare

What's New

V2 API Authentication (#101)

  • HMAC-SHA1 request signing for all API calls
  • V2 login with regional URL discovery
  • MFA (two-factor authentication) support via mfa_callback
  • Refresh token support with automatic token renewal
  • TP-Link private CA certificate chain bundled for SSL verification
  • Custom exception classes: TPLinkAuthError, TPLinkMFARequiredError, TPLinkTokenExpiredError, TPLinkCloudError

New Device Support (#102)

  • HS200 - Smart Light Switch
  • KP200 - Smart Outdoor Plug (2 outlets, with child device support)
  • KP400 - Smart Outdoor Plug (2 outlets, with child device support)
  • KL420L5 - Smart LED Light Strip (color, brightness, color temp)
  • KL430 - Smart Light Strip, Multicolor (color, brightness, color temp)

Updated Test Infrastructure (#103)

  • WireMock stubs updated for V2 authentication flow
  • Added V2 account status and login mock endpoints
  • Added sys_info stubs for all new device types
  • Relaxed header matching for V2 signing compatibility

Documentation (#104)

  • README updated with V2 API usage, MFA, token management, error handling
  • Device compatibility list expanded from 7 to 15 devices
  • Usage examples for light strips, outdoor plugs, and switches

Breaking Changes

  • Authentication now uses V2 API by default (V1 wap.tplinkcloud.com replaced by V2 n-wap.tplinkcloud.com)
  • TPLinkDeviceManager constructor accepts new mfa_callback parameter
  • Login may raise TPLinkAuthError or TPLinkMFARequiredError instead of generic exceptions
  • Python 3.10+ required

Full Changelog

v4.2.1...v5.0.0

4.2.1

07 Feb 05:00
56c86c3

Choose a tag to compare

What's Changed

Bug Fixes

  • Fix AttributeError when creating TPLinkDeviceManager without credentials (#77) - fixes #75
  • Handle responseData as both string and dict in pass_through_request (#79) - fixes #65

CI & Testing

  • Fix CI workflow: add pytest-asyncio, fix branch trigger, update to docker compose v2 (#80) - fixes #78
  • Update Python test matrix to 3.10, 3.11, 3.12 (drop EOL 3.9)
  • Add pytest.ini with asyncio_mode = auto, remove deprecated event_loop fixture

Full Changelog: v4.2.0...v4.2.1

4.2.0

12 Jan 04:02
5ba6b4f

Choose a tag to compare

What's Changed

  • Added support for EP40 outdoor smart plug by @ddn in #73
  • Update python-publish.yml to use Trusted Publisher by @piekstra in #74

New Contributors

  • @ddn made their first contribution in #73

Full Changelog: v4.1.5...v4.2.0

4.1.5

21 Jul 02:35
2d84dd5

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v4.1.4...v4.1.5

4.1.4

10 Jul 21:41
c87863b

Choose a tag to compare

What's Changed

  • Return/Pass through None instead of failing with an error by @JBlaschke in #66

Full Changelog: v4.1.3...v4.1.4

4.1.3

06 Apr 01:14
3783326

Choose a tag to compare

What's Changed

Full Changelog: v4.1.2...v4.1.3

4.1.2

04 Apr 18:20
e8f335c

Choose a tag to compare

What's Changed

Full Changelog: v4.1.1...v4.1.2

4.1.1

24 Feb 01:20
1843287

Choose a tag to compare

What's Changed

Full Changelog: v4.1.0...v4.1.1