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