[RELEASE] NOAA Weather Alerts

NOAA Weather Alerts provides weather alert notifications for USA based users through TTS using any or all Music devices, Echo Speaks devices, Google/Speech devices, PushOver Notifications devices, Hubitat app, and Dashboard tiles. NOAA provides granular customization to enable users to watch for specific events, severity, urgency while also using global variables to customize alert notification messages.

Donations are always appreciated:

NOAA App Changes:.

  • 2.4.9 - fixed API undocumented changes from weather.gov (thanks CurtisZM!)
  • 2.4.8 - added additional checkState configurations and activities
  • 2.4.7 - fixed repeat issue from 2.4.6
  • 2.4.6 - fixed tile refresh issue
  • 2.4.5 - fixed "final" bug in repeat - forgot to convert to integers for calculations, complete reorganization of code
  • 2.4.4 - fixed missing reset for repeats, added restrictions to repeats, added options to Pushover if restricted option
  • 2.4.3 - fixed AppWatchDog2 setVersion
  • 2.4.2 - fixed misspelling of variables causing infinite repeat
  • 2.4.1 - fixed default settings not initializing correctly
  • 2.4.0 - added new AppWatchDog2 code enhancements
  • 2.3.9 - fixed TTS repeat intro for talkNow routine
  • 2.3.8 - added repeat intros to TTS notifications to distinguish a new notification over an existing, added AppWatchdogv2 support
  • 2.3.7 - fixed initializing errors being reported for default state when running test in initial setup without hitting done
  • 2.3.6 - fixed repeat capabilities (thx to Cobra for guidance) and added # of repeats as new functionality, cleaned up more code, added pushover conditions based on times repeating and character count
  • 2.3.5 - removed repeat functionality option until it can be rewritten
  • 2.3.4 - fixed bug with repeats (again)
  • 2.3.3 - fixed repeat issues, fixed fast TTS speak issues due to capitalization of alerts
  • 2.3.2 - fixed issues with Alexa TTS Speech devices not working
  • 2.3.1 - fixed google mini volume issue and test repeat scenario - kudos to razorwing for troubleshooting
  • 2.3.0 - fixed google mini initialization errors - kudos to Cobra for coding guidance
  • 2.2.9 - fixed some confusing wording, customized look and feel to match NOAA color theme, added ability to set log debug disable timeout, added donations link
  • 2.2.8 - added customization for introduction to alert for TTS devices to cleanup PushOver and NOAA Tile notifications, catch potential API service availability issues
  • 2.2.7 - Added weather.gov URI that is built based on user options in app
  • 2.2.6 - Added ability to see weather.gov API current response with app settings in place
  • 2.2.5 - fixed new introduced looping error due to code changes, reduced info message from two lines of logs to a one to save log retention
  • 2.2.4 - fixed installation issue and fixed comparison of alert sent dates issue
  • 2.2.3 - fixed repeat every 5 minutes issue
  • 2.2.2 - added global volume/restore for all TTS devices, enabled ability for multiple different TTS device types, added support for Google Devices modified GUI to accomodate.
  • 2.2.1 - fixed custom coordinates not being displayed
  • 2.2.0 - fixed repeat issues - can be tested with issuing a test alert
  • 2.1.9 - support for updated NOAA Tile Driver
  • 2.1.8 - fixed NOAA Dashboard Tile to reset after user predefined time, fixed bug with repeating the alert
  • 2.1.7 - moved options around into appropriate categories to support simple installation, added warning and URL to weather.gov for advanced configuration testing, removed required fields for simple install of NOAA
  • 2.1.6 - minor code cleanup for install, modified test alert to use custom formatting for testing
  • 2.1.5 - added minor severity for those who want weather forecasting and ALL weather alerts
  • 2.1.4 - added alert certainty to support Hydrologic alerts, changed alert severity and urgency to multi-select, cleaned up code a bit, reset tile alerts if no alerts in feed
  • 2.1.3 - added automatic volume restoral for EchoSpeaks devices
  • 2.1.2 - added ability to restore volume for EchoSpeaks devices
  • 2.1.1 - fixed Weather Alert Event Codes
  • 2.1.0 - fixed test alert to reset dashboard tile
  • 2.0.9 - added new Dashboard Tile ability (thanks to BPTWorld!)
  • 2.0.8 - added ability to turn on switch if a weather alert occurs
  • 2.0.7 - removed 30 minute option for polling
  • 2.0.6 - added ability to alert only on specific weather alert code events
  • 2.0.5 - added ability to use custom coordinates
  • 2.0.4 - removed requirements of forcing selections in TTS, enabled the option to just use PushOver and not use TTS
  • 2.0.3 - added ability to have both Music/Speech TTS and Echo Speaks devices for notification services
  • 2.0.2 - fixed {alertevent} replacement, modified URI string to only look for actual alerts (NOAA was notifying test events due to lack of URI refinement)
  • 2.0.1 - fixed testing of alertmsg
  • 2.0.0 - alertmsg building components, added customization of weather announcement along with variable inputs, option for immediate or expected notifications, cleaned up UI
  • 1.1.4 - fixed poll frequency case statement
  • 1.1.3 - added poll frequency configuration
  • 1.1.2 - fixed repeat errors
  • 1.1.1 - changed API feed for more detailed weather alerts
  • 1.1.0 - fixed PushOver testing to work correctly if pushover not being used, fixed UI elements for test, auto turn-off test mode after initiated, fixed check for TTS
  • 1.0.9 - added more logic on restriction options, fixed PushOver character limitation
  • 1.0.8 - fixed repeat in # minutes errors and execution
  • 1.0.7 - added ability to decide weather alert severity to check for
  • 1.0.6 - added testing option, repeat alert after # of minutes
  • 1.0.5 - fixed error with checking both mode and switch restrictions.
  • 1.0.4 - fixed mode restriction wording, fixed auto log off issue, added disable by switch option
  • 1.0.3 - added restrictions based on modes, pushover notification support and logEnable for only 15 min
  • 1.0.2 - added standard logEnable logic for 30 min disable, latitude and longitude from Hub Location, announcement intro customization, random bug fixes
  • 1.0.1 - misc bug fixes
  • 1.0.0 - Initial code concept

NOAA Tile Driver Changes:

  • 1.2.1 - added AppWatchDogDriver2 support
  • 1.2.0 - rewrite of the driver app (again) for better optimization, automate disabling of logging
  • 1.1.0 - Longer alerts will scroll on dashboard for 5 minutes, fixed justification of text alignment, simplify driver configuration screen
  • 1.0.0 - Initial release thanks to bptworld!

Instructions:
After adding the groovy code to your Apps Code and your Devices Code in Hubitat go into your Devices and add a new Virtual Device using the user-device driver NOAA Tile, then in Hubitat Apps add a New User App - NOAA Weather Alerts. After the app installs select your PushOver, Music, Google/Speech and/or Echo Speaks devices and then hit done. NOAA Weather Alerts is setup and should begin announcing any new weather alerts for your area.

For those who would like to customize your NOAA Weather Alerts, below is a description of what each option does. Please keep in mind having ALL options selected will result in false or even NULL responses from the api. ONLY customize for what you are truly looking for. Example: If I am only concerned with tornado watches/warnings then only select the Watch a Specific Weather Alert to those two settings. Natively the app looks at all possible weather codes for you already.

Alert Message - allows you to customize the alert that is announced. You can use {variables} listed in the Customization Instructions to create your own custom message.

Restrictions - you can either restrict by mode or by switch

Weather Severity - You have choices of Moderate, Severe and Extreme. The more restrictive the severity to fewer announcements.

Alerts Urgency - Immediate is just alerts that are for immediate notifications. Expected is forecasted alerts.

Poll Frequency - change how often NOAA pulls for weather alerts

Repeat alerts - repeat a given alert in a certain # of minutes from original announcement

Custom Coordinates - allows for custom latitude/longitude to acquire weather alerts from another location within the USA

Weather Severity - Allows to choose what severity to watch for: Moderate, Severe and Extreme

Watch a Specific Weather Alert - allows for reduction of alerts to be monitored to just those alerts you are wanting to be announced

Alert Certainty - allows to specify for Possible, Likely and Observed

Alert Urgency - allows to specify Immediate, Expected and Future

Run a test Alert - test NOAA and your configuration

Enabel Debug Logging - if you are having issues and/or need support enable debug logging. Debug logging will automatically shutoff after 15 minutes to reduce the amount of logs being produced by NOAA. This can be configured to always be on or you can set another timeout preference

Version 2.4.0 and above:
AppWatchDog2 Supported

Version 2.3.9 and below:
App Watchdog JSON file: https://raw.githubusercontent.com/PrayerfulDrop/Hubitat/master/AaronWardAppUpdate.json

13 Likes

@aaron

Thanks for adding the mode restriction option, however, it seems that the wording for the option is the opposite of what actually occurs.

It states that selected modes will "allow actions" but according to the logging it's the opposite?

Thanks again,

@halfrican.ak

Thanks for catching that! I have updated the code and also added a switch (thanks to @csteele) restriction option too.

Add more to NOAA. First post updated.

1 Like

Moderate alerts don't seem to be working with the newest version, the logs are showing it's not checking for moderate even if I have it selected.

image

I have a Moderate alert in my area now:

Doht. That wasn’t supposed to be in the code. I am working on that currently for 1.0.7. Will fix here in a minute. Sorry about that. :crazy_face:

1.0.7 released - added the ability to choose what types of alerts you want to monitor.

1 Like

Thanks, new update is working great so far

2 Likes

The repeating option appears to be working in seconds instead of minutes for me so far. I set mine to 500 minutes but appears the alerts were occurring after about 500 seconds instead from what I could tell.

I also saw these errors in the logs:

[app:227](http://10.100.11.130/logs/past#app227)2019-03-01 09:00:15.663 pm [error](http://10.100.11.130/installedapp/configure/227)groovy.lang.MissingPropertyException: No such property: minutes for class: java.lang.String on line 205 (refresh)

[app:227](http://10.100.11.130/logs/past#app227)2019-03-01 08:55:16.233 pm [error](http://10.100.11.130/installedapp/configure/227)groovy.lang.MissingPropertyException: No such property: minutes for class: java.lang.String on line 205 (refresh)

[app:227](http://10.100.11.130/logs/past#app227)2019-03-01 08:50:15.616 pm [error](http://10.100.11.130/installedapp/configure/227)groovy.lang.MissingPropertyException: No such property: minutes for class: java.lang.String on line 205 (refresh)

[app:227](http://10.100.11.130/logs/past#app227)2019-03-01 08:45:16.263 pm [info](http://10.100.11.130/installedapp/configure/227)Waiting 5 minutes before next poll...

Looking into it. Just turn off repeat for now.

Just waiting for some crazy weather now...

2 Likes

1.0.8 fixes repeat issues

Fantastic App! - Many of the NOAA statements are lengthy and I can view in Hubitat logs.

Question about the push to phone notification; When the notification shows up in the top bar (Android 9 in my case) I can only see a portion of the update (see pic) If I click it takes me to the Dashboard URL which is empty. Is there a way to view the full alert remotely?

1 Like

@Shortstop Are you using the PushOver app?

Yes, but just have phone selected. Should I use Hublink instead or both?

After some research I have discovered there is a 1024 character limit. I will work on fixing this in 1.0.9 to send multiple messages.

Thanks! - Here in the mountains of Colorado they don't give expected snow amounts until the very end of the message. :sunglasses:

1 Like

v1.0.9 posted with PushOver notification character limit fixes. Thanks to @csteele for assisting me with education on Groovy.

Got my first alert yesterday about today's winter storm in the NorthEast. Awesome app, thank you!

1 Like

Couple things: New version I tried "run a test alert" and got an error screen:

Error: Cannot invoke method deviceNotification() on null object

When trying to reload the app the error screen persisted and I got the weather alert repeatedly over the past 30 minutes. Only option is to remove and reinstall.