Added TpLink Tapo power usage data GET route
This commit is contained in:
parent
05915aae30
commit
fb9f39ce21
7 changed files with 1365 additions and 44 deletions
|
|
@ -92,3 +92,23 @@ pub struct LoadAvgStats {
|
|||
pub five: f64,
|
||||
pub fifteen: f64,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub struct TapoDeviceData {
|
||||
pub name: String,
|
||||
pub ip: String,
|
||||
pub alias: String,
|
||||
pub model: String,
|
||||
pub on: bool,
|
||||
pub current_power_w: f64,
|
||||
pub today_energy_wh: u64,
|
||||
pub month_energy_wh: u64,
|
||||
pub today_runtime_min: u64,
|
||||
pub month_runtime_min: u64,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub struct TapoPowerResponse {
|
||||
pub timestamp: String,
|
||||
pub devices: Vec<TapoDeviceData>,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue