Announcement

Collapse
No announcement yet.

Updated EtherRain Sprinkler Control Interface

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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

    #2
    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 ; November 26, 2009, 07:30 AM.

    Comment


      #3
      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

      Comment


        #4
        Just installed my new EtherRain and have some questions

        First, how do I check the status of the rain detector from Homeseer? Thanks.

        Comment


          #5
          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.

          Comment


            #6
            Originally posted by simonmason View Post
            First, how do I check the status of the rain detector from Homeseer? Thanks.

            Comment


              #7

              Comment


                #8
                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

                Comment


                  #9
                  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 Files

                  Comment


                    #10
                    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

                    Comment


                      #11
                      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?

                      Comment


                        #12
                        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

                        Comment


                          #13
                          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.

                          Comment


                            #14
                            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

                            Comment


                              #15
                              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!

                              Comment

                              Working...
                              X