Updated dependencies
This commit is contained in:
parent
8877b24e84
commit
e8d5698835
3835
Cargo.lock
generated
3835
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
16
Cargo.toml
16
Cargo.toml
|
@ -29,11 +29,11 @@ automation_devices = { path = "./automation_devices" }
|
|||
google_home = { path = "./google_home/google_home" }
|
||||
google_home_macro = { path = "./google_home/google_home_macro" }
|
||||
tokio = { version = "1", features = ["rt-multi-thread"] }
|
||||
rumqttc = "0.18"
|
||||
rumqttc = "0.24.0"
|
||||
tracing = "0.1.37"
|
||||
anyhow = "1.0.68"
|
||||
async-trait = "0.1.83"
|
||||
axum = "0.6.1"
|
||||
axum = "0.7.9"
|
||||
bytes = "1.3.0"
|
||||
dotenvy = "0.15.0"
|
||||
dyn-clone = "1.0.17"
|
||||
|
@ -45,12 +45,12 @@ futures = "0.3.25"
|
|||
hostname = "0.4.0"
|
||||
impls = "1.0.3"
|
||||
indexmap = { version = "2.0.0", features = ["serde"] }
|
||||
itertools = "0.12.1"
|
||||
itertools = "0.13.0"
|
||||
json_value_merge = "2.0.0"
|
||||
pollster = "0.2.5"
|
||||
pollster = "0.4.0"
|
||||
proc-macro2 = "1.0.81"
|
||||
quote = "1.0.36"
|
||||
reqwest = { version = "0.11.13", features = [
|
||||
reqwest = { version = "0.12.9", features = [
|
||||
"json",
|
||||
"rustls-tls",
|
||||
], default-features = false } # Use rustls, since the other packages also use rustls
|
||||
|
@ -58,13 +58,13 @@ serde = { version = "1.0.149", features = ["derive"] }
|
|||
serde_json = "1.0.89"
|
||||
serde_repr = "0.1.10"
|
||||
syn = { version = "2.0.60", features = ["extra-traits", "full"] }
|
||||
thiserror = "1.0.38"
|
||||
tokio-cron-scheduler = "0.9.4"
|
||||
thiserror = "2.0.5"
|
||||
tokio-cron-scheduler = "0.13.0"
|
||||
tokio-util = { version = "0.7.11", features = ["full"] }
|
||||
tracing-subscriber = "0.3.16"
|
||||
uuid = "1.8.0"
|
||||
wakey = "0.3.0"
|
||||
zigbee2mqtt-types = { version = "0.2.0", features = ["debug", "philips"] }
|
||||
zigbee2mqtt-types = { version = "0.4.0", features = ["debug", "philips"] }
|
||||
|
||||
[dependencies]
|
||||
automation_lib = { workspace = true }
|
||||
|
|
|
@ -7,7 +7,7 @@ use automation_lib::mqtt::WrappedAsyncClient;
|
|||
use automation_macro::LuaDeviceConfig;
|
||||
use rumqttc::{matches, Publish};
|
||||
use tracing::{debug, trace, warn};
|
||||
use zigbee2mqtt_types::vendors::philips::Zigbee929003017102;
|
||||
use zigbee2mqtt_types::philips::{Zigbee929003017102, Zigbee929003017102Action};
|
||||
|
||||
#[derive(Debug, Clone, LuaDeviceConfig)]
|
||||
pub struct Config {
|
||||
|
@ -70,12 +70,8 @@ impl OnMqtt for HueSwitch {
|
|||
debug!(id = Device::get_id(self), "Remote action = {:?}", action);
|
||||
|
||||
match action {
|
||||
zigbee2mqtt_types::vendors::philips::Zigbee929003017102Action::Leftpress => {
|
||||
self.config.left_callback.call(()).await
|
||||
}
|
||||
zigbee2mqtt_types::vendors::philips::Zigbee929003017102Action::Rightpress => {
|
||||
self.config.right_callback.call(()).await
|
||||
}
|
||||
Zigbee929003017102Action::LeftPress => self.config.left_callback.call(()).await,
|
||||
Zigbee929003017102Action::RightPress => self.config.right_callback.call(()).await,
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
mod web;
|
||||
|
||||
use std::net::SocketAddr;
|
||||
use std::path::Path;
|
||||
use std::process;
|
||||
|
||||
|
@ -18,6 +19,7 @@ use dotenvy::dotenv;
|
|||
use google_home::{GoogleHome, Request, Response};
|
||||
use mlua::LuaSerdeExt;
|
||||
use rumqttc::AsyncClient;
|
||||
use tokio::net::TcpListener;
|
||||
use tracing::{debug, error, info, warn};
|
||||
use web::{ApiError, User};
|
||||
|
||||
|
@ -154,11 +156,10 @@ async fn app() -> anyhow::Result<()> {
|
|||
});
|
||||
|
||||
// Start the web server
|
||||
let addr = fulfillment_config.into();
|
||||
let addr: SocketAddr = fulfillment_config.into();
|
||||
info!("Server started on http://{addr}");
|
||||
axum::Server::try_bind(&addr)?
|
||||
.serve(app.into_make_service())
|
||||
.await?;
|
||||
let listener = TcpListener::bind(addr).await?;
|
||||
axum::serve(listener, app).await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
@ -93,6 +93,8 @@ where
|
|||
|
||||
// Create a request to the auth server
|
||||
// TODO: Do some discovery to find the correct url for this instead of assuming
|
||||
// TODO: I think we can also just run Authlia in front of the endpoint instead
|
||||
// This would then give us a header containing the logged in user info?
|
||||
let mut req = reqwest::Client::new().get(format!("{}/userinfo", openid_url));
|
||||
|
||||
// Add auth header to the request if it exists
|
||||
|
|
Loading…
Reference in New Issue
Block a user