Browse Source

Check if MQTT message is from domoticz previous to parse it in relay module

fastled
Xose Pérez 7 years ago
parent
commit
cec57d2611
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      code/espurna/relay.ino

+ 1
- 0
code/espurna/relay.ino View File

@ -386,6 +386,7 @@ void relayMQTTCallback(unsigned int type, const char * topic, const char * paylo
if (type == MQTT_MESSAGE_EVENT) {
// Match topic
if (strncmp(topic, "domoticz", 8) == 0) return;
String t = String(topic + mqttTopicRootLength());
if (!t.startsWith(MQTT_RELAY_TOPIC)) return;
if (!t.endsWith(mqttSetter)) return;


Loading…
Cancel
Save