Browse Source

on -> ON

master
Julien Cabillot 3 years ago
committed by Cabillot Julien
parent
commit
5d20ac73a2
1 changed files with 2 additions and 9 deletions
  1. 11
      arduino/sonoffliving/sonoffliving.cpp

11
arduino/sonoffliving/sonoffliving.cpp

@ -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…
Cancel
Save