Announcement

Collapse
No announcement yet.

Wunderground Script

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

    Wunderground Script

    I was playing around with Wunderground a bit and got the format for submitting to them. This script it a bit rough as I wrote it in about an hour... However once you sign up with Wunderground for you own weatherstation ID, you can schedule the script to run and update Wunderground with values from your weather station. I've been grabbing the 1-wire values thru the MCSTemp plugin and it seems to work fine. Let me know and feel free to comment/update it.

    I haven't tried this with 1.7, but it may work fine.

    You can download it from here:
    http://forums.homeseer.com/showthread.php?p=671244

    Thanks!

    -Mike
    Last edited by mloebl; October 13, 2005, 08:21 AM.

    #2
    If you are running build 1997 and posting to Wunderground stopped working, comment out the line that sets the "Content-Type" header. HST made a change and it's no longer ignored, however it's not required anyways.

    -Mike

    Comment


      #3
      I wrote up a simple plugin for HS2 if anyone is interested. Now lets you post decimals, etc. Let me know if interested, please see here: http://forums.homeseer.com/showthread.php?t=111164 .

      -Mike

      Comment


        #4
        does anyone have a script for pulling data from wunderground? I use weatherxml, but I am about 50 miles and 1300 feet higher than the phoenix location for the data.

        What I am trying to do is build a script for my tempermental motion activated outdoor flood lights to disable it when the wind speed gets high and enable again when it drops back down where the trees wont set it off. someone on wunderground is down the block from me, so this would be great data to use for it. Just havent figured out quite how to pull in to HS.

        PS, trying not to have to install my own weatherstation unit to do this...

        Ideas?

        Thx,
        Toby
        HS 3.0.0.199 Pro/Insteon 3.0.5.20/3 Venstar Insteon Therms / Insteon Thermostat 3.0.2.2 / DirecTV 3.0.0.14 / OpenSprinkler 2.0.5.21 / ITunes DAAP 3.0.0.23/ UltraM1G3 3.0.5437.37424/ UltraWeatherbug3 /HSTouch Svr 3.0.0.68/Zwave 3.0.1.25/Ultramon3/Global Cache 5.0.0.17/Various BLXXX Plugins.

        Comment


          #5
          Toby,
          See this thread for a script that pulls data from a WU station.

          http://board.homeseer.com/showthread.php?t=109952
          💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

          Comment


            #6
            Originally posted by Rupp
            Toby,
            See this thread for a script that pulls data from a WU station.

            http://board.homeseer.com/showthread.php?t=109952
            Great info, just what I am looking for. Ill develop a script off your examples. Thanks for the assistance.
            HS 3.0.0.199 Pro/Insteon 3.0.5.20/3 Venstar Insteon Therms / Insteon Thermostat 3.0.2.2 / DirecTV 3.0.0.14 / OpenSprinkler 2.0.5.21 / ITunes DAAP 3.0.0.23/ UltraM1G3 3.0.5437.37424/ UltraWeatherbug3 /HSTouch Svr 3.0.0.68/Zwave 3.0.1.25/Ultramon3/Global Cache 5.0.0.17/Various BLXXX Plugins.

            Comment


              #7
              Rapid Fire Wunderground

              I've been trying to modfy Mike's original script to allow access to the rapid fire on wunderground. I emailed Shaun at wunderground and got a reply back on the proper protocol to use for rapid fire.
              Here are the changes to the protocol to add realtime support:

              A real-time update should look almost like the standard update. However, the server to request is:

              rtupdate.wunderground.com, not weatherstation.wunderground.com

              And, please add to the query string:

              realtime=1&rtfreq=2.5

              where rtrfreq is the frequency of updates in seconds.

              We haven't decided whether you should also send standard updates if the user is uploading in real-time. For now, I think we are leaning toward either only sending standard updates, or only sending real-time updates, not requiring that both are sent when the user is in real-time mode. That'll be simpler.

              An example url:
              http://rtupdate.wunderground.com/weatherstation/updateweatherstation.php?realtime=1&rtfreq=2.5&action=update raw&ID=KCASANFR14&PA

              SSWORD=xxxxxx&dateutc=2006-02-03 17:53:02&winddir=69&windspeedmph=2&windgustmph=9&humidity=89 &tempf=

              56.2&dewptf=53.0&rainin=0.00&dailyrainin=0.00&baromin=30.11& softwaretype=Wunderground

              Shaun

              Seems simple enough. Well, when I change all the needed protocol I get an error in HS2.
              "In URLAction POST: The underlying connection was closed: An unexpected error occurred on a receive.

              Any ideas what this might mean?

              Comment


                #8
                I'm seeing the same thing with Rapidfire... If I do the same URL manually by outputting the raw data it works fine. Wonder if there is something funny going on with how the "POST" action works? I tried splitting out URL and data as well without any luck. If I find it, I'll let you know.

                -Mike

                Comment


                  #9
                  Got it figured out!

                  Use hs.GetUrl instead.
                  You have to take out all of the writelog stuff ,but it sends all the data fine!

                  So my version of the original script looks like this:
                  PHP Code:
                  server_url "http://rtupdate.wunderground.com"
                  data="/weatherstation/updateweatherstation.php?realtime=1&rtfreq=2.5&action=updateraw&ID=KFLFORTM19&PASSWORD=XXXXXX"&"&dateutc="&dateutc&"&winddir="&winddir&"&windspeedmph="&windspeedmph&"&windgustmph="&windgustmph&"&humidity="&humidity&"&tempf="&tempf&"&rainin="&rainin&"&dailyrainin="&dailyrainin&"&baromin="&baromin&"&dewptf="&dewptf&"&softwaretype=1-Wire"
                  s=hs.GetUrl(server_url,data,True,80
                  Last edited by siliconmelt; March 1, 2006, 07:13 AM.

                  Comment


                    #10
                    Originally posted by siliconmelt
                    Got it figured out!

                    Use hs.GetUrl instead.
                    You have to take out all of the writelog stuff ,but it sends all the data fine!

                    So my version of the original script looks like this:
                    PHP Code:
                    server_url "http://rtupdate.wunderground.com"
                    data="/weatherstation/updateweatherstation.php?realtime=1&rtfreq=2.5&action=updateraw&ID=KFLFORTM19&PASSWORD=XXXXXX"&"&dateutc="&dateutc&"&winddir="&winddir&"&windspeedmph="&windspeedmph&"&windgustmph="&windgustmph&"&humidity="&humidity&"&tempf="&tempf&"&rainin="&rainin&"&dailyrainin="&dailyrainin&"&baromin="&baromin&"&dewptf="&dewptf&"&softwaretype=1-Wire"
                    rf=hs.GetUrl(server_url,data2,True,80

                    Good find and thanks for the update! Just updated my plugin to do this and works great. I got around the success thing, what a pita. Seems like a joke "When does success not equal success?". This is kinda bad, but this will work:

                    Code:
                            s = hs.GetUrl(server_url, data, True, 80)
                            If Left(s, 3) = "suc" Then ...
                    -Mike

                    Comment


                      #11
                      In case anyone wants to pull data from wunderground stations into homeseer, i put together a package that does it and displayes with virtual device statuses, creates the virtual devices and event to update the data etc...

                      Wunderground Script Version 1.00
                      http://board.homeseer.com/showthread.php?t=111452

                      Wunderground Script Discussion Thread
                      http://board.homeseer.com/showthread.php?t=111451

                      Hope someone besides me finds a use for this...

                      Toby
                      HS 3.0.0.199 Pro/Insteon 3.0.5.20/3 Venstar Insteon Therms / Insteon Thermostat 3.0.2.2 / DirecTV 3.0.0.14 / OpenSprinkler 2.0.5.21 / ITunes DAAP 3.0.0.23/ UltraM1G3 3.0.5437.37424/ UltraWeatherbug3 /HSTouch Svr 3.0.0.68/Zwave 3.0.1.25/Ultramon3/Global Cache 5.0.0.17/Various BLXXX Plugins.

                      Comment


                        #12
                        Finally a weather script that works, and is relevent!

                        Hey, this script works for me! (makes a change, I normally have problems running the simplist scripts). I even found a weather station about 100yds from my house, which is even more unusual :-)

                        From looking at the weather station on www.wunderground.com (ID IESSEXCO1, or http://www.wunderground.com/weathers...p?ID=IESSEXCO1 if you need it), it would be really handy to grab the forecast for the next few days as well. My scripting skills are non-existant (I did dabble with scripting in HS a couple of years ago, but I've long since forgotten anything that I learnt).

                        How easy would it be to add the next 4 days forecast?

                        Thanks, Pete

                        Comment


                          #13
                          Originally posted by pwhite8314
                          Hey, this script works for me! (makes a change, I normally have problems running the simplist scripts). I even found a weather station about 100yds from my house, which is even more unusual :-)

                          From looking at the weather station on www.wunderground.com (ID IESSEXCO1, or http://www.wunderground.com/weathers...p?ID=IESSEXCO1 if you need it), it would be really handy to grab the forecast for the next few days as well. My scripting skills are non-existant (I did dabble with scripting in HS a couple of years ago, but I've long since forgotten anything that I learnt).

                          How easy would it be to add the next 4 days forecast?

                          Thanks, Pete
                          Glad to hear the script is working for you.

                          Actually the wunderground data doesnt contain any forcast data. If you go to the comma delimited format (or html, i didnt see it there either) for your station id, there is no field referencing a forecast. Candidly I have never seen any wunderground stations with a forecast. Simply put, these stations are usually <$500 weatherstations which simply upload their data from the instruments to the website. There isnt a meteorologist on site...

                          What I would recommend for forecast is to install the weatherxml package (through the built in hs updater) (for more info go to the weatherxml plugin discussion group) to pull the data from weather.com for your area code. I use both the weatherxml and wunderground data for various triggers in my hs custom events and scripts.

                          Good luck, hope this info helps.

                          Toby
                          HS 3.0.0.199 Pro/Insteon 3.0.5.20/3 Venstar Insteon Therms / Insteon Thermostat 3.0.2.2 / DirecTV 3.0.0.14 / OpenSprinkler 2.0.5.21 / ITunes DAAP 3.0.0.23/ UltraM1G3 3.0.5437.37424/ UltraWeatherbug3 /HSTouch Svr 3.0.0.68/Zwave 3.0.1.25/Ultramon3/Global Cache 5.0.0.17/Various BLXXX Plugins.

                          Comment

                          Working...
                          X