AsusRouter
AsusRouter is an API wrapper for communication with ASUSWRT-powered routers using HTTP(S) protocols. The library supports both the stock AsusWRT firmware and AsusWRT-Merlin.
Up till now, it is mostly used for the custom AsusRouter Home Assistant integration. But I am always open to making it suitable for any other use.
Installation
Installation of the latest release is available from PyPI:
pip install asusrouter
Usage
Once installed, you can import the AsusRouter
class from the module. Example shows the default parameters except for host
, username
and password
.
import aiohttp
import asyncio
from asusrouter import AsusRouter, AsusData
loop = asyncio.new_event_loop()
session = aiohttp.ClientSession(loop=loop)
router = AsusRouter(
hostname="router.my.address",
username="admin",
password="password",
use_ssl=True,
session=session,
)
loop.run_until_complete(router.async_connect())
data = loop.run_until_complete(router.async_get_data(AsusData.NETWORK))
print(data)
loop.run_until_complete(router.async_disconnect())
loop.run_until_complete(session.close())
Supported devices
AsusRouter supports virtually every AsusWRT-powered device.
WiFi 7 | 802.11be
WiFi 6e | 802.11axe
WiFi 6 | 802.11ax
WiFi 5 | 802.11ac
WiFi 4 | 802.11n
Support the library
Issues and Pull requests
If you have found an issue working with the library or just want to ask for a new feature, please fill in a new issue.
You are also welcome to submit pull requests to the repository!
Check it with your device
Testing the library with different devices would help a lot in the development process. Unfortunately, currently, I have only one device available, so your help would be much appreciated.
Other support
This library is a free-time project. If you like it, you can support me by buying a coffee.