OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) Interval 2 program issues

  • This topic is empty.
Viewing 10 posts - 26 through 35 (of 35 total)
  • Author
    Posts
  • #27310

    Ray
    Keymaster

    The station delay is in units of seconds. But it’s pretty easy to modify one line of code to change it to units of minutes. Specifically, in ospi.py, around line 151:
    accumulate_time += gv.sd # add station delay
    just change that to
    accumulate_time += gv.sd * 60 # add station delay
    I think this is the only change you need to do.

    About master on adjust time — currently it only supports a positive value. Technically it’s because the the master valve is associated with other stations, so it’s scheduled after other stations have been scheduled. Therefore, it can’t ‘go back in time’ and turn on before other stations are turned on. There are ways to work around it though. Here is one possibility: in ospi.py, around line 135, the function
    def schedule_stations(stations)
    this is where stations are scheduled (i.e. stations that should turn on are assigned a start time and stop time). You can push the start and stop time by 180 (3 minutes), and that will cause the master valve to be on 3 minutes before any other station turns on. I haven’t tried this myself so I don’t know if there are other changes you need to make. But the idea should work.

    #27311

    Dan in CA
    Participant

    pls90,

    I think this might work.

    The system also has a “concurrent’ mod that allows more than one station to be on at the same time, Options>Station handling>uncheck sequential.

    Instead of declaring one station as Master just schedule the one you use as master to turn 2-3 minutes before any other to give time for pressure to build. Then schedule one other station for the desired time. When the second station is done, keep the “master” running for a while and start the next one…

    Dan

    #27312

    pls90
    Participant

    @Ray and Dan, thank you very much for your suggestions. I will give it a try next weekend and report back.

    @Dan
    , your solution should definitely work. This would make scheduling a bit more complicated so I’ll try to incorporate Ray’s suggestions. As from a UI point of view everything is already there apart from the restrictions for negative values it would be nice if theses changes could find their way into the “official” source code. I do believe that some people have similar issues with a “weak” well.

    #27313

    Archades
    Participant

    I am happy to say OSPI has been watering my garden for the last few days without fault that I can see.
    Thanks for the awesome OSPI to all involved.

    #27314

    Dan in CA
    Participant

    pls90,

    The only problem with modifying the program code is, if you update the software later, the changes will be lost. I have added your request to the wish list. There should be a way to build ray’s suggested changes into a plugin. That would provide the option to those who need it and would avoid the update problem.

    Dan

    #27315

    pls90
    Participant

    @Dan
    Thank you very much for adding my request to the wish list. The idea to realize this as a plugin is brilliant!
    Again, thank you for your hard work!

    #27316

    pls90
    Participant

    @Ray: I’m afraid I was not successful
    @ray wrote:

    The station delay is in units of seconds. But it’s pretty easy to modify one line of code to change it to units of minutes. Specifically, in ospi.py, around line 151:
    accumulate_time += gv.sd # add station delay
    just change that to
    accumulate_time += gv.sd * 60 # add station delay

    I modified the line as suggested, in options changed the station delay to 30 wich should give me 30*60s but in the preview I only see 30s delay. Should the delay show up as 30min?

    @ray wrote:

    About master on adjust time — currently it only supports a positive value. … in ospi.py, around line 135, the function
    def schedule_stations(stations)
    this is where stations are scheduled (i.e. stations that should turn on are assigned a start time and stop time). You can push the start and stop time by 180 (3 minutes), and that will cause the master valve to be on 3 minutes before any other station turns on. I haven’t tried this myself so I don’t know if there are other changes you need to make. But the idea should work.

    I changed line 148 to

    gv.rs[sid][0] = accumulate_time + 180 # start at accumulated time # pls90: and add 3min

    and line 164 to

    gv.rs[sid][0] = gv.now + 180 #accumulate_time # set start time # pls90: and add 3min

    Neither in preview nor in my test was the pump started before the valve was activated.
    I guess I did something wrong. 😕
    Any thoughts on my issue? Thank you!

    #27285

    pls90
    Participant

    I did some more testing. I guess I misunderstood what the suggested code change does.
    I thought it would multiply the input value (in seconds) by 60, so in order to get 30min delay I entered 30 as station delay value.
    As no actual delay between succeeding runs is visual this is most likely wrong.
    I realized that after the code change I can enter values up to 999 (about 16min), and these do show up in the preview.
    Alas, no 4 digit values can be entered. But I’m much closer to the 30min I need. 🙂
    Regarding my second need to start the master pump 3min before opening a valve I still have no idea how to modify the code.

    #27317

    Ray
    Keymaster

    The preview calculates the program timing independently, so the modifications you made to ospi.py will not be reflected in the preview.

    #27318

    Archades
    Participant

    Just a quick update – All is well, stable as a rock (knock on wood). No downtime that I can see, sprinklers have worked every day for about a month so thank-you once again.

Viewing 10 posts - 26 through 35 (of 35 total)
  • You must be logged in to reply to this topic.

OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) Interval 2 program issues