OpenSprinkler Forums OpenSprinkler Unified Firmware Set duration to more than 4 hours Reply To: Set duration to more than 4 hours

#60547

Ray
Keymaster

Because it uses a 2-byte integer to represent time, and that means the maximum is 65535 seconds (slightly more than 18 hours), however, some ranges of the 2-byte integer are used to represent other time formats, like sunset/sunrise +/- offset time. So we only allow the time to go up to 64800 seconds, or 18 hours.

If you wonder why not use 4-byte integer, that’s because the program settings are stored in EEPROM, and there is very limited amount of EEPROM available on OS 2.3 and previous generations. This limit likely will be removed in the next firmware as we will transition to use flash (SD card on OS 2.3, and flash on OS 3.0 or OSPi) to store program settings. As a result, it will have much larger storage space for program settings and hence the maximum run-time can increase dramatically as well.

That said, we don’t recommend settings a very long duration. The reason being if the controller reboots or gets disrupted in the middle of a run for whatever reason (power break etc.), it will not resume as currently the firmware does not preserve the program dynamics. So if you set a zone to run for 24 hours, and the controller reboots after 12 hours, it won’t continue the remaining 12 hours. The better way to handle this is to set a smaller duration but let the program repeat: for example, you can set the zone to run 1 hour at a time, but use the program’s ‘repeating’ feature to set it to repeat 24 times. That way, if the controller reboots in the middle, it will at most lost 1 hour of water time, instead of, say 12 hours. This is a more robust way to achieve long running time.