This commit is contained in:
Julien Cabillot 2017-05-26 18:20:47 +02:00 committed by Cabillot Julien
parent 7b29c1dab6
commit 5d20ac73a2

View File

@ -121,13 +121,6 @@ void testConnectMQTT()
Debug.print("OK\nSubscribe");
client.subscribe(MQTT_COMMAND);
blinkLED(LED_PIN, 40, 8);
if(digitalRead(RELAY_PIN) == HIGH) {
digitalWrite(LED_PIN, LOW);
} else {
digitalWrite(LED_PIN, HIGH);
}
Debug.println(" OK");
} else {
Debug.print("KO, erreur : ");
@ -154,9 +147,9 @@ void callbackMQTT(char* topic, byte* payload, unsigned int length)
Debug.println(msgString);
if (stopic == MQTT_COMMAND) {
if (msgString == "on") {
if (msgString == "ON") {
relayState = true;
} else if (msgString == "off") {
} else if (msgString == "OFF") {
relayState = false;
} else if (msgString == "reset"){
ESP.restart();