Browse Source

fix mqtt qos and retain

main
Hendrik Langer 7 years ago
parent
commit
6cb149c8f3
  1. 3
      src/main.cpp
  2. 4
      src/screen.cpp

3
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);
}

4
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;

Loading…
Cancel
Save