rszimm / sprinklers_pi

Sprinkling System Control Program for the Raspberry Pi
GNU General Public License v2.0
309 stars 100 forks source link

Feature Request: Config for maximum duration #168

Open nerdiges opened 4 years ago

nerdiges commented 4 years ago

Would it be possible to have a configuration option to restrict the maximum duration for the valve e.g in schedules? I would like to use it as an additional saftey maesure to avoid schedules accidentially configured to open the valve for 200+ minutes.

Best would be an configuration option in the settings page, but an alternative option could be a setting in the config.h

Thank you for your efforts, Stephan

nhorvath commented 4 years ago

I'll consider this but for now if you want you can edit the "max" parameter of this line in your local copy: https://github.com/rszimm/sprinklers_pi/blob/master/web/ShSched.htm#L113

nerdiges commented 4 years ago

Thank you for your quick response. I already implemented your recommended work around in ShSched.htm and QSched.htm and it's restricted on the web interface as excpected.

Nevertheless, a restriction in the binary could also restrict any duration provided via API. Would be handy for any integration in a hom automation software suchu as home assistant.