diff --git a/.gitignore b/.gitignore index ea8c4bf..0f2b40d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /target +/mqttAutomation-* diff --git a/build.sh b/build.sh index f16ac69..95e8620 100644 --- a/build.sh +++ b/build.sh @@ -1,5 +1,7 @@ #!/bin/sh +set -e + cross build --target aarch64-unknown-linux-gnu --release cargo build --release diff --git a/src/automation/mod.rs b/src/automation/mod.rs index ae5721f..9869fd5 100644 --- a/src/automation/mod.rs +++ b/src/automation/mod.rs @@ -86,10 +86,10 @@ impl Automation { }}); } fn lamp01_set(&self, state: bool) { - self.tx_set(String::from("/cool/devices/lamp-01/set"), state); + self.tx_set(String::from("/kees/devices/lamp-01/set"), state); } fn pc_sw_set(&self, state: bool) { - self.tx_set(String::from("/cool/devices/sw-01/set"), state); + self.tx_set(String::from("/kees/devices/sw-01/set"), state); } fn get_current_time(&self) -> u32 { @@ -247,7 +247,7 @@ impl Automation { else if message.topic.starts_with("clock/") { self.clock_message_in(message); } - else if message.topic.eq("/cool/devices/KNMITemp/values") { + else if message.topic.eq("/kees/devices/KNMITemp/values") { let payload_json = json_parser::Json::Text(message.payload); let path = Vec::from([String::from("gr")]); @@ -313,7 +313,7 @@ impl Automation { println!("ERROR: main: faild to subscribe to automation/alarm/# ({})", e), Ok(_) => {} } - match self.client.subscribe("/cool/devices/KNMITemp/values", QoS::AtMostOnce) { + match self.client.subscribe("/kees/devices/KNMITemp/values", QoS::AtMostOnce) { Err(e) => println!("ERROR: main: faild to subscribe to KNMITemp/values ({})", e), Ok(_) => {}