logo elektroda
logo elektroda
X
logo elektroda

Reducing Relay Delay with dInput_n on OpenBeken BK7231N for Fast Switch Response

zakdma 267 2
ADVERTISEMENT
  • #1 21463267
    zakdma
    Level 3  
    Hi, there!

    The light switch relay is controlled by a hardware switch (ON/OFF positions).
    OpenBeken latest version on BK7231N installed.
    TglChanOnTgl configured for the switch pin and works ok and fast, but I need the relay to follow the hardware switch. So I changed pin it to dInput_n.
    It's working fine and relay follows hardware switch, but there is a small annoying delay between hardware switch changed state and relay reflects it.
    Is there any way to avoid this delay, so the switch works as fast as TglChanOnTgl?

    Thank you!
  • ADVERTISEMENT
  • #2 21466519
    p.kaczmarek2
    Moderator Smart Home
    I think there is a little hidden feature where you can use this flag to reduce debounce time:
    
    	int debounceMS;
    	if (CFG_HasFlag(OBK_FLAG_BTN_INSTANTTOUCH)) {
    		debounceMS = 100;
    	}
    	else {
    		debounceMS = 250;
    	}
    
    
    Helpful post? Buy me a coffee.
  • #3 21467358
    zakdma
    Level 3  
    >>21466519
    Thank you! I already set Flag 6 and saw that the delay is shorter but still exists.
    Why does the toggle have no such delay?
    Toggle doesn't use debouncing, but the switch does?
ADVERTISEMENT