Inclement Weather, Personal Weather Station

In case anyone is interested; I put together a script that lets me notify myself and up to three people via phone of inclement weather at any Personal Weather Station, using Wunderground’s API’s. You’ll need a Wunderground developer key, but they’re free for limited use.

I’ve been using it a few months now; the only challenge I still have with it is that seemingly the cron job for resetting weather state twice a day only fires once, and occasionally when the SmartThings notification queue gets backed up I’ll get text messages at 2 or 3 in the morning.

Lots more could be done with it, I’ve kept it pretty simple so far as I’m still learning the scripting environment. It’s all up here on GITHub, not sure if I’ve used GIT the right way or not, I’m used to Visual Studio and TFS. Feel free to suggest changes or point out bone-headed mistakes.

–jim

Odd. It didn’t include the link I added. https://github.com/jameslew/inclement_weather_pws

Nice! I’ve been using a faux-device that polls weather from a nearby station. From there, apps can subscribe to events for different weather conditions (temp, precip, wind, etc):

@jim_lewallen: My experience is that a function can only have one entry in the ‘scheduler’. If you try to schedule a function to run while it is already scheduled or is running, the new schedule call is just ignored.

However, I believe you can do

schedule(“0 0 5,16 * * ?”, “setDefaultWeather”)

That’s a cool idea @IMBrian; I wouldn’t have thought to try that. I like the idea though, I’ll have to read up and learn more ;-).

@c.chen, I’ve tried the 5,16, and it seems to skip the 16 event. I haven’t figured out why yet, which was why I tried splitting it up. I’ll have to research that further too.