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

Feature request: define minimal gap between two on periods #11

Open
paede81 opened this issue Jun 18, 2020 · 2 comments
Open

Feature request: define minimal gap between two on periods #11

paede81 opened this issue Jun 18, 2020 · 2 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@paede81
Copy link

paede81 commented Jun 18, 2020

Sometimes the window between two on periods is just a few seconds, this did not look like a real human behavior (turn light on and off), therefor I look like a config parameter where I can define a minimal time window between off and on again.

For me a perfect solution would be if I can set something link this:

{
"windowBegin": "00:00",
"windowEnd": "23:59:59",
"minDuration": 5,
"maxDuration": 10,
"minCount": 10,
"maxCount": 25
"minGap": 3,
"maxGap": 5
}

This would generate a sequence which looks like:
<ON: 6min> ---OFF: 3min--- <ON: 8min> ---OFF: 5min---<ON: 5min>

instead of currently:
<ON: 6min> ---OFF: 2sec--- <ON: 8min> ---OFF: 15min---<ON: 5min>

@csuermann
Copy link
Owner

Thank you for proposing this feature, @paede81!

I guess this could clash with the other constraints that are currently supported (e.g. min/max count): Depending on the values you chose, the node might not be able to fulfill all constraints. One way of dealing with this could be to give certain configurations priority over others. Or eliminate some constraints altogether, e.g. min/max count) and only have min/max gap as a replacement. What would be your preference?

C.

@csuermann csuermann added enhancement New feature or request question Further information is requested labels Aug 12, 2020
@Scoobler
Copy link

@csuermann seems Like a great feature, I would personally say have a minGap, potentially no maxGap and minGap takes priority over the maxCount.

So if the windowBegin and windowEnd allows the maxCount only then enforce it.

If however the other constraints are given a higher priority, the ON-to-OFF duration + gap (adhering to minGap & minDuration) should allow for the minCount - if the window is then sufficiently large enough that the array of ON-to-OFF durations + gap’s passes the maxCount, then enforce the maxCount - the remaining window time could then be distributed through the array of ON-to-OFF duration times (not exceeding maxDuration) & gaps at random.

I think there will always be the option of human error in entering the incorrect values - but as long as it’s noted in the instructions how it is designed to work, that’s the most you can really account for I guess?!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants