Skip to content
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

Change relay pulse time while active #816

Closed
mcspr opened this issue Apr 26, 2018 · 2 comments
Closed

Change relay pulse time while active #816

mcspr opened this issue Apr 26, 2018 · 2 comments
Assignees
Labels
Milestone

Comments

@mcspr
Copy link
Collaborator

mcspr commented Apr 26, 2018

Changing pulse time from Web does not reset currently running timer i.e. using Normally off / 60s:
Turn on -> Change time to 10s -> ... wait 60 seconds... -> relay turns off
It works afterwards ofc:
Turn on -> ... wait 10 seconds ... -> relay turns off

Also, because _relayConfigure is only called by websockets code, there is no way to set relayTimeN using terminal commands besides rebooting device.

@xoseperez
Copy link
Owner

I have changed the way the Ticker works. TBH I'm not 100% sure it's a good idea (more processing load) but it works and does what you want. Also, I have added a reload command to the terminal that forces the modules to re-read the configuration from the settings.

Staged for release.

mcspr added a commit to mcspr/espurna that referenced this issue May 30, 2018
@mcspr
Copy link
Collaborator Author

mcspr commented May 30, 2018

Maybe keep the ticker? And supercede this by #831 for timed on / off state.

I did entertain the idea of detaching the ticker completely if either mode or time changes and, like this approach, reattach ticker starting from current time. It does exactly what issue says, but makes relay logic slightly tangled :/ Timed on / off will keep the logic that pulse only changes when state does, and is with added benefit of dynamic pulse timer.

mcspr added a commit to mcspr/espurna that referenced this issue May 30, 2018
@xoseperez xoseperez modified the milestones: 1.12.7, 1.13.0 Jun 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants