fixes to MQTT

This commit is contained in:
debsahu 2018-04-07 23:00:57 -04:00
parent 574c82b55d
commit 4d9b70d858
2 changed files with 2 additions and 2 deletions

View file

@ -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());

View file

@ -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);