8 releases
0.4.0 | Nov 28, 2023 |
---|---|
0.3.6 | Jul 6, 2023 |
0.3.5 | Feb 13, 2023 |
0.3.3 | Feb 1, 2021 |
0.3.2 | Jan 31, 2021 |
#5 in #home-automation
25 downloads per month
Used in fritzctrl
37KB
982 lines
fritzapi
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.
Example
List devices
// 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
lib.rs
:
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.
Example
let mut client = fritzapi::FritzClient::new(user, password);
// List devices
let mut devices = client.list_devices()?;
// If the first device is off, turn it on
let dev = devices.first_mut().unwrap();
if !dev.is_on() {
dev.turn_on(&mut client)?;
}
Dependencies
~0.7–14MB
~164K SLoC