Announcement

Collapse
No announcement yet.

[VB.NET/ASP.NET] Snevl Weather Warnings

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [VB.NET/ASP.NET] Snevl Weather Warnings

    Update v2.15 - Attached is the installer for v2.14 of Snevl Weather Warnings (Snevl_WW), as well as a ZIP file of the files to replace for v2.15. Features:
    • Monitors NWS for alerts in one or more states, and any number of counties within those states.
    • Allows for ignoring certain alert types, or considering certain alert types as "high priority"
    • Now includes (thanks to Ed Tenholder, aka tenholde) a separate web page to display the currently active alerts, and control notifications and announcements; Much prettier than the standard HS device status page.
    • Can track and take action on up to five alerts that are active at any time. This number can be modified with a one-line change to the code.
    • Optionally will create and populate device strings for up to five active alerts at a time.
    • Options to perform a number of actions when alerts are detected: email messages, text-to-speech announcements, text messages, or LED sign displays.
    • VBScript statements can be specified to run just before or just after any announcement, e.g. to turn speakers ON/OFF.
    • A separate optional event can be created, and it will be triggered each time there is a new alert. This allows for pretty easy expansion for actions other than those already built into the script.
    • Most actions include templates and support substitution variables, so you can make the content of the email, text messages, announcements, or LED messages pretty much anything you want, and insert content of the alerts via the variables.
    • The speaker instance can be specified for both regular and high priority announcements.
    • Everything is configured via an ASPX configuration editor page. Please DO NOT edit the config file manually.
    • If the alert info provides a polygon of the affected area, a Google map can be provided to show it (sample shown below). This will show up on the alerts page (from tenholde) and optionally in a device.
    I'm providing both the VB.NET script and the ASPX web page full source, but with some misgivings. PLEASE read the section of the User Manual. I respectfully request everyone's help in how we handle the source code.

    Ed Tenholder (tenholde) collaborated with me on this, developing the Alerts web page and the installer.

    After running the v2.14 installer, unzip the v2.15 files and use the two files in that zip to replace the same files installed by the installer.

    Please post any questions, comments, requests, or bug reports (for both tenholde and I) in the discussion thread: http://board.homeseer.com/showthread.php?t=147338

    Steve
    Attached Files
    Last edited by stevea; February 14, 2017, 07:10 PM. Reason: Added 2.15 zip

    #2
    v2.0

    The ZIP in the first post has been replaced with the v2.0 installer. Changes from v1.0 to v2.0:
    • Now includes Ed Tenholder's (tenholde) Weather Alerts Page, a much more attractive way to look at the alerts info.
    • Also thanks to Ed, includes an actual installer package to put everything where it needs to be with no manual copying / moving of files.
    • Expanded the number of alerts that can be shown in devices from 3 to 5.
    • If any debug is selected, makes sure the "Logs" directory is present (or creates it).
    • Added (hopefully) support for the LEDAM plug-in for displaying information on LED signs.
    • Added a "Clear Existing Alerts" button to the config page, to help in debugging de-dupe settings and notifications. This will cause the script to see any alerts as "new".
    • Added error-handling for when the request for data from NWS is ether rejected or times out. A small error message will be printed if it happens three times in a row (the three count can be customized for some other number).
    Ed Tenholder worked very closely with me on this to make sure it comes out looking as much as possible as a single package. I *REALLY* appreciate the collaboration.

    As always, post any comments, bugs, requests, or questions over in the discussion thread: http://board.homeseer.com/showthread.php?t=147338

    Steve

    Comment


      #3
      V2.5 Update

      The first post in this thread has been updated with the ZIP'd installer for v2.5 of SnevlWeatherWarnings. The changes made by tenolde and I:
      • Updated the email / text message address strings to a longer 240 character maximum
      • Add the option to specify VBScript statements to be executed before and/or after the announcement. This may be useful to (for example) turn speakers ON and OFF.
      • The Alerts page (tenholde's) has the Homeseer header corrected
      • The re-direct pages have been removed
      • The installer now has two options: To install a menu button for Weather Warnings, and to view the documentation as the install completes.
      Post any comments, issues, or suggestions for either Ed or I in the discussion thread (http://board.homeseer.com/showthread.php?t=147338).

      Steve

      Comment


        #4
        V2.6 Update

        Sorry to post an update so soon, but I just posted v2.6 over in the library thread, it corrects the problem reported by Bryan Nystorm (http://board.homeseer.com/showpost.p...&postcount=103) where device codes for some of the global devices were not being saved. If your global devices are already created, this change doesn't make anything different happen.

        Steve

        Comment


          #5
          v2.7 posted

          The post at the top of this thread has been updated with v2.7. Only a couple of changes since v2.6:
          • Replaced the method for running pre-/post- announcement script statements, as it didn't work with any version of Homeseer earlier than 2.4.10 (or something near that).
          • Added field to the config page to allow you to specify what speaker instance you want to use for the announcements. Separate fields are provided for both regular and high priority announcements.
          As usual, post any questions or comments over in the discussion thread (http://board.homeseer.com/showthread.php?t=147338).

          Steve

          Comment


            #6
            v2.8 Posted

            The message at the top of this thread has been updated with v2.8 of Snevl_WW, with the following modifications:
            • Updated with more alert types
            • Fixed the saving of device codes for global devices. This was broken in v2.5, fixed briefly in 2.5.1, and then broken in v2.6 and v2.7.
            • Added $NEWLINE to the variable substitutions so that line breaks could be added to the body of email messages.
            Post any issues, comments, or suggestions in the discussion thread: http://board.homeseer.com/showthread.php?t=147338

            Steve

            Comment


              #7
              v2.9 Posted

              The ZIP attached to the first message of this thread has been updated with version 2.9 of Snevl_WW. I've tried to incorporate the fixes to things people have reported and any of the requests that have been made:
              • The SAME field (Specific Area Message Encoding) is now parsed out of an alert, if the alert has one. The SAME codes correspond to the Emergency Alert System transmission. A new device has been added for each alert to show the SAME code in the device string. The script doesn't yet do anything else with this code.
              • Added a test mode, which will create a fake alert when the script is called. This is to help test out new your configuration for how to handle alerts, e.g. email settings, announcement settings, etc. See the User Manual for specifics of how to use the test mode.
              • Added a separate event for High Priority alerts. There has always been an optional New Alert event, which allows you to define your own actions on each alert. The new one lets you have specific actions that are just for the High Priority alerts.
              • There is now a separate checkbox to enable / disable high priority alert announcements. Previously there was only one checkbox for all announcements. Now with two separate checkboxes you can disable the normal announcements and enable only the high priority ones.
              • All of the date/time fields of the alerts are now checked for valid date/times, to avoid the script aborting on empty strings. Now if an alert has bad date/times it will be ignored, but the other processing will continue (e.g. aging off old alerts, repeating announcements, etc.).
              As always, please report any issues or further requests and I'll attempt to address them. Please use the discussion thread (http://board.homeseer.com/showthread.php?t=147338) for any such discussion. Thanks.

              Steve

              Comment


                #8
                v2.10 Posted

                The ZIP'd installer for v2.10 has been attached to the message at the beginning of this thread. This is a pretty minor change:
                • The NWS changed their alert page from http://www.weather.gov/alerts-beta to http://alerts.weather.gov. I expected they would change it eventually (with "beta" in the path). For now the old address seems to redirect to the new one, but I assume it will eventually break, so the script now goes directly to the new path.
                • In the process of going to the now URL, they also made the state name case-sensitive, and it has to be lower case. In v2.9 you can get around this by just putting the state in lower case in the config. In v2.10 I force it to lower case.
                • I took out the warning message in the HS log in the event of a date/time on an alert that couldn't be parsed. It seems to always mean the alert is expired, so the script now ignores it and moves on.
                As always, please report any issues or further requests and I'll attempt to address them. Please use the discussion thread (http://board.homeseer.com/showthread.php?t=147338) for any such discussion. Thanks.

                Steve

                Comment


                  #9
                  v2.11

                  The ZIP in the first message of this thread has been replaced with the installer for v2.11. The changes in v2.11:
                  • Added the option to enable the creation of static Google maps when the alert info includes a polygon of the affected area. (See the sample at the top of this thread) This can be useful, because the polygon will be more accurate than just the county boundaries.
                  • A "Map" device has been added, and the above described Google map will be placed into the device string of that device if it is chosen.
                  • The map associated with an alert (if there is one) will also be shown on the alerts page.
                  • Added the option to hide the devices for an alert if there is no active alert in that slot. NOTE: You have to choose the "Hide Marked" button on the HS status page for the devices to actually be hidden.
                  • There is now an additional filter option, to ignore alerts of a given severity or lower. This will allow you to ignore alerts that are (for example) "Minor" severity.
                  • Any extra spaces that are specified in the States or Counties fields are stripped to prevent errors.
                  This version has changes in the components from both Ed and I. Please post any comments or issues for either of us in the discussion thread: http://board.homeseer.com/showthread.php?t=147338

                  Steve

                  Comment


                    #10
                    v2.12

                    The ZIP attached to the first message of this thread has been updated with the installer for version 2.12 of Snevl Weather Warnings. The changes in this version are:
                    • Clear out the contents of the virtual devices once the alert has expired, even if the devices are hidden.
                    • Added a new virtual device that is populated with an attractively formatted table of the most recent 10 alerts, including the alert type, severity, and the beginning and ending date/time.
                    • Beefed up the logic to avoid having the same alert repeated beyond the repeat settings. Slight changes in an alert by NOAA were confusing the script to think it was a new alert.


                    Post any issues, suggestions, or comments in the discussion thread: http://board.homeseer.com/showthread.php?t=147338

                    Steve

                    Comment


                      #11
                      The first message in this thread has been updated with version 2.13 of Snevl Weather Warnings. The changes in v2.13:
                      • Added the option to have high priority alerts only repeat the number of times specified for non-high priority alerts, or repeat only until acknowledged.
                      • Fixed the handling of pre-announcement and post-announcement script commands. Turns out this has been broken for some time.


                      Post any comments, bugs, or requests over in the discussion thread (here:http://board.homeseer.com/showthread.php?t=147338)

                      Steve

                      Comment


                        #12
                        v2.14 update

                        The first message in this thread has been updated with version 2.14 of Snevl Weather Warnings. The changes in v2.14:
                        • Initializes all devices to OFF when first creating them.
                        • Turn the warning and warning type devices off when the alert is no longer active (a bug that Fungun found).


                        Post any comments, bugs, or requests over in the discussion thread (here:http://board.homeseer.com/showthread.php?t=147338)

                        Steve

                        Comment


                          #13
                          v2.15

                          A small patch ZIP file to bring the install of Snevl Weather Warnings up to v2.15 has been added to the first file in this thread. For those who are already running v2.14, simply use the two files in the zip file to replace the two of the same name in the scripts and html subdirectories.

                          The changes in this version:
                          • Applied a fix for a recent change by the National Weather Service that caused Snevl Weather Warnings to fail.
                          • Now doesn't turn off warning devices unless they are already ON. (Mainly of interest if you trigger events on the devices)
                          • Changed the format of $STARTTIME and $ENDTIME substitutions so that a leading zero wouldn't mess up the announcement of the times.
                          • Fixed a broken link for the FIPS data in the configuration page.


                          As usual, post any issues in the discussion thread (http://board.homeseer.com/showthread.php?t=147338).

                          Steve

                          Comment

                          Working...
                          X