|
|
|
@ -116,7 +116,12 @@ void callbackMQTT(char* topic, byte* payload, unsigned int length) |
|
|
|
FastLED.setBrightness(brightness); |
|
|
|
client.publish(MQTT_LED_BRIGHTNESS_STATE, message_buff, true); |
|
|
|
} else if (stopic == MQTT_LED_COLOR_COMMAND) { |
|
|
|
color = msgString.toInt(); |
|
|
|
// Sample : 134,168,255
|
|
|
|
color = CRGB( |
|
|
|
msgString.substring(0,3).toInt(), |
|
|
|
msgString.substring(4,7).toInt(), |
|
|
|
msgString.substring(8,11).toInt() |
|
|
|
); |
|
|
|
client.publish(MQTT_LED_COLOR_STATE, message_buff, true); |
|
|
|
} else if (stopic == MQTT_LED_SPEED_COMMAND) { |
|
|
|
speed = msgString.toInt(); |
|
|
|
|