You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If you use a device with AC Frequency Detection (like Moes MS-104B) then TglChanOnTgl is not reliable. It switches the device multiple time a day with toggle the input
Please add something similar then SwitchDebounce 69 to the application (as available in Tasmota)
Some devices, such as BlitzWolf BW-SS5 or Moes MS-104B, use mains frequency detection on their switch inputs. Whenever the connected switch or button is pressed there are 50/60 Hz pulses on the switch input. Inside the switch there's a frequency detection circuit which is connected to a GPIO of the ESP8266 chip which counts those pulses. Prior to Tasmota 8.4 this kind of switching was handled using Counter sensors and scripting which is now simplified.
You can imagine this algorithm as a leaking bucket. Every pulse adds water to the bucket (little more than leaking out in a cycle), but the water is dripping countinously. If the bucket is full, we will treat the switch on. If there's no pulses, the bucket will be empty, and the we will turn off the switch. The size of the bucket is the debouncing time which controls the sensitivity of the algorithm. If the mains frequency is 50 Hz, a whole AC wave is 20 msec long (for 60 Hz it's about 17 msec; 1000 / frequency if we want the result in milliseconds). The exact frequency is not really important, because we add more water for every pulse.
After you have assigned a Switch to the GPIO connected to the AC frequency detection circuit use the 'SwitchDebounce' command to set the number of pulses required for the switch to be recognized as on or off. For example: SwitchDebounce 69 will turn the switch on after three pulses and turn it off after three missing ones (3 * 20 msec is 60 and the last digit must be 9 to activate the AC detection). You will probably have to experiment with the values depending on your AC frequency and the devices frequency detection implementation.
Once the feature is enabled you can use this switch as any regular switch!
I haven't seen such device yet. I may need to buy one with donation funds if they are sufficient, or is there anyone with such device willing to help with testing?
Describe the bug
If you use a device with AC Frequency Detection (like Moes MS-104B) then TglChanOnTgl is not reliable. It switches the device multiple time a day with toggle the input
Please add something similar then
SwitchDebounce 69
to the application (as available in Tasmota)I believe bug is related to: #753
Firmware:
To Reproduce
Steps to reproduce the behavior:
Additional context
Tasmota identified the issue and created a workaround:
Code snipped here:
arendst/Tasmota@7e8c136
The text was updated successfully, but these errors were encountered: