diff --git a/src/main.cpp b/src/main.cpp index f49f91e..249e8da 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -607,6 +607,12 @@ void setup() if (!ota.getMAC().equals("246f28d1a080")) mqtt.subscribe("thomas/sensor/246f28d1a080/#", receiveMqtt); if (!ota.getMAC().equals("30aea47b0568")) mqtt.subscribe("thomas/sensor/30aea47b0568/#", receiveMqtt); + /* temp: publish version */ + delay(5000); + String topic_version = String("thomas/sensor/") + ota.getMAC() + String("/version"); + const char* fw_version_str = String(FW_VERSION).c_str(); + mqtt.publish(topic_version.c_str(), fw_version_str, strlen(fw_version_str)); + ESP_LOGD(TAG, "setup done"); }