This is a simple python script that sends a notification to your phone when a fire is reported to TxtFire Philippines. This uses the Pushover API to send notifications to your phone.
- Python 3.6+
- A Pushover account. You can get a free account here. After creating an account, you will need to the user key and create an application to get an API token.
- Setup your device to receive notifications from Pushover. You can download the app from the App Store or Google Play.
- Docker (optional)
- Just clone this repository.
- Create an virtual environment and activate it.
python -m venv venv
source venv/bin/activate
- Install the required packages
pip install -r requirements.txt
- Create a
.env
file in the root directory of the project and add the following environment variables.
DELAY=30
SEARCH_TERM=Quezon City
PUSHOVER_TOKEN=your_pushover_api_token
PUSHOVER_USER=your_pushover_user_key
- Run the script
python fire_notifier.py
- Build the docker image
docker build -t fire_notifier .
- Create a
.env
file in the root directory follow step 2 above. - Run the docker container
docker run --name fire-notifier --env-file .env fire_notifier
docker run -d --name fire-notifier --env-file .env --restart always fire_notifier
docker run -d --name fire-notifier --env-file .env --restart always -v fire_notifier_data:/app/db fire_notifier
DELAY
- The delay in seconds between each check for new fires. Default is 30 seconds.SEARCH_TERM
- The search term to use to filter the fire data. Example:Holy Spirit
,Quezon City
,Manila
, etc... The default is empty string meaning it will send notification if it's a dangerous alert type regardless of the location. The value can also be a list of search terms separated by commas. Example:Quezon City,Makati,Pasig
.PUSHOVER_TOKEN
- Your Pushover API token.PUSHOVER_USER
- Your Pushover user key.PUSHOVER_DEVICE
- The device name to send the notification to. Default is empty string which means it will send to all devices.