move things around
Signed-off-by: Frank Villaro-Dixon <frank@villaro-dixon.eu>
This commit is contained in:
parent
12efb33cf2
commit
db0036a2bc
6 changed files with 25 additions and 31 deletions
8
Cargo.lock
generated
8
Cargo.lock
generated
|
@ -156,14 +156,6 @@ version = "0.4.21"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c"
|
||||
|
||||
[[package]]
|
||||
name = "mytest"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"daikin_altherma",
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "percent-encoding"
|
||||
version = "2.3.1"
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
workspace = { members = ["mytest"] }
|
||||
[package]
|
||||
name = "daikin_altherma"
|
||||
version = "0.0.1"
|
||||
|
@ -25,3 +24,6 @@ url = "2.5.0"
|
|||
[dependencies.uuid]
|
||||
version = "1.7.0"
|
||||
features = ["v4"]
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
|
||||
|
|
|
@ -1,14 +1,6 @@
|
|||
use daikin_altherma::DaikinAlthermaClient;
|
||||
fn main() {
|
||||
let mut a = DaikinAlthermaClient::new("192.168.11.100".to_string()).unwrap();
|
||||
// let am = a.get_adapter_model();
|
||||
// println!("Adapter model: {am}");
|
||||
//
|
||||
|
||||
//a.set_holiday_mode(false);
|
||||
|
||||
//# let hm = a.is_holiday_mode();
|
||||
//# println!("Holiday mode: {hm}");
|
||||
|
||||
let tp = a.get_tank_parameters().unwrap();
|
||||
println!("Tank: {:?}", tp);
|
10
examples/temperature.rs
Normal file
10
examples/temperature.rs
Normal file
|
@ -0,0 +1,10 @@
|
|||
use daikin_altherma::DaikinAlthermaClient;
|
||||
fn main() {
|
||||
let mut a = DaikinAlthermaClient::new("192.168.11.100".to_string()).unwrap();
|
||||
|
||||
let hp = a.get_heating_parameters().unwrap();
|
||||
println!("Heating: {:?}", hp);
|
||||
a.set_heating_setpoint_temperature(20.0);
|
||||
let hp = a.get_heating_parameters().unwrap();
|
||||
println!("Heating: {:?}", hp);
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
[package]
|
||||
name = "mytest"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
daikin_altherma = {path = "/home/frank/src/github.com/frankkkkk/daikin-altherma-rs/"}
|
||||
thiserror = "1.0.57"
|
16
src/lib.rs
16
src/lib.rs
|
@ -1,4 +1,12 @@
|
|||
use std::{fmt::Debug, net::TcpStream};
|
||||
//! # API to Daikin Altherma LAN Adapters
|
||||
//!
|
||||
//! This rust crate interfaces with Daikin Altherma LAN adapters.
|
||||
//! There are two firmware versions of the LAN adapters:
|
||||
//! - Cloud connected
|
||||
//! - LAN only
|
||||
//! This library only supports the second one for the moment.
|
||||
|
||||
use std::net::TcpStream;
|
||||
use uuid::Uuid;
|
||||
|
||||
use serde_json::{json, Value};
|
||||
|
@ -8,9 +16,9 @@ use url::Url;
|
|||
mod errors;
|
||||
mod params;
|
||||
mod traits;
|
||||
use crate::errors::DAError;
|
||||
use crate::params::HeatingParameters;
|
||||
use crate::params::TankParameters;
|
||||
pub use crate::errors::DAError;
|
||||
pub use crate::params::HeatingParameters;
|
||||
pub use crate::params::TankParameters;
|
||||
|
||||
pub struct DaikinAlthermaClient {
|
||||
ws_client: WebSocket<stream::MaybeTlsStream<TcpStream>>,
|
||||
|
|
Loading…
Reference in a new issue