|
@ -547,11 +547,17 @@ void wifiLoop() { |
|
|
Serial.println(); |
|
|
Serial.println(); |
|
|
#endif
|
|
|
#endif
|
|
|
|
|
|
|
|
|
isMQTTMessage = true; |
|
|
|
|
|
|
|
|
// Action to perform
|
|
|
|
|
|
if ((char)payload[0] == '0') { |
|
|
|
|
|
isMQTTMessage = true; |
|
|
|
|
|
switchRelayOff(); |
|
|
|
|
|
} |
|
|
if ((char)payload[0] == '1') { |
|
|
if ((char)payload[0] == '1') { |
|
|
|
|
|
isMQTTMessage = true; |
|
|
switchRelayOn(); |
|
|
switchRelayOn(); |
|
|
} else { |
|
|
|
|
|
switchRelayOff(); |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
if ((char)payload[0] == '2') { |
|
|
|
|
|
toggleRelay(); |
|
|
} |
|
|
} |
|
|
isMQTTMessage = false; |
|
|
isMQTTMessage = false; |
|
|
|
|
|
|
|
|