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

#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!