Smart City – Automatically Dispatch Snow Clearing Teams Upon Weather Alerts

Nov 14, 2018 | Developer, DevOps

Many cities provide snow clearing services. It is especially important at night to inform teams about snow warnings as snow accumulation can be troublesome for the masses in the morning of the following day. When to expect snow can be found online, but is this form of weather detection reliable enough to mobilize service teams before snowfall? How do you make sure to wake a team up if necessary and let them sleep if not?

The alerting component the app-based alerting service SIGNL4 does an excellent job of persistently notifying individuals on call, but how can you configure alerts to be be forwarded from the web?

Weather Alerts

Let me walk you through an example of how weather alerts can sent from the web to your SIGNL4 team. In this case, we would like to send an alert to a SIGNL4 team when the temperature falls is below a certain value. (You can adapt it to other weather conditions as well.) We will use the API of Open Weather Map, a corresponding Google Apps Script and the alerting functionality of SIGNL4.

The basic idea is of this example to monitor weather information for a certain city on an hourly base. If the temperature falls below a certain value, we trigger a SIGNL4 alarm.

The corresponding interface URL of Open Weather Map is the following: http://api.openweathermap.org/data/2.5/weather?q=<City>&units=metric&appid=<app-id>. Please note, that you would need to get your APP ID from that site first.

Calling this URL in the browser returns a so-called JSON string containing the weather information. The documentation can be found here: https://openweathermap.org/current#current_JSON.

The Code

Our Google Apps Script code at Google (https://scripts.google.com) might look like described in example on Github at https://github.com/signl4/signl4-weather-alerts.

The main() function of this script can be triggered by Google Apps Script every hour. Just click on the clock symbol in Google Apps Script and set up the desired interval. With each run, the script retrieves the current weather information and compares it with the limit as defined in the INT_LOW_TEMP constants. If the temperature is too low, the script sends a SIGNL4 alarm.

Thanks to Frank Gutacker for the code and for preparing this article.

About SIGNL4

SIGNL4 is a SaaS software solution that can notify your team via mobile push, text and voice calls. It tracks acknowledgements and escalates ongoing incidents automatically when needed. Learn more about the features of SIGNL4  here.

 

[cv_special_header text=”Assemble your SIGNL4 team today!” align=”center” size=”normal” margin=”0″][/cv_special_header]

*Sign up free, no Credit Card required

 

      

Discover SIGNL4

SIGNL4 Alerting App

Stay ahead of critical incidents with SIGNL4 and its superpowers. SIGNL4 provides superior and automated mobile alerting, delivers alerts to the right people at the right time and enables operations teams to respond and to manage incidents from anywhere.

Learn more about SIGNL4 and start your free 30-days trial.