NOAA Weather Plus discussions

Plug-ins, scripts, and other software to improve your home automation experience.
gtreece
Posts: 171
Joined: Mon Sep 26, 2011 6:01 pm

Re: NOAA Weather Plus discussions

Post by gtreece »

Dewster35 wrote:Not a problem! -12 for windchill looks more proper. Thanks for the update and awesome plugin!
When there's a "-" in front of the number, it's not proper for me. Brrrrr!
nsheldon
Posts: 2469
Joined: Mon Aug 09, 2010 2:12 pm
Location: CA
Contact:

Re: NOAA Weather Plus discussions

Post by nsheldon »

Excellent! Glad you like it. :-D
hamw
Posts: 1342
Joined: Mon Mar 31, 2008 7:45 pm

Re: NOAA Weather Plus discussions

Post by hamw »

Do you know if precipitation information is available from NOAA? That was one thing that Wunderground had over NOAA aside from local weather stations.
nsheldon
Posts: 2469
Joined: Mon Aug 09, 2010 2:12 pm
Location: CA
Contact:

Re: NOAA Weather Plus discussions

Post by nsheldon »

hamw wrote:Do you know if precipitation information is available from NOAA? That was one thing that Wunderground had over NOAA aside from local weather stations.
Probability of Precipitation (% chance) is provided in the NOAA feed used by the NOAA Weather Plus plugin. Is that the kind of precipitation information you're looking for?
hamw
Posts: 1342
Joined: Mon Mar 31, 2008 7:45 pm

Re: NOAA Weather Plus discussions

Post by hamw »

Looking for actual rainfall amount. Don't know if it is available.
Dewster35
Posts: 1033
Joined: Tue Jul 06, 2010 6:29 pm
Location: Petoskey, MI

Re: NOAA Weather Plus discussions

Post by Dewster35 »

nsheldon wrote:
Dewster35 wrote:Nathan,
In regards to the plugin's calculation for windchill, is that something you're pulling directly from the NOAA location or are you doing some internal calculation? I am showing a -250F right now... and while cold... it's not that cold!
Wow! That is cold! :-D

Wind Chill is not provided in the NOAA feed used by NOAA Weather Plus, so it's calculated by the plugin based on the wind speed and temperature (both as reported by NOAA), using the formula provided by NOAA at http://www.nws.noaa.gov/om/windchill.

I just now double-checked the formula in the plugin with the formula posted on that NOAA page and found that I'd accidentally multiplied when I should have added. ;-) That'd explain the vastly incorrect number. I've posted an update to NOAA Weather Plus that fixes it (as well as a few other bugs). See the announcement thread for the download link. Thanks for bringing that bug to my attention.
I like this for the extended weather forecast and the alerts. One more way to let us know we are going to get hammered like we are today :)

Not that I don't like the plugin's value, but since it is being calculated, how hard would it be to run it on my own from two indigo variables that contain the windspeed and temperature? I am 4 miles away from the airport and we are up on a hill on the other side of the bay so we get quite a bit different here.
nsheldon
Posts: 2469
Joined: Mon Aug 09, 2010 2:12 pm
Location: CA
Contact:

Re: NOAA Weather Plus discussions

Post by nsheldon »

hamw wrote:Looking for actual rainfall amount. Don't know if it is available.
Nope. At least not from the feed from which NOAA Weather Plus obtains data. You could, however, try getting the information you're looking for by generating your own XML which can contain quite a few different predictive and historical data from this National Weather Service page. You'd still have to parse through the resulting XML, but maybe you could get what you're looking for.
nsheldon
Posts: 2469
Joined: Mon Aug 09, 2010 2:12 pm
Location: CA
Contact:

Re: NOAA Weather Plus discussions

Post by nsheldon »

Dewster35 wrote:Not that I don't like the plugin's value, but since it is being calculated, how hard would it be to run it on my own from two indigo variables that contain the windspeed and temperature? I am 4 miles away from the airport and we are up on a hill on the other side of the bay so we get quite a bit different here.
It wouldn't be too hard at all. It could be calculated using either Python or AppleScript from your 2 Indigo variables. The formula used in the NOAA Weather Plus plugin is the one from the Wind Chill description page linked to earlier. From that page:
Attachments
NWS Wind Chill calculation graphic
NWS Wind Chill calculation graphic
windchill.gif (60.26 KiB) Viewed 4957 times
Dewster35
Posts: 1033
Joined: Tue Jul 06, 2010 6:29 pm
Location: Petoskey, MI

Re: NOAA Weather Plus discussions

Post by Dewster35 »

nsheldon wrote:
Dewster35 wrote:Not that I don't like the plugin's value, but since it is being calculated, how hard would it be to run it on my own from two indigo variables that contain the windspeed and temperature? I am 4 miles away from the airport and we are up on a hill on the other side of the bay so we get quite a bit different here.
It wouldn't be too hard at all. It could be calculated using either Python or AppleScript from your 2 Indigo variables. The formula used in the NOAA Weather Plus plugin is the one from the Wind Chill description page linked to earlier. From that page:
That was the plan... just not a fan of doing math in script :)

Just an FYI

I have on the plugin right now

temperatureF = 2
windMPH = 8

and windchill is not calculating anything not sure if there is an issue if it hits calculates close to zero or what.
Dewster35
Posts: 1033
Joined: Tue Jul 06, 2010 6:29 pm
Location: Petoskey, MI

Re: NOAA Weather Plus discussions

Post by Dewster35 »

In case anyone hates scripting math as much as me, below is an applescript. You would create 3 variables in Indigo. HomeWind, HomeTemp and HomeWindChill.

I have this on a schedule to run every 15 minutes on a short delay after action collection populates the wind speed and temperature into the above variables.

Code: Select all

set TEMP to 1
set WIND to 1
set WC to 1
tell application "IndigoServer"
	set TEMP to (value of variable "HomeTemp") as number
	set WIND to (value of variable "HomeWind") as number
end tell
set WC to round (35.74 + (0.621 * TEMP) - (35.75 * (WIND ^ 0.16)) + (0.4275 * (TEMP * (WIND ^ 0.16))))
tell application "IndigoServer"
	set (value of variable "HomeWindChill") to WC
end tell
nsheldon
Posts: 2469
Joined: Mon Aug 09, 2010 2:12 pm
Location: CA
Contact:

Re: NOAA Weather Plus discussions

Post by nsheldon »

Dewster35 wrote:Just an FYI

I have on the plugin right now

temperatureF = 2
windMPH = 8

and windchill is not calculating anything not sure if there is an issue if it hits calculates close to zero or what.
That's another bug that I also found last night after posting the 1.1.11 version. If the primary data source doesn't contain either speed or current temperature information (generally due to NOAA not including it, which happens more often than it should), the plugin attempts to download that data from an alternate source. However, it wasn't using that alternate wind speed and current temperature information when calculating wind chill. I've fixed that (I hope, anyway) in version 1.1.12. That version is now up in the main announcement thread. You can also download it with this link.
Dewster35
Posts: 1033
Joined: Tue Jul 06, 2010 6:29 pm
Location: Petoskey, MI

Re: NOAA Weather Plus discussions

Post by Dewster35 »

nsheldon wrote:
Dewster35 wrote:Just an FYI

I have on the plugin right now

temperatureF = 2
windMPH = 8

and windchill is not calculating anything not sure if there is an issue if it hits calculates close to zero or what.
That's another bug that I also found last night after posting the 1.1.11 version. If the primary data source doesn't contain either speed or current temperature information (generally due to NOAA not including it, which happens more often than it should), the plugin attempts to download that data from an alternate source. However, it wasn't using that alternate wind speed and current temperature information when calculating wind chill. I've fixed that (I hope, anyway) in version 1.1.12. That version is now up in the main announcement thread. You can also download it with this link.
Nathan,
Out of curiosity, where is the other data source coming from?
nsheldon
Posts: 2469
Joined: Mon Aug 09, 2010 2:12 pm
Location: CA
Contact:

Re: NOAA Weather Plus discussions

Post by nsheldon »

NOAA Weather Plus gets its primary data feed using the GPS coordinates you provide in the Configuration dialog box. It integrates the latitude and longitude values at the end of the URL http://forecast.weather.gov/MapClick.php?FcstType=dwml. So an example URL might be http://forecast.weather.gov/MapClick.php?FcstType=dwml&lat=38.123&lon=-119.750. That returns an XML file with current conditions and forecast data, though often times the current condition data is incomplete. For those instances, the plugin downloads an XML file with the full list of NOAA weather stations at the URL http://w1.weather.gov/xml/current_obs/index.xml. It then searches the entire file for NOAA weather stations with GPS coordinates near to the GPS coordinates you originally provided. If it finds one, it accesses the URL for the XML file of that specific station then looks for the specific current condition information that's missing from the first file. That alternate XML file URL generally corresponds to the station ID you'd probably use with the included NOAA Weather plugin provided by Perceptive Automation (unless your GPS coordinates are very far away from that station).
automaton
Posts: 103
Joined: Fri May 23, 2008 8:35 am

Re: NOAA Weather Plus discussions

Post by automaton »

Nathan,
I'm evaluating the weatherAdvisory1Text (and 2+3) in a script to look for important watches or warnings. I'm triggering the script on any change in weatherAdvisory1Text. Although this does work, I've noticed that the trigger is actuated twice for each 15 minute weather cycle. I'm guessing that you may be clearing the old weatherAdvisory1Text and then posting the new weatherAdvisory1Text, and that is why I see two triggers. Is this correct? Any recommendations on which parameter to trigger from that would only create one actuation of the trigger?

Thanks.
Dewster35
Posts: 1033
Joined: Tue Jul 06, 2010 6:29 pm
Location: Petoskey, MI

Re: NOAA Weather Plus discussions

Post by Dewster35 »

automaton wrote:Nathan,
I'm evaluating the weatherAdvisory1Text (and 2+3) in a script to look for important watches or warnings. I'm triggering the script on any change in weatherAdvisory1Text. Although this does work, I've noticed that the trigger is actuated twice for each 15 minute weather cycle. I'm guessing that you may be clearing the old weatherAdvisory1Text and then posting the new weatherAdvisory1Text, and that is why I see two triggers. Is this correct? Any recommendations on which parameter to trigger from that would only create one actuation of the trigger?

Thanks.
I do the same thing and noticed similar behavior. I simply setup a variable to toggle using that as a conditional for my trigger, so I'm only getting the one update.
Post Reply

Return to “Nathan Sheldon Software”