forked from fmueller/esp8266-led-marquee-sign-controller
add status topic and publish after sending text to sign
This commit is contained in:
parent
165540c120
commit
60a82b896a
@ -22,7 +22,8 @@ static SocketServer socketServer;
|
||||
|
||||
WiFiClient client;
|
||||
Adafruit_MQTT_Client mqtt(&client, AIO_SERVER, AIO_SERVERPORT, AIO_USERNAME, AIO_KEY);
|
||||
Adafruit_MQTT_Subscribe mqtt_subscribe_topic = Adafruit_MQTT_Subscribe(&mqtt, "homeassistant/marquee_sign/text");
|
||||
Adafruit_MQTT_Subscribe mqtt_subscribe_topic = Adafruit_MQTT_Subscribe(&mqtt, "homeassistant/marquee_sign/text/set");
|
||||
Adafruit_MQTT_Publish mqtt_publish_topic = Adafruit_MQTT_Publish(&mqtt, "homeassistant/marquee_sign/text/status");
|
||||
|
||||
void MQTT_connect();
|
||||
|
||||
@ -79,6 +80,8 @@ void loop() {
|
||||
const char* signText = (char *)mqtt_subscribe_topic.lastread;
|
||||
|
||||
sendTextToSign(signText);
|
||||
|
||||
mqtt_publish_topic.publish(signText);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user