on -> ON
This commit is contained in:
parent
7b29c1dab6
commit
5d20ac73a2
@ -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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user