Irrigation_Item.pm |
Irrigation_Item
Example initialization:
These are to be placed in a *.mht file in your user code directory.
First, define your actual irrigation object:
UPB_Rain8, irrigation_controller1, 13, 1
Then, define the Irrigation_Item(s) and attach the real object:
IRRIGATION, irrigation_controller1, morning_irrigation
IRRIGATION, irrigation_controller1, evening_irrigation
Irrigation Cycle controller - This is an attempt to abstract irrigation control features from the hardware specific device driver. This driver can cycle through specific zones with specified time delays (much like a generic sprinkler controller found on an existing system) This driver has been tested to work with the UPB_Rain8 driver, but should work with any other device object that can turn on/off its zones using the MH support substate syntax ( ->set(on:4);)
set(state)
Start / Stop full irrigation cycle
state[on/off] = Start/Stop full irrigation cycle
zone_single(zone,state,time)
Start / Stop single zone
zone[x] = Single zone to activate/deactivate
state[on/off] = Start / Stop single zone
time[x] = Time in seconds for the zone to run
zone_activate(zone,activated)
Set zone activation part of the cycle
zone[x] = Zone to set activate/de-activated
activated[1/0] = Set / unset active zone in full cycle
zone_time(zone,time)
Set zone cycle time
zone[x] = Zone to set cycle time
time[x] = Time in seconds for the zone to run part of the cycle
zone_count(zones)
Set total zones
zones[x] = Number of zones as a part of the system (default 8)
zone_hammer(time)
Set anti-water hammer time (seconds)
time[x] = Time in seconds for overlaping zones
running()
Returns (1/0) system running
zone_current()
Returns [1/0] current zone running
NONE
Jason Sharpee - jason@sharpee.com
NONE
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Irrigation_Item.pm |