Releases: mihai-dinculescu/tapo
Releases · mihai-dinculescu/tapo
v0.6.0
Added
- 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.
Changed
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
Changed
- 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
Added
get_energy_data
is now available for the P110 devices. (thanks to @kuhschnappel)
Changed
EnergyUsageResult
'spast24h
,past7d
,past30d
andpast1y
fields are now deprecated.get_energy_data
should be used instead. (thanks to @felixhauptmann)
v0.3.1
Added
examples/tapo_generic_device_toggle.rs
demonstrates howdevice_info
can be used to assess the current status of a generic device and toggle it.
Changed
on_time
is now optional for theL510
andL530
devices because the v2 hardware no longer returns it.
v0.3.0
Added
- The
set
API allows multiple properties to be set in a single request for the L510 and L530 devices.
Changed
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
v0.2.0
Added
- Generic Device example.
Changed
get_device_usage
has been moved to the base implementation so that all devices have access to it.Color
now implementsserde::Serialize
andserde::Deserialize
.
Removed
TapoDeviceExt
is no longer hasDefault
andserde::Serialize
as supersets.
v0.1.0
Added
- Initial Release of Tapo