Irrigation.pm |
In user code:
use Insteon::Irrigation; $irrigation = new Insteon::Irrigation('12.34.56', $myPLM);
In items.mht:
INSTEON_IRRIGATION, 12.34.56, irrigation, Irrigation
Creating the object:
use Insteon::Irrigation; $irrigation = new Insteon::Irrigation('12.34.56', $myPLM);
Turning on a valve:
$v_valve_on = new Voice_Cmd "Turn on valve [1,2,3,4,5,6,7,8]"; if (my $valve = state_now $v_valve_on) { $valve--; set_valve $irrigation "0$valve", "on"; }
Turning off a valve:
$v_valve_off = new Voice_Cmd "Turn off valve [1,2,3,4,5,6,7,8]"; if (my $valve = state_now $v_valve_off) { $valve--; set_valve $irrigation "0$valve", "off"; }
Requesting valve status:
$v_valve_status = new Voice_Cmd "Request valve status"; if (state_now $v_valve_status) { poll_valve_status $irrigation; }
Provides basic support for the EzFlora (aka EzRain) sprinkler controller.
Insteon::BaseDevice, Insteon::DeviceController
new()
Instantiates a new object.
poll_valve_status()
Sends a message to the device requesting the valve status. The response from the device is printed to the log and stores the result in memory.
set_valve(valve_id, valve_state)
Used to directly control valves. Valve_id is a two digit number 00-07, valve_state may be on or off.
set_program(program_id, proggram_state)
Used to directly control programs. Program_id is a two digit number 00-03, valve_state may be on or off.
get_active_valve_id()
Returns the active valve number identified by the device in response to the last
poll_valve_status()
request.
get_valve_is_running()
Returns true if the active valve identified by the device in response to the last
poll_valve_status()
request is running.
get_active_program_number()
Returns the active program number identified by the device in response to the last
poll_valve_status()
request.
get_program_is_running()
Returns true if the active program identified by the device in response to the last
poll_valve_status()
request is running.
get_pump_enabled()
Returns true if valve 8 is set to be a pump. In this setup, valve 8 will also turn on when any other valve is enabled. Generally used if you have some sort of water pump that runs to provide water to your sprinklers.
get_timers()
Sends a request to the device asking for it to respond with the current timers. It does not appear that there is code to interpret the response provided by the device.
_is_info_request()
Used to intercept and handle unique EZFlora messages, all others are passed on
to Insteon::BaseObject::_is_info_request()|Insteon::BaseInsteon/Insteon::BaseObject
.
request_status()
This does nothing and returns 0, it prevents a request_status message, which the device does not support, from being sent to the device.
Gregg Liming <gregg@limings.net> David Norwood <dnorwood2@yahoo.com> Evan P. Hall <evan@netmagic.net> Kevin Robert Keegan
http://www.simplehomenet.com/Downloads/EZRain%20Command%20Set.pdf, http://www.simplehomenet.com/Downloads/EZFlora%20Command%20Set.pdf
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.pm |