Merge pull request #124 from debsahu/master

fixes to MQTT
This commit is contained in:
Deb 2018-04-07 23:16:16 -04:00 committed by GitHub
commit 22565228de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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);