update zigbee2mqtt base topic
This commit is contained in:
parent
4419442101
commit
f969dd0a10
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
/target
|
||||
/mqttAutomation-*
|
||||
|
||||
2
build.sh
2
build.sh
@ -1,5 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
cross build --target aarch64-unknown-linux-gnu --release
|
||||
cargo build --release
|
||||
|
||||
|
||||
@ -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(_) => {}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user