From 4d9b70d858cf556611e300282b0ad46d3e784703 Mon Sep 17 00:00:00 2001 From: debsahu Date: Sat, 7 Apr 2018 23:00:57 -0400 Subject: [PATCH] fixes to MQTT --- Arduino/McLighting/McLighting.ino | 2 +- Arduino/McLighting/request_handlers.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Arduino/McLighting/McLighting.ino b/Arduino/McLighting/McLighting.ino index ab2e103..9d913c1 100644 --- a/Arduino/McLighting/McLighting.ino +++ b/Arduino/McLighting/McLighting.ino @@ -775,7 +775,7 @@ void setup() { getStatusJSON(); #ifdef ENABLE_MQTT - mqtt_client.publish(mqtt_outtopic, String(String("OK /") + String(ws2812fx_mode).c_str()); + mqtt_client.publish(mqtt_outtopic, String(String("OK /") + String(ws2812fx_mode)).c_str()); #endif #ifdef ENABLE_AMQTT amqttClient.publish(mqtt_outtopic.c_str(), qospub, false, String(String("OK /") + String(ws2812fx_mode)).c_str()); diff --git a/Arduino/McLighting/request_handlers.h b/Arduino/McLighting/request_handlers.h index b81f737..a0612ac 100644 --- a/Arduino/McLighting/request_handlers.h +++ b/Arduino/McLighting/request_handlers.h @@ -1018,7 +1018,7 @@ void checkForRequests() { strcat(message, HOSTNAME); mqtt_client.publish(mqtt_outtopic, message); // ... and resubscribe - mqtt_client.subscribe(mqtt_intopic, qossub, qossub); + mqtt_client.subscribe(mqtt_intopic, qossub); #ifdef ENABLE_HOMEASSISTANT ha_send_data.detach(); mqtt_client.subscribe(mqtt_ha_state_in.c_str(), qossub);