Jump to content

Alerts


dbuss

Recommended Posts

I have programs to send me notifications when we have a particular weather alert. We had a Winter Weather Alert yesterday and it was upgraded to a Blizzard Warning. It appeared that when an alert is upgraded, the old one is still there. Is this correct?

I ask because I got the notification when the Blizzard warning was issued, and I continued getting the Winter Storm Warning notification.

Here are my two notification programs.

 

If
        'Plug-Ins / NOAA Weather' Alert is Winter Storm Warning
 
Then
        Set 'Plug-Ins / Notification Controller / UD Mobile' Send Message Sound 'Small Resonant Alarm' Content 94 Notification ID (ID=94)
        $Winter_Storm_Warning  = 1
 
Else
        $Winter_Storm_Warning  = 0
 

If
        'Plug-Ins / NOAA Weather' Alert is Blizzard Warning
 
Then
        Set 'Plug-Ins / Notification Controller / UD Mobile' Send Message Sound 'Small Resonant Alarm' Content 96 Notification ID (ID=96)
        $Blizzard_Warning  = 1
 
Else
        $Blizzard_Warning  = 0
 

Link to comment
6 minutes ago, bpwwer said:

There can only be one alert at at a time, it's a single value.  It's probably something with the programs but I don't know what.

Both of those programs were triggering every 10 minutes. I changed the programs using variables so they wouldn't trigger every time the NOAA Plugin polled for alerts.

Another interesting thing is when I would query the NOAA plugin in the admin console I would see these three alerts scroll through "Winter Weather Advisory", "Winter Storm Warning' and "Blizzard Warning".

Link to comment

Yeah, that makes sense.  The plug-in gets the alerts from NOAA and loops through them one-by-one.  But since there's only one value for alert in the node, it sets it to each in turn until it gets to the last one on the list.  That was just the simplest way to code it.

The IoX doesn't support the ability to handle a varying number of alerts like that.  If I dynamically created nodes, you wouldn't be able to create programs since you can't create a program for a node that may or may not exist.  Nodes have a fixed definition and don't support the ability to have a varying number of values (which again, you wouldn't be able to write programs for).

Link to comment
2 minutes ago, bpwwer said:

Yeah, that makes sense.  The plug-in gets the alerts from NOAA and loops through them one-by-one.  But since there's only one value for alert in the node, it sets it to each in turn until it gets to the last one on the list.  That was just the simplest way to code it.

The IoX doesn't support the ability to handle a varying number of alerts like that.  If I dynamically created nodes, you wouldn't be able to create programs since you can't create a program for a node that may or may not exist.  Nodes have a fixed definition and don't support the ability to have a varying number of values (which again, you wouldn't be able to write programs for).

It's not a problem for me now that I understand how it all works, I really enjoy your plugin.

Thank you for creating it.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...