Weather Alert Notifier

by LukeB81 in Outside > Backyard

221 Views, 0 Favorites, 0 Comments

Weather Alert Notifier

notification.png

When you're planting a garden there is one important thing easy to forget - severe weather reports including frost on your crops. I noted there was a little red (!) alert icon on an Android weather widget, but there seems to be no such alert for desktop computer or Linux computer or phone. I made a simple script that should help, documented here

https://howtotrainyourrobot.com/severe-weather-alerts-with-a-simple-python-script/

Supplies

Ubuntu/Linux. Internet access.

Install Python Prerequisites

At the command line run:

pip3 install lxml
pip3 install requests

Run Script

Modify the script here with the url of your region from

https://alerts.weather.gov/

Set that url in the .py script from here:

https://raw.githubusercontent.com/programmin1/Weat...

If there is an alert you should see it in notifications.

Run Command Regularly

Run a check from time to time - say, once every couple hours as shown in the article:

In the terminal:

sudo nano /etc/crontab

(enter password which will not be shown)

The script can be run once every couple hours by adding a line:

1 */2 * * * username python3 /home/user/path/to/file.py