Add new + command also to MQTT
See: https://github.com/toblum/McLighting/pull/45
This commit is contained in:
parent
e3a4690693
commit
a025e0a35a
1 changed files with 7 additions and 0 deletions
|
@ -297,6 +297,7 @@ void webSocketEvent(uint8_t num, WStype_t type, uint8_t * payload, size_t lenght
|
|||
webSocket.sendTXT(num, "OK");
|
||||
}
|
||||
|
||||
// + ==> Set multiple LED in the given colors
|
||||
if (payload[0] == '+') {
|
||||
handleSetDifferentColors(payload);
|
||||
webSocket.sendTXT(num, "OK");
|
||||
|
@ -406,6 +407,12 @@ void checkForRequests() {
|
|||
DBG_OUTPUT_PORT.printf("MQTT: Set single LED in given color [%s]\n", payload);
|
||||
mqtt_client.publish(mqtt_outtopic, String(String("OK ") + String((char *)payload)).c_str());
|
||||
}
|
||||
|
||||
// + ==> Set multiple LED in the given colors
|
||||
if (payload[0] == '+') {
|
||||
handleSetDifferentColors(payload);
|
||||
mqtt_client.publish(mqtt_outtopic, String(String("OK ") + String((char *)payload)).c_str());
|
||||
}
|
||||
|
||||
// = ==> Activate named mode
|
||||
if (payload[0] == '=') {
|
||||
|
|
Loading…
Reference in a new issue