Tasmota/tasmota/tasmota_support
Marcus Better 1a462c986c
[tuyamcu_v2] Fix suppressed dimmer updates from MQTT (#20950)
The driver tried to avoid loops when state updates from the MCU (eg
from physical button press) could be reflected back by Tasmota and
trigger another MCU command, followed by a state update. It did this
by tracking the source of the command in the last_source and
last_command_source variables, suppressing the command if either of
those was SRC_SWITCH.

However this logic is faulty: Since there are two last_source
variables to check, a command might reset one of them, but the other
would still suppress the update. As it turns out, MQTT commands would
only set last_source but not last_command_source. As a result, any
dimmer changes via MQTT would be dropped by the driver and not applied
to the MCU.

Switch functionality (on/off) was still working because those do not
rely on last_command_source, only last_source.

This change removes the loop detection logic altogether for dimmer
updates. This should be safe, because the driver already has the
latest dimmer value in its shadow state, and will not try to re-apply
a current value, thus breaking the loop.

This patch has been tested with several CE-WF500D dimmers which had
this problem.
2024-03-14 17:42:52 +01:00
..
settings.ino Add internal support for persistent JSON settings using single file 2024-02-07 22:55:39 +01:00
support.ino IR support data larger than 64 bits (#20831) 2024-02-28 22:42:29 +01:00
support_a_i2c.ino Prep ESP32 I2C bus2 support 2023-10-19 16:59:53 +02:00
support_button_v4.ino sorry... (#19429) 2023-08-31 10:50:29 +02:00
support_command.ino [tuyamcu_v2] Fix suppressed dimmer updates from MQTT (#20950) 2024-03-14 17:42:52 +01:00
support_crash_recorder.ino Phase 1 support C2/C6 2023-08-21 16:00:20 +02:00
support_device_groups.ino Bump version to v11.1.0.4 2022-06-02 14:17:39 +02:00
support_eeprom.ino Bump version to v11.1.0.4 2022-06-02 14:17:39 +02:00
support_esp32.ino Fix C2 compile error 2024-02-09 13:53:19 +01:00
support_esp8266.ino Fix ESP8266 eFuseMac result 2024-01-28 17:34:15 +01:00
support_esptool.ino Bump version to v11.1.0.4 2022-06-02 14:17:39 +02:00
support_features.ino Update changelogs 2024-02-27 14:16:13 +01:00
support_flash_log.ino Bump version to v11.1.0.4 2022-06-02 14:17:39 +02:00
support_float.ino Berry `scale_int`, equivalent of `scale_uint` for signed integers (#20090) 2023-11-23 11:31:26 +01:00
support_jpeg.ino Bump version to v11.1.0.4 2022-06-02 14:17:39 +02:00
support_network.ino Improve mdns logging 2022-11-23 21:41:35 +01:00
support_profiling.ino Bump version to v11.1.0.4 2022-06-02 14:17:39 +02:00
support_pwm.ino Fix ESP32 PWM activity on unconfigured PWM GPIOs (#20732) 2024-02-17 15:19:12 +01:00
support_rotary.ino Fix rotary edge cases (#19164) 2023-08-25 17:06:27 +02:00
support_rtc.ino Document different syslog layouts 2023-12-21 14:30:49 +01:00
support_statistics.ino Bump version to v11.1.0.4 2022-06-02 14:17:39 +02:00
support_switch_v4.ino Update switch comments 2023-08-17 23:28:27 +02:00
support_tasmota.ino Add LoRa to ESP8266 2024-02-29 17:12:08 +01:00
support_udp.ino Bump version to v11.1.0.4 2022-06-02 14:17:39 +02:00
support_wifi.ino Add core3 ethernet support on SPI for all ESP32 models 2024-02-14 16:19:51 +01:00
tasmota_ca.ino Fix local ca includes 2022-06-02 17:14:05 +02:00