This is a simple Telegram bot that you can add to a group chat.
Whenever your internet connection fails, it will notice and start counting. When the outage ends, it will send an automated message telling you that your connection is back, and how long the outage lasted:
You need a couple of things things to run it yourself:
- A python environment with the additional packages
ping3
andpython-telegram-bot
. - A telegram bot token (get it from the BotFather)
- The ID of the group chat you want to add it to (example)
Add the bot token and group chat ID to a config.json
file with a similar structure as the config_example.json
file included in this repository. The bot.py
script will load it and use it.
Tell python to run bot.py
and it should work! Happy outage tracking!