Add new + command also to MQTT
See: https://github.com/toblum/McLighting/pull/45
This commit is contained in:
@@ -297,6 +297,7 @@ void webSocketEvent(uint8_t num, WStype_t type, uint8_t * payload, size_t lenght
|
|||||||
webSocket.sendTXT(num, "OK");
|
webSocket.sendTXT(num, "OK");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// + ==> Set multiple LED in the given colors
|
||||||
if (payload[0] == '+') {
|
if (payload[0] == '+') {
|
||||||
handleSetDifferentColors(payload);
|
handleSetDifferentColors(payload);
|
||||||
webSocket.sendTXT(num, "OK");
|
webSocket.sendTXT(num, "OK");
|
||||||
@@ -407,6 +408,12 @@ void checkForRequests() {
|
|||||||
mqtt_client.publish(mqtt_outtopic, String(String("OK ") + String((char *)payload)).c_str());
|
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
|
// = ==> Activate named mode
|
||||||
if (payload[0] == '=') {
|
if (payload[0] == '=') {
|
||||||
String str_mode = String((char *) &payload[0]);
|
String str_mode = String((char *) &payload[0]);
|
||||||
|
|||||||
Reference in New Issue
Block a user