From 6cb149c8f345be904c3fecf4b6163fae17c6be41 Mon Sep 17 00:00:00 2001 From: Hendrik Langer Date: Sat, 3 Feb 2018 19:27:14 +0100 Subject: [PATCH] fix mqtt qos and retain --- src/main.cpp | 3 ++- src/screen.cpp | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 0339e24..a77739c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -120,7 +120,8 @@ void transmitStatus() { char sensorBuf[root.measureLength()+1]; root.printTo(sensorBuf, sizeof(sensorBuf)); - statusPacketIdSub = iot.mqtt.publish(bme280Topic.c_str(), 1, true, sensorBuf); + statusPacketIdSub = iot.mqtt.publish(bme280Topic.c_str(), 0, false, sensorBuf); +// statusPacketIdSub = iot.mqtt.publish(bme280Topic.c_str(), 1, true, sensorBuf); } diff --git a/src/screen.cpp b/src/screen.cpp index 2c361d8..15d4a6e 100644 --- a/src/screen.cpp +++ b/src/screen.cpp @@ -83,10 +83,10 @@ uint8_t MainMenu::select() { return current_pos; break; case 2: - iot.mqtt.publish(topic.c_str(), 1, true, "light" ); + iot.mqtt.publish(topic.c_str(), 0, false, "light" ); break; case 3: - iot.mqtt.publish(topic.c_str(), 1, true, "test2" ); + iot.mqtt.publish(topic.c_str(), 0, false, "test2" ); break; case 4: menuChange = eMainScreen;