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 October 7th, 2014, 12:25 PM
frankc's Avatar
frankc frankc is offline
Seer Deluxe
 
Join Date: Jan 2009
Location: Kansas, USA
Posts: 301
Quote:
Originally Posted by NeverDie View Post

I have a lux sensor with high dynamic range on order from Adafruit (http://www.adafruit.com/products/1980). It should arrive this week. It's inexpensive at around $7, but I'm hoping it will correlate well enough to solar irradiance, even though it doesn't have the crystal hemisphere over it like a proper scientific instrument would. I should think that a solar panel would also be a good way to measure irradiance, as that is what powers it--although again it would be missing a hemisphere.

.
Is the lux sensor's output such that something like a raspberry pi is required to make sense of it? I was thinking of a solar panel as well. Even one of the small types used for a landscape light. Or would they be too non-linear or perhaps saturate too quickly? And in any event would a sensor have to follow the sun's inclination throughout the year to provide a consistent and relative output?
__________________
HS3, CM15A, Win10, Sprinklers w /ET, Concord Security , CallerID, tenScripting3, TextSeer, tenHsServer, tenScriptAid, Jon00ImageBuilder, Jon00LogMonitor
Reply With Quote
  #42  
Old October 7th, 2014, 10:13 PM
NeverDie's Avatar
NeverDie NeverDie is offline
Seer Master
 
Join Date: Jun 2013
Location: 3rd rock from the sun
Posts: 1,211
Quote:
Originally Posted by frankc View Post
What is your source of local ET figures?
http://texaset.tamu.edu/date.php?stn=48&spread=7

and

http://www.realgreenlawns.com/austin...in_weather.htm

Also, rather than being level, my lawn is on a slope. I'm not seeing runoff when I irrigate, but maybe the slope is somehow a factor.

Reply With Quote
  #43  
Old October 7th, 2014, 10:31 PM
NeverDie's Avatar
NeverDie NeverDie is offline
Seer Master
 
Join Date: Jun 2013
Location: 3rd rock from the sun
Posts: 1,211
Quote:
Originally Posted by frankc View Post
Is the lux sensor's output such that something like a raspberry pi is required to make sense of it? I was thinking of a solar panel as well. Even one of the small types used for a landscape light. Or would they be too non-linear or perhaps saturate too quickly? And in any event would a sensor have to follow the sun's inclination throughout the year to provide a consistent and relative output?
I get the impression that a pyranometer is the preferred type of sensor ( http://en.wikipedia.org/wiki/Pyranometer). I don't know how well different sensors would approximate that.

Last edited by NeverDie; October 8th, 2014 at 08:00 AM.
Reply With Quote
  #44  
Old October 8th, 2014, 08:09 AM
frankc's Avatar
frankc frankc is offline
Seer Deluxe
 
Join Date: Jan 2009
Location: Kansas, USA
Posts: 301
Quote:
Originally Posted by NeverDie View Post
Also, rather than being level, my lawn is on a slope. I'm not seeing runoff when I irrigate, but maybe the slope is somehow a factor.
wow... grass looks great, but how in the world would you figure the ET for that? If the angle of the sun is an issue in figuring the solar radiation, what happens when the land is angled away from or toward the sun. Seems like there would be an effect. But the run off would seem to be a bigger issue. What if you watered twice a day to give the smaller amount of water to remain on the lawn / in the soil?

I am still working on the formulas within the script. I went through half of it yesterday. I am thinking of modifying the script to figure solar radiation on an hourly basis rather than daily. The ETs it derives seem to be a little high the way it is.
Reply With Quote
  #45  
Old October 8th, 2014, 08:36 AM
frankc's Avatar
frankc frankc is offline
Seer Deluxe
 
Join Date: Jan 2009
Location: Kansas, USA
Posts: 301
Great sources of ET and radiation!

It would be interesting to run the Python script using the coordinates of those locations to check how well the ET matches. I'll give that a shot.
Reply With Quote
  #46  
Old October 8th, 2014, 02:27 PM
NeverDie's Avatar
NeverDie NeverDie is offline
Seer Master
 
Join Date: Jun 2013
Location: 3rd rock from the sun
Posts: 1,211
Quote:
Originally Posted by frankc View Post
wow... grass looks great, but how in the world would you figure the ET for that? If the angle of the sun is an issue in figuring the solar radiation, what happens when the land is angled away from or toward the sun. Seems like there would be an effect.
I too would think that there would need to be an adjustment to the solar radiation figure based on not just the slope angle but also the direction of the slope. The slope in the photo above is about 20 degrees downward in a north easterly direction. So, if anything, a solar radiation measurement would effectively be even lower, similar to how it would be for solar panels mounted at the same angle and facing the same direction:

http://www.pveducation.org/pvcdrom/p...ation-and-tilt
Reply With Quote
  #47  
Old October 10th, 2014, 10:03 AM
NeverDie's Avatar
NeverDie NeverDie is offline
Seer Master
 
Join Date: Jun 2013
Location: 3rd rock from the sun
Posts: 1,211
Quote:
Originally Posted by frankc View Post
I used ActivePython-2.5.5.7-win32-x86.msi. I put that and other information in the script. (you also need simple json). I had read on this board that was the only version that would work. So that is the only version I tried. And as of a week ago, I had never messed with python. But it is very similar to visual basic I think. I think you will find it easy to learn. I've learned enough in a week to do enough.

I need to get a raspberry pi. They look interesting. I've messed with an arduino a little. My sprinklers are controlled from a webControl board.
Where exactly do I put the simplejson files so that activePython will be sure to find them? There's no simplejson installer. It's just a bunch of files.

BTW, ActivePython version 2.5.5.7 (community edition) is no longer available on the activePython website because it is no longer the current version. Are you using the community version or one of the paid-for versions? Or is there a secret location where it can still be downloaded? I did download the current 32-bit community version, version 2.7.8.10. I updated your script to use my free weatherunderground key (which allegedly does have historical data access), but unfortunately your script choked when I tried running it:

ActivePython 2.7.8.10 (ActiveState Software Inc.) based on
Python 2.7.8 (default, Jul 2 2014, 19:50:44) [MSC v.1500 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> ================================ RESTART ================================
>>>

Traceback (most recent call last):
File "C:\Users\David\Downloads\homeseer python script\ET-master\ET-master\et4a_v001.py", line 391, in <module>
getHistoricalData(forecast)
File "C:\Users\David\Downloads\homeseer python script\ET-master\ET-master\et4a_v001.py", line 161, in getHistoricalData
cachefile = open("data/" + datestring, 'w')
IOError: [Errno 2] No such file or directory: 'data/20141005'
>>>

Not sure if it's choking because I'm using more current version of ActivePython than 2.5.5.7, or whether that's unrelated. I also tried running the same script using the 64-bit ActivePython, but the result was the same. I also tried running the original poster's python script, and it choked in the same spot (although on a different date).

Just to confirm my assumptions: are you also running Python under Windows? I'm assuming so, if only because the ActivePython reference you gave me was for a windows version. I could try running Python on a raspberry pi to see if perhaps the "file or directory" problem above is because of my using a Windows rather than linux environment.

Last edited by NeverDie; October 10th, 2014 at 01:23 PM.
Reply With Quote
  #48  
Old October 10th, 2014, 01:14 PM
frankc's Avatar
frankc frankc is offline
Seer Deluxe
 
Join Date: Jan 2009
Location: Kansas, USA
Posts: 301
Hi there ND.

I am running the script on Windows XP. The reason I am using XP is I have a video capture card that only has drivers for XP.

I did just find the Active Python file. I searched for:
ActivePython-2.5.5.7-win32-x86.msi and found it. It is free. If the link below works (if not, let me know), you will need to click on "View raw file". It asked me whether I wanted to save it. It is 24 MB. You will also need SimpleJSON. I have entered that information in my script.

https://code.google.com/p/common-cod...2-x86.msi?r=96

I have made 100's of changes to my script. And it is much longer than before. Dave, the author, and I worked quite a bit two days ago calibrating the script. I used the data from Dallas to do that using one of the links you posted. I'll update the github thing today with mine. His would not run on my PC. It wasn't written for the version of Python that will run on Homeseer.

I am hoping that HS3 will run Python, but haven't heard anything in that regard. Python version 2.5 is old!

Again, per your link, I emailed the folks at A&M and asked for their script to calculate ET. They said it wasn't within their policy to do so. I plan to email them back and explain it seems odd to me that they have posted on their website that they want to increase the public's awareness of the need to use ET. How are people supposed to do that if they have no software?
Reply With Quote
  #49  
Old October 10th, 2014, 01:41 PM
NeverDie's Avatar
NeverDie NeverDie is offline
Seer Master
 
Join Date: Jun 2013
Location: 3rd rock from the sun
Posts: 1,211
Good news: it breaks in a different spot, and in a way that should be easy to fix, as this time around ActrivePython simply isn't finding the simplejson files it needs to import.

PythonWin 2.5.5 (r255:77872, Jan 31 2010, 15:49:35) [MSC v.1310 32 bit (Intel)] on win32.
Portions Copyright 1994-2008 Mark Hammond - see 'Help/About PythonWin' for further copyright information.
Traceback (most recent call last):
File "C:\Python25\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line 325, in RunScript
exec codeObject in __main__.__dict__
File "C:\Users\David\Downloads\homeseer python script\ET-master\ET-master\et4a_v001.py", line 21, in <module>
import simplejson as json #simplejson needed for Pyton 2.5
ImportError: No module named simplejson
>>>

Where exactly do I put the simplejson files so that activePython will be sure to find them? Or, more simply, where did you place yours? There's no simplejson installer. It's just a bunch of files. I'm not sure what filepath activePython might use when it tries to find them for the import.

Last edited by NeverDie; October 10th, 2014 at 02:30 PM.
Reply With Quote
  #50  
Old October 10th, 2014, 01:54 PM
NeverDie's Avatar
NeverDie NeverDie is offline
Seer Master
 
Join Date: Jun 2013
Location: 3rd rock from the sun
Posts: 1,211
Quote:
Originally Posted by frankc View Post

Again, per your link, I emailed the folks at A&M and asked for their script to calculate ET. They said it wasn't within their policy to do so. I plan to email them back and explain it seems odd to me that they have posted on their website that they want to increase the public's awareness of the need to use ET. How are people supposed to do that if they have no software?
I take it as reason for hope that that they even replied to your query, even if it was only to officially slam the door. You might try pointing out that by posting the code they leverage the power of the internet by getting free eyeballs to scour their code for possible errors and, if there are any, they may even get the fixes for free without having to make any further effort on their own. As it stands, their code could be erroneous, but how would anyone even know? They could also avail themselves of any improvements that might similarly arise. That sort of thing happens all the time, and it's a large factor in what's driving open source to be such a big phenomenon. If they don't want to be bothered fielding questions, maybe they can just put it up on github and largely forget about it. If they don't know how to do that, you could offer to post it for them, as you've obviously figured it out. Also, their own students may find it to be of educational value, which is generally part of an academic institution's broader mission, especially in this case: ET is of obvious relevance to agricultural studies. If they read and understand these arguments and are open to reason, they will see how de-cloaking their code has potential benefits to them, and then perhaps they'll reconsider your request more favorably from that self-interested perspective, especially if it requires little to no effort on their end to make it happen. On the other hand, if their code is so poorly written that they're afraid of career suicide and/or massive embarrassment if it ever became in any way public....I'm not sure how to get past an unspoken concern like that, but it might also be their true reason for stonewalling.

Last edited by NeverDie; October 10th, 2014 at 03:03 PM.
Reply With Quote
  #51  
Old October 10th, 2014, 02:23 PM
frankc's Avatar
frankc frankc is offline
Seer Deluxe
 
Join Date: Jan 2009
Location: Kansas, USA
Posts: 301
I didn't take notes when I installed SimpleJSON. Although it seems it happened easily. Perhaps I just clicked on setup.py from my downloads directory ? I hope that works. If so, let me know and I will add that info to my script.

I agree with your assessment of A&M's policy. The odd thing is they wrote a 'friendly' explanation of ET and stated that it needs to be used more. I'll email them now. They had emailed me twice and the fact that they post that data is great!
Reply With Quote
  #52  
Old October 10th, 2014, 03:16 PM
NeverDie's Avatar
NeverDie NeverDie is offline
Seer Master
 
Join Date: Jun 2013
Location: 3rd rock from the sun
Posts: 1,211
I moved the simplyjson files to the c:\python25\lib directory, and ActivePython seems to find them now.

However, it's back to square one, as it now breaks again where it did before before I downgraded to ActivePython 2.5.5.7:

PythonWin 2.5.5 (r255:77872, Jan 31 2010, 15:49:35) [MSC v.1310 32 bit (Intel)] on win32.
Portions Copyright 1994-2008 Mark Hammond - see 'Help/About PythonWin' for further copyright information.
Traceback (most recent call last):
File "C:\Python25\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line 325, in RunScript
exec codeObject in __main__.__dict__
File "C:\Users\David\Downloads\homeseer python script\ET-master\ET-master\et4a_v001.py", line 391, in <module>
getHistoricalData(forecast)
File "C:\Users\David\Downloads\homeseer python script\ET-master\ET-master\et4a_v001.py", line 161, in getHistoricalData
cachefile = open("data/" + datestring, 'w')
IOError: [Errno 2] No such file or directory: 'data/20141005'
>>>

I'm running on Windows 7 Ultimate. I'm running simplejson 3.6.4 instead of the 3.6.3 that you referenced, again because that's what's available because it's what's current.

I just now tried adding a "data" directory under Python25. It now runs without the above error, but now ActivePython just vaguely says "failed to run script - syntax error - invalid syntax." It doesn't say where.

Argh.. It's probably something obvious to anyone with python experience, but at the moment I have none. Therefore, I may have to return to this at a later date to get it sorted, as presently I'm just spinning my wheels without getting traction.

Last edited by NeverDie; October 10th, 2014 at 05:13 PM.
Reply With Quote
  #53  
Old October 10th, 2014, 05:41 PM
frankc's Avatar
frankc frankc is offline
Seer Deluxe
 
Join Date: Jan 2009
Location: Kansas, USA
Posts: 301
Quote:
Originally Posted by NeverDie View Post
Argh..
I don't recall why I downloaded the version of SimpleJSON I downloaded, but it is available - I just got it a week or so ago. So you might try to go to that version, although, I doubt that is the issue.

Are you using the original script aka Dave's? I'm thinking that one also needs the directory 'Water' in the Scripts subdirectory.

Also, I can run the script from the command line at the Scripts directory just as easily as from Homeseer. Well, if you are using his, you won't be able to run it from Homeseer. Actually, without modifications to his, you can't run his from anywhere with Python 2.5.

I don't recall ever getting an error that Python didn't elaborate on.
Reply With Quote
  #54  
Old October 10th, 2014, 06:53 PM
NeverDie's Avatar
NeverDie NeverDie is offline
Seer Master
 
Join Date: Jun 2013
Location: 3rd rock from the sun
Posts: 1,211
Quote:
Originally Posted by frankc View Post

Are you using the original script aka Dave's?
It gives the same error, but in addition it also says ">>> C:\Users\David\Downloads\ET python script\versions\getWeather_v001.py:111: Warning: 'with' will become a reserved keyword in Python 2.6" That may at least partly the explain the problem with running that python script on a later version of python.

I believe the line it may be referring to is:
with open("water/" + datestring) as f:
because it parks a flashing cursor on that line when the error occurs.
Reply With Quote
  #55  
Old October 10th, 2014, 07:03 PM
NeverDie's Avatar
NeverDie NeverDie is offline
Seer Master
 
Join Date: Jun 2013
Location: 3rd rock from the sun
Posts: 1,211
Quote:
Originally Posted by frankc View Post
I don't recall why I downloaded the version of SimpleJSON I downloaded, but it is available - I just got it a week or so ago. .
Version 3.6.4 was uploaded on 9/29/2014, so I'm guessing shortly after you downloaded 3.4.3. It does claim though that it "maintains backwards compatibility with Python 2.5." (
https://pypi.python.org/pypi/simplejson/)
Reply With Quote
  #56  
Old October 10th, 2014, 07:20 PM
frankc's Avatar
frankc frankc is offline
Seer Deluxe
 
Join Date: Jan 2009
Location: Kansas, USA
Posts: 301
With open does not work with 2.5. I learned last night that it actually will with another module import. but not without that import.


But I too had that problem when I first tried run dave's script. I just rem'd that section out. More recently, I replaced that section completely. That was where his controller updated that day's watering. My controller sends An email to report its watering. So my script gets that email and saves the data to a directory.

It's difficult getting this stuff to work while you learn python. A week ago or so, I thought a python was something that slithered.
Reply With Quote
  #57  
Old October 11th, 2014, 07:10 PM
NeverDie's Avatar
NeverDie NeverDie is offline
Seer Master
 
Join Date: Jun 2013
Location: 3rd rock from the sun
Posts: 1,211
I notice that weatherunderground has added quantified precipitation predictions to its forecasts:

Name:  precip.png
Views: 181
Size:  73.1 KB

As you can see in the picture, WU thinks there will be 0.25" of rain on Monday.

For irrigation planning purposes, that's obviously much more useful than only knowing the chance of rain (which is defined as the probability of 0.01" of rain or greater).

Anyone happen to know if this quantified precipitatio forecast is available through the free WU api? Accuweather has had these quantified precipitation predictions for some time now, although I don't know whether Acuweather has a free api like WU does.

Once I get up to speed on python, it will be interesting to start tracking WU predictions (and, if easy, those made by other weather sites too) against what actually happens. That way, for automated irrigation planing purposes, I'll know better what the accuracy is and which website is the most accurate forecaster.

Last edited by NeverDie; October 13th, 2014 at 08:45 AM.
Reply With Quote
  #58  
Old October 11th, 2014, 09:33 PM
frankc's Avatar
frankc frankc is offline
Seer Deluxe
 
Join Date: Jan 2009
Location: Kansas, USA
Posts: 301
I bet you are right. The Python script does get this figure from WU and assigns the figure to a variable "forecast". Also gets the chances of precipitation for today and tomorrow. I have the script set such that if either chance is 40% or more, there will be no irrigation. But, I am not using the qpf figure. I need to fix that. Maybe reduce the amount of irrigation by that qpf figure? I hadn't realized the significance of it.

I now have the Python script telling Homeseer which of 10 schedules to use. I created 10 events: 1 mm, 2 mm, 3 mm... up to 10 mm. The actual number of minutes range from 15 to 146. So Python has Homeseer enable one of those and disables the rest. I think that should work. Things are set up to have it work tomorrow.
Reply With Quote
  #59  
Old October 11th, 2014, 10:07 PM
frankc's Avatar
frankc frankc is offline
Seer Deluxe
 
Join Date: Jan 2009
Location: Kansas, USA
Posts: 301
Here is what I don't understand about pop and qpf:

This is for tomorrow:
"pop":0,
"qpf_allday": {
"in": 0.51,
"mm": 13
so there is a 0% chance of precip. But prediction is half an inch of rain.

For the next day:
"pop":90,
"qpf_allday": {
"in": 1.57,
"mm": 40
That makes more sense to me: 90% chance and 1.57" predicted.
??
Reply With Quote
  #60  
Old October 11th, 2014, 10:46 PM
NeverDie's Avatar
NeverDie NeverDie is offline
Seer Master
 
Join Date: Jun 2013
Location: 3rd rock from the sun
Posts: 1,211
Quote:
Originally Posted by frankc View Post
Here is what I don't understand about pop and qpf:

This is for tomorrow:
"pop":0,
"qpf_allday": {
"in": 0.51,
"mm": 13
so there is a 0% chance of precip. But prediction is half an inch of rain.
I agree it doesn't make sense. i.e. it would seem to be self-contradictory. Are those actual numbers that currently appear on the WU website?

pop = probability of precipitation
qpf = quantified precipitation forecast

Just a wild guess, but I suppose it might come about as an infrequent glitch if WU used one model/methodology to compute pop and a completely different model/methodology to compute qpf. Maybe then, because the two models don't completely agree with each other, you could get anomalies like this. However, I don't see how it could happen if pop and qpf were derived from the same forecast model.

I haven't myself run across an anomaly like the one you posted, but I had been looking at accuweather, not WU, because until today I didn't notice WU having a qpf.

Last edited by NeverDie; October 11th, 2014 at 11:10 PM.
Reply With Quote
Reply

Bookmarks

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenSprinkler open source sprinkler controller reidfo Irrigation Discussion 21 August 27th, 2013 11:16 PM
OpenSprinkler control plugin available for download reidfo BeakerRain 0 July 19th, 2012 11:21 AM
Does this plugin work with the Windows Media Center plugin? rdimitri SqueezeBox Plug-In (3P) 0 May 16th, 2011 05:05 PM
Upgrade procedure for ACRF plugin from W800 free plugin htsource ACRF Processor (3P) 14 January 26th, 2006 11:21 AM


All times are GMT -4. The time now is 05:45 AM.


Copyright HomeSeer Technologies, LLC