Announcement

Collapse
No announcement yet.

XML Weather From NOAA.gov [VB] Discussion

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

    XML Weather From NOAA.gov [VB] Discussion

    Post any comments, bugs or suggestions about this script in this thread.

    You can download the script HERE
    Visit My Home Seer Site at:
    www.JohnWPB.com
    Created with LCARS

    #2
    Confused

    John,

    Having a problem with script and not sure why. I've modified the script for my observation location and set the starting house/unit code to "x" & "1" but...

    Script is still generating divice codes of w1-w14. Also each time it executes it creates a new set of identical device codes (e.g. 4 executions of the event created 56 devices, w1-w14 repeated 4 times).

    I've checked the parameters several times.

    Dennis

    John, follow-on comment.... look at the section where you test for the existance of the hc. I'm not a script writter but this looks like a constant not a variable is being set for the house code.
    Last edited by dlgardne; November 19, 2004, 05:07 PM.

    Comment


      #3
      Oops!

      dlgardne, You are absolutely correct. I had hard coded it again while testing, and forgot to switch it back. I have updated the zip file with the corrected version. You can also look for this line:

      dv.hc = "w"

      and replace it with the following line.

      dv.hc = housecode

      This will take care of both it creating duplicate devices, as well as now creating the devices on the house/unit codes of your choice.
      Visit My Home Seer Site at:
      www.JohnWPB.com
      Created with LCARS

      Comment


        #4
        I'm at work right now... I downloaded your script and made the changes. Then using the Homeseer web interface I created a new event. I already had a script called weather.txt so i just used that script and overwrote the contents of it with your script. I clicked save and ran the script. No devices were created. I also used a script to rename the file to vbs and vb and neither of those worked either.

        Can someone assist me in troubleshooting my problem?

        Comment


          #5
          Never mind. Thankfully my pc is screwed up and likes to reboot itself everynow and then. That caused HS to reboot and now the devices are showing just fine.

          Comment


            #6
            I made some additions to this script if anyone wants to use it just PM me. Basically its the same script but instead of checking if the first device exist it now checks all the devices.

            I also added the option to turn on and off Devices simply by putting a 0 or 1 next to the Device Option. Works very well for me. I don't want to post the script here yet because it hasnt been tested long enough but if your interested i will e-mail it to you.

            Comment


              #7
              Very nice script

              Very nice script. I have replaced my old NOAA screen scraper with your new script.


              A suggestion: you may want to add a line to validate or check on internet connectivity before pulling down info from NOAA.

              Seeing the following if ISP connection is down.

              1/3/2005 11:48:11 PM~!~Error~!~Script error in file: NOAA-WeatherXML.txt: 5:Invalid procedure call or argument: 'Instr' in line 148

              I added a couple of lines reading if webpage="" then ....but this is not optimal.
              - Pete

              Auto mator
              Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb

              HS4 Pro - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
              HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

              X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

              Comment


                #8
                Just in case you wanted my changes im going to post them here. Everything has been tested and has worked 100% so far. I agree that a internet validation would be handy but i have not added it. I actually stoped using this script because the NOAA site does not update fast enough. I needed something real time which i ended up finding. The link for that site is below

                http://www.aws.com/aws_2001/asp/obsF...BAIR1&obs=full

                I did not remove any functionality from the NOAA script. I only added to it. I added the ability to turn On and Off devices as needed simply by adding a 0 or 1 value next to the appopriate variable in the squintz config section. The script now checks to see if all of the devices already exist and not just the first device. So you can manually delete a device and not have to worry about it creating multiple devices. You still have to reserve 14 devices codes but not all 14 have to be in use at the same time. So if you only wanted the data for the first 5 devices then you could turn the rest off and use them for something else.

                Give it a try you will be happy with it!
                Attached Files

                Comment


                  #9
                  For about a week or so, I've been getting this error message:
                  --------
                  1/25/2005 8:20:40 PM~!~Error~!~Script error in file: NOAA-WeatherXML.txt: 5:Invalid procedure call or argument: 'Instr' in line 146
                  --------
                  Anyone else getting this? Any ideas?

                  Comment


                    #10
                    So.... No response. Does this mean it is working for everyone else?

                    Comment


                      #11
                      I get exactly the same thing. What I don't understand is why it worked for a few days and then just quit. I didn't change anything with the script, it just quit. Anybody else?

                      Comment


                        #12
                        Which script are you guys using. The original or the modified one?
                        💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

                        Comment


                          #13
                          I 'm using the original scripts.
                          I found out my problem was with the hs.GetURL command not working. I solved this problem by changing the line:
                          webpage=hs.GetURL(host, page, strip_tags, port)

                          to this:
                          webpage = hs.URLAction(host & page,"GET","","")

                          I did this in both the NOAA-WeatherXML.txt script and the NOAA_xmlWeather.asp web page. Now, they both work just fine.

                          Comment

                          Working...
                          X