Sever Weather Alert

Posted on
Sun Jun 05, 2016 2:15 pm
dz1rfj offline
Posts: 135
Joined: Mar 13, 2016

Sever Weather Alert

How Can I leverage Wundergroupd, and my Airfoil to automatically create a sever weather trigger? I do have Wunderground tell me my weather using a python script I found in our community.

My weather radio triggered a few minutes ago, and I would love my house to speak it to me as well.

Thanks for any info!

Thanks
-Brian

Posted on
Sun Jun 05, 2016 2:20 pm
jalves offline
Posts: 744
Joined: Jun 16, 2013

Re: Sever Weather Alert

I'll take a crack at this:
First set a trigger for any change in your Underground station's "Alert Status". If alertStatus = true, then trigger whatever action(s) will get your attention. Something like having Indigo speak "Weather Alert", to turning a light on,. Whatever works.

Running Indigo 2023.2 on a 24" iMac M1), OS X 14.4
Jeff

Posted on
Sun Jun 05, 2016 2:33 pm
dz1rfj offline
Posts: 135
Joined: Mar 13, 2016

Re: Sever Weather Alert

Jeff,

thanks. I created that trigger. Is there any way of a trigger for say, high winds, or tornado warning / watches? I am not very familiar with the data available via the plugin..

Do you know what I can expect as a result of this trigger? So, is it any sudden change, or a sever change?

Thanks,

Brian

Thanks
-Brian

Posted on
Sun Jun 05, 2016 2:42 pm
jalves offline
Posts: 744
Joined: Jun 16, 2013

Re: Sever Weather Alert

All good questions. Not sure I can answer them though. Perhaps the author of the WU plugin can pop in with more info about what these alerts contain.

I would say though that we are dealing with the National Weather Service weather advisories so they issue these alerts when sever weather (whatever that means) is imminent. They usually include a time frame in their forecast. I'd suggest looking at the various elements in your WU location. In Idigo's Device screen, select your plugin location and then in the lower portion of the window (you'll probably have to scroll down for this) you can see a list of all the custom states.

Running Indigo 2023.2 on a 24" iMac M1), OS X 14.4
Jeff

Posted on
Sun Jun 05, 2016 3:11 pm
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Sever Weather Alert

Well, it's a mixed bag I'm afraid.

The documentation for the Weather Underground Alerts dictionary is here: https://www.wunderground.com/weather/api/d/docs?d=data/alerts. That will give you some idea of what you can use for your triggers. I map to device states 'alertType1 - alertType5'. So for sites in the U.S., you should be able to reliably trigger off the alert type. For non-U.S. sites, it will depend on the national weather service in that country. Weather Underground doesn't list type codes for non-U.S. sites.

Hope that helps!
Dave

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Sun Jun 05, 2016 6:46 pm
dz1rfj offline
Posts: 135
Joined: Mar 13, 2016

Re: Sever Weather Alert

Dave,

Thanks. I will take a look, as I am in 23112 in VA, I should be able to find something relevant.

- Brian

Thanks
-Brian

Posted on
Sun Jun 05, 2016 7:22 pm
FlyingDiver online
User avatar
Posts: 7213
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Sever Weather Alert

I trigger on the "Alert Status" state "Becomes Equal To" "True". Then I use the following script in the Action to email the alert to me:

Code: Select all
wsStates = indigo.devices[665073353].states

def sendAlertEmail(alert, message, expires):
   theSubject = "Weather Alert: %s" % alert
   theBody = "%s\n\nThis weather alert is valid until %s" % (message, expires)

   bePlugin = indigo.server.getPlugin("com.flyingdiver.indigoplugin.betteremail")
   if bePlugin.isEnabled():
      bePlugin.executeAction("sendEmail", deviceId=1422637605,
      props={'emailTo':'<email address here>', 'emailSubject': theSubject, 'emailMessage': theBody})
      
   return

if wsStates[u'alertDescription1'] != ' ':
   sendAlertEmail(wsStates[u'alertDescription1'], wsStates[u'alertMessage1'], wsStates[u'alertExpires1'])

if wsStates[u'alertDescription2'] != ' ':
   sendAlertEmail(wsStates[u'alertDescription2'], wsStates[u'alertMessage2'], wsStates[u'alertExpires2'])

if wsStates[u'alertDescription3'] != ' ':
   sendAlertEmail(wsStates[u'alertDescription3'], wsStates[u'alertMessage3'], wsStates[u'alertExpires3'])

if wsStates[u'alertDescription4'] != ' ':
   sendAlertEmail(wsStates[u'alertDescription4'], wsStates[u'alertMessage4'], wsStates[u'alertExpires4'])


That uses my BetterEmail plugin to send the email. I think you can do something similar with the built in Email sender if you want to.

You'll get an email with something like this in the body:
...Strong thunderstorms will affect south central Charlotte and
central Lee counties...

At 622 PM EDT...a strong thunderstorm was located near Bonita
Springs...moving northwest at 15 mph. Additional strong
thunderstorms will develop over central Lee and south central
Charlotte counties through 730 PM.

Winds of 40 to 50 mph and half inch hail are possible with these
storms.

Locations impacted include...
Cape Coral...Fort Myers...Bonita Springs...Punta Gorda...Cypress Lake...
Pine Manor...Buckingham...Three Oaks...east Dunbar...southwest Florida
Airport...San Carlos Park...palmona park...lochmoor Waterway Estates...
Villas...McGregor...Harlem Heights...Iona...North Naples...burnt store
Marina and Fort Myers Villas.

Torrential rainfall is also occurring with this storm...and may cause
localized flooding. Do not drive your vehicle through flooded
roadways.

Frequent cloud to ground lightning is occurring with this storm.
Lightning can strike 10 miles away from a thunderstorm. Seek a safe
shelter inside a building or vehicle.

Lat...Lon 2678 8216 2697 8189 2642 8161 2642 8166
2633 8166 2632 8167 2631 8177
time...Mot...loc 2222z 147deg 22kt 2640 8171



joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sun Jun 05, 2016 7:31 pm
ckeyes888 offline
Posts: 2425
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: Sever Weather Alert

Ok, I'll be the jerk. It's spelled severe.

Carl

Posted on
Sun Jun 05, 2016 7:47 pm
FlyingDiver online
User avatar
Posts: 7213
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Sever Weather Alert

I'm glad you posted this, because I just realized that my trigger doesn't really work right. If there's bad weather in my area, the alert contents will change, the but the "Alert Status" state will never go False, so it'll never trigger on "Becomes Equal To - True". Well, it triggers the first time but not any time there's an update. Hmm. This is going to be complicated.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sun Jun 05, 2016 9:12 pm
Bollar offline
Posts: 528
Joined: Aug 11, 2013

Re: Sever Weather Alert

You might also look at this thread and my (extremely ugly) script that pulls alerts from the NWS database. The cool thing here is that it compares the alert polygons to your location and only triggers the alert if you're inside the polygon. I use this to turn on all the house lights and chirp the alarm if there's a tornado warning, for example - but it doesn't bother me if the tornado is on the other side of the county.

viewtopic.php?f=5&t=11855&hilit=weather

Insteon / Z-Wave / Bryant Evolution Connex /Tesla / Roomba / Elk M1 / SiteSage / Enphase Enlighten / NOAA Alerts

Posted on
Tue Jun 07, 2016 9:59 am
dz1rfj offline
Posts: 135
Joined: Mar 13, 2016

Re: Sever Weather Alert

Very cool stuff here! Thanks guys,

I will play with both of these.

Thanks
-Brian

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 4 guests