Tasmota/tasmota
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
..
berry HASPmota moved to a distinct library `lv_haspmota` (#20929) 2024-03-11 22:31:44 +01:00
displaydesc Create ST7735S_ATOM_S3_diplsay.ini (#20566) 2024-01-22 19:27:44 +01:00
energy_modbus_configs Add entry for Growatt 12KTL-3S (#18898) 2023-06-18 20:26:42 +02:00
html_compressed Fix ESP8266 eFuseMac result 2024-01-28 17:34:15 +01:00
html_uncompressed Fix ESP8266 eFuseMac result 2024-01-28 17:34:15 +01:00
include Add command ``RfTimeout`` to Sonoff RFBridge (#20937) 2024-03-14 17:21:09 +01:00
language Fix compilations 2024-03-14 16:40:22 +01:00
lvgl_berry LVGL fix montserrat-10 and icons-10 (#20901) 2024-03-09 22:09:41 +01:00
tasmota_support [tuyamcu_v2] Fix suppressed dimmer updates from MQTT (#20950) 2024-03-14 17:42:52 +01:00
tasmota_xdrv_driver [tuyamcu_v2] Fix suppressed dimmer updates from MQTT (#20950) 2024-03-14 17:42:52 +01:00
tasmota_xdsp_display modify RA8876 display driver to use internal touch driver (#20562) 2024-01-22 18:21:58 +01:00
tasmota_xlgt_light Update GPIOViewer 2024-01-07 15:10:19 +01:00
tasmota_xnrg_energy Fix invalid constant description (#20796) 2024-02-24 15:27:58 +01:00
tasmota_xsns_sensor expand xsns_100_ina3221 to optionaly calculate the charge and / or Energy per chanel (#20915) 2024-03-12 08:12:22 +01:00
tasmota_xx2c_global Skip slicing for Berry 2024-01-16 16:02:36 +01:00
zigbee Zigbee DIYRuZ_Geiger (#19151) 2023-07-19 20:41:49 +02:00
my_user_config.h expand xsns_100_ina3221 to optionaly calculate the charge and / or Energy per chanel (#20915) 2024-03-12 08:12:22 +01:00
tasmota.ino [tuyamcu_v2] Fix suppressed dimmer updates from MQTT (#20950) 2024-03-14 17:42:52 +01:00
user_config_override_sample.h