Crates.io | dss |
lib.rs | dss |
version | 0.1.2 |
source | src |
created_at | 2020-01-11 13:30:50.468878 |
updated_at | 2020-07-14 16:27:04.960509 |
description | Rust native DigitalStrom Server API |
homepage | https://github.com/Roba1993/DSS |
repository | https://github.com/Roba1993/DSS |
max_upload_size | |
id | 197477 |
size | 98,298 |
This repository provides a digitalStrom Server API as well as a Command Line Interface to control your installation directly.
Add dss
as a dependency in Cargo.toml
:
[dependencies]
dss = "0.1.2"
extern crate dss;
fn main() {
// Connect to the digital strom server
let appt = dss::Appartement::connect("url", "user", "password").unwrap();
// Get an overview of the complete appartment
println!("{:#?}\n", appt.get_zones().unwrap().iter().find(|z| z.id == zone));
// turn the light in the zone 2 and group 0 on
appt.set_value(2, Some(0), dss::Value::Light(1.0)).unwrap();
}
cargo install dss
.dss
and follow the login instructionsdss server user password
to login automaticallyzones
to get an overview of your apprtmentoffice light on
to turn the light on in the office zoneOther Commands are:
office light off
office light 0.0
light 1.0 office
light on 2
office schadow open open
shadow 0.5 0.5 office
shadow 0.5 close 2
Small Special for the german folks:
büro licht an
büro licht 0.0
licht 1.0 büro
licht an 2
büro schatten auf auf
schatten 0.5 0.5 büro
schatten 0.5 zu 2
Please contribute!
The goal is to make this library as usefull as possible :)
If you need any kind of help, open an issue or write me an mail. Pull requests are welcome!
Copyright © 2020 Robert Schütte
Distributed under the MIT License.