NOAA Weather Script

Posted on
Wed Dec 14, 2011 3:36 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: NOAA Weather Script

It sounds like you have a repeating Time/Date action that is starting new NOAA Weather Scripts, but that isn't how the NOAA Weather Script should be launched. Instead, you should have a single Server Startup trigger that launches it. It then runs in the background as long as the IndigoServer is running. If you launch it over and over again via a Time/Date Action then you'll end up with tons of them.

Image

Posted on
Wed Dec 14, 2011 4:07 pm
buckaroo offline
Posts: 6
Joined: Dec 01, 2011

Re: NOAA Weather Script

Matt -

You're right, so let me give that a whirl....

Posted on
Sat Apr 21, 2012 10:12 pm
gadgetfreak98 offline
Posts: 47
Joined: Jan 08, 2009

Re: NOAA Weather Script

Hi. I cannot seem to get the NOAA script to regularly update. I understand it is supposed to do so upon server launch and then automatically thereafter. However, it just doesn't seem to work and I get the following error after server restart.


Trigger Get NOAA Weather Data
Weather NOAA Weather NOAA Script Launched
Weather NOAA GetXMLfile:TextEdit got an error: "http://www.nws.noaa.gov/data/current_obs/KNYC.xml" doesn’t understand the «event aevtdwnl» message.(-1708)


Any advice? Thanks!

Posted on
Sun Apr 22, 2012 8:59 am
jay (support) offline
Site Admin
User avatar
Posts: 18224
Joined: Mar 19, 2008
Location: Austin, Texas

Re: NOAA Weather Script

It looks like your NOAA script has gotten altered somehow - the one we ship with Indigo doesn't attempt to talk to TextEdit for any reason. I'd recommend making sure you have the shipping version of the script installed and that's the one that's being launched.

If you're using Indigo 5 you might want to switch to the NOAA plugin - it should be a little more robust.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sun Apr 22, 2012 9:03 am
gadgetfreak98 offline
Posts: 47
Joined: Jan 08, 2009

Re: NOAA Weather Script

jay (support) wrote:
It looks like your NOAA script has gotten altered somehow - the one we ship with Indigo doesn't attempt to talk to TextEdit for any reason. I'd recommend making sure you have the shipping version of the script installed and that's the one that's being launched.

If you're using Indigo 5 you might want to switch to the NOAA plugin - it should be a little more robust.


Jay, thanks for the response. I will be honest that I'm not 100% sure how to find the shipping script and then install it. Or, to your second suggestion, use the plugin. Is the plug in as an alternative to the script? I'm on Indigo 5.1. Thanks!

Posted on
Sun Apr 22, 2012 9:18 am
jay (support) offline
Site Admin
User avatar
Posts: 18224
Joined: Mar 19, 2008
Location: Austin, Texas

Re: NOAA Weather Script

Check out the documentation for the plugin (available by selecting "About NOAA Weather" menu item on the NOAA Weather plugin menu) - rather than update variables with data, the plugin allows you to define weather station devices in the device dialog. You can then use the states in those devices in triggers, conditions, and control pages just like you use any other device. You can have as many different weather station devices if you like to keep track of weather at multiple locations.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sun Apr 22, 2012 9:28 am
gadgetfreak98 offline
Posts: 47
Joined: Jan 08, 2009

Re: NOAA Weather Script

jay (support) wrote:
Check out the documentation for the plugin (available by selecting "About NOAA Weather" menu item on the NOAA Weather plugin menu) - rather than update variables with data, the plugin allows you to define weather station devices in the device dialog. You can then use the states in those devices in triggers, conditions, and control pages just like you use any other device. You can have as many different weather station devices if you like to keep track of weather at multiple locations.


Thanks. I did see that and have the plug-in installed, in fact. Does it auto update like the script is supposed to? I set up a trigger with the plug-in to alert me if wind speed exceeds 30 MPH, so I see how to pull the variables. It's the updating that is perplexing to me.

My real main objective here is to be able to have my computer tell me the current conditions via Airfoil communicating with speakers in my bedroom. Everything is working with that set up, other than the automatic updating. It sounds like perhaps I do need that original script? If so, any advice where to find it? Thanks!

Posted on
Sun Apr 22, 2012 9:49 am
gadgetfreak98 offline
Posts: 47
Joined: Jan 08, 2009

Re: NOAA Weather Script

jay (support) wrote:
It looks like your NOAA script has gotten altered somehow - the one we ship with Indigo doesn't attempt to talk to TextEdit for any reason. I'd recommend making sure you have the shipping version of the script installed and that's the one that's being launched.

If you're using Indigo 5 you might want to switch to the NOAA plugin - it should be a little more robust.



By the way, I was able to locate another script called: Weather NOAA sync.scpt. I used that and restarted the server. It did seem to update at that point, but upon its attempt, I got the following error: GetXMLfile:TextEdit got an error: "http://www.nws.noaa.gov/data/current_obs/KNYC.xml" doesn’t understand the «event aevtdwnl» message.(-1708)

To your point, that seemed to point at TextEdit somehow. But I would have thought that would have been the unadulterated original script, which was found in the Library/Application Support/Indigo 5/Scripts/Background Tasks folder...

Note, though, that when I just click "Run" under the Edit Trigger screen for the script, I only get the "Weather NOAA Script Launched" message in the Event Log. Perhaps there is something else linked to the script that relies upon TextEdit?

Posted on
Sun Apr 22, 2012 11:00 am
jay (support) offline
Site Admin
User avatar
Posts: 18224
Joined: Mar 19, 2008
Location: Austin, Texas

Re: NOAA Weather Script

Weather station devices update every 30 minutes - but you'll only see data changes once an hour because that's how frequently NOAA updates their data.

Not sure what's going on with your script - the one built-in doesn't reference TextEdit in any way. Sounds like you have some other systemic problem. You might try to open that script in Script Editor and run it yourself - hopefully it will show you more precisely where it's failing. I just ran that script on my Mac here and it's running fine. Make sure your starting up this script:

Code: Select all
/Library/Application Support/Perceptive Automation/Indigo 5/Scripts/Background Tasks/Weather NOAA sync.scpt

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sun Apr 22, 2012 12:58 pm
gadgetfreak98 offline
Posts: 47
Joined: Jan 08, 2009

Re: NOAA Weather Script

jay (support) wrote:
Weather station devices update every 30 minutes - but you'll only see data changes once an hour because that's how frequently NOAA updates their data.

Not sure what's going on with your script - the one built-in doesn't reference TextEdit in any way. Sounds like you have some other systemic problem. You might try to open that script in Script Editor and run it yourself - hopefully it will show you more precisely where it's failing. I just ran that script on my Mac here and it's running fine. Make sure your starting up this script:

Code: Select all
/Library/Application Support/Perceptive Automation/Indigo 5/Scripts/Background Tasks/Weather NOAA sync.scpt


Thanks Jay. That is the script I loaded up earlier today and it seems to be updating now, notwithstanding the strange TextEdit error. So I think I am on my way! Thanks.

Posted on
Wed Sep 11, 2013 8:29 am
williams7170 offline
Posts: 17
Joined: May 30, 2008

Re: NOAA Weather with Indigo 6

I have been off my programming chair for a few years, but just got my sprinkler system back up and running. I have loaded the latest NOAA weather (and Weather plus) Plugin, but can't remember how to find the variable values r have them publish to the variable list (automatically).
Do I need to run a script? I am running the latest indigo (6.0.1) and weather plugins (v1.1.0 & v 1.1.14) and the on the device list it is updating the plugin periodically - But the Variable list is not publishing any values (I appologize, I remember this was something I did, but it has been a few years and come up empty on searching the forum)

One last note - I am unable to select the checkbox or "remote display" on either one.

Randy

Posted on
Wed Sep 11, 2013 2:24 pm
jay (support) offline
Site Admin
User avatar
Posts: 18224
Joined: Mar 19, 2008
Location: Austin, Texas

Re: NOAA Weather Script

The NOAA Weather plugin included with Indigo doesn't automatically publish to variables since it's not generally needed (you can use the states directly in most places where you'd use a variable). You can use a Device State Changed trigger (has any change) to insert a device state into a variable value using the "Variable Actions->Insert Device State into Variable" action if you really need the temp in a variable.

Custom devices presented by plugins can't be shown in the built-in device lists in Indigo Touch and the Indigo Web Server pages (which is why that option is disabled). If you want to show device states then just add them to a custom control page.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Wed Sep 11, 2013 2:42 pm
williams7170 offline
Posts: 17
Joined: May 30, 2008

Re: NOAA Weather Script

Jay , thanks for the quick response. I hate to ask this, but how do I know the different variable id's (i.e.. NOAA_Weather_currenttemp). Is there a list for this and/or weather plus available?

Randy

Posted on
Thu Sep 12, 2013 9:31 am
jay (support) offline
Site Admin
User avatar
Posts: 18224
Joined: Mar 19, 2008
Location: Austin, Texas

Re: NOAA Weather Script

Select the device in the device table and there will be a table below called Custom States - you may have to resize the control area to see it, just grab the split view resize control between the device list and control area and drag up. All available states will be shown in that list.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sat Dec 27, 2014 2:45 am
dtich offline
Posts: 798
Joined: Sep 24, 2005

Re: NOAA Weather Script -- need curl help

hi all,

i'm still using a script for noaa access, and although i'm going to migrate to the builtin plugin at some point, right now i'm too tied into my original setup. having just migrated the server to yosemite i now have an error when the script is run: looking for the 'url access script'.. which no longer exists. i've been advised to tweak the script to use curl, but i'm too dang rusty, the syntax is not at my fingertips anymore! thought i could ask here, can anyone make this with curl for me???:

Code: Select all
on GetXMLfile()
   try
      
      tell application "URL Access Scripting.app"
         --http://www.weather.gov/xml/current_obs/KBUR.xml
         «event aevtdwnl» "http://www.weather.gov/xml/current_obs/" & NOAA_Station & ".xml" given «class fdst»:file myFile, «class rplc»:«constant erplyes »
         
         -- work around -31040 error:
         tell application "URL Access Scripting.app" to quit
      end tell
      return true
   on error errString number errNum
      LogNOAA("GetXMLfile", errString, errNum)
      return false
   end try
end GetXMLfile


any pointers much appreciated!!!

Who is online

Users browsing this forum: No registered users and 26 guests