show build version in html

This commit is contained in:
2024-03-02 14:01:48 +01:00
7 changed files with 70 additions and 12 deletions

View File

@@ -621,6 +621,7 @@ impl PlantCtrlBoardInteraction for PlantCtrlBoard<'_> {
qos: AtLeastOnce,
retain: true,
}),
client_id: Some("plantctrl"),
keep_alive_interval : Some(Duration::from_secs(60*60*2)),
//room for improvement
..Default::default()
@@ -716,14 +717,22 @@ impl PlantCtrlBoardInteraction for PlantCtrlBoard<'_> {
println!("Some error assembling full_topic 2");
bail!("Some error assembling full_topic 2")
};
client.publish(
let publish = client.publish(
&full_topic,
embedded_svc::mqtt::client::QoS::ExactlyOnce,
true,
message,
)?;
);
match publish {
OkStd(_) => return Ok(()),
Err(err) => {
println!("Error during mqtt send on topic {} with message {:#?} error is {:?}",full_topic, message, err);
return Err(err)?
},
}
return Ok(());
;
}
fn state_charge_percent(&mut self) -> Result<u8> {