Skip to content

Tapo v0.9.0

Choose a tag to compare

@mihai-dinculescu mihai-dinculescu released this 25 Apr 20:11
· 61 commits to main since this release
be053c4

Rust

Added

  • ApiClient::discover_devices: added support for SmartCam devices (e.g. IP cameras) via the AES SSL protocol. They are now discovered and listed as DiscoveryResult::CameraPtz (for PTZ models) or DiscoveryResult::Other instead of failing with an error.
  • CameraPtzHandler: added handler for Tapo PTZ cameras (C210, C220, C225, C325WB, C520WS, TC40, TC70) with get_device_info, get_rtsp_stream_url, get_snapshot, pan_tilt, save_preset, goto_preset, delete_preset, and get_presets methods. Use c210, c220, c225, c325wb, c520ws, tc40, or tc70 on the ApiClient to create it.
  • DiscoveryResult::CameraPtz: added variant exposing device_info, handler, and ip when a supported PTZ camera is discovered.
  • HubHandler: added support for S210 light switches with on, off, and get_device_usage. Use s210 on the hub to create the S210Handler.
  • OtherResult: added catch-all result type for unsupported hub child devices, containing device_id, model, and nickname.
  • KE100Result, S200Result, T100Result, T110Result, T300Result, T31XResult: added model field.
  • json-schema feature: added optional schemars::JsonSchema derive on Color for use with MCP or other JSON Schema tooling.
  • ApiClient::discover_devices_raw: added raw device discovery (behind debug feature) that returns the IP address of the devices found and their discovery JSON response.

Changed

  • ChildDeviceHubResult::Other: changed from a unit variant to Other(Box<OtherResult>), exposing device info for unrecognized models.
  • ApiClient::discover_devices: sped up discovery by inferring the authentication protocol (KLAP or AES) from the discovery message instead of probing the device.
  • DiscoveryResult::GenericDevice: renamed to DiscoveryResult::Other. Removed handler field, added ip field.
  • DeviceType::GenericDevice: renamed to DeviceType::Other.
  • DeviceInfoGenericResult: renamed to DeviceInfoBasicResult.
  • DeviceInfoPowerStripResult: changed time_diff from i64 to Option<i64> for consistency with other device info types.
  • DeviceInfoBasicResult: removed device_on, on_time, ip, fw_id, hw_id, lang, rssi, signal_level, specs, ssid, and time_diff fields. Changed nickname to Option<String>. Added serde aliases for SmartCam field name compatibility.

Fixed

  • AesSslProtocol, KlapProtocol: downgraded error! log calls to debug! on request, handshake, and authentication failures. The same information is already returned as an Err value, so the error! logs were duplicate reporting.

Removed

  • GenericDeviceHandler: removed. Use a specific handler type (e.g. l530, p110) instead.
  • ApiClient::generic_device: removed method for creating a GenericDeviceHandler.

Python

Added

  • ApiClient.discover_devices: added support for SmartCam devices (e.g. IP cameras) via the AES SSL protocol. They are now discovered and listed as DiscoveryResult.CameraPtz (for PTZ models) or DiscoveryResult.Other instead of failing with an error.
  • CameraPtzHandler: added handler for Tapo PTZ cameras (C210, C220, C225, C325WB, C520WS, TC40, TC70) with get_device_info, get_rtsp_stream_url, get_snapshot, pan_tilt, save_preset, goto_preset, delete_preset, and get_presets methods. Use c210, c220, c225, c325wb, c520ws, tc40, or tc70 on the ApiClient to create it.
  • DiscoveryResult.CameraPtz: added variant exposing device_info, handler, and ip when a supported PTZ camera is discovered.
  • HubHandler: added support for S210 light switches with on, off, and get_device_usage. Use s210 on the hub to create the S210Handler.
  • OtherResult: added catch-all result type for unsupported hub child devices, containing device_id, model, and nickname.
  • KE100Result, S200Result, T100Result, T110Result, T300Result, T31XResult: added model field.
  • ApiClient.discover_devices_raw: added raw device discovery that returns the IP address of the devices found and their discovery JSON response.

Changed

  • HubHandler: changed get_child_device_list() to return OtherResult instead of None for unsupported devices.
  • ApiClient.discover_devices: sped up discovery by inferring the authentication protocol (KLAP or AES) from the discovery message instead of probing the device.
  • DiscoveryResult.GenericDevice: renamed to DiscoveryResult.Other. Removed handler field, added ip field.
  • DeviceType.GenericDevice: renamed to DeviceType.Other.
  • DeviceInfoGenericResult: renamed to DeviceInfoBasicResult.
  • DeviceInfoBasicResult: removed device_on, on_time, ip, fw_id, hw_id, lang, rssi, signal_level, specs, ssid, and time_diff fields. Changed nickname to Optional[str]. No longer inherits from DeviceInfoSmartExt; all fields are now declared directly.

Fixed

  • DeviceInfoRgbLightStripResult, DeviceInfoRgbicLightStripResult: removed incorrect on_time field from .pyi stubs (not present in Rust type).
  • Logging: stopped emitting error-level Rust logs on stderr for request failures, handshake errors, and session expiry. The same information is already raised as a Python exception; these messages are now emitted at debug level instead.

Removed

  • GenericDeviceHandler: removed. Use a specific handler type (e.g. l530, p110) instead.
  • ApiClient.generic_device: removed method for creating a GenericDeviceHandler.

Full Changelog: v0.8.12...v0.9.0