All notable changes to this project will be documented in this file. This change log follows the conventions of keepachangelog.com.
- Added an example for the L900 light strips.
- Added support for the L900 light strips.
Python v0.7.0 - 2024-11-07
- Added support for the KE100 thermostatic radiator valve (TRV).
Rust v0.7.17 - 2024-10-23
- Added support for the P304 power strip.
- The
openssl
dependency has been replaced with native Rust alternatives to expand cross-compilation options, such as for Android, and to decrease build times (thanks to @rbock44). PlugPowerStripHandler
has been renamed toPowerStripPlugHandler
to be consistent with the rest of the library.PlugPowerStripResult
has been renamed toPowerStripPlugResult
to be consistent with the rest of the library.- The
UsageByPeriodResult
fieldstoday
,past7
, andpast30
have been updated toOption<u64>
to handle cases where the API returns negative values, which will be represented asNone
.
- Updated all comments referencing Watts to confirm the correct units are specified.
Python v0.6.0 - 2024-10-23
- Added support for the P300 and P304 power strips.
- Python logs can now capture entries from the underlying Rust library.
- The
openssl
dependency has been replaced with native Rust alternatives to expand cross-compilation options, such as for Android, and to decrease build times (thanks to @rbock44). - The
UsageByPeriodResult
fieldstoday
,past7
, andpast30
have been updated toOptional[int]
to handle cases where the API returns negative values, which will be represented asnull
.
- Updated all comments referencing Watts to confirm the correct units are specified.
Rust v0.7.16 - 2024-09-27
- Added support for the L535 light bulbs.
- Fixed an issue that prevented the color from being set properly for the L535 light bulbs.
Python v0.5.1 - 2024-09-27
- Added support for the L535 light bulbs.
- Fixed an issue that prevented the color from being set properly for the L535 light bulbs.
Rust v0.7.15 - 2024-09-18
- The
LowBattery
variant has been added to theS200BLog
enum.
- The
t310
andt315
methods ofHubHandler
can now createT31XHandler
handlers for either of the two device types. - The child device handlers for the H100 hub and the P300 power strip have been redesigned to eliminate the use of lifetimes, to facilitate FFI integrations.
- The comments of
start_timestamp
andend_timestamp
fields inEnergyDataResult
have been updated to better describe their purpose. S200BRotationParams
's fielddegrees
has been renamed torotation_degrees
.
- Fixed an issue with the
Color
presets that triggered a validation error when attempting to set thecolor
toDarkRed
.
- The deprecated
past24h
,past7d
,past30d
andpast1y
fields have been removed fromEnergyUsageResult
. This data is now available exclusively throughget_energy_data
'sEnergyDataResult
response.
Python v0.5.0 - 2024-09-18
- Added full support for the S200B switches through the
S200BHandler
handler. - Added full support for the T100 sensors through the
T100Handler
handler. - Added full support for the T110 sensors through the
T110Handler
handler. - Added full support for the T300 sensors through the
T300Handler
handler. - Added full support for the T310 and T315 sensors through the
T31XHandler
handler.
- The comments of
start_timestamp
andend_timestamp
fields inEnergyDataResult
have been updated to better describe their purpose.
- Fixed an issue with the
Color
presets that triggered a validation error when attempting to set thecolor
toDarkRed
.
Rust v0.7.14 - 2024-08-31
DeviceInfoPlugEnergyMonitoringResult
has been added to support the P110 and P115 devices, which have different responses compared to the P100 and P105 devices.
DeviceInfoPlugResult
has been updated to correctly support the P100 and P105 devices.
Python v0.4.0 - 2024-08-31
DeviceInfoPlugEnergyMonitoringResult
has been added to support the P110 and P115 devices, which have different responses compared to the P100 and P105 devices.
- Resolved an issue that led to unrecoverable process hangs when a device request timed out.
- The concurrency of device handlers has been significantly enhanced by replacing all
Mutex
instances withRwLock
. DeviceInfoPlugResult
has been updated to correctly support the P100 and P105 devices.
Rust v0.7.13 - 2024-08-26
- To align with the latest API updates, the
overheated
field for plugs has been replaced by three enums:overcurrent_status
,overheat_status
, andpower_protection_status
(thanks to @padenot).
Python v0.3.2 - 2024-08-26
- To align with the latest API updates, the
overheated
field for plugs has been replaced by three enums:overcurrent_status
,overheat_status
, andpower_protection_status
.
Rust v0.7.12 - 2024-06-27
- H100's create child device handler methods now take a
HubDevice
enum
instead of aString
and are nowasync
to allow for more flexibility. This enables the caller to find child devices by either device ID or nickname. PlugIdentifier
has been renamed toPlug
.Plug::ByDeviceId
now verifies that the provided device ID is found and returns anError::DeviceNotFound
error when it's not.HubDevice
variants now take aString
instead of a&str
to allow for more flexibility.Plug
variants now take aString
instead of a&str
to allow for more flexibility.
ColorLightSetDeviceInfoParams
hue
field validation has been changed frombetween 1 and 360
tobetween 0 and 360
to match the device's expected range.- Fixed an issue where the
EnergyDataResult's
start_timestampand
end_timestamp` did not correctly adjust for timezone offsets. - The
chrono
dependency has been updated to0.4.34
to fix the minimum version requirement.
- The
overheated
property has been removed fromDeviceInfoGenericResult
because it's not present in the response of all devices.
Python v0.3.1 - 2024-06-27
ColorLightSetDeviceInfoParams
hue
field validation has been changed frombetween 1 and 360
tobetween 0 and 360
to match the device's expected range.- Fixed an issue where the
EnergyDataResult's
start_timestampand
end_timestamp` did not correctly adjust for timezone offsets. - All handlers are now correctly exported and can be imported from the
tapo
module.
- The
overheated
property has been removed fromDeviceInfoGenericResult
because it's not present in the response of all devices.
Rust v0.7.11 - 2024-05-04
- Added support for the P300 power strip (thanks to @Michal-Szczepaniak).
RgbLightStripHandler
andDeviceInfoRgbLightStripResult
have been added to support the L900 devices separately from the L530 and L630 devices.
ChildDeviceResult
has been renamed toChildDeviceHubResult
to facilitate adding support for other devices with children.ColorLightStripHandler
has been renamed toRgbicLightStripHandler
to better reflect its purpose.DeviceInfoColorLightStripResult
has been renamed toDeviceInfoRgbicLightStripResult
to better reflect its purpose.
Python v0.3.0 - 2024-05-04
- Added partial support for the H100 hub and its child devices. Currently, only the
get_device_info
function is supported for the child devices through the hub'sget_child_device_list
method.
- A large number of types have been reorganized to me more in line with the Rust library. This includes moving many of them under the
requests
andresponses
sub modules.
l900
has been removed from theApiClient
until proper support is added.
Rust v0.7.10 - 2024-04-05
- The implementation of
ApiClient::new
has been improved to allow for the return ofApiClient
instead ofResult<ApiClient, Error>
. - The default timeout for all requests has been reduced to 30 seconds from 300 seconds.
ApiClient::with_timeout
has been added to allow for the setting of a custom timeout for all requests (thanks to @skoky).
Python v0.2.1 - 2024-04-05
- The default timeout for all requests has been reduced to 30 seconds from 300 seconds.
- The
timeout_s
optional parameter has been added to theApiClient
constructor to allow for the setting of a custom timeout for all requests (thanks to @skoky).
Rust v0.7.9 - 2024-01-27
- The
send()
method of the.set()
API now takes a reference to the device handler in order to allow for better ergonomics.
- The device info response for the L510, L520, and L610 devices has been fixed.
Python v0.2.0 - 2024-01-27
- Added support for the L530, L630, and L900 color light bulbs.
- Fixed a misconfiguration that was preventing the sdist package from working properly.
- The device info response for the L510, L520, and L610 devices has been fixed.
Rust v0.7.8 - 2024-01-22
- Added the
device_reset
method to all plugs and lights.
- The device info response for the L510, L520, and L610 devices has been fixed to have the
re_power_type
field as optional.
Python v0.1.5 - 2024-01-22
- Added the
device_reset
method to all plugs and lights.
- The device info response for the L510, L520, and L610 devices has been fixed to have the
re_power_type
field as optional.
Rust v0.7.7 - 2024-01-13
- The
anyhow::anyhow!("Local hash does not match server hash")
error has been replaced with the more specifictapo::TapoResponseError::InvalidCredentials
error.
- The
default_states
field that's part of the device info response has been changed for the L510, L520, and L610 devices to match the actual response from the device. - A handful of edge cases around the Klap Protocol that were causing panics have been fixed to return
tapo::TapoResponseError::SessionTimeout
ortapo::TapoResponseError::InvalidResponse
errors instead.
Python v0.1.4 - 2024-01-13
- The "Local hash does not match server hash" error has been replaced with the more specific
tapo::TapoResponseError::InvalidCredentials
error.
- The
default_states
field that's part of the device info response has been changed for the L510, L520, and L610 devices to match the actual response from the device. - A handful of edge cases around the Klap Protocol that were causing panics have been fixed to return
tapo::TapoResponseError::SessionTimeout
ortapo::TapoResponseError::InvalidResponse
errors instead.
Rust v0.7.6 - 2023-11-25
- Added support for the KE100 thermostatic radiator valve (TRV) devices (thanks to @pwoerndle).
- Fixed an issue that was preventing the
nickname
field from being decoded in theget_device_info
results of child devices of the H100 hub.
Rust v0.7.5 - 2023-11-05
- Added support for the T300 water sensor.
- Added a dedicated handler for the L520 devices.
Python v0.1.3 - 2023-11-04
- Added support for the L510, L520 and L610 light bulbs.
- The minimum required version of Python has been changed to 3.8, up from 3.7.
- Fixed an issue that was preventing
get_device_info_json
from working on the plug devices.
Python v0.1.2 - 2023-10-19
- Added support for generic devices.
- Added
get_device_info_json
to all currently supported devices.
Python v0.1.1 - 2023-10-01
This is the first version of the Python wrapper library. It supports the plug devices P100, P105, P110 and P115.
v0.7.4 - 2023-09-15
- Fixed the minimum version of the chrono dependency by setting it to 0.4.25.
DeviceUsageResult
has been split intoDeviceUsageResult
andDeviceUsageEnergyMonitoringResult
. The former is now returned for the P100 and P105 devices while the latter is returned for all the other devices that support energy monitoring.EnergyMonitoringPlugHandler
has been renamed toPlugEnergyMonitoringHandler
.- All
___DeviceInfoResult
structs have been renamed toDeviceInfo___Result
. - All
___DefaultState
structs have been renamed toDefault___State
.
get_device_usage
has been removed from theGenericDeviceHandler
because it is not supported by all devices.
v0.7.3 - 2023-09-14
- Added support for the newly introduced KLAP protocol, which is required to interact with the latest firmware version of multiple devices.
- All uses of
time
have been replaced withchrono
:EnergyDataInterval
'stime::OffsetDateTime
andtime::Date
fields have been replaced withchrono::NaiveDate
.EnergyUsageResult::local_time
field is nowchrono::NaiveDateTime
instead oftime::OffsetDateTime
.EnergyDataResult::local_time
field is nowchrono::NaiveDateTime
instead oftime::OffsetDateTime
.TemperatureHumidityRecords
's andTemperatureHumidityRecord
datetime
fields are nowchrono::DateTime<chrono::Utc>
instead oftime::OffsetDateTime
.
EnergyDataInterval::Hourly::start_datetime
andEnergyDataInterval::Hourly::end_datetime
have been renamed tostart_date
andend_date
because the time component is not required.- The
login
function on all handlers has been renamed torefresh_session
to better reflect its purpose and it now takes and returns a&mut self
instead ofself
. L510DeviceInfoResult
has been renamed toLightDeviceInfoResult
to better reflect its purpose when used for L510 and L610 devices.L530DeviceInfoResult
has been renamed toColorLightDeviceInfoResult
to better reflect its purpose when used for L530, L630 and L900 devices.L930DeviceInfoResult
has been renamed toColorLightStripDeviceInfoResult
to better reflect its purpose when used for L920 and L930 devices.- The
default_states
field ofLightDeviceInfoResult
,ColorLightDeviceInfoResult
,ColorLightStripDeviceInfoResult
andPlugDeviceInfoResult
is now a struct instead of an enum.
v0.7.2 - 2023-08-21
- Added
get_current_power
to theP110
andP115
plugs. (thanks to @Michal-Szczepaniak)
v0.7.1 - 2023-05-30
- Added
get_temperature_humidity_records
to theT310
andT315
sensors.
- The creation of device handlers has been simplified.
// old
let device = ApiClient::new(ip_address, tapo_username, tapo_password)?
.l530()
.login()
.await?;
// new
let device = ApiClient::new(tapo_username, tapo_password)?
.l530(ip_address)
.await?;
- The creation of child device handlers has been reworked so that they can be created without requiring a call to
get_child_device_list
when the child Device ID is known. ApiClient
now implementsClone
to allow for a cheaper duplication of the client.
- The
L510
andL610
devices no longer expose theset()
API because changing multiple properties simultaneously does not make sense for these devices.
v0.7.0 - 2023-05-26
- Added initial support for the H100 device, the S200B switch and the T100, T110, T310, T315 sensors. The child devices currently support
get_device_info
andget_trigger_logs
. - All responses now derive
serde::Serialize
to allow for more straightforward consumer serialisation. (thanks to @ClementNerma) ApiClient
has been marked as bothSend
andSync
to allow for sharing between threads. (thanks to @ClementNerma)
GenericDeviceInfoResult
'sdevice_on
property has been made optional to accommodate devices that do not provide this field.
v0.6.0 - 2023-05-08
- Added support for the L920 and L930 light strips. The highlight is the
tapo::ColorLightStripHandler::set_lighting_effect
function, which supports all the effects that the Tapo app contains alongside user-defined effects. - Added support for the L900 light strips.
- Each supported device now has it's own handler creator.
set_*
functions liketapo::requests::ColorLightSetDeviceInfoParams::set_brightness
now returnSelf
instead ofResult<Self, Error>
to allow for better ergonomics. The validations will now run whentapo::requests::ColorLightSetDeviceInfoParams::send
is called.tapo::requests::L510SetDeviceInfoParams
has been renamed totapo::requests::LightSetDeviceInfoParams
to better reflect its purpose when used for L510, L610, and L900 devices.tapo::requests::L530SetDeviceInfoParams
has been renamed totapo::requests::ColorLightSetDeviceInfoParams
to better reflect its purpose when used for L530, L630, L920 and L930 devices.tapo::P100Handler
has been renamed totapo::PlugHandler
.tapo::P110Handler
has been renamed totapo::EnergyMonitoringPlugHandler
.tapo::L510Handler
has been renamed totapo::LightHandler
.tapo::L530Handler
has been renamed totapo::ColorLightHandler
.tapo::L930Handler
has been renamed totapo::ColorLightStripHandler
.
v0.5.0 - 2023-04-16
- The creation of an API Client for a specific device is now done through handler methods on the
ApiClient
struct. This allows for a more ergonomic API. (thanks to Octocrab for inspirations)
// old
let device = ApiClient::<L530>::new(ip_address, tapo_username, tapo_password, true).await?;
// new
let device = ApiClient::new(ip_address, tapo_username, tapo_password)?
.l530()
.login()
.await?;
ApiClient::new
parameters are nowimpl Into<String>
instead ofString
to allow for more flexibility.- Error handling has been reworked. All functions that could error now return a
Result<..., tapo::Error>
.
v0.4.0 - 2023-02-25
get_energy_data
is now available for the P110 devices. (thanks to @kuhschnappel)
EnergyUsageResult
'spast24h
,past7d
,past30d
andpast1y
fields are now deprecated.get_energy_data
should be used instead. (thanks to @felixhauptmann)
v0.3.1 - 2023-02-19
examples/tapo_generic_device_toggle.rs
demonstrates howdevice_info
can be used to assess the current status of a generic device and toggle it.
on_time
is now optional for theL510
andL530
devices because the v2 hardware no longer returns it.
v0.3.0 - 2022-11-20
- The
set
API allows multiple properties to be set in a single request for the L510 and L530 devices.
tapo::Color
has been moved totapo::requests::Color
.GenericDeviceInfoResult::on_time
has been changed fromu64
toOption<u64>
because some devices (like L930) do not provide this field.- All response structs have been moved under
tapo::responses
. - The docs have been improved.
v0.2.1 - 2022-08-07
latitude
andlongitude
inGenericDeviceInfoResult
,L510DeviceInfoResult
,L530DeviceInfoResult
andPlugDeviceInfoResult
are now signed integers to accommodate for incoming responses with negative numbers. (thanks to @JPablomr)
v0.2.0 - 2022-06-13
- Generic Device example.
get_device_usage
has been moved to the base implementation so that all devices have access to it.Color
now implementsserde::Serialize
andserde::Deserialize
.
TapoDeviceExt
is no longer hasDefault
andserde::Serialize
as supersets.