| Crates.io | fritzapi |
| lib.rs | fritzapi |
| version | 0.4.1 |
| created_at | 2021-01-31 18:37:06.340597+00 |
| updated_at | 2024-12-29 11:52:22.533362+00 |
| description | Library for interfacing with the "AVM Home Automation" API |
| homepage | |
| repository | https://github.com/rksm/fritz-homeautomation-rs |
| max_upload_size | |
| id | 348976 |
| size | 72,430 |
Library for interfacing with the "AVM Home Automation" API https://avm.de/fileadmin/user_upload/Global/Service/Schnittstellen/AHA-HTTP-Interface.pdf.
It is used by the fritzctrl utility.
// Get a session id
let sid = fritzapi::get_sid(&user, &password)?;
// List devices
let mut devices = fritzapi::list_devices(&sid)?;
// If the first device is of, turn it on
let dev = devices.first_mut().unwrap();
if !dev.is_on() {
dev.turn_on(&sid)?;
}
License: MIT