mirror of https://github.com/arendst/Tasmota.git
v5.7.1h - Additional files
5.7.1h * Consolidate WS2812 (xdrv_ws2812) into Sonoff Led (xdrv_snfled) * Invert WS2812 fade speed to align with Sonoff led (Speed 1 = fast, Speed 8 = slow) * Remove upper case MQTT receive buffer
This commit is contained in:
parent
e232f22da2
commit
a0dcdb59b2
|
@ -58,11 +58,6 @@ void mqtt_publishDomoticzPowerState(byte device)
|
||||||
sysCfg.domoticz_relay_idx[device -1], sysCfg.led_dimmer[device -1]);
|
sysCfg.domoticz_relay_idx[device -1], sysCfg.led_dimmer[device -1]);
|
||||||
mqtt_publish(domoticz_in_topic);
|
mqtt_publish(domoticz_in_topic);
|
||||||
}
|
}
|
||||||
else if ((Maxdevice == device) && (pin[GPIO_WS2812] < 99)) {
|
|
||||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"idx\":%d,\"nvalue\":2,\"svalue\":\"%d\"}"),
|
|
||||||
sysCfg.domoticz_relay_idx[device -1], sysCfg.ws_dimmer);
|
|
||||||
mqtt_publish(domoticz_in_topic);
|
|
||||||
}
|
|
||||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"idx\":%d,\"nvalue\":%d,\"svalue\":\"\"}"),
|
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"idx\":%d,\"nvalue\":%d,\"svalue\":\"\"}"),
|
||||||
sysCfg.domoticz_relay_idx[device -1], (power & (0x01 << (device -1))) ? 1 : 0);
|
sysCfg.domoticz_relay_idx[device -1], (power & (0x01 << (device -1))) ? 1 : 0);
|
||||||
mqtt_publish(domoticz_in_topic);
|
mqtt_publish(domoticz_in_topic);
|
||||||
|
@ -165,9 +160,6 @@ boolean domoticz_mqttData(char *topicBuf, uint16_t stopicBuf, char *dataBuf, uin
|
||||||
snprintf_P(stemp1, sizeof(stemp1), PSTR("%d"), i +1);
|
snprintf_P(stemp1, sizeof(stemp1), PSTR("%d"), i +1);
|
||||||
if (2 == nvalue) {
|
if (2 == nvalue) {
|
||||||
nvalue = domoticz["svalue1"];
|
nvalue = domoticz["svalue1"];
|
||||||
if ((pin[GPIO_WS2812] < 99) && (sysCfg.ws_dimmer == nvalue)) {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
if (sfl_flg && (sysCfg.led_dimmer[i] == nvalue)) {
|
if (sfl_flg && (sysCfg.led_dimmer[i] == nvalue)) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -464,11 +464,6 @@ void hue_light_status(byte device, String *response)
|
||||||
|
|
||||||
if (sfl_flg) {
|
if (sfl_flg) {
|
||||||
sl_replaceHSB(response);
|
sl_replaceHSB(response);
|
||||||
#ifdef USE_WS2812
|
|
||||||
}
|
|
||||||
else if (pin[GPIO_WS2812] < 99) {
|
|
||||||
ws2812_replaceHSB(response);
|
|
||||||
#endif // USE_WS2812
|
|
||||||
} else {
|
} else {
|
||||||
response->replace("{h}", "0");
|
response->replace("{h}", "0");
|
||||||
response->replace("{s}", "0");
|
response->replace("{s}", "0");
|
||||||
|
@ -579,11 +574,6 @@ void hue_lights(String *path)
|
||||||
|
|
||||||
if (sfl_flg) {
|
if (sfl_flg) {
|
||||||
sl_getHSB(&hue,&sat,&bri);
|
sl_getHSB(&hue,&sat,&bri);
|
||||||
#ifdef USE_WS2812
|
|
||||||
}
|
|
||||||
else if (pin[GPIO_WS2812] < 99) {
|
|
||||||
ws2812_getHSB(&hue,&sat,&bri);
|
|
||||||
#endif // USE_WS2812
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hue_json.containsKey("bri")) {
|
if (hue_json.containsKey("bri")) {
|
||||||
|
@ -638,11 +628,6 @@ void hue_lights(String *path)
|
||||||
if (change) {
|
if (change) {
|
||||||
if (sfl_flg) {
|
if (sfl_flg) {
|
||||||
sl_setHSB(hue, sat, bri, ct);
|
sl_setHSB(hue, sat, bri, ct);
|
||||||
#ifdef USE_WS2812
|
|
||||||
}
|
|
||||||
else if (pin[GPIO_WS2812] < 99) {
|
|
||||||
ws2812_setHSB(hue, sat, bri);
|
|
||||||
#endif // USE_WS2812
|
|
||||||
}
|
}
|
||||||
change = false;
|
change = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue