immanuelnoel / asuswrt-api

Asus WRT (Wireless RouTer) API wrapper.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ASUS WRT API

What

Forked from https://github.com/vrachieru/asuswrt-api.
Improved to fetch information from a local ASUS WRT router. and setup pseudo monitors for WAN connection status.

Useful when a Load Balancer is setup between two WAN connections, and when 1/2 WANs are down. This is easily missed unless one checks the admin UI.

Extended to send a telegram message when the alert fires. A telegram bot (https://core.telegram.org/bots) needs to be setup in prior.

How

  • Create a 'creds.py' file from 'creds.py.sample', that has the appropriate credentials.

  • Execute,

    python wan.py

  • Setup crontab for a check every hour

    0 * * * * cd /opt/asus-wrt/scripts && python wan.py > /opt/asus-wrt/logs/cmd.log 2>&1

About

Asus WRT (Wireless RouTer) API wrapper.


Languages

Language:Python 100.0%