OpenSprinkler Forums OpenSprinkler Unified Firmware Set duration to more than 4 hours

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #60108

    robi
    Participant

    I see that in the UI it allows me to set any duration up to 23:59:59, but in reality the duration is capped to 4 hours (it allows saving bigger values, but when going back to edit the program, you’re surprised to see less).

    I’d like to use a free output of Opensprinkler not for watering, but for something else through a relay, which could need to run even for 22 hours on certain days.

    Any reason why durations are limited to 4 hours?

    #60110

    Samer
    Keymaster

    Which firmware version are you on?

    #60114

    robi
    Participant

    App version 1.8.5
    Firmware 2.1.8 (2)
    Hardware Version 3.0 – AC

    #60418

    Ray
    Keymaster

    As described in the user manual, the limit is 18 hours. If you set anything beyond that, the integer value gets chopped to something smaller, like 4 hours. Yes the UI/app should probably throw a warning if it goes beyond 18 hours. We will check and fix this.

    #60498

    robi
    Participant

    Any reason why this limit has to be 18 hours? Why can’t it be something much closer to 24 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.

    #60562

    robi
    Participant

    Got it, thanks.

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.

OpenSprinkler Forums OpenSprinkler Unified Firmware Set duration to more than 4 hours