MQTT-DS5: Added dedicated power control topic
This commit is contained in:
parent
657a13a12a
commit
acab1aa058
1 changed files with 5 additions and 0 deletions
|
@ -211,6 +211,10 @@ void incoming_mqtt(char* topic, byte* payload, unsigned int length) {
|
|||
}
|
||||
}
|
||||
|
||||
if (strcmp(topic, mqtt_topic_power) == 0) {
|
||||
code = codes[0];
|
||||
}
|
||||
|
||||
free(msgCopy);
|
||||
|
||||
// Check if we found a code to send
|
||||
|
@ -236,6 +240,7 @@ void reconnect() {
|
|||
// subscribe to incoming topics
|
||||
client.subscribe(mqtt_topic_command);
|
||||
client.subscribe(mqtt_topic_volume);
|
||||
client.subscribe(mqtt_topic_power);
|
||||
if (DEBUGTOSERIAL) {
|
||||
Serial.println("Subscriptions done");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue