on -> ON
This commit is contained in:
parent
7b29c1dab6
commit
5d20ac73a2
@ -121,13 +121,6 @@ void testConnectMQTT()
|
|||||||
Debug.print("OK\nSubscribe");
|
Debug.print("OK\nSubscribe");
|
||||||
client.subscribe(MQTT_COMMAND);
|
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");
|
Debug.println(" OK");
|
||||||
} else {
|
} else {
|
||||||
Debug.print("KO, erreur : ");
|
Debug.print("KO, erreur : ");
|
||||||
@ -154,9 +147,9 @@ void callbackMQTT(char* topic, byte* payload, unsigned int length)
|
|||||||
Debug.println(msgString);
|
Debug.println(msgString);
|
||||||
|
|
||||||
if (stopic == MQTT_COMMAND) {
|
if (stopic == MQTT_COMMAND) {
|
||||||
if (msgString == "on") {
|
if (msgString == "ON") {
|
||||||
relayState = true;
|
relayState = true;
|
||||||
} else if (msgString == "off") {
|
} else if (msgString == "OFF") {
|
||||||
relayState = false;
|
relayState = false;
|
||||||
} else if (msgString == "reset"){
|
} else if (msgString == "reset"){
|
||||||
ESP.restart();
|
ESP.restart();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user