Releases: piekstra/tplink-cloud-api
Releases · piekstra/tplink-cloud-api
v5.2.0
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_typeattribute — every device now has acloud_typeproperty ("kasa" or "tapo") indicating which cloud it was discovered throughinclude_tapoparameter — passinclude_tapo=FalsetoTPLinkDeviceManagerto 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
What's new
Modernization
- pyproject.toml: Replaced
setup.py+pytest.iniwith modern PEP 621 config (#110) - Python 3.13 + 3.14 support: Added to CI test matrix, updated
aiohttpandfreezegundeps (#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
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.comreplaced by V2n-wap.tplinkcloud.com) TPLinkDeviceManagerconstructor accepts newmfa_callbackparameter- Login may raise
TPLinkAuthErrororTPLinkMFARequiredErrorinstead of generic exceptions - Python 3.10+ required
Full Changelog
4.2.1
What's Changed
Bug Fixes
- Fix
AttributeErrorwhen creatingTPLinkDeviceManagerwithout credentials (#77) - fixes #75 - Handle
responseDataas both string and dict inpass_through_request(#79) - fixes #65
CI & Testing
- Fix CI workflow: add
pytest-asyncio, fix branch trigger, update todocker composev2 (#80) - fixes #78 - Update Python test matrix to 3.10, 3.11, 3.12 (drop EOL 3.9)
- Add
pytest.iniwithasyncio_mode = auto, remove deprecatedevent_loopfixture
Full Changelog: v4.2.0...v4.2.1
4.2.0
4.1.5
What's Changed
- Add if 'next_action' exists check by @kytishong in #67
New Contributors
- @kytishong made their first contribution in #67
Full Changelog: v4.1.4...v4.1.5
4.1.4
What's Changed
- Return/Pass through
Noneinstead of failing with an error by @JBlaschke in #66
Full Changelog: v4.1.3...v4.1.4