-
-
Notifications
You must be signed in to change notification settings - Fork 156
/
Copy pathgv_reference.txt
129 lines (119 loc) · 8.8 KB
/
gv_reference.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
##################################################################################################################
#### Variables held in the settings dictionary (gv.sd in Python code, "sd" in Node-red), default values shown ####
##################################################################################################################
from controller values (cvalues):
=================================
name default Description
-----------------------------------
en 1 enabled (boolean, system operation)
mm 0 manual mode (boolean)
rbt 0 reboot (boolean)
rd 0 rain delay (hours)
rstrt 0 restart software (boolean)
from options:
=============
alr 0 active-low relay (booleanfor use with relay boards connected through shift registers)
htip "::" IP address to bind to for the HTTP server
htp 80 port to bind to for the HTTP server
idd 0 individual run durations, used in schedule programs (boolean)
loc "" location, (for e.g. weather plugin) - not used by core program
mas 0 master station number (index + 1)
mtoff 0 master off delay (seconds)
mton 0 master on delay (seconds)
nbrd 1 number of boards (includes base unit and expansion octets/boards)
nopts 14 Number of options to be displayed on Options page
passphrase "12d4e6fc471fbe073df5a0678fcffb9f75b12161e4e3f6d1e1bd81ffb22163bf", SHA256 hash of passphrase. default (opendoor) shown.
pigpio 0 use pigpio library if it is installed (boolean)
rdst 0 rain delay stop time (Unix time stamp)
rs 0 rain sensed (boolean), Stops all irrigation except stations set to ignore rain.
rst 1 Rain sensor type (normally open = 1 (default), or normally closed = 0)
sdt 0 station delay time (seconds)
seq 1 sequential or concurrent operation (boolean)
snlen 32 max length of station names on stations page
tf 1 time format (24 hour clock = 1, 12 hour clock = 0)
upas 0 use passphrase (boolean)
urs 0 use rain sensor (boolean)
wl 100 water level (global percent adjustment of watering time)
wl_* 0 set by plugins to override wl
for scheduling:
===============
bsy 0 program busy (boolean, scheduling program is currently running)
ir [0] ignore rain bytes, each byte contains bits per board (bit flags) for stations to ignore rain delay and rain sensor
iw [0] ignore water level, each byte contains bits per board (bit flags) for stations to ignore water level (both general scaling and plugin adjustments)
mo [0] master operation, each byte contains bits per board (bit flags) for stations with master set. Length = number of boards
nprogs 0 number of scheduling programs, can be calculated from length of program array (gv.pd)
nst 8 number of stations
rsn 0 Stop all stations. Stops any running stations and clears the run schedule.
tz_offset varies local device time offset from UTC in seconds.
for logging:
============
lg 1 enable logging of scheduling runs (boolean), enabled: 1, disabled: 0
lr 100 limit number of log records to keep, 0 = no limit
UI related:
===========
lang "default" Language to be used for text in the UI.
name "SIP" configurable name for system. can be used to help manage multiple controllers
show [255] controls if stations appear in the UI, list of bytes (bit flags), each byte contains bits per board
theme "original" files used to style the UI
tu "C" Temperature unit that appears in the page footer ("C" or "F")
##########################################################################
#### other gv attributes ("gv"), Items showing e.g [S] return a list: ####
##########################################################################
Read + write:
===========
gv.bsy SIP is busy, stations are running
gv.lrun [4] last run, used to add data to log file (list: [station index, program number, duration, end time]). Length = 4
gv.node_runs Dictionary of stations being controlled by node-red.
gv.now Current time as seconds since the epoch, in UTC. Updated once per second.
gv.pd [P] program data - loaded from file at startup (list of dicts). Length = number of programs.
gv.pluginStn Used to display plugin data next to station time countdown on home page timeline.
gv.pnames [P] program names - list of strings. length = numbr of programs
gv.pon program on (Holds program number of currently running scheduling program)
gv.ps [S] program schedule used for UI display (list of 2 element lists i.e. [program number, duration]). Length = number of stations
gv.rovals [S] run once values - list of duration times in seconds for a run once program (list, length = number of stations not counting master)
gv.rn run now - indicates of a running program was started by "Run now" (boolean).
gv.rs [S] run schedule (list [scheduled start time, scheduled stop time, duration, program number]). Length = number of stations
gv.sbits [8] station bits, used to display stations that are on in UI, list of bytes (bitmasks), one byte per board. Length = number of boards + 1.
# gv.scount W? station count, used in set station to track running stations with master association
gv.snames [S] station names, list read from snames.json in data folder. Length = number of stations
gv.srvals [S] shift register values, used to turn zones on or off (list of one byte per station, 1 = turn on, 0 = turn off). Length = number of stations
gv.tz_offset time zone offset of local device from UTC.
gv.use_pigpio set to 1 if pigpio library is installed (boolean).
gv.use_gpio_pins Controls SIP's use of GPIO pins, default = True, Set = False to disable.
Read only (status info):
========================
gv.cputemp CPU temperature from internal sensor.
gv.day_ord Day of year as int (ordinal)
gv.now current time as timestamp, updated once per second at top of timing loop
gv.nowt current time as struct time, updated once per second at top of timing loop
gv.dse days since epoch, providing a "daystamp" against which to evaluate interval programs, updated with gv.now
gv.output_srvals [S] shift register values, used to turn zones on or off (list of one byte per station, 1 = turn on, 0 = turn off)
gv.output_srvals_lock a mutex used whenever gv.output_srvals must be accessed atomically
gv.plugin_data dictionary (index by plugin root web prefix) to hold plugin data.
gv.plugin_menu [M] list to hold a 2 element list for each plugin to be added to menu on home page (['menu text', 'url'])
gv.plugin_scripts list of strings representing the script file names (e.g. 'myPlugInScript.js') to be injected into base.html
# gv.ver_str software rev number (string)
gv.ver_date date of release (string)
#########################
#### Blinker signals ####
#########################
Notifications broadcast by SIP
==============================
alarm A signal that can be used in a plugin to indicate a problem (not used by SIP core)
new_day indicates that a new day has started (sent on software start and just after midnight)
loggedin someone has just logged in
option_change a setting on the Options page has been changed
program_change a scheduling program has been edited
program_deleted a scheduling program has been deleted
program_toggled a scheduling program has been enabled or disabled
rain_changed indicates that a rain sensor has changed
rain_delay_change manual rain delay has been set or ended (check sd["rd"])
rebooted the hardware has been rebooted
restarted SIP software has restarted
restarting SIP software is re-starting
running_program_change scheduling program has started or stopped (check gv.pon)
station_completed a station run has ended
station_names station names have been changed
stations_scheduled a program is started (Scheduled or "run now"), or station is manually started (check gv.srvals for stations set to run))
value_change a controller value has changed (see controller values above)
zone_change GPIO pins are activated according to gv.srvals