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
  #41  
Old July 1st, 2013, 08:02 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
I see what you are saying. I did misread your question. My code was for the rain sensor. I haven't looked at the code that closely but there must be a variable that is set when the device is running? Will take a look.
Simon:
Using your technique, you could parse for "ready," "busy," and "waiting" in the status response string. You'd need another virtual device for controller status. if the string returned from the getStatusRet function includes "busy" or "waiting" then the controller is "running." You can view the inline comments at the function in EtherRain.vb

I'm not well versed in devices or virtual devices for HomeSeer at this point but from what I understand they can only have an "on" or "off" state so it looks like you need a virtual device for every binary parameter, especially if you are monitoring from HSTouch (which I know little about at this point).

Jim
Reply With Quote
  #42  
Old July 2nd, 2013, 12:23 AM
edstasneyjr edstasneyjr is offline
Seer Plus
 
Join Date: Jun 2011
Location: C.S. Texas
Posts: 81
There is away to get the status into the log and put it into a virtual device. Just following the logic from earlier above this post.

Edit lines (below this statement)
( responsestr = devnamestr & " Working. Status: ")


responsestr = devnamestr & " Working. Status: "
'now need to get status (ready/busy/waiting/rain/short)
'setup the url
myurl = "http://" & erdevices(j).ipPort
'also, make sure the password is accepted
qstr = "/" & resultPage & "?" & "xs"
url = myurl & qstr
rez = getPage(url)
If Not rez Then
getStatusRet = responsestr & "Unknown"
Exit Function
End If
k = InStr(webstr, "os:")
'check operating status
wstr = "?"
If k > 0 Then
wstr = Mid(webstr, k + 4, 2)
End If
If wstr = "BZ" Then
getStatusRet = responsestr & "Running"
hs.writelog ("EtherRain", "EtherRain is Running")
hs.SetDeviceStatus ("R15", 2)
Exit Function
End If
If wstr = "WT" Then
getStatusRet = responsestr & "Waiting"
hs.writelog ("EtherRain", "EtherRain is Ready")
hs.SetDeviceStatus ("R15", 2)
Exit Function
End If
If wstr = "RD" Then
responsestr = responsestr & "Ready"
hs.writelog ("EtherRain", "EtherRain is Ready")
hs.SetDeviceStatus ("R15", 2)
End If
'but now check short
k = InStr(webstr, "rz:")
'check operating status
wstr = "?"
If k > 0 Then
wstr = Mid(webstr, k + 4, 2)
End If
If wstr = "SH" Then
getStatusRet = responsestr & "(Short)"
Exit Function
End If




specifically you want the:

hs.writelog ("EtherRain", "EtherRain is Ready")
hs.SetDeviceStatus ("R15", 2)

or whatever corresponds to your virtual device (mine is R15). The next phase that I have to figure out is a way to make the virtual device something other than values 0,1,2,3 and make them represent something else. I have seen somewhere to do this.

Hope this helps someone.
Reply With Quote
  #43  
Old July 2nd, 2013, 07:19 PM
edstasneyjr edstasneyjr is offline
Seer Plus
 
Join Date: Jun 2011
Location: C.S. Texas
Posts: 81
Got the status to display in the Display web page in homeseer and in the log location. I am using R15 as my virtual device. Below is the code that I used that was changed from the original. it is mostly just changing to lines in the corresponding locations

hs.writelog ("EtherRain", "EtherRain is Ready")
hs.SetDeviceString ("R15", "Ready")




responsestr = devnamestr & " Working. Status: "
'now need to get status (ready/busy/waiting/rain/short)
'setup the url
myurl = "http://" & erdevices(j).ipPort
'also, make sure the password is accepted
qstr = "/" & resultPage & "?" & "xs"
url = myurl & qstr
rez = getPage(url)
If Not rez Then
getStatusRet = responsestr & "Unknown"
Exit Function
End If
k = InStr(webstr, "os:")
'check operating status
wstr = "?"
If k > 0 Then
wstr = Mid(webstr, k + 4, 2)
End If
If wstr = "BZ" Then
getStatusRet = responsestr & "Running"
hs.writelog ("EtherRain", "EtherRain is Running")
hs.SetDeviceString ("R15", "Running")
Exit Function
End If
If wstr = "WT" Then
getStatusRet = responsestr & "Waiting"
hs.writelog ("EtherRain", "EtherRain is Waiting")
hs.SetDeviceString ("R15", "Waiting")
Exit Function
End If
If wstr = "RD" Then
responsestr = responsestr & "Ready"
hs.writelog ("EtherRain", "EtherRain is Ready")
hs.SetDeviceString ("R15", "Ready")
End If
'but now check short
k = InStr(webstr, "rz:")
'check operating status
wstr = "?"
If k > 0 Then
wstr = Mid(webstr, k + 4, 2)
End If
If wstr = "SH" Then
getStatusRet = responsestr & "(Short)"
Exit Function
End If


Now to the next hurdle of which Zone is it on.
Reply With Quote
  #44  
Old July 4th, 2013, 03:16 PM
simonmason's Avatar
simonmason simonmason is offline
Seer Master
 
Join Date: Nov 2001
Location: Chatham, NJ, USA
Posts: 1,030
Thanks for the pointers. I adding the following calls into my setup as well. I have an event that runs every 5 minutes to poll the etherrain. I originally set this up to poll the rain sensor. In order for this to accurately return the status of the controller I will probably have to move it to polling every minute. It would be nice if there was a way to fire an event from the controller when it starts anything, it would save having to poll it.
Reply With Quote
  #45  
Old July 10th, 2013, 01:45 AM
edstasneyjr edstasneyjr is offline
Seer Plus
 
Join Date: Jun 2011
Location: C.S. Texas
Posts: 81
Thanks to Jim for helping me get the zone/station information into HS and HS Touch. The key to this is listed below.

What Jim gave me.

Try inserting the code above the line:

k = InStr(webstr, "os:")

and

k = InStr(webstr, "ri:")
wstr = "?"
If k > 0 Then
wstr = Mid(webstr, k + 4, 1)
End If
hs.writelog ("EtherRain", wstr +1)



I expanded on a previous post do to this information resetting the zone information back to 0 otherwise it is on 8 when the next cycle runs. (mostly just adding

hs.writelog ("EtherRain", "reseting zone to 0")
hs.SetDeviceString ("V1", "0")

)


If wstr = "BZ" Then
getStatusRet = responsestr & "Running"
hs.writelog ("EtherRain", "EtherRain is Running")
hs.SetDeviceString ("R15", "Running")
hs.writelog ("EtherRain", wstr + 1)
hs.SetDeviceString ("V1", wstr + 1)
Exit Function
End If
If wstr = "WT" Then
getStatusRet = responsestr & "Waiting"
hs.writelog ("EtherRain", "EtherRain is Waiting")
hs.SetDeviceString ("R15", "Waiting")
hs.writelog ("EtherRain", "reseting zone to 0")
hs.SetDeviceString ("V1", "0")
Exit Function
End If
If wstr = "RD" Then
responsestr = responsestr & "Ready"
hs.writelog ("EtherRain", "EtherRain is Ready")
hs.SetDeviceString ("R15", "Ready")
hs.writelog ("EtherRain", "reseting zone to 0")
hs.SetDeviceString ("V1", "0")
End If


Hope this helps.
Reply With Quote
  #46  
Old July 10th, 2013, 01:51 AM
edstasneyjr edstasneyjr is offline
Seer Plus
 
Join Date: Jun 2011
Location: C.S. Texas
Posts: 81
Sorry I forgot a line. You need:

hs.SetDeviceString ("v1", wstr + 1)


This is the whole thing:

k = InStr(webstr, "ri:")
wstr = "?"
If k > 0 Then
wstr = Mid(webstr, k + 4, 1)
End If

hs.writelog ("EtherRain", wstr + 1)
hs.SetDeviceString ("v1", wstr + 1)
Reply With Quote
  #47  
Old July 13th, 2013, 09:37 AM
simonmason's Avatar
simonmason simonmason is offline
Seer Master
 
Join Date: Nov 2001
Location: Chatham, NJ, USA
Posts: 1,030
Just to confirm what is going on here. When I insert that last code and the controller is not running I get a 9.

Is wstr+1 going to return the number of the active zone when the controller is running?

Also, is it possible to poll other information - for example, in addition to zone number, total time zone will run for, time remaining, etc.

Finally, is it possible to send specific commands to the controller, for example - turn on or off a specific zone?

Last edited by simonmason; July 13th, 2013 at 10:04 AM.
Reply With Quote
  #48  
Old July 15th, 2013, 08:02 AM
edstasneyjr edstasneyjr is offline
Seer Plus
 
Join Date: Jun 2011
Location: C.S. Texas
Posts: 81
Not sure on several of you comments/questions.

With Jim's helped I only wanted what zone the controller turned on (basicaaly I am trying to get some of the same information that works in the OptiRain windows app). I belive the controller counts from zero not from one so that is why you have a "+ 1". You should be able to get the total time zone run time. I would think you could get remaining time but that one maybe more difficult.

Yes you should be able to turn off certain zone when you run the initial command of sending turning on the water cycles. The bases of running EtherRain is just the command plus the amount of time you want to run. For example I have 4 zones so for me when I send the controller information it is the command and then 1,2,3,4,0,0,0,0. In the example zone one gets one minute, zone 2 gets to minutes, 3 gets 3 min, 4 gets 4 and then zeros for the rest.

Hope this helps.
Reply With Quote
  #49  
Old July 15th, 2013, 08:21 PM
simonmason's Avatar
simonmason simonmason is offline
Seer Master
 
Join Date: Nov 2001
Location: Chatham, NJ, USA
Posts: 1,030
It looks like the 9 that is returned means no zone is currently running. I see the documentation on runCycle that allows for manual operation of the zones - that works. I think I am good now - just need to update all of my MainLobby screens to use these new commands. Thanks for the help.
Reply With Quote
  #50  
Old July 16th, 2013, 01:03 AM
jiml@quicksmart.com jiml@quicksmart.com is offline
Seer
 
Join Date: Jul 2009
Location: west
Posts: 37
EtherRain zone status

Hi Simon,
The relay index that EtherRain returns is always the last zone completed. When the controller is running (ie, when the status is BZ (busy) the currently running zone is the relay index + 1. When the controller is not running (status = RD (ready) the relay index will continue to report the last zone that ran. For EtherRain 8, usually this is 8; for EtherRain 7, usually this is 7. The relay index doesn't reset until a new cycle begins, this way it is possible to check to see if the controller stopped mid cycle (usually only a power outage or reset would cause this).

Hope this explains. A complete explanation is in the API which I can send to anyone who is interested.

Jim
Reply With Quote
  #51  
Old July 16th, 2013, 08:29 AM
simonmason's Avatar
simonmason simonmason is offline
Seer Master
 
Join Date: Nov 2001
Location: Chatham, NJ, USA
Posts: 1,030
I'm good. I have all of the interaction working in homeseer. The only comment/request I have moving forward regards the polling. In order to create a close handshake between the Etherrain and Homeseer I am currently polling it every couple of minutes. This is primarily because I am feeding information to my Cinemar MainLobby system and I want the touchscreens to be providing up to date information. It would be nice if certain events trigger a response such that I don't have to poll the controller. For example, the rain sensor activating, or a zone changing.

Perhaps something for future consideration.
Reply With Quote
  #52  
Old October 4th, 2013, 02:29 PM
timlacey's Avatar
timlacey timlacey is offline
Seer Deluxe
 
Join Date: Dec 2004
Location: San Diego
Posts: 348
Hello,

I am moving my irrigation from my Stargate to Homeseer when I switch to HS3 (there is no SG plug-in for HS3). I am waiting for a few plug-ins now, but they're getting close and I should be able to switch around the January timeframe.

Is there an update on using Etherrain with HS3? Does the community here recommend this solution over others?

Tim
Reply With Quote
  #53  
Old October 5th, 2013, 05:52 PM
simonmason's Avatar
simonmason simonmason is offline
Seer Master
 
Join Date: Nov 2001
Location: Chatham, NJ, USA
Posts: 1,030
I haven't switched to HS3 so I can't comment specifically on this. I have it working under HS2 nicely. However, as it is a stand-alone controller that can be accessed via it's own web site it would not be an issue to switch to HS3 even if the direct interface with HS3 doesn't work. So I wouldn't less this hold you up.
Reply With Quote
  #54  
Old October 20th, 2013, 12:26 AM
jiml@quicksmart.com jiml@quicksmart.com is offline
Seer
 
Join Date: Jul 2009
Location: west
Posts: 37
EtherRain scriptset for HS3

Quote:
Originally Posted by timlacey View Post
Is there an update on using Etherrain with HS3? Does the community here recommend this solution over others?

Tim
Hello Tim,
We will be supporting HS3. We have purchased HS3 and have started the process of building an HS3 script set. We are targeting the release of an HS3 script set for EtherRain by January 2014. The functionality may vary slightly on the first release depending the programming information made available by HomeSeer.

Jim
Reply With Quote
  #55  
Old January 11th, 2014, 02:45 PM
jiml@quicksmart.com jiml@quicksmart.com is offline
Seer
 
Join Date: Jul 2009
Location: west
Posts: 37
EtherRain HS3 Interface

The EtherRain HS3 interface is now downloadable from the QuickSmart site

The interface look and feel is the same as the HS2 interface; one function (runSeqCycles) is not yet supported due to current HS3 scripting limitations but all the other functions including the most often used "runNamedCycle" work.
Jim
Reply With Quote
  #56  
Old June 9th, 2016, 01:56 PM
jayman13 jayman13 is offline
Seer Master
 
Join Date: Jul 2011
Location: Chicago, IL
Posts: 934
Quote:
Originally Posted by jiml@quicksmart.com View Post
The EtherRain HS3 interface is now downloadable from the QuickSmart site

The interface look and feel is the same as the HS2 interface; one function (runSeqCycles) is not yet supported due to current HS3 scripting limitations but all the other functions including the most often used "runNamedCycle" work.
Jim
Hey Jim, just wondering about any updates to the script for running sequential cycles. Also, is there a way to determine the status of the rain sensor? I am trying to reset up everything in HS3. Thanks.
Reply With Quote
  #57  
Old July 22nd, 2017, 03:40 PM
jiml@quicksmart.com jiml@quicksmart.com is offline
Seer
 
Join Date: Jul 2009
Location: west
Posts: 37
EtherRain HS3 Interface Scripts

Hello Jayman13,
As of July 22, 2017 the HS3 script set for EtherRain is fully functional including support for running sequential cycles.

If you have a larger irrigation system and multiple EtherRain controllers, you can run up to 64 zones sequentially by setting only one HomeSeer event. Run sequential cycles also supports the monthly irrigation setbacks so you can create one event the can run year around, reducing irrigation automatically in the fall and winter if needed.

The script set has been tested on 3.0.0.318.

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 05:51 PM.


Copyright HomeSeer Technologies, LLC