View unanswered posts | View active topics It is currently Sat May 25, 2013 5:11 pm



Reply to topic  [ 175 posts ]  Go to page: Previous  1 ... 6, 7, 8, 9, 10, 11, 12  Next
 NOAA Weather Script 
Author Message

Joined: Nov 26, 2009
Posts: 932
Location: Kalispell, MT
Post NOAA Script Not Working
Hey,

Yesterday my NOAA script stopped working. I've been using KGPI, Glacier Park Int. Airport
which up until yesterday was working fine. No other changes in that time.
The event log shows it timing out. Is there something else I can check on to trouble shoot
this?

Thanks,

Carl


Wed Feb 02, 2011 12:03 pm
Profile

Joined: Feb 02, 2011
Posts: 4
Post Re: NOAA Script Not Working
ckeyes888 wrote:Hey,

Yesterday my NOAA script stopped working. I've been using KGPI, Glacier Park Int. Airport
which up until yesterday was working fine. No other changes in that time.
The event log shows it timing out. Is there something else I can check on to trouble shoot
this?

Thanks,

Carl


Same here ...

Weather NOAA GetXMLfile:URL Access Scripting got an error: AppleEvent timed out.(-1712)


Wed Feb 02, 2011 12:06 pm
Profile

Joined: Nov 26, 2009
Posts: 932
Location: Kalispell, MT
Post Re: NOAA Weather Script
The site for KGPI seems to be up and running: http://www.weather.gov/xml/current_obs/KGPI.xml

Carl


Wed Feb 02, 2011 12:12 pm
Profile
Site Admin
User avatar

Joined: Mar 19, 2008
Posts: 6667
Location: Austin, Texas
Post Re: NOAA Weather Script
Something on the NOAA site has changed - I just noticed that I stopped getting "Weather_Condition" in my feed. However, I'm still getting the rest of the data, so perhaps they're just having sporadic outages or network issues.

_________________
Jay (Indigo Support)
Image


Wed Feb 02, 2011 12:36 pm
Profile WWW

Joined: Mar 09, 2008
Posts: 183
Post Re: NOAA Weather Script
I saw a press item that the NOAA servers had been swamped due to the widespread storms the last couple of days; they were upgrading equipment to deal with it. Might or might not be coincidental.


Wed Feb 02, 2011 1:34 pm
Profile

Joined: Apr 01, 2003
Posts: 823
Location: Rio Rancho, NM
Post Re: NOAA Script Not Working
BitStream wrote:Same here ...

Weather NOAA GetXMLfile:URL Access Scripting got an error: AppleEvent timed out.(-1712)


I was getting that error. I updated the script (per another post in this topic) to use the shell script instead of URL access.

Code: Select all
do shell script "/usr/bin/curl -s -S -m " & webQueryTimeout & " http://www.nws.noaa.gov/xml/current_obs/" & stationID & ".xml >" & myFile
      (*tell application "URL Access Scripting"
         download "http://www.nws.noaa.gov/xml/current_obs/" & stationID & ".xml" to file myFile replacing yes
         
         -- work around -31040 error:
         tell application "URL Access Scripting" to quit
      end tell*)

_________________
Greg In The Desert


Wed Feb 02, 2011 1:40 pm
Profile WWW

Joined: Aug 07, 2003
Posts: 51
Location: State College, PA
Post Re: NOAA Weather Script
I tried the ‘curl’ approach to accessing NOAA data:

do shell script "/usr/bin/curl -s -S -m " & webQueryTimeout & " http://www.nws.noaa.gov/xml/current_obs/" & stationID & ".xml >" & myFile’’

but am now receiving the following error:

--> error "curl: (6) Couldn't resolve host 'HD:private:var:folders:FM:FM9kxceaFeGIS-VfYVnbvU+++TI:TemporaryItems:noaa_sync_temp.xml'" number 6

Not quite sure what this means...


Thu Feb 03, 2011 2:41 am
Profile WWW
User avatar

Joined: Nov 18, 2008
Posts: 1721
Location: Berkeley, CA
Post Re: NOAA Weather Script
wmcorbin wrote:I tried...
do shell script "/usr/bin/curl -s -S -m " & webQueryTimeout & " http://www.nws.noaa.gov/xml/current_obs/" & stationID & ".xml >" & myFile’’

Try this:
Code: Select all
do shell script "/usr/bin/curl -s -S -m " & webQueryTimeout & " http://www.nws.noaa.gov/xml/current_obs/" & stationID & ".xml >" & myFile

You had 2 single quotes at the end of your line.


Thu Feb 03, 2011 11:24 am
Profile

Joined: Nov 26, 2009
Posts: 932
Location: Kalispell, MT
Post Re: NOAA Weather Script
For some reason my original script has started working again.


Thu Feb 03, 2011 1:40 pm
Profile
User avatar

Joined: Nov 18, 2008
Posts: 1721
Location: Berkeley, CA
Post Re: NOAA Weather Script
ckeyes888 wrote:For some reason my original script has started working again.


This might explain your script's return to life:
BillC previously wrote:I saw a press item that the NOAA servers had been swamped due to the widespread storms the last couple of days; they were upgrading equipment to deal with it...


Thu Feb 03, 2011 2:20 pm
Profile
Site Admin
User avatar

Joined: Mar 19, 2008
Posts: 6667
Location: Austin, Texas
Post Re: NOAA Weather Script
ckeyes888 wrote:For some reason my original script has started working again.


Thus my "perhaps they're just having sporadic outages or network issues" post from above... :D

_________________
Jay (Indigo Support)
Image


Thu Feb 03, 2011 3:18 pm
Profile WWW

Joined: Nov 26, 2009
Posts: 932
Location: Kalispell, MT
Post Re: NOAA Weather Script
A bit off-topic but has anyone found or know of a site that simply shows the season snowfall
total for a zip code? Tons of useless links are all I've been able to come up with.
Would just like to parse out that info for a variable.

Thanks,

Carl


Fri Feb 04, 2011 2:12 pm
Profile

Joined: Apr 01, 2003
Posts: 823
Location: Rio Rancho, NM
Post Re: NOAA Weather Script
The first issue I had with the NOAA and TED scripts running in the background seem to be fixed. I am now having a problem where both of these scripts randomly quitting. They seem to run for about 1-2 days before they stop and without any apparent errors.

When I noticed when they have stopped running, I can manually start the trigger actions and they start running again without any errors.

_________________
Greg In The Desert


Tue Feb 08, 2011 1:24 pm
Profile WWW
Site Admin
User avatar

Joined: Mar 19, 2008
Posts: 6667
Location: Austin, Texas
Post Re: NOAA Weather Script
Yep, that's a problem. Background scripts are run using /usr/bin/osascript - that's the system's built-in command line tool to execute an AppleScript. Periodically I'll have background scripts that quit for no apparent reason. The return code doesn't indicate an error, it just appears that the script quit. Of course, these scripts should never quit, so something else is going on. But because we have nothing returned by osascript there's nothing we can do to try to figure it out.

I have a time/date action that runs every couple of minutes and checks to see if those scripts are running and if not it restarts them. We're looking at adding that kind of functionality into Indigo 5.0 (the ability for a background script to be restarted if it quits).

_________________
Jay (Indigo Support)
Image


Tue Feb 08, 2011 3:10 pm
Profile WWW

Joined: Apr 01, 2003
Posts: 823
Location: Rio Rancho, NM
Post Re: NOAA Weather Script
How does your time date action work to check on those background scripts?

_________________
Greg In The Desert


Tue Feb 08, 2011 9:05 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 175 posts ]  Go to page: Previous  1 ... 6, 7, 8, 9, 10, 11, 12  Next

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.   Template designed by STSoftware.