OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) Interval – Plugin development Re: Re: Interval – Plugin development

#26645

Dan in CA
Participant

All of gv is not yet documented but a good part if it, the gv.sd (settings dictionary), is described in the file sd_refertnce.txt in the OSPi directory.

Also, if you look in ospi.py starting at line ~378. The Global vars section is where the all the gv (global vars) attributes are defined. There are some comments describing what they are.

I am planning to add the rest of the gv info to the sd_reference.txt file and probably rename it to gv_reference.txt. I’ll post here when it is ready.

EDIT: Forgot to answer your question about the 32 program limit. That was the case on the micro-controller version of OpenSprinkler. I left the JavaScript files that produce the UI pretty much as they were. So, short answer: disregard the 32 program limit.

EDIT: Here are the rest of the gv attributes:
gv.ver firmware rev number (int, based on firmware version this program was ported from)
gv.rev release number of this program (int)
gv.revdate date of release (string)
gv.now current time, updated once per second at top of timing loop
gv.srvals shift register values, used to turn zones on or off (list of one byte per station, 1 = turn on, 0 = turn off)
gv.rovals run once values – list of duration times in seconds for a run once program (list, length = number of statons)
gv.pd program data – loaded from file at startup (list of lists)
gv.ps program schedule used for UI display (list of 2 element lists i.e. [program number, duration])
gv.pon program on (Holds program number of currently running program)
gv.sbits station bits, used to display stations that are on in UI (list of bytes, one byte per board)
gv.rs run schedule (list [scheduled start time, scheduled stop time, duration, program index])
gv.lrun last run, used to display log line on home page (list [station index, program number, duration, end time])
gv.scount station count (not used — dead code ????)
gv.snames station names, loaded from ‘snames.txt’ file (string)

Dan