Mercurial > code > home > repos > homeauto
diff espNode/desk/src/mqtt.cpp @ 1678:7831b5de3572
espNode checkpoint
author | drewp@bigasterisk.com |
---|---|
date | Mon, 27 Sep 2021 22:59:39 -0700 |
parents | 3ff074ba25f1 |
children |
line wrap: on
line diff
--- a/espNode/desk/src/mqtt.cpp Wed Sep 22 01:22:05 2021 -0700 +++ b/espNode/desk/src/mqtt.cpp Mon Sep 27 22:59:39 2021 -0700 @@ -37,12 +37,15 @@ Published from MCU: +mode in {scan, enroll, download, setModel, deleteModel} + fingerprint/<mode>/status = junk fingerprint/<mode>/error/<caller> = FPM error message fingerprint/store = some change to fingerprint storage fingerprint/detect = input finger fingerprint/model/<fid> = binary model data fingerprint/image/<fid> = binary image data +fingerprint/temperature = "%.3fC" */ void Publish(const std::string& subtopic, const std::string& msg) { std::string topic = "fingerprint/" + subtopic; @@ -61,6 +64,7 @@ snprintf(buf, sizeof(buf), "%.3fC", temp_c); mqttClient.publish("fingerprint/temperature", 1, /*retain=*/true, buf); } + void onMqttConnect(bool sessionPresent) { Serial.println("Connected to MQTT."); Serial.print("Session present: ");