-
Notifications
You must be signed in to change notification settings - Fork 638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Relay: use relative time comparisons, runtime settings for flood window and delays #1962
Conversation
…t is there at all)
I don't know if this truly solves the interlocking, but this ensures the ordering but not direct dependencies. I also wonder how / why / where delay mechanics is used, since none of the presets have it set. A different solution could use a global delay setting a-la "relayInterlockTime" and apply the delay only when sync mode requires it. But then what to do with on / off delays? A more complex sync mechanics, like specifying mask of other relays state / lock state 1 that we want per each relay, could use of |
…yStatus(id, status) changes it
…re relayStatus(id, status) changes it
@oscarsan1 I have added a single setting I guess we could have this per relay... but then we need to set it for both relays to work properly in the most common case. |
…efresh, snapshot relaySync value in configure
I test Sonoff T1 2 gangs with the Espurna 1.14.0 for control blinds. It works very well. I don't understand all the new code added, but the result is ok. |
Thanks for testing! I do agree I went a bit overboard with timers and I think I also introduced a bug with pulse mode where locks would never allow toggle to work... WIP on a bit different approach by using a different set of timers which should be part of 1.14.2 Settings lock might work as a new settings key? Setting |
Thanks to you for your great job!! |
New user configurable options:
relayDelayOnN
,relayDelayOffN
)relayDelayInterlock
)relayFloodTime
, set to 0 will always trigger default case of setting fw_count = 1.relayFloodCount
)Try to use relative time instead of assuming timestamps are always sequential.
Flood window is managed exactly the same when switching without sync modes.
RELAY_SYNC_ONE and RELAY_SYNC_NONE_OR_ONE now delays the transition to ON for
relayDelayInterlock
time (ms) if any other relay is ON.fix #1510 ? (interlock)
fix #1594 (flood window configuration)