https://github.com/alancunningham/rain-notifier
Sends you a notification if it's going to rain in the next few minutes.
https://github.com/alancunningham/rain-notifier
apprise darksky darksky-api notifications pirate-weather pirateweather-api python python-3 python3 raspberry-pi raspberrypi weather
Last synced: 22 days ago
JSON representation
Sends you a notification if it's going to rain in the next few minutes.
- Host: GitHub
- URL: https://github.com/alancunningham/rain-notifier
- Owner: AlanCunningham
- Created: 2022-07-31T11:09:47.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2023-04-20T12:38:12.000Z (about 3 years ago)
- Last Synced: 2025-07-09T07:52:56.227Z (11 months ago)
- Topics: apprise, darksky, darksky-api, notifications, pirate-weather, pirateweather-api, python, python-3, python3, raspberry-pi, raspberrypi, weather
- Language: Python
- Homepage:
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rain Notifier
Frequently checks the weather and sends a notification to your favourite
services [(using Apprise](https://github.com/caronc/apprise)) when it's about to start
raining.

☔ **This project requires a [Pirate Weather](https://docs.pirateweather.net/en/latest/) developer account.**
## Hardware
- Personally, I have this running on a Raspberry Pi (any model should do)
## Installation
- Create a python3 virtual environment and install the project's requirements:
```
$ python3 -m venv rain_notifier_venv
$ source rain_notifier_venv/bin/activate
(rain_notifier_venv) $ pip install -r requirements.txt
```
- Open settings.py and enter your:
- Your Pirate Weather API key
- Latitude
- Longitude
- Preferred units of measurement
Units of measurement options, from the old Dark Sky docs:
```
auto: automatically select units based on geographic location
ca: same as si, except that windSpeed is in kilometers per hour
uk2: same as si, except that nearestStormDistance and visibility are in miles and windSpeed is in miles per hour
us: Imperial units (the default)
si: SI units
```
- Also in settings.py, enter where you want your notifications to be sent. See
[Apprise's github page](https://github.com/caronc/apprise) for examples. An
example for Telegram and Discord would look something like this:
```
# The list of services to notify
apprise_services = [
"tgram://bottoken/ChatID",
"discord://webhook_id/webhook_token",
]
```
- You should now be able to start the program:
```
(rain_notifier_venv) $ python main.py
```
# Checking for rain
By default, the program checks for rain every 10 minutes. If rain is predicted to start in the next 10-12 minutes, a notification is sent to the list of Apprise services.
It'll look something like this:
> **Rain starting in 11 minutes**
>
> Duration: 8 minutes
>
> Probability: 27% chance
>
> 