Merge remote-tracking branch 'debsahu/master'

This commit is contained in:
Tobias Blum 2018-04-08 13:07:38 +02:00
commit 0d8703c694
3 changed files with 6 additions and 5 deletions

View file

@ -775,7 +775,7 @@ void setup() {
getStatusJSON();
#ifdef ENABLE_MQTT
mqtt_client.publish(mqtt_outtopic, String(String("OK /") + String(ws2812fx_mode).c_str());
mqtt_client.publish(mqtt_outtopic, String(String("OK /") + String(ws2812fx_mode)).c_str());
#endif
#ifdef ENABLE_AMQTT
amqttClient.publish(mqtt_outtopic.c_str(), qospub, false, String(String("OK /") + String(ws2812fx_mode)).c_str());
@ -863,7 +863,7 @@ void loop() {
if (mode == SET_MODE) {
DBG_OUTPUT_PORT.printf("SET_MODE: %d %d\n", ws2812fx_mode, mode);
strip.setMode(ws2812fx_mode);
mode = HOLD;
mode = SETSPEED;
}
if (mode == OFF) {
// strip.setColor(0,0,0);
@ -882,7 +882,7 @@ void loop() {
}
if (mode == SETSPEED) {
strip.setSpeed(convertSpeed(ws2812fx_speed));
// mode = HOLD;
mode = HOLD;
}
if (mode == BRIGHTNESS) {
strip.setBrightness(brightness);

View file

@ -746,7 +746,7 @@ void checkForRequests() {
uint8_t json_speed = constrain((uint8_t) root["speed"], 0, 255);
if (json_speed != ws2812fx_speed) {
ws2812fx_speed = json_speed;
mode = SETSPEED;
if(stateOn) mode = SETSPEED;
}
}
@ -1018,7 +1018,7 @@ void checkForRequests() {
strcat(message, HOSTNAME);
mqtt_client.publish(mqtt_outtopic, message);
// ... and resubscribe
mqtt_client.subscribe(mqtt_intopic, qossub, qossub);
mqtt_client.subscribe(mqtt_intopic, qossub);
#ifdef ENABLE_HOMEASSISTANT
ha_send_data.detach();
mqtt_client.subscribe(mqtt_ha_state_in.c_str(), qossub);

View file

@ -13,6 +13,7 @@
___
Update 07.04.2018:
And even more changes to McLighting! Most of them were contributed by user @debsahu. Thank you!
- Update arduino-esp8266 to latest, at least version 2.4.1
- AMQTT is now the default MQTT library, it's a bit more lightweight and stable. You can still use PubSubClient if you want to.
- You can use @debsahu great NeoAnimationFX library as a alternative to WS2812FX. It's based on the NeoPixelBus instead of Adafruits NeoPixel library. It can handle longer strips more efficient. If you want, give it a try. WS2812FX is still the default.
- Some more changes regarding Homeassistant integration.