Skip to content

Commit

Permalink
Update dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
qwandor committed Jan 20, 2022
1 parent 8a90cc8 commit 0404dbb
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 19 deletions.
18 changes: 10 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions homie-controller/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ categories = ["network-programming"]

[dependencies]
log = "0.4.14"
rumqttc = "0.8.0"
rumqttc = "0.10.0"
thiserror = "1.0.29"

[dev-dependencies]
async-channel = "1.6.1"
futures = "0.3.17"
homie-device = { version = "0.6.0", path = "../homie-device" }
pretty_env_logger = "0.4.0"
rumqttd = "0.7.0"
rumqttlog = "0.7.0"
rumqttd = "0.9.0"
rumqttlog = "0.9.0"
# TODO: Remove "io-util" once a new version of rumqttc is released which fixes
# https://github.com/bytebeamio/rumqtt/issues/294.
tokio = { version = "1.12.0", features = ["io-util", "macros", "rt", "rt-multi-thread", "time"] }
3 changes: 2 additions & 1 deletion homie-controller/examples/discover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
use homie_controller::{Event, HomieController, PollError};
use rumqttc::MqttOptions;
use std::time::Duration;

#[tokio::main]
async fn main() -> Result<(), PollError> {
pretty_env_logger::init();

let mut mqttoptions = MqttOptions::new("homie_controller", "test.mosquitto.org", 1883);
mqttoptions.set_keep_alive(5);
mqttoptions.set_keep_alive(Duration::from_secs(5));

let (controller, mut event_loop) = HomieController::new(mqttoptions, "homie");
loop {
Expand Down
3 changes: 1 addition & 2 deletions homie-controller/tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,7 @@ fn spawn_mqtt_broker(port: u16) {
max_payload_size: 2048,
max_inflight_count: 500,
max_inflight_size: 1024,
username: None,
password: None,
login_credentials: None,
},
},
);
Expand Down
2 changes: 1 addition & 1 deletion homie-device/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ futures = "0.3.17"
local_ipaddress = "0.1.3"
log = "0.4.14"
mac_address = "1.1.2"
rumqttc = "0.8.0"
rumqttc = "0.10.0"
tokio = "1.12.0"
thiserror = "1.0.29"

Expand Down
2 changes: 1 addition & 1 deletion homie-influx/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ homie-controller = { version = "0.4.0", path = "../homie-controller" }
influx_db_client = { version = "0.5.0", default-features = false, features = ["rustls-tls"] }
log = "0.4.14"
pretty_env_logger = "0.4.0"
rumqttc = "0.8.0"
rumqttc = "0.10.0"
rustls = "0.19.1"
rustls-native-certs = "0.5.0"
serde_derive = "1.0.130"
Expand Down
3 changes: 2 additions & 1 deletion homie-influx/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const DEFAULT_MQTT_RECONNECT_INTERVAL: Duration = Duration::from_secs(5);
const DEFAULT_INFLUXDB_URL: &str = "http://localhost:8086";
const CONFIG_FILENAME: &str = "homie-influx.toml";
const DEFAULT_MAPPINGS_FILENAME: &str = "mappings.toml";
const KEEP_ALIVE: Duration = Duration::from_secs(5);

#[derive(Clone, Debug, Default, Deserialize)]
#[serde(default, deny_unknown_fields)]
Expand Down Expand Up @@ -170,7 +171,7 @@ pub fn get_mqtt_options(
) -> MqttOptions {
let client_name = format!("{}-{}", config.client_prefix, client_name_suffix);
let mut mqtt_options = MqttOptions::new(client_name, &config.host, config.port);
mqtt_options.set_keep_alive(5);
mqtt_options.set_keep_alive(KEEP_ALIVE);

if let (Some(username), Some(password)) = (&config.username, &config.password) {
mqtt_options.set_credentials(username, password);
Expand Down
2 changes: 1 addition & 1 deletion mijia-homie/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ itertools = "0.10.1"
log = "0.4.14"
mijia = { version = "0.5.0", path = "../mijia" }
pretty_env_logger = "0.4.0"
rumqttc = "0.8.0"
rumqttc = "0.10.0"
rustls = "0.19.1"
rustls-native-certs = "0.5.0"
serde_derive = "1.0.130"
Expand Down
3 changes: 2 additions & 1 deletion mijia-homie/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const DEFAULT_HOST: &str = "test.mosquitto.org";
const DEFAULT_PORT: u16 = 1883;
const DEFAULT_SENSOR_NAMES_FILENAME: &str = "sensor-names.toml";
const CONFIG_FILENAME: &str = "mijia-homie.toml";
const KEEP_ALIVE: Duration = Duration::from_secs(5);

#[derive(Clone, Debug, Default, Deserialize)]
#[serde(default, deny_unknown_fields)]
Expand Down Expand Up @@ -99,7 +100,7 @@ pub fn get_mqtt_options(config: MqttConfig, device_id: &str) -> MqttOptions {

let mut mqtt_options = MqttOptions::new(client_name, config.host, config.port);

mqtt_options.set_keep_alive(5);
mqtt_options.set_keep_alive(KEEP_ALIVE);
if let (Some(username), Some(password)) = (config.username, config.password) {
mqtt_options.set_credentials(username, password);
}
Expand Down

0 comments on commit 0404dbb

Please sign in to comment.