dbuss Posted January 12 Posted January 12 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
bpwwer Posted January 13 Posted January 13 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.
dbuss Posted January 13 Author Posted January 13 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".
bpwwer Posted January 14 Posted January 14 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).
dbuss Posted January 14 Author Posted January 14 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.
Recommended Posts