www.homeseer.com    
 

Go Back   HomeSeer Message Board > Irrigation Plug-ins > Irrigation Discussion

Irrigation Discussion Discussion of irrigation integration with HomeSeer systems.

Reply
 
Thread Tools Display Modes
  #1  
Old July 31st, 2009, 03:28 PM
jiml@quicksmart.com jiml@quicksmart.com is offline
Seer
 
Join Date: Jul 2009
Location: west
Posts: 37
Updated EtherRain Sprinkler Control Interface

A feature rich and easy-to-use interface for EtherRain on HomeSeer2 is now available. The interface consists of a set of web pages and an updated EtherRain.vb script.

The interface is very easy to install and use and now provides the following functionality:

1. Controller definition
2. Irrigation Cycle definition - up to 20!
3. Setback definition
4. Daily check-in event with email and log alerts
5. Two click manual irrigation
6. Temporary irrigation suspend (1 to 9 days) with auto resume
7. Single click irrigation enable/disable
8. Complete use of all HomeSeer Event definitions.

With this interface it is now very easy for anyone to use EtherRain within their HomeSeer 2 powered home control system. This interface provides some higher-end features like email notification, temporary suspend, setback control.

The interface implements all of the needed functionality for basic and sophisticated irrigation control, including monthly setback functionality providing an easy way to save water. With these foundations, and HomeSeer's highly extensible Event building capabilities, it is possible to easily develop irrigation programs having a wide range of sophistication.

With this interface it is now very easy to set up maintainable irrigation events using standard HomeSeer 2 Event creation procedures. By specifying the "runNamedCycle" function, you need only specify your controller name and the cycle name that you wish to use when defining an irrigation event. Once you have set up your irrigation events, you can easily change zone settings and setback profile with the provided web interface and you can set up as many programs as you wish. The EtherRain controller, along with the interface script let you turn your HomeSeer 2 automation system into a very high-end reliable irrigation controller.

For ease-of-use, and water conservation, a "setback" profile is included to provide automatic variation of your cycles on a monthly basis. You can set up the profile to scale back irrigation to coincide with your seasonal climate. Once you define your profile you can apply it to any cycle you define. Now you don't have to define multiple events for use in different seasons (though you still can!)

The EtherRain Interface for HomeSeer2 consists of a folder containing webpages which is easily copied to the "html" folder of your HomeSeer directory, and the EtherRain.vb file which is copied to your scripts directory.

Once the files are copied, create a custom web page button in HomeSeer's Setup area by clicking the "Web Site" tab and in the Custom Web Page fields, enter a custom web page title of "EtherRain Home" that uses the custom web page link of: "EtherRainAsp/er_home.asp." Then click save. From the EtherRain home page you can access all of the above functionality. Installation time is minimal.

The EtherRain HomeSeer2 interface resides in a zipped folder and can be downloaded from the QuickSmart website at:

http://www.quicksmart.com/qs_software.html#homeseer

You can download the interface and view the environment without purchasing an EtherRain controller. EtherRain is a professionally designed, reliable, easy-to-configure, Ethernet-connected sprinkler controller. It has built-in rain sensor circuitry. With the included interface, you'll find that EtherRain offers the best value in sprinkler control in terms of features, reliability, and ease of setup and use for the HomeSeer 2 platform.

If you have questions about using this HomeSeer 2 interface or using EtherRain with HomeSeer 2, please post on this thread.

cheers,
jim
Reply With Quote
  #2  
Old November 24th, 2009, 02:09 AM
petergomes
Guest
 
Posts: n/a
Hi Dear.

I have recently join this site and this is nice idea for providing us information about this Interface. Would you mind to let us know more about this? Thanks!

Last edited by petergomes; November 26th, 2009 at 08:30 AM.
Reply With Quote
  #3  
Old June 3rd, 2012, 02:38 PM
jiml@quicksmart.com jiml@quicksmart.com is offline
Seer
 
Join Date: Jul 2009
Location: west
Posts: 37
EtherRain script set updated...

The EtherRain HomeSeer interface script set has been recently updated (June, 2012)

The main update is the addition of a function that enables multiple cycles to be run sequentially through one HomeSeer event, so if you have multiple EtherRain controllers you don't have to calculate start times for each controller and the cycles will run in sequence like a single 16 or 32 zone controller. The function takes into account the application of monthly water-saving setbacks, if setbacks are used.

The new function is called "runSeqCycles" and is documented in the function reference guide.

This function can also be used for cycle and soak applications, where a single long cycle can be replaced by say two or three shorter cycles - with each cycle run in sequence, without having to calculate start times for each cycle.

The initial code base for this function was contributed by "kanga" - an expert HomeSeer scripter. I would like to add that the scripting flexibility and event control that is built into HomeSeer is very impressive.

We've made other minor updates to the scripts over the last year based on feedback from HomeSeer users. Thanks for your continued inputs.


Jim
Reply With Quote
  #4  
Old July 5th, 2012, 03:54 PM
simonmason's Avatar
simonmason simonmason is offline
Seer Master
 
Join Date: Nov 2001
Location: Chatham, NJ, USA
Posts: 978
Just installed my new EtherRain and have some questions

First, how do I check the status of the rain detector from Homeseer? Thanks.
Reply With Quote
  #5  
Old July 6th, 2012, 03:58 PM
jayman13 jayman13 is offline
Seer Master
 
Join Date: Jul 2011
Location: Chicago, IL
Posts: 913
Quote:
Originally Posted by simonmason View Post
First, how do I check the status of the rain detector from Homeseer? Thanks.
I don't think you can. My understanding is that it shows up in your log. If you get Jon00's script for log checking you can spawn an event that occurs when your rain detector is on but other than that I don't know how you do it. Somebody correct me if I'm wrong.
Reply With Quote
  #6  
Old July 13th, 2012, 12:19 AM
jiml@quicksmart.com jiml@quicksmart.com is offline
Seer
 
Join Date: Jul 2009
Location: west
Posts: 37
Quote:
Originally Posted by simonmason View Post
First, how do I check the status of the rain detector from Homeseer? Thanks.
Hi Simon,
If you are using the EtherRain script set you can set up an event that calls the status command.

Create an event as described in the Functional Reference Guide. In the field labeled "Optional Parameters" enter the following:

("getStatusRet”,”NameOfYourController”)

Where "NameOfYourController" is your controller's name.

The command will return a string that provides the status of of the device. If rain is being detected, the word "rain" will appear in the results string.

If you are writing an ASP script use this line:

rstr = hs.RunEx("EtherRain.vb","getStatusRet","NameOfYourController ")

The return string will provide the device status, including the word "rain" if rain is being detected.

This command is used in the script set when you click the status button from the EtherRain home page.

The "getStatusRet" command return string is documented more fully within the EtherRain.vb script.

Hope this helps.

Jim
Reply With Quote
  #7  
Old July 13th, 2012, 09:17 AM
simonmason's Avatar
simonmason simonmason is offline
Seer Master
 
Join Date: Nov 2001
Location: Chatham, NJ, USA
Posts: 978
Thanks, I tried this out. I get no response to the command as outlined. I did try the disable and enable from the scripts and these work fine. I started looking around the script but didn't spend much time in it to figure out what is going on. I am calling it with the following optional parameters:

("getStatusRet",”EtherRain.8”)

I get nothing in the log. I also tried calling it with no second parameter, which when I look at the script should result in a message that the name wasn't specified. As I said, I haven't looked through the whole script yet but this call is not working.
Reply With Quote
  #8  
Old July 13th, 2012, 10:23 AM
jiml@quicksmart.com jiml@quicksmart.com is offline
Seer
 
Join Date: Jul 2009
Location: west
Posts: 37
Hi Simon,
Looks like calling the function from the event just runs the function but doesn't return anything. You'll have to write an ASP script using the second form to process the return string. Sorry about that.

Tell me what you are trying to accomplish; I may be able to write a function for it if it is generic enough (example: logControllerStatus("NameOfController"))

Jim
Reply With Quote
  #9  
Old July 13th, 2012, 10:32 AM
simonmason's Avatar
simonmason simonmason is offline
Seer Master
 
Join Date: Nov 2001
Location: Chatham, NJ, USA
Posts: 978
OK, this is what I am trying to figure out. I currently have an X-10 sprinkler controller. I use MainLobby as my main interface and then homeseer as the brains behind the whole system. Currently I have setup custom screens in MainLobby that give me complete control over the sprinkler setup (see attached screen shots) and then I have two scripts in homeseer that trigger all of the actions as needed through a number of events.

I get that the EtherRain is a self contained controller. So, the way I see it I have two options -

Run everything as I have been doing through scripts - assuming that all basic functions in EtherRain are accessible from individual calls - which I don't think they are.

Use the EtherRain script to read all of the basic information out of the controller, display it in MainLobby, but not be able to control the settings there and use the EtherRain interface to set these things.

I think the second option is probably the easiest?

So, in the case of the rain sensor - I wanted to read the status of the sensor as it changes and set a flag in homeseer/MainLobby so this information can be visually displayed on the interface.

Does this make sense?
Attached Images
      
Reply With Quote
  #10  
Old July 13th, 2012, 08:06 PM
jiml@quicksmart.com jiml@quicksmart.com is offline
Seer
 
Join Date: Jul 2009
Location: west
Posts: 37
Quote:
Originally Posted by simonmason View Post
OK, this is what I am trying to figure out. I currently have an X-10 sprinkler controller. I use MainLobby as my main interface and then homeseer as the brains behind the whole system. Currently I have setup custom screens in MainLobby that give me complete control over the sprinkler setup (see attached screen shots) and then I have two scripts in homeseer that trigger all of the actions as needed through a number of events.

I get that the EtherRain is a self contained controller. So, the way I see it I have two options -

Run everything as I have been doing through scripts - assuming that all basic functions in EtherRain are accessible from individual calls - which I don't think they are.

Use the EtherRain script to read all of the basic information out of the controller, display it in MainLobby, but not be able to control the settings there and use the EtherRain interface to set these things.

I think the second option is probably the easiest?

So, in the case of the rain sensor - I wanted to read the status of the sensor as it changes and set a flag in homeseer/MainLobby so this information can be visually displayed on the interface.

Does this make sense?
Hi Simon,

It makes sense. The key here is that you are using scripts in your custom screens to develop your programs. Because you are using scripts you can emulate pretty much everything that you are doing with the X-10 system using functions in the provided EtherRain.vb script.

The main differences between the the EtherRain operating model and the X-10 on-off device model are these:

1. EtherRain was designed so that you never have to send an off command. When you send a command to EtherRain you tell it how many minutes to run for each zone; you specify a time for the zones you want to run, and 0 for the zones that you don't want to run. You can send EtherRain a command that will run just one zone at a time if you want to emulate X-10. You don't have to program an off event however.

2. EtherRain will only run one zone at a time. If you send EtherRain a command to irrigate while it is already running an irrigate command, the second command will not execute unless you first send a Clear/reset command to the EtherRain, so if you use a zone model, you should always send a clear/resest command first.

You can construct zone based commands through scripting if you want, you would insert your zone runtimes into a command string using the "runCycle" command - explained in the Function Guide.

You can get the status of the rain sensor using the command:
rstr = hs.RunEx("EtherRain.vb","getStatusRet","NameOfYourController ")

It will return the operating status in a string form. If a command is running it will return the zone that is running, and if raining, "RAIN" You'll have to set up an event to poll this status continuously though. You'll have to parse the return string to get the data.

Hope this explains. Let me know if parsing the getStatusRet string is too difficult. I may be able to provide a separate function for rain. We use this command when clicking the status on the EtherRain Main page. We parse the return string in the ASP script.

Jim
Reply With Quote
  #11  
Old July 15th, 2012, 10:58 AM
simonmason's Avatar
simonmason simonmason is offline
Seer Master
 
Join Date: Nov 2001
Location: Chatham, NJ, USA
Posts: 978
I don't have a problem in off-loading some of the controls to the EtherRain - in fact I think this is preferred. Naturally with an X-10 controller I had to monitor it constantly - make sure that off commands were received for example! I will start playing with the code and adapting it to my setup.

My initial thought is to off-load the bulk of the processing to the controller. So I will no longer monitor zone status during a cycle, etc. The only thing I will do is allow for the selection of cycle and adjusting the length of zones, etc.

First question, the EtherRain interface does not actively update Homeseer, correct? Therefore I will have to put a polling mechanism in place in order to know whether the unit is idle, status of the rain sensor, etc?
Reply With Quote
  #12  
Old July 15th, 2012, 04:26 PM
jiml@quicksmart.com jiml@quicksmart.com is offline
Seer
 
Join Date: Jul 2009
Location: west
Posts: 37
Quote:
Originally Posted by simonmason View Post
First question, the EtherRain interface does not actively update Homeseer, correct? Therefore I will have to put a polling mechanism in place in order to know whether the unit is idle, status of the rain sensor, etc?
Hi Simon,
That is correct, there isn't a way for an IP device to asynchronously contact HomeSeer to set a variable, for example. So you have to set up an event that executes periodically calling the status function. I'm fairly certain there is a way to set up a temporary or self deleting homeseer "poll for status" event when your irrigation event starts. This "poll for status" event could then be deleted at the end of the cycle. The runSeqCycles function uses self deleting events.

All of the "runCycle" functions now first call the status function, to determine if the controller will accept a command. If you call a "runCycle" or "runNamedCycle" function through an event and the controller is reporting rain, for example, the command will not run and the reason why will be sent to the HomeSeer Log.

Take a look at the script er_statusRequest.asp This function is called via AJAX from the er_home.asp script when one of the status buttons is clicked and it calls the getStatusRet function and sends the result back to the er_home. The er_home.asp script parses the result string to display the status, inluding RAIN if the sensor is detecting rain. You can see how the result string is parsed by viewing that portion of the er_home.asp script.

Hope this helps
Jim
Reply With Quote
  #13  
Old July 24th, 2012, 08:25 PM
simonmason's Avatar
simonmason simonmason is offline
Seer Master
 
Join Date: Nov 2001
Location: Chatham, NJ, USA
Posts: 978
Ok, I went the easy route and modified your EtherRain.vb file. I now call this every 5 minutes to poll the status of the controller using the GetStatusRet function. I modified the code to set my internal flags for the rain sensor so homeseer and MainLobby know what is going on. It seems that the easiest function for me to use when running the sprinklers is the runCycle. I can then leave all of the code for setting zone times in MainLobby/homeseer and then call this function.

One question, I want to improve the polling so I know what is going on during a cycle. I don't see any documentation on what variables can exist in the status string. I see from the code that there is a os:, BZ, WT, RD rn:, and rz: ?

What is rz - short, and WT - Waiting?

Thanks.
Reply With Quote
  #14  
Old July 25th, 2012, 12:00 AM
jiml@quicksmart.com jiml@quicksmart.com is offline
Seer
 
Join Date: Jul 2009
Location: west
Posts: 37
Quote:
Originally Posted by simonmason View Post
One question, I want to improve the polling so I know what is going on during a cycle. I don't see any documentation on what variables can exist in the status string. I see from the code that there is a os:, BZ, WT, RD rn:, and rz: ?

What is rz - short, and WT - Waiting?

Thanks.
Hi Simon,
I need to put that in tabular form in the API. The controller returns three status variables:
OS - Current operating status
CS - Command status
RZ - Irrigation command result - result of the last Irrigation command sent

OS: Operating Status provides current the state of the controller. The states are:
RD - READY. the controller is ready to accept a new irrigate command
WT- WAITING. The controller has accepted an Irrigate command that had a delay associated with it and is waiting to start the command. Not used in HomeSeer usually
BZ - BUSY. The controller is currently executed an irrigate command.

CS: Command status: - the result of the last command send to the controller. Values returned are:

OK - if the command was accepted
ER - if the command had a formatting error
NA - if the command came from an unauthorized IP address

RZ: Result of previous irrigation command. Values returned are:

OK - the previous I command completed with no issues
RN - the previous I command was interrupted by the rain indicator
SH - the previous I command was interrupted by the detection of a short in the valve wiring (RI will give a clue to the zone causing the issue)
NC - the previous command did not complete - most likely a power outage

This is all included in the API, though probably could be organized a little better (as above!). The appendix of the API tells how to interpret the RI (relay index) status.

Is there a set of standard HomeSeer or Main Lobby variables that developers can write to, or are you defining your own?

Cheers,
Jim
Reply With Quote
  #15  
Old July 25th, 2012, 06:45 AM
simonmason's Avatar
simonmason simonmason is offline
Seer Master
 
Join Date: Nov 2001
Location: Chatham, NJ, USA
Posts: 978
Thanks, this will be very helpful.

I don't know if I have all of the information on variables - but I use two types. 1) variables that you define at startup - but these (I think) are only addressable by scripts and not easily by the web interface and 2) device variables defined in the web interface. The latter are assigned an X-10 like address - I believe a throwback to an earlier version of homeseer. I use a combination of the both, but mostly the latter. Creating rules with the device variables is quite easy as it can be done in the web interface. So for example, I have a device variable (it happens to be Q1) and I set the flag in here based on the feedback from the controller. Then I reference this device both in homeseer and in MainLobby.

If you were to invest more time in the homeseer interface - then a simple polling script (like the one I am working on) would then set the values in a bunch of device variables. That would make it easy for anyone to interface with homeseer without creating any scripts.

But, I am not fully qualified to get into the details. The last formal training I had was in Pascal 25 years ago and I taught myself vb script in order to program my homeseer!
Reply With Quote
  #16  
Old September 15th, 2012, 10:17 AM
BIGMACK48 BIGMACK48 is offline
Seer Deluxe
 
Join Date: Sep 2008
Location: Newyork
Posts: 322
Exclamation Upgrade to new version of EtherRain.8

When I upgrade to new version of EtherRain.8

I now getting this error in log file when I run a event to turn sprinklers zone on.

EtherRain:Alerts The controller EtherRain.8 is reporting Rain. The cycle will not execute.

The old version ran ok.

Could you tell me how to fix this problem?

Thank you

Greg Mack
Reply With Quote
  #17  
Old September 26th, 2012, 11:08 PM
jiml@quicksmart.com jiml@quicksmart.com is offline
Seer
 
Join Date: Jul 2009
Location: west
Posts: 37
Quote:
Originally Posted by BIGMACK48 View Post
When I upgrade to new version of EtherRain.8
Hi Greg,
I assume you mean when you upgraded your scripts you started getting the "rain detected message" when there is no rain. Please make sure that you have the most recent script set. When the script set was recently updated there was an intermediate script set version on the web site for about a week that had a bug that caused this message under certain conditions. The script set was corrected fairly quickly but you still might have that version. If you still experience the inadvertent message after downloading and installing the current script set please contact me.

Cheers,
Jim
Reply With Quote
  #18  
Old September 27th, 2012, 08:02 AM
simonmason's Avatar
simonmason simonmason is offline
Seer Master
 
Join Date: Nov 2001
Location: Chatham, NJ, USA
Posts: 978
I did get the polling script setup - currently for the rain sensor but could be easily modified for other actions. If anyone has a similar need just let me know and I can share the simple code.
Reply With Quote
  #19  
Old April 21st, 2013, 08:57 AM
simonmason's Avatar
simonmason simonmason is offline
Seer Master
 
Join Date: Nov 2001
Location: Chatham, NJ, USA
Posts: 978
I never got around to programming beyond the rain sensor, which is working well. I am now in the processing of connecting the EtherRain to my MainLobby touchscreens through Homeseer.

First question - my rain sensor is NC. So EtherRain thinks that it is raining when it is not. I adjusted for this in my code to check the rain sensor and report it back separately.

I don't see a setting to reverse this? Do I need to reverse the logic in the .vb file or is there an easier way to do this?
Reply With Quote
  #20  
Old May 2nd, 2013, 09:42 PM
jiml@quicksmart.com jiml@quicksmart.com is offline
Seer
 
Join Date: Jul 2009
Location: west
Posts: 37
Wink rain sensor for EtherRain

Hi Simon,

EtherRain expects a "normally open" rain sensor. Most commercially available rain sensors have three terminals with one of the terminals being Normally Open. Check your rain sensor installation guide to see if your's has this. This would be the easiest way to fix the issue.

If you use a NC rain sensor with EtherRain, then the irrigation events won't run (except when it's raining )


Jim
Reply With Quote
Reply

Bookmarks

Tags
sprinkler ethernet

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:28 PM.


Copyright HomeSeer Technologies, LLC