Announcement

Collapse
No announcement yet.

New OpenSprinkler Plugin

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

    #16
    Nice work! Thanks
    Tom
    baby steps...starting again with HS3
    HS3Pro: Z-NET & 80 Z wave Devices,
    HSTouch: 4 Joggler (Android Kitkat), 2 iPhone, 3 iPads
    Whole House Audio: 5 SqueezePlay Jogglers w Bose Speakers
    In The Works: 10 Cameras Geovision, new Adecmo/Envisalink Alarm, Arduinos
    System: XP on Fanless Mini-ITX w/ SSD

    Comment


      #17
      Here's the latest.

      1.0.08
      -Fixed bug where device strings were written to the wrong device

      ----------------
      1.0.0.7
      No functional changes, just cleaned up config webpage.
      ----------------
      Change the Stations device "Run for X minutes". It now creates a Run-once program for that Zone. This eliminates having to change to manual mode.

      I have a crude config page that will set the parameters in the .ini file. It's not pretty, but it works. NOTE: You will have to disable and re-enable the plugin for the changes to take effect.
      Last edited by jbbtex; October 26, 2014, 09:39 AM. Reason: removed attachments

      Comment


        #18
        evapotranspiration ??

        Your plugin looks nice Mattyjee.

        I've been reading about evapotranspiration, aka ET, today. I had been considering using a moisture detector with my controller. But per comments on this board, it is pretty obvious that ET would be better. I use Stevea's 'Snevl Sprinkler' script with HS2 and a 'Webcontrol' board. It works well, but no ET yet.

        If you want to further 'improve your VB.net skills' Mattyjee, this might be a challenge to take on. There are a few compiled ET calculators and Excel spreadsheet 'calculators' on the Internet. But none of them lend themselves to integration with HS.

        However, one document I found worth noting can be found at: http://edis.ifas.ufl.edu/pdffiles/AE/AE45900.pdf , which explains step by step how to calculate the ET. I figure software like WeatherXML will provide access to all of the weather related variables required. The more I read about evapotranspiration, the more interesting it becomes and the more feasible a DIY version seems. 'mcsSprinklers' may be the only plug-in already making use of ET.

        Just food for thought...

        take care!

        Frank

        Comment


          #19
          Brady - I've loaded a new version based on your latest but with a bit of a re-write. I'm not sure if you're interested in trying it out or sticking with what you've got but if you do try it you should be able to test it in parallel to your existing program with no interference between the two - the files are renamed and it will create a new set of devices. This definitely works for me but I'd need you to tell me if there any issues with expansion boards. I did manage to find an error with expansions that wouldn't have worked in my old original version.

          My main changes are:
          1) Renamed the address fields of devices and changed code to refer to devices by address not by name. Otherwise if a user renames a device it will stop working.

          2) Changed your new devices to be children of the root device - helps group things nicely.

          3) From now on, devices are rebuilt every time the code is started. Means you can make changes and add devices without having to delete all and you can add/remove program devices on the go (with a restart of plugin). Unfortunately this will only work from this version onwards. If you run this version it will create all new devices and communicate with them only.

          4) Tidied up a few bits of code and moved functions from Root device to other devices.

          5) Took "MG" or "BW" references out of all code.

          Your enhancements are awesome. I have no idea how you managed to work that stuff out - I even struggled to reverse engineer your code to see how it works.

          Frank - I'm not that advanced yet. I'm happy just having my rain delay set by external events. I don't think my grass is that advanced - it just likes getting wet.

          Comment


            #20
            Originally posted by Mattyjee View Post
            Frank - I'm not that advanced yet. I'm happy just having my rain delay set by external events. I don't think my grass is that advanced - it just likes getting wet.
            Strange! My grass seems to be the same way. I look forward to watching your software progress.

            One consideration for future inclusion of the ET factor would be to write the software such that the zone on times could be adjustable by a percentage derived from ET. Perhaps OpenSprinkler is a problem in that regard if the on times are not remotely adjustable.

            Frank
            Last edited by frankc; September 28, 2014, 07:29 AM.

            Comment


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

              Comment


                #22
                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.
                Interesting! A friend of mine recently considered buying an OpenSprinkler when his controller failed. He doesn't have Homeseer. I advised him to just buy a used sprinkler system on eBay. Which he did. At the time, I didn't realize there were people like yourself writing plugins for Homeseer for the OpenSprinkler. Had I know that I would have encouraged him to buy it and Homeseer. At the time , I was concerned his grass would die before he got everything working.

                I found an online ET calculator today that uses JavaScript. And the formulas and functions are viewable in the browser. I'm thinking I could adapt that to vb. That will be a start.

                Thanks.

                Comment


                  #23
                  Originally posted by frankc View Post

                  I found an online ET calculator today that uses JavaScript. And the formulas and functions are viewable in the browser.

                  Thanks.
                  Which one?

                  Comment


                    #24
                    Originally posted by NeverDie View Post
                    Which one?
                    I'll have to find it. I know I had a bookmark for it.

                    But, since then, I ran across a Python script that was well done. I adapted it to Homeseer HS2 and it seems to be working great. I didn't know anything about Python, but I've been able to learn enough to get it going.

                    Would you be interested in that? If there is a reason to convert it to vb, I think the Python would convert much easier than the online JavaScript one.

                    If you want the Python script, let me know. I've put lots of notes in the script to help me understand what it does.

                    I don't have HS3 and I don't know whether Python will run under HS3 or not.

                    Frank

                    Comment


                      #25
                      Yes, please, as I would actually prefer python anyway.

                      I previously tried to find a spreadsheet for doing ET calcs, as I thought it would be interesting to do some "what-ifs" to get a better feel for the relative significance of the various factors. I also wanted to compute ET from local weather stations, few of which post ET even if they post all the measurements from which ET is derived. Then I could also compute historical ET, which is hard to find without paying for it. I had thought a simple spreadsheet that does the ET calcs would be easy to find, but Google failed me. I even inquired on a popular weather forum, again to no avail. The people on the weather forum who cared about ET all just paid for the Davis software that calculated it automatically from their Davis weather stations (and nothing else). It's the strangest thing, as the current landscape seems to leave most owners of other weatherstations clueless as to ET, even if they want to know it. The Michael Sherry homeseer plug-in will compute it, but again that's non-trivial $$$'s, and the setup didn't look easy. Anyhow, as near as I can tell, it's not geared toward what-if's.

                      The equations for doing the ET calc are easy enough to find, but it requires some care and attention to detail to properly automate the 30+ steps to calculate it, whether it be by spreadsheet or python script or whatever, and I saw no virtue in re-doing it from scratch. It certainly doesn't help that some start-to-finish concrete example calculations which use them are hard to find (maybe they exist, but I never found any). I'd much rather leverage either code or a spreadsheet that's already debugged and vetted.
                      Last edited by NeverDie; October 6, 2014, 06:46 AM.

                      Comment


                        #26
                        ET JavaScript

                        Hello ND,

                        I did find the javascript link:

                        http://www.tfrec.wsu.edu/orchard/pet/petcalc.html

                        I went through all the processes you describe; mainly trying to find formulas already adapted and sources of solar radiation. I did find a spreadsheet that might work, although it appeared to be more work than it seemed to be worth and it didn't appear to process the ET formula I expected. I'll find the link to it and post it too.

                        But what I did find was a Python script a person wrote from the formula. We have messaged several times. The link to that short forum thread is:

                        http://apicommunity.wunderground.com...y_button&reply[id]=14850938

                        You will see a link to the script he posted. Don't use the script pasted in the forum itself. Not knowing Python, that post was very difficult to use due to its indentation issues. He does not use Homeseer. He developed a way to determine Solar Radiation without actual measurements. It appears the way he did it works amazingly well. Although I haven't got to the point yet of verifying the values because I have been working on the script.

                        I will post my adaptation of his script and provide the link as soon as I get mine posted later today.

                        Frank

                        Comment


                          #27
                          I took a simpler route for calculating water needs, I just have my sprinkler script scrape a weather.com web page that has the water needs calculated for my zip code...not perfect, but worked pretty well this summer. No brown spots in the grass, but the sprinklers may have run a little more than necessary on a couple days. http://www.weather.com/home-garden/forecast/49464
                          HS Install Date: Feb. 16, 2007

                          HS3 Pro, Z-Wave, Insteon, BLStat, HS Touch Server, MyQ

                          WeatherXML, BLBackup, BLLAN, BLLock, Restart, CaddX, OpenSprinkler

                          Comment


                            #28
                            Originally posted by frankc View Post
                            Hello ND,

                            I did find the javascript link:

                            http://www.tfrec.wsu.edu/orchard/pet/petcalc.html

                            I went through all the processes you describe; mainly trying to find formulas already adapted and sources of solar radiation. I did find a spreadsheet that might work, although it appeared to be more work than it seemed to be worth and it didn't appear to process the ET formula I expected. I'll find the link to it and post it too.

                            But what I did find was a Python script a person wrote from the formula. We have messaged several times. The link to that short forum thread is:

                            http://apicommunity.wunderground.com...y_button&reply[id]=14850938

                            You will see a link to the script he posted. Don't use the script pasted in the forum itself. Not knowing Python, that post was very difficult to use due to its indentation issues. He does not use Homeseer. He developed a way to determine Solar Radiation without actual measurements. It appears the way he did it works amazingly well. Although I haven't got to the point yet of verifying the values because I have been working on the script.

                            I will post my adaptation of his script and provide the link as soon as I get mine posted later today.

                            Frank
                            Thanks for the links. It appears he calculates solar radiation based on latitude and time of year (not sure if he includes elevation but that could be a further refinement). If it's sunny and pollution isn't a problem, I imagine that gets you pretty close. Properly adjusting for cloud cover, which he attempts to do, sounds trickier. I'm no expert, but my laymen conception is that some cloud cover is heavier than others, and without measurements I don't know how one accounts for those differences, which I'm guessing could be large. My hypothesis is that solar irradiance probably generally dominates the other factors, but I was going to confirm just how much it dominants through the what-if analysis.

                            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.

                            The ghetto approach to this is a temperature sensor inside sealed a glass jar that you put outside where it can be exposed to the sun. I haven't tried it, and I don't know how accurate it would be, but that's what some people do.

                            Regarding capping your water balance formula because of soil saturation, you may want to consider getting a soil moisture sensor. If used just for that purpose, it wouldn't have to be very accurate, and probably even a cheap SMS would serve the purpose. I presently have three different SMS's buried at different depths, which I can track in real-time using plot.ly (https://plot.ly/~WhiteRabbit/41/medium-deep-shallow/), though I hope to move off plot.ly to a better logging-plotting method fairly soon. Anyhow, a further refinement considers not just total rainfall for a day, but the intensity of the rainfall. Depending on where you live, that may or may not matter so much, but here we tend to get intense rain and a lot of run-off. The three sensors at different depths show this is so, because the deeper sensor (around 6-8" deep) is sometimes unaffected by even 1-2" of heavy rainfall, even though it may saturate the soil at one or both the shallower depths. I know from measurements that if I were to irrigate by the same amount, but at a slower precipitation rate of 0.4"/hour, then (barring extreme conditions) the water would definitely register on the deepest sensor. Anyhow, as you were discussing how best to cap in that thread, I thought I would toss that in as food for thought. If you know the percolation rate for your soil (there's a simple one-off measurement you can do that will tell you), the amount of captured water might (?) also be something you could calculate without needing direct SMS measurements for soil moisture saturation.
                            Last edited by NeverDie; October 7, 2014, 09:11 AM.

                            Comment


                              #29
                              Interesting! I'll have to take a look at the lux sensor you mention and I agree that a moisture sensor would be a good addition to the rest of this.

                              I haven't compared his work to the formula he used, but I don't see that it makes use of elevation.

                              I've just created my first GitHub. I can't believe it was as difficult as I made it out to be. But I think I have got the script uploaded and I think the link is:

                              https://github.com/frankpc3/ET

                              As you noted, the author takes a "cloud cover" reading every hour from the weather station in the area. And he has applied arbitrary figures for each type of cover noted. Then adds it all together. I am planning to adjust that sum by some factor if it doesn't match actual readings in this area. I am lucky in that a college: K-State here in Kansas, measures and publishes ET and Solar Radiation values every hour. The trouble is that it appears they cannot be scraped or downloaded automatically. However, the figures are obtained just a few miles from here and I plan to compare their results with those of the script.

                              Let me know if the link above does not work.

                              Frank

                              Comment


                                #30
                                Originally posted by misraels View Post
                                I just have my sprinkler script scrape a weather.com web page that has the water needs calculated for my zip code http://www.weather.com/home-garden/forecast/49464
                                I hadn't found that before. I am looking now, but nothing is said other than, "Watering Needs - None". Does it specify how much to water when that becomes necessary?

                                Does your script adjust the durations of your zones on a percentage basis?

                                And is there some way to mute the people talking?

                                Thanks!

                                Frank

                                Comment

                                Working...
                                X