From 78784723b1e20d035fd21c57b9650ca934736bcc Mon Sep 17 00:00:00 2001 From: Matthias Prinke <83612361+matthias-bs@users.noreply.github.com> Date: Mon, 10 Jul 2023 22:45:20 +0200 Subject: [PATCH] Update BresserWeatherSensorMQTT.ino --- .../BresserWeatherSensorMQTT/BresserWeatherSensorMQTT.ino | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/BresserWeatherSensorMQTT/BresserWeatherSensorMQTT.ino b/examples/BresserWeatherSensorMQTT/BresserWeatherSensorMQTT.ino index bb15802c..7ce67296 100644 --- a/examples/BresserWeatherSensorMQTT/BresserWeatherSensorMQTT.ino +++ b/examples/BresserWeatherSensorMQTT/BresserWeatherSensorMQTT.ino @@ -270,9 +270,10 @@ RainGauge rainGauge; // MQTT topics const char MQTT_PUB_STATUS[] = "/status"; const char MQTT_PUB_RADIO[] = "/radio"; -const char MQTT_PUB_DATA[] = "/data"; +const char MQTT_PUB_DATA[] = "data"; +const char MQTT_PUB_RSSI[] = "rssi"; const char MQTT_PUB_EXTRA[] = "/extra"; -const char MQTT_PUB_RSSI[] = "/rssi"; + char mqttPubStatus[TOPIC_SIZE]; char mqttPubRadio[TOPIC_SIZE]; @@ -530,7 +531,7 @@ void publishWeatherdata(bool complete) } } - String mqtt_topic_base = String(HOSTNAME) + String('/') + sensor_str + String('/'); + String mqtt_topic_base = String(Hostname) + String('/') + sensor_str + String('/'); String mqtt_topic; // sensor data