add MQTT and OTA update support #1

Open
burned42 wants to merge 6 commits from add_mqtt into main
Showing only changes of commit 60a82b896a - Show all commits

View File

@ -22,7 +22,8 @@ static SocketServer socketServer;
fmueller marked this conversation as resolved Outdated

Please add a blank line above.

Please add a blank line above.

done 👍

done 👍
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);
}
}