Check if incomming message contains anything.

This commit is contained in:
Damme
2014-08-13 21:29:18 +02:00
parent 7d501307ee
commit 3a63ae619d
@@ -70,7 +70,7 @@ void incomingMessage(const MyMessage &message) {
Serial.println("This is an ack from gateway"); Serial.println("This is an ack from gateway");
} }
if (message.type==V_LIGHT) { if (message.type == V_LIGHT && strlen(msg.getString()) != 0) {
// Change relay state // Change relay state
state = message.getBool(); state = message.getBool();
digitalWrite(RELAY_PIN, state?RELAY_ON:RELAY_OFF); digitalWrite(RELAY_PIN, state?RELAY_ON:RELAY_OFF);