diff --git a/WifiControlSensor/MQTT.ino b/WifiControlSensor/MQTT.ino index a6a4fe8..146a66a 100644 --- a/WifiControlSensor/MQTT.ino +++ b/WifiControlSensor/MQTT.ino @@ -26,6 +26,10 @@ int setupMQTT(char *server, char *user, char *passwd, int port) { return 0; } +int MQTT_isConnected(){ + return mqtt->connected(); +} + // Function to connect and reconnect as necessary to the MQTT server. // Should be called in the loop function and it will take care if connecting. int MQTT_connect() { diff --git a/WifiControlSensor/WebServer.ino b/WifiControlSensor/WebServer.ino index 57fce3a..6a6c84f 100644 --- a/WifiControlSensor/WebServer.ino +++ b/WifiControlSensor/WebServer.ino @@ -1,6 +1,7 @@ void handleRoot() { server.send(200, "text/html", "