(2022 Oct 26, 02:56 AM)tutqiunnh Wrote: (2022 Oct 25, 09:57 PM)dan Wrote: If a rain sensor is connected to SIP running on a Raspberry Pi it will stop irrigation as long as the rain sensor's switch is active. It is possible to set some stations to ignore the rain sensor or a rain delay on the Stations page.
Internally SIP has 2 variables that control the effect of the rain sensor. They are gv.sd["urs"] (use rain sensor) and gv.sd["rs"] (rain sensed) if both of those variables have a value of 1 irrigation will be stopped. You can find descriptions of the SIP variables in the gv_reference.txt file in the SIP directory.
Currently there is a new SIP extension (plugin) under development that integrates Node-RED with SIP. It will allow node-red to read and set almost all of SIP's variables. That may be something you could use.
Dan
When both variables are true and irrigation is scheduled or in progress is irrigation delayed or just ended for the day? Currently I have a bash script that gets the rain total and rain rate data from my station and uses web interface cmds to disable or enable the SIP system. If rain is happening during a scheduled irrigation program which has sequential station durations what happens to that program? A) if the rain sensor GPIO is active or B)if I have issued a system off web cmd. Particularly if the rain ends before the program end time. My guess in either case the program is stopped and the remainder of the program ignored for the day if “rain sensed” and “use rain sensor” are active and if system off is active at start of program or issued during the program, the program or it’s remainder is ignored for the day as well. Is that correct?
Bryan
You are basically correct.
To make things a little clearer here are some more details about how SIP works:
First, I forgot to mention that there is a third variable gv.sd["rst"] (rain sensor type).
If "use rain sensor" is set on the Options page. You can simulate a rain sensor by toggling between gv.sd["rst"] = 0 and gv.sd["rst"] = 1. You mentioned that you are not using GPIO pins for the rain sensor so this may be useful.
When the system is disabled everything stops. Any running stations are stopped and no new programs will be scheduled.
There is also "stop all stations" (command: /cv?rsn=1) which stops any running stations and clears the schedule of the currently running program. Programs that are scheduled later will still be run.
At this point there is no way to delay a program it is just ended. Delaying a program would interfere with any programs scheduled at a later time so it would be problematic.
When a rain sensor is connected to a GPIO pin and the sensor's switch is active, irrigation is stopped and no further irrigation is allowed except for stations that are set to ignore rain.
The way a rain sensor works is that is has a stack of absorbent disks that swell when they get wet. When they swell a certain amount it activates the switch. When the rain stops it takes a while for the disks to dry and contract enough to release the switch. This is designed to simulate the moisture content of the soil.
Dan