Use Telegram Bot and GitHub Workflows to notify you about power supply status on your OpenWRT router.
- Telegram Bot setup
- Create a Telegram Bot
- Obtain the Telegram bot token
- GitHub setup
- Fork this repository
- Create personal GitHub access token
- Add Telegram bot token
TELEGRAM_TOKEN
secret to your repository
- Router setup
- Install OpenWrt on your Router
- Install
curl
andjq
:
opkg update && opkg install curl jq
- Set the following variables in the
lightson
script:TELEGRAM_TOKEN
- Telegram bot tokenGH_USER
- Your GitHub userGH_TOKEN
- Your personal GitHub access token
- Copy
lightson
script to/usr/bin/
on the router. Make sure it's executable and owned by root - Copy
etc/init.d/lightson
script to/etc/init.d/lightson
on the router. Make sure it's executable and owned by root - Enable and start the service:
/etc/init.d/lightson enable && /etc/init.d/lightson start