Announcement

Collapse
No announcement yet.

New OpenSprinkler Plugin

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

    #76
    Originally posted by NeverDie View Post
    Did you pull the input parameters into python from weatherunderground or somehow from the Texas A&M website?
    Glad it worked! I pulled the data from the Dallas Texas A&M site. I pulled the WU data from the WU Dallas site. That is why the correlation is close. A&M has perhaps 20 or 30 sites.

    What I plan to do next is pull data off of a K-State wx site near here. They post data on an hourly basis. For a test, I will run the Python script using their wx data to calculate ET and SR. I can then compare their results and the Python's for the same set of data. The only difference will be the cloudcover calcs the Python script makes. I figure I can then tweak that routine to equal the "Dallas" SR.

    Comment


      #77
      Originally posted by Mark42 View Post
      Beyond just converting the Python code to VB, I'm pondering how far to take the conversion. There are a number of 'stylistic' things I would want to change, e.g. all the configuration information should be in a INI file and the code should be broken up into logical procedures and functions which are easier to manage.
      Great idea! I will do that. I'm not sure which Python script you looked at - whether the original or my original one. I have made 1,000 changes since either one of them was posted. I will post my latest version here, probably today.

      As you say, it is always a problem to maintain two versions of the script. I would like to see what you've done with a thought to migrate mine to VB. I need a push and some help in that regard since I haven't programmed in vb for years.

      The problems now are that I have to use an old version of Python to write the code and for it to run in Homeseer HS2 and I miss out on newer Python features. I don't know whether it will run in HS3. The plugins here are written in vb. So compatibility is limited. I don't know how difficult it will be to use it with Mattyjee's OpenSprinkler Plugin.

      Fortunately, it runs fine in Homeseer, at least on HS2. It also runs equally well at a DOS command prompt, at least on Windows XP. It also works very tightly with the Snevl Sprinkler controller scripts that I use.

      Comment


        #78
        Python Script

        MattyJee,

        Perhaps you could use the attached Python script to add ET to your plugin some day. I have not tested it with HS3 though.

        It does work with Snevl sprinkler controller. But another file might be needed for Snevl to make it work. I have the file but maybe his newer version controller has it built in already.

        If you have any questions, please let me know.

        EDIT: found typo in previous script.
        Attached Files

        Comment


          #79
          Hi frankc,

          I did a quick read on the script (probably too quickly) late last night before bed, and it looks as though the earlier approach (location date, time of day, cloud cover) to figuring solar radiation is still there. Maybe it's happenstance, but where I live I notice quite a few weather stations (all or nearly all of them seem to be Davis weather station hardware, though not all of them are using Davis weather station software) which are both near me and posting to weather underground actually do measure solar radiation directly using the Davis sensor (linked above earlier in this thread) and report it almost minute-by-minute to weather underground just like they do with their wind speed measurements. However, either those weather stations aren't computing ET or aren't reporting it to WU, or if they are, WU drops the ET info. Regardless, the data from which ET can be derived is all there on weatherunderground and so could be used by us to compute ET after-the-fact. Perhaps the same is true of WU weather stations near where you and/or David live?
          Last edited by NeverDie; October 15, 2014, 08:23 AM.

          Comment


            #80
            Originally posted by NeverDie View Post
            Hi frankc,

            I did a quick read on the script (probably too quickly) late last night, and it looks as though the earlier approach (location date, time of day, cloud cover) to figuring solar radiation is still there. .
            Yes. Those calculations are still there. That is the only way I have to get cloudcover. I've looked and can't find a station nearby that has the information available realtime. The K-state station nearby delays their report by a day or so and even then, the page can't be scraped automatically. Maybe you are suggesting you would have to scrape the report to get the info. I have read on the WU site about people who are measuring that info, but the info is not reported.

            Would you give an example to me of a site that has that?

            Comment


              #81
              Originally posted by frankc View Post
              Yes. Those calculations are still there. That is the only way I have to get cloudcover. I've looked and can't find a station nearby that has the information available realtime. The K-state station nearby delays their report by a day or so and even then, the page can't be scraped automatically. Maybe you are suggesting you would have to scrape the report to get the info. I have read on the WU site about people who are measuring that info, but the info is not reported.

              Would you give an example to me of a site that has that?
              I'd be happy to: http://www.wunderground.com/personal...USTI29#history

              Comment


                #82
                That weather station even has its own website (http://epicweatheraustin.com/wxindex.php), and I notice that weather station's software is a package called "Weather Display": http://www.weather-display.com/wdl/features.shtml

                I see from reading the Weather Display feature list that one of Weather Display's recent new features is the ability to compute ET: "•New:Now calculates evapotranspiration rate (Kimberly -Penman equations) for stations with solar readings. " If it would be helpful to your efforts, I could try contacting the weather station owner to see if he would be willing to switch on that ET calculation in his Weather Display software and datalog the ET to his weather station's website, just as is already being done with the raw weather data as his weather station collects it. i.e. by adding a (presumably vetted) ET calc to the dataset to the website's datalog, perhaps it would aid in the validation of David's and your python implementation of the Kimberlly-Penman equations---that is, if they are the very same equations as what you and David have implemented. On the other hand, if you think the datastreams you can already access are sufficient for that purpose, then that would be great also. You seem to be making speedy progress, and so my understanding as to the current status of validation efforts (such as suggested by Mark42 above) is undoubtedly lagging.
                Last edited by NeverDie; October 15, 2014, 09:21 AM.

                Comment


                  #83
                  Originally posted by NeverDie View Post
                  If it would be helpful to your efforts, I could try contacting the weather station owner to see if he would be willing to switch on that ET calculation
                  Any data we can get to further verify the results, would be great. Right now, the script considers everything considerable :-) But a correction factor has to be applied. I want to continue fighting this thing until I understand why a correction is required. Dave has suggested we are using the wrong Solar Radiation factor. And indeed if the other one is used, the results are very close with no correction. But I would like to make sure that is correct. As you can understand, no one wants unhappy grass.

                  So, I am continuing to try different ways to test the script, but raw data to do so is hard to come by because, the solar radiation readings always include cloudcover effect. With no indication of how much that effect is.

                  Another issue is that the formula used by the script is Penman Montieth. I have no idea what the difference is between that one and the one you stated. But I know that the Penman Montieth is what is used by the colleges and seems to be the standard.

                  Comment


                    #84
                    Originally posted by NeverDie View Post

                    They have downloadable solar radiation readings available ! that is perfect. I would like to find something similar near here.

                    Comment


                      #85
                      Originally posted by frankc View Post
                      They have downloadable solar radiation readings available ! that is perfect. I would like to find something similar near here.
                      Exactly. I'm glad you're elated, because I just now sent an email to the owner asking if he would be willing to activate the ET calc in his software so that it will display on his website alongside the rest of his weather station's measurements. I'll let you know if/when I hear anything back. If my email to him gets lost in the blizzard of emails we all get these days, I'm optimistic I can still find another way to contact him. Meanwhile, I remain hopeful that we'll hear back from him soon.
                      Last edited by NeverDie; October 15, 2014, 12:36 PM.

                      Comment


                        #86
                        Originally posted by Mattyjee View Post
                        No there is actually a watering factor in OpenSprinkler which will cut times down based on a percentage. It's not being used in the plugin at the moment but I may add it next time I sit down with it.
                        You can adjust this in the OpenSprinkler options page.

                        Or via HS script hs.GetURL(your_OS_ip_address, "/co?pw=OS_password&o23=XXX", True, you_OS_ip_port), where XXX sets the length each zone will run by percentage.

                        ex. hs.GetURL(192.168.1.254, "/co?pw=qwerty&o23=90", True, 80)

                        This would cut each zone's watering time to 90% of what is programmed, 15 minutes becomes 13.5 minutes

                        Comment


                          #87
                          Originally posted by jbbtex View Post
                          Or via HS script hs.GetURL(your_OS_ip_address, "/co?pw=OS_password&o23=XXX", True, you_OS_ip_port), where XXX sets the length each zone will run by percentage.

                          ex. hs.GetURL(192.168.1.254, "/co?pw=qwerty&o23=90", True, 80)

                          This would cut each zone's watering time to 90% of what is programmed, 15 minutes becomes 13.5 minutes
                          Awesome. I'm going to add this in.

                          How did you find these commands out? I googled and googled and only found a sheet showing simple commands (the ones I had in the first version). Do you also know the command to read back what watering percentage has been set? Or is that a "webscrape" like all the other status?

                          A single device with watering percentage will give the guys above what they would want if they ever chose to go with OpenSprinkler.

                          Comment


                            #88
                            Originally posted by Mattyjee View Post
                            Awesome. I'm going to add this in.

                            How did you find these commands out? I googled and googled and only found a sheet showing simple commands (the ones I had in the first version). Do you also know the command to read back what watering percentage has been set? Or is that a "webscrape" like all the other status?

                            A single device with watering percentage will give the guys above what they would want if they ever chose to go with OpenSprinkler.
                            I don't know of any way to get data except "webscraping."

                            All the HTTPGET commands I have found are here: http://rayshobby.net/wordpress/wp-co...ETcommands.pdf

                            Also, when I have some time I'm going to try to add a function to each of the Program devices that would allow the user to manually run a Program. For example, the HS device Program 1 would have a button in Device Management label "Run Now." This button would create an OpenSprinkler "Run Once" program based on the parameters of Program 1. Only thing is, I don't know when I'll ever have time to work on it.

                            Comment


                              #89
                              Maybe don't have to scrape ?

                              Originally posted by jbbtex View Post
                              I don't know of any way to get data except "webscraping."
                              WeatherUnderground data pages use JSON and XML formats to make past and current weather data available for download. This assumes the data you are interested in is available within the WU pages. Really no need to do any scraping. Although it depends upon what you are looking for. And NeverDie just discovered that some pages have solar radiation available. I found one such site about 8 miles from here. Problem is 90%+ of the WU sites do not make solar radiation measurements.

                              Our efforts have been to determine ET without the benefit of actual solar radiation data.

                              The percentage idea is perfect! It does mean that each zone will be cut down linearly in time. I suppose that would mean that a zone with already minimal irrigation, would be fine with the same percentage decrease as the others.

                              Comment


                                #90
                                Originally posted by frankc View Post
                                WeatherUnderground data pages use JSON and XML formats to make past and current weather data available for download. This assumes the data you are interested in is available within the WU pages. Really no need to do any scraping. Although it depends upon what you are looking for. And NeverDie just discovered that some pages have solar radiation available. I found one such site about 8 miles from here. Problem is 90%+ of the WU sites do not make solar radiation measurements.

                                Our efforts have been to determine ET without the benefit of actual solar radiation data.

                                The percentage idea is perfect! It does mean that each zone will be cut down linearly in time. I suppose that would mean that a zone with already minimal irrigation, would be fine with the same percentage decrease as the others.
                                My reference was to the OpenSprinkler data. The plug in scrapes the OS web interface to get status, etc.

                                Comment

                                Working...
                                X