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.
* Add files via upload
* Add files via upload
* Add files via upload
* Add files via upload
* Update en_GB.h
* Update xsns_100_ina3221.ino
* Add files via upload
* Add files via upload
I hope I have all details now changed ;-))
* Add files via upload
I still found a little detail to beutify ;-)
Remove the logic that inhibits the sending of updates to the MCU until
the DP's state has been observed at least once in a status report from
the MCU. This logic was intended to ensure that a DP is not updated
with its current value, which reportedly crashes some very broken
devices.
However, other devices like the Feit DIM/WIFI dimmers do not reliably
report DPs that haven't been changed. So the required status report
would never arrive, resulting in the inability to control these
devices remotely, at least until their state had been changed by a
manual button press, something that is not always practical as it
requires physical device access and needs to be done after every
restart.
Removing this logic allows Tasmota to control the device state.
* add support for ams5915 and ams6915 temerature and pressure sensors
* improved function namings
* optimized detection of sensor
* set verbosity level to debug
* minor code cleanings
* added seconds-counter to minimize i2c bus load, minor code cleanups
* add meas_valid in sensor struct to differentiate between sensor present (at tasmota boot) and measurement valid (if sensor was reattached) at runtime
* removed global struct and sensor_present, introduced dynamic memory allocation if sensor is present at startup, minor code changes
* fixes missing initialisation of variable
* corrected the amount of used memory if compiled with AMSX915 support
* Update my_user_config.h
disable AMSx915 by default
---------
Co-authored-by: baschdello <urschelb@rhrk.uni-kl.de>
Co-authored-by: Bastian <bastianurschel@gmail.com>
* Send LWTs when nodes come online and offline
* Use string macro
* Add a TASMESH_HEARTBEAT config
* Add flags to config file
* Fix missing break in case
* Rename heartbeat feature define
* Comment out tasmesh settings
* Detect online peers on all packets, not just heartbeats
* fix INVERTED bug
fix shutterposition xxx commands do not work on inverted shutter
* fix INVERTED bug
* fix INVERTED bug
shutterposition UP/DOWN/... commands did not work as expected on inverted shutter