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_TOKENsecret to your repository
- Router setup
- Install OpenWrt on your Router
- Install
curlandjq:
opkg update && opkg install curl jq - Set the following variables in the
lightsonscript:TELEGRAM_TOKEN- Telegram bot tokenGH_USER- Your GitHub userGH_TOKEN- Your personal GitHub access token
- Copy
lightsonscript to/usr/bin/on the router. Make sure it's executable and owned by root - Copy
etc/init.d/lightsonscript to/etc/init.d/lightsonon 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