diff --git a/src/main.cpp b/src/main.cpp index 0067adf..5ee5ab7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -73,7 +73,7 @@ struct __attribute__((packed)) sensor_readings_t { uint32_t lastUpdate = 0; } sensor_readings; -sensor_readings_t sensors_a4cf1211c3e4, sensors_246f28d1fa5c, sensors_246f28d1a080, sensors_30aea47b0568; +sensor_readings_t sensors_a4cf1211c3e4, sensors_246f28d1fa5c, sensors_246f28d1a080, sensors_246f28d1eff4; SensorHistory history_pressure(30); @@ -196,8 +196,8 @@ void receiveMqtt(const char* topic, const char* data) { sensor = &sensors_246f28d1fa5c; } else if (strstr(topic, "thomas/sensor/246f28d1a080") == topic) { sensor = &sensors_246f28d1a080; - } else if (strstr(topic, "thomas/sensor/30aea47b0568") == topic) { - sensor = &sensors_30aea47b0568; + } else if (strstr(topic, "thomas/sensor/246f28d1eff4") == topic) { + sensor = &sensors_246f28d1eff4; } char* topic_last = strrchr(topic, '/'); @@ -411,8 +411,8 @@ void displayValues() { if (!ota.getMAC().equals("246f28d1a080") && millis() - sensors_246f28d1a080.lastUpdate < 15*60*1000) { display.printf("246f28d1a080: %4.1f %4.1f %6.1f\n", sensors_246f28d1a080.temperature, sensors_246f28d1a080.humidity, sensors_246f28d1a080.pressure); } - if (!ota.getMAC().equals("30aea47b0568") && millis() - sensors_30aea47b0568.lastUpdate < 15*60*1000) { - display.printf("30aea47b0568: %4.1f %4.1f %6.1f\n", sensors_30aea47b0568.temperature, sensors_30aea47b0568.humidity, sensors_30aea47b0568.pressure); + if (!ota.getMAC().equals("246f28d1eff4") && millis() - sensors_246f28d1eff4.lastUpdate < 15*60*1000) { + display.printf("246f28d1eff4: %4.1f %4.1f %6.1f\n", sensors_246f28d1eff4.temperature, sensors_246f28d1eff4.humidity, sensors_246f28d1eff4.pressure); } } @@ -644,7 +644,7 @@ void setup() if (!ota.getMAC().equals("a4cf1211c3e4")) mqtt.subscribe("thomas/sensor/a4cf1211c3e4/#", receiveMqtt); if (!ota.getMAC().equals("246f28d1fa5c")) mqtt.subscribe("thomas/sensor/246f28d1fa5c/#", receiveMqtt); if (!ota.getMAC().equals("246f28d1a080")) mqtt.subscribe("thomas/sensor/246f28d1a080/#", receiveMqtt); - if (!ota.getMAC().equals("30aea47b0568")) mqtt.subscribe("thomas/sensor/30aea47b0568/#", receiveMqtt); + if (!ota.getMAC().equals("246f28d1eff4")) mqtt.subscribe("thomas/sensor/246f28d1eff4/#", receiveMqtt); /* temp: publish version */ delay(5000);