feat: add MQTT support and configuration documentation
This commit is contained in:
@@ -21,4 +21,5 @@ serde = "1.0"
|
||||
serde_derive = "1.0"
|
||||
serde_json = "1.0"
|
||||
# end of web stuff
|
||||
paho-mqtt = "0.13.2"
|
||||
ping = "0.4.1"
|
||||
|
@@ -414,6 +414,10 @@ fn main() -> ExitCode {
|
||||
if device_online == true {
|
||||
// Render new image
|
||||
send_package(ip.to_string(), &last_data, &straba_res);
|
||||
// Publish data to MQTT
|
||||
if let Some(ref client) = mqtt_client {
|
||||
publish_to_mqtt(client, &last_data, &straba_res);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user