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
  #21  
Old May 5th, 2013, 02:06 PM
simonmason's Avatar
simonmason simonmason is offline
Seer Master
 
Join Date: Nov 2001
Location: Chatham, NJ, USA
Posts: 978
I checked the sensor it is NC and does not have a NO option. It was installed last year and I was using it on my old X-10 based controller that could accept either in the programming. It would be a shame to switch the sensor.

I control the X-10 unit by scripts in homeseer. I was thinking of using your programs to control the unit moving forward. I could just adapt the code and send commands to the Etherrain. However, if I tell it to turn on the zones manually will it still listen to the rain sensor and ignore them?
Reply With Quote
  #22  
Old May 8th, 2013, 01:08 AM
jiml@quicksmart.com jiml@quicksmart.com is offline
Seer
 
Join Date: Jul 2009
Location: west
Posts: 37
using the nc sensor

Hi Simon,
Let me restate your question to make sure I understand it:
You have an NC rain sensor that connects as an X-10 HomeSeer device. You want to modify the EtherRain scripts to test the your rain sensor device before sending an irrigation command. Is that correct? If so yes you should be able to make that modification as long as the device status is available to the scripting language - I think it is. You'd test for an on or off - whatever state the sensor reports when it detects rain.

The logic might also apply for manual commands if the function that you modify is the same one that is called when the manual button is clicked.

Hope this states your application correctly.
Jim
Reply With Quote
  #23  
Old May 8th, 2013, 08:09 AM
simonmason's Avatar
simonmason simonmason is offline
Seer Master
 
Join Date: Nov 2001
Location: Chatham, NJ, USA
Posts: 978
Sorry Jim, I confused things. I do have a NC rain sensor. It does not have the third lead that many do, apparently this model is sold as either an NO or an NC in separate units. I used to have it connected to my X-10 sprinkler control but I replaced that controller with the EtherRain. So now it is connected to the EtherRain.

I figure that there are three options. I handle the scheduling of the sprinklers outside of the EtherRain? In order to do this I would need to be able to send commands to the EtherRain to turn on and off the sprinklers - I haven't looked into the code, is this possible? This is not as daunting as one might think as I have a whole series of scripts written for the old X-10 controller.

Second, you can allow for NC or NO rain sensors as a setting in the EtherRain interface.

Third, I replace the rain sensor - it was new last summer so this is not my first choice but it can of course be done if options 1 or 2 don't work.
Reply With Quote
  #24  
Old May 10th, 2013, 01:00 AM
jiml@quicksmart.com jiml@quicksmart.com is offline
Seer
 
Join Date: Jul 2009
Location: west
Posts: 37
Hi Simon,

It might be possible to emulate the operation of an X-10 controller with EtherRain using the Direct Relay Mode in EtherRain, but it's not worth trying. The main benefit that EtherRain brings to HomeSeer control is that you only need to send one command to EtherRain, the one command contains all of the cycle information, so if there was ever a connection or other computer issue after the command was sent, EtherRain would continue operating the cycle - you don't have to worry about setting timers or sending an OFF command. Some of these irrigation cycles can be 6 hours long and sometimes glitches can happen in that amount of time; having EtherRain manage the cycle enhances reliability and makes programming easier when used in the intended irrigation mode.

EtherRain doesn't support a normally closed sensor. We had to simplify the design and Normally Open makes more logical sense for a sensor. So a Normally Closed sensor won't work with EtherRain.

If you can send an email stating the name and model number of your sensor, (and your address) I can send you one of our rain sensors. You can attach it to the wire you already have in place and that will solve the problem.

Your sensor information will help me because I need to know which sensors to NOT recommend to customers when they ask. I haven't found a sensor in the US that didn't support both Normally Open and Normally Closed, but the Hunter Mini-Clik, which does support both Normally Open and Normally Closed in the US, does NOT support Normally Open in France. Who would have guessed?

This should get you started in the most expeditious manner.

Jim
Reply With Quote
  #25  
Old May 12th, 2013, 04:19 PM
frankc's Avatar
frankc frankc is offline
Seer Deluxe
 
Join Date: Jan 2009
Location: Kansas, USA
Posts: 301
EtherRain, HS2, and iPad

I just discovered my self-contained, non-PC connected, sprinkler controller has quit functioning. So perhaps now is the time to purchase an HS2 connected controller.

I am interested in the EtherRain 7p since I have 7 zones and a valve common to the 7 zones.

I am hoping to utilize my LAN connected iPad to remotely control the EtherRain controller. Assuming that is not a problem, would I be able to alter the scheduled watering cycle such that I could turn a chosen zone on and off to adjust the sprinkler heads? Would that require deleting the full '7 zone' programming to allow individual zone control?

For example, with my hard-wired only controller, I could conveniently turn any zone on and off as I adjusted arc width and spray distance. And when it came time to blow out the system, I could control the zone status (on/ off) as required by the air compressor being used to blow out each zone.

Thanks!
Reply With Quote
  #26  
Old May 14th, 2013, 10:32 PM
jiml@quicksmart.com jiml@quicksmart.com is offline
Seer
 
Join Date: Jul 2009
Location: west
Posts: 37
EtherRain with HomeSeer and iPad

Hi Frank,
EtherRain just responds to commands that are given to it, it doesn't store a schedule, so, to answer your question below, your scheduled programs would remain as you have programmed them into HomeSeer, while you execute valve testing commands.

I'm assuming you are accessing your HomeSeer desktop remotely through your iPad, correct? (I'm assuming that is possible don't know for a fact that it is) if so you can use the EtherRain HomeSeer scripts, you can set up seven of the 20 programs as valve test cycles: just define cycles that have one value per zone, say 1 minute, and name them valve test cycles. Then click the run manual for that program and only that zone will run; you can let the valve run for the full minute, or you can tap the stop cycle button to stop it immediately.

Your scheduled HomeSeer events will still run as scheduled. Alternatively you could use HomeSeer for your scheduled events and use the third party iPhone App for EtherRain to perform valve testing - it should run on your iPad.

You can learn more about setting up cycles and events by downloading the EtherRain HomeSeer script package - it includes good setup instruction.

Hope this helps,

Jim
Reply With Quote
  #27  
Old May 14th, 2013, 10:48 PM
frankc's Avatar
frankc frankc is offline
Seer Deluxe
 
Join Date: Jan 2009
Location: Kansas, USA
Posts: 301
Quote:
Originally Posted by jiml@quicksmart.com View Post
I'm assuming you are accessing your HomeSeer desktop remotely through your iPad, correct? (I'm assuming that is possible don't know for a fact that it is)
Jim
Thanks Jim,

Sounds perfect!

I haven't tried the iPad idea, but I feel confident it will work.

I will proceed along those lines. I've lost two controllers (I won't mention a name, but like I said, they are non-web based and are solid state) in 4 years. Ridiculous!

And more importantly, this will be more fun to use HS2 with some software control.

Thanks!

Frank
Reply With Quote
  #28  
Old June 23rd, 2013, 03:55 PM
jayman13 jayman13 is offline
Seer Master
 
Join Date: Jul 2011
Location: Chicago, IL
Posts: 913
Hey Jim,

I'm trying to get the status of my controller through an event in homeseer particularly to see if rain is detected. I am going to then parse out the response in the log to determine if rain is in the string. When the I run the event with the following parameters as seen in the log I get this:

6/23/2013 2:51:53 PM - Event - Running script in background: EtherRain.vb("getStatusRet”,”Device1”)
6/23/2013 2:51:53 PM - Warning - VB.Net script exception(0), re-starting: Length cannot be less than zero.Parameter name: length


Anything I am doing wrong?
Reply With Quote
  #29  
Old June 23rd, 2013, 03:59 PM
jayman13 jayman13 is offline
Seer Master
 
Join Date: Jul 2011
Location: Chicago, IL
Posts: 913
Quote:
Originally Posted by simonmason View Post
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.
Hey Simon. If you have the script I would love to use it. Can you post?
Reply With Quote
  #30  
Old June 23rd, 2013, 09:09 PM
simonmason's Avatar
simonmason simonmason is offline
Seer Master
 
Join Date: Nov 2001
Location: Chatham, NJ, USA
Posts: 978
I added the following code after line 326 in the standard script - after the section titled - "but now check rain..."

Code:
		'Checking rain sensor...
		
        If wstr = "1" Then
			'Rain sensor on
			'Rain sensor is normally closed (NO) so a "1" indicates that it is wet
            responsestr = responsestr & "(Rain)"
			hs.writelog ("EtherRain", "Rain Sensor is on - raining")
			'Set rain sensor status - R14
			hs.SetDeviceStatus ("R14", 2)
        End If

		If wstr <> "1" Then
			'Rain sensor off
			'Rain sensor is normally closed (NO) so something other than a "1" (presumably a 0) indicates that it is not wet
			hs.writelog ("EtherRain", "Rain Sensor is off - Not raining")
			'Set rain sensor status - R14
			hs.SetDeviceStatus ("R14", 3)
        End If
Reply With Quote
  #31  
Old June 23rd, 2013, 09:17 PM
jayman13 jayman13 is offline
Seer Master
 
Join Date: Jul 2011
Location: Chicago, IL
Posts: 913
Quote:
Originally Posted by simonmason View Post
I added the following code after line 326 in the standard script - after the section titled - "but now check rain..."

Code:
		'Checking rain sensor...
		
        If wstr = "1" Then
			'Rain sensor on
			'Rain sensor is normally closed (NO) so a "1" indicates that it is wet
            responsestr = responsestr & "(Rain)"
			hs.writelog ("EtherRain", "Rain Sensor is on - raining")
			'Set rain sensor status - R14
			hs.SetDeviceStatus ("R14", 2)
        End If

		If wstr <> "1" Then
			'Rain sensor off
			'Rain sensor is normally closed (NO) so something other than a "1" (presumably a 0) indicates that it is not wet
			hs.writelog ("EtherRain", "Rain Sensor is off - Not raining")
			'Set rain sensor status - R14
			hs.SetDeviceStatus ("R14", 3)
        End If
Thanks. So you created a virtual device R14 and run events off that?
Reply With Quote
  #32  
Old June 23rd, 2013, 09:24 PM
simonmason's Avatar
simonmason simonmason is offline
Seer Master
 
Join Date: Nov 2001
Location: Chatham, NJ, USA
Posts: 978
Yes,

I have an elaborate set of scripts that I developed for my X-10 controller - using MainLobby as the main interface. I am in the process of converting them over to use for the etherrain controller. I have not gotten far because my sprinkler system is in disarray - Sandy damage - and I have been waiting for the repair guy for over 2 months!
Reply With Quote
  #33  
Old June 23rd, 2013, 09:42 PM
jayman13 jayman13 is offline
Seer Master
 
Join Date: Jul 2011
Location: Chicago, IL
Posts: 913
Well that snippet of code works great. I shouldn't have waited so long to determine rain sensor status. I'd always be wondering now did the irrigation system not go on because the sensor was on, did HS screw up? Thanks again.
Reply With Quote
  #34  
Old June 26th, 2013, 11:53 PM
jiml@quicksmart.com jiml@quicksmart.com is offline
Seer
 
Join Date: Jul 2009
Location: west
Posts: 37
Quote:
Originally Posted by jayman13 View Post
Hey Jim,

I'm trying to get the status of my controller through an event in homeseer particularly to see if rain is detected. I am going to then parse out the response in the log to determine if rain is in the string. When the I run the event with the following parameters as seen in the log I get this:

6/23/2013 2:51:53 PM - Event - Running script in background: EtherRain.vb("getStatusRet”,”Device1”)
6/23/2013 2:51:53 PM - Warning - VB.Net script exception(0), re-starting: Length cannot be less than zero.Parameter name: length


Anything I am doing wrong?
Hi Jayman,
How are you calling the script?
if calling from asp it should look like this:


res = hs.RunEx("EtherRain.vb","getStatusRet”,”dev1Name;dev1PW”)

The return should be a string with the status. Note in the call that both the device name and password must be entered and there must be a semi-colon separating the two, and of course the quotes!

This should work for you. You shouldn't have to parse the log if you use this call because the response should be returned to your script.

Let me know how this goes.
Jim
Reply With Quote
  #35  
Old June 27th, 2013, 12:49 PM
jayman13 jayman13 is offline
Seer Master
 
Join Date: Jul 2011
Location: Chicago, IL
Posts: 913
Thanks Jim. I am using the script above and it is working great.
Reply With Quote
  #36  
Old June 30th, 2013, 10:45 AM
edstasneyjr edstasneyjr is offline
Seer Plus
 
Join Date: Jun 2011
Location: C.S. Texas
Posts: 81
Starting small

First of all thanks for helping (these forums are great).

Starting small as I have a simple setup because I don't have a any programming knowledge and having trouble with something simple and then expanding on it.

I have EtherRain and I want to eventually see the status of it in HS Touch. I think the best way to do that is to have a virtual device. Virtual device is where I currently have an issue and I cannot seem to change the status in the status screen. So for testing I am just trying to set the device value (see below). Just to make sure I am doing this correctly I am doing this in the events and under running a script so that I can see it in the log (not sure if there is another way to do this).

Sub Main
&hs.SetDeviceStatus ("V1", 3)
End Sub


Again thanks for anyone who can help for a non-programmer.
Reply With Quote
  #37  
Old June 30th, 2013, 11:06 PM
simonmason's Avatar
simonmason simonmason is offline
Seer Master
 
Join Date: Nov 2001
Location: Chatham, NJ, USA
Posts: 978
Your event will turn on that device - but what is triggering it? I don't think you can do this from an event unless you call the event with something. Etherrain comes with its own script - you need to set up an event to run this script on a regular basis. Here is what I am doing...

Etherrain Status
Recurring every 5 minute(s)
WHEN
Everyday
Run script: EtherRain.vb("getStatusRet", "EtherRain.8")

Then you need to place the code to update the virtual device in the ether rain.vb (see my post above).
Reply With Quote
  #38  
Old July 1st, 2013, 03:15 PM
edstasneyjr edstasneyjr is offline
Seer Plus
 
Join Date: Jun 2011
Location: C.S. Texas
Posts: 81
First of all thank you for your help.

Couple different things are happening. I had different code than you (mine was May 2012) and I am running EtherRain7. With that being said your code does work, but I don't think it is doing what I want and I think your code is checking for rain using a sensor (NC?)?

I am hoping to get the status of whether or not EtherRain is running and what zone it is on? The code did work by changing the status on the status screen to off where it was unknown earlier (this actually helped me out a lot - ).

Another question maybe you all can answer is there a way to make it so I can input my on times into the HS Touch screen (like if you used OptiRain QuickCycle) for each zone. I'm pretty sure there is as I can see the command lines in the log from when I run an event (where it is the command etherrain.vb,something,X,X,X,X,X,X,X - where "X" represents zones). I am just trying not to recreate the wheel.

Jim,

Can you give us a heads up on what we might have to do for HS3 release since I think your scripts are in VB and they are trying to make everyone standardize on .Net Framework? Just trying to be a forward thinker.
Reply With Quote
  #39  
Old July 1st, 2013, 04:22 PM
simonmason's Avatar
simonmason simonmason is offline
Seer Master
 
Join Date: Nov 2001
Location: Chatham, NJ, USA
Posts: 978
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.

As for HS3 - I don't plan to update right away. I will need to go through a lot of plugins and code to figure out what works and what doesn't. With Cinemar MainLobby it took me almost a year to finally switch over!
Reply With Quote
  #40  
Old July 1st, 2013, 07:52 PM
jiml@quicksmart.com jiml@quicksmart.com is offline
Seer
 
Join Date: Jul 2009
Location: west
Posts: 37
Quote:
Originally Posted by edstasneyjr View Post
First of all thank you for your help.
Jim,

Can you give us a heads up on what we might have to do for HS3 release since I think your scripts are in VB and they are trying to make everyone standardize on .Net Framework? Just trying to be a forward thinker.
Ed:
No worries on HS3. I have a copy of the HS3 beta and will be porting the scripts to HS3. Converting to ASPX won't be difficult, however the beta version as it stands is missing some things and Homeseer needs to provide some better documentation on how an event can by programmatically generated given that at this time it seems that they removed some simple event generating functions from their scripting library.

I hope to have the scripts updated when HS3 is out of Beta, I know some customers want them updated sooner. I just have to wait until the information is available. The HS3 scripts will be downloadable in a separate zip file when available and will be labled for HS3.

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:46 AM.


Copyright HomeSeer Technologies, LLC