[![GitHub Release](https://img.shields.io/github/release/Vaskivskyi/asusrouter.svg?style=for-the-badge&color=blue)](https://github.com/Vaskivskyi/asusrouter/releases) [![License](https://img.shields.io/github/license/Vaskivskyi/asusrouter.svg?style=for-the-badge&color=yellow)](LICENSE)
![Downloads](https://img.shields.io/pypi/dm/asusrouter?style=for-the-badge&color=blue) ![Commit activity](https://img.shields.io/github/commit-activity/m/vaskivskyi/asusrouter.svg?style=for-the-badge&color=yellow)

## 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](https://github.com/Vaskivskyi/ha-asusrouter) and from recently by the core Home Assistant AsusWRT 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`.

```python
import aiohttp
import asyncio
from asusrouter import AsusRouter, AsusData

# Create a new event loop
loop = asyncio.new_event_loop()

# Create aiohttp session
session = aiohttp.ClientSession(loop=loop)

router = AsusRouter(                #required - both IP and URL supported
    hostname="router.my.address",   #required
    username="admin",               #required
    password="password",            #required
    use_ssl=True,                   #optional
    session=session,                #optional
)

# Connect to the router
loop.run_until_complete(router.async_connect())

# Now you can use the router object to call methods
data = loop.run_until_complete(router.async_get_data(AsusData.NETWORK))
print(data)

# Remember to disconnect and close the session when you're done
loop.run_until_complete(router.async_disconnect())
loop.run_until_complete(session.close())
```

## Supported devices

AsusRouter supports virtually every AsusWRT-powered device.

> [!TIP]  
> Version `388.10` of AsusWRT-Merlin firmware is officially **NOT supported** due to the issues with HTTP daemon crashes. Use versions `>=388.10_2` or `<=388.9_2`.

### WiFi 7 | 802.11be

| Model                                                                           | Status              | Tested firmware            | Find it on Amazon[^amazon]                                                             |
| ------------------------------------------------------------------------------- | ------------------- | -------------------------- | -------------------------------------------------------------------------------------- |
| [GT-BE19000](https://asusrouter.vaskivskyi.com/devices/GT-BE19000.md)           | 💛 Expected to work |                            | find it (https://amzn.to/3yGFU7U) |
| [GT-BE98](https://asusrouter.vaskivskyi.com/devices/GT-BE98.md)                 | 💚 Confirmed        | Stock:
- `102_34372` | find it (https://amzn.to/3vGztgz) |
| [GT-BE98 Pro](https://asusrouter.vaskivskyi.com/devices/GT-BE98Pro.md)          | 💛 Expected to work |                            | find it (https://amzn.to/3uoSjeR) |
| [RT-BE58U](https://asusrouter.vaskivskyi.com/devices/RT-BE58U.md)               | 💛 Expected to work |                            | find it (https://amzn.to/4bHsdo4) |
| [RT-BE88U](https://asusrouter.vaskivskyi.com/devices/RT-BE88U.md)               | 💛 Expected to work |                            | find it (https://amzn.to/3TAGCKY) |
| [RT-BE92U](https://asusrouter.vaskivskyi.com/devices/RT-BE92U.md)               | 💛 Expected to work |                            | find it (https://amzn.to/4c1E8gg) |
| [RT-BE96U](https://asusrouter.vaskivskyi.com/devices/RT-BE96U.md)               | 💛 Expected to work |                            | find it (https://amzn.to/3vJu8oD) |
| [TUF-BE3600](https://asusrouter.vaskivskyi.com/devices/TUF-BE3600.md)           | 💛 Expected to work |                            | find it (https://amzn.to/3VhHoyt) |
| [TUF-BE6500](https://asusrouter.vaskivskyi.com/devices/TUF-BE6500.md)           | 💛 Expected to work |                            | find it (https://amzn.to/3X3Xltv) |
| [ZenWiFi BD4](https://asusrouter.vaskivskyi.com/devices/ZenWiFiBD4.md)          | 💛 Expected to work |                            | find it (https://amzn.to/3Kfulr1) |
| [ZenWiFi BQ16](https://asusrouter.vaskivskyi.com/devices/ZenWiFiBQ16.md)        | 💛 Expected to work |                            | find it (https://amzn.to/4bgVvdo) |
| [ZenWiFi BQ16 Pro](https://asusrouter.vaskivskyi.com/devices/ZenWiFiBQ16Pro.md) | 💛 Expected to work |                            | find it (https://amzn.to/3MNcw48) |
| [ZenWiFi BT10](https://asusrouter.vaskivskyi.com/devices/ZenWiFiBT10.md)        | 💛 Expected to work |                            | find it (https://amzn.to/48F5wiB) |

### WiFi 6e | 802.11axe

| Model                                                                           | Status              | Tested firmware                                                                   | Find it on Amazon[^amazon]                                                             |
| ------------------------------------------------------------------------------- | ------------------- | --------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| [GT-AXE11000](https://asusrouter.vaskivskyi.com/devices/GT-AXE11000.md)         | 💛 Expected to work |                                                                                   | find it (https://amzn.to/3Gotj9R) |
| [GT-AXE16000](https://asusrouter.vaskivskyi.com/devices/GT-AXE16000.md)         | 💚 Confirmed        | Stock:
- `388.21617`Merlin:
- `388.7_beta1_rog`
- `388.7_0_rog` | find it (https://amzn.to/3vObLyZ) |
| [RT-AXE7800](https://asusrouter.vaskivskyi.com/devices/RT-AXE7800.md)           | 💚 Confirmed        | Stock:
- `388_22068`                                                        | find it (https://amzn.to/3jUr2LU) |
| [ZenWiFi ET8](https://asusrouter.vaskivskyi.com/devices/ZenWiFiET8.md)          | 💚 Confirmed        | Stock:
- `388.23759`                                                        | find it (https://amzn.to/3Iks0La) |
| [ZenWiFi ET9](https://asusrouter.vaskivskyi.com/devices/ZenWiFiET9.md)          | 💛 Expected to work |                                                                                   | find it (https://amzn.to/3RbMKJa) |
| [ZenWiFi Pro ET12](https://asusrouter.vaskivskyi.com/devices/ZenWiFiProET12.md) | 💚 Confirmed        | Stock:
- `388.23013`                                                        | find it (https://amzn.to/3GTz68P) |

### WiFi 6 | 802.11ax

| Model                                                                                          | Status              | Tested firmware                                                                                                                                                                       | Find it on Amazon[^amazon]                                                             |
| ---------------------------------------------------------------------------------------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| [DSL-AX82U](https://asusrouter.vaskivskyi.com/devices/DSL-AX82U.md)                            | 💚 Confirmed        | Merlin:
- `386.07_0-gnuton0_beta2`                                                                                                                                              | find it (https://amzn.to/3G87vyR) |
| [GT-AX11000](https://asusrouter.vaskivskyi.com/devices/GT-AX11000.md)                          | 💚 Confirmed        | Merlin:
- `386.7_2`
- `388.1_0`
- `388.4_0`
- `388.7_0_rog`                                                                                                   | find it (https://amzn.to/3WDzOMT) |
| [GT-AX11000 Pro](https://asusrouter.vaskivskyi.com/devices/GT-AX11000Pro.md)                   | 💚 Confirmed        | Stock:
- `388.24198`Merlin:
- `388.7_0_rog`                                                                                                                               | find it (https://amzn.to/3VUNbHl) |
| [GT-AX6000](https://asusrouter.vaskivskyi.com/devices/GT-AX6000.md)                            | 💛 Expected to work | Merlin:
- `388.7_beta1`                                                                                                                                                         | find it (https://amzn.to/3GrKHKG) |
| [GT6](https://asusrouter.vaskivskyi.com/devices/GT6.md)                                        | 💛 Expected to work |                                                                                                                                                                                       | find it (https://amzn.to/3GmPCfR) |
| [RP-AX56](https://asusrouter.vaskivskyi.com/devices/RP-AX56.md)                                | 💚 Confirmed        |                                                                                                                                                                                       | find it (https://amzn.to/3MpZSY8) |
| [RT-AX3000P](https://asusrouter.vaskivskyi.com/devices/RT-AX3000P.md)                          | 💛 Expected to work |                                                                                                                                                                                       | find it (https://amzn.to/3RPa2UO) |
| [RT-AX52](https://asusrouter.vaskivskyi.com/devices/RT-AX52.md)                                | 💛 Expected to work |                                                                                                                                                                                       | find it (https://amzn.to/40Ph3sO) |
| [RT-AX53U](https://asusrouter.vaskivskyi.com/devices/RT-AX53U.md)                              | 💚 Confirmed        | Stock:
- `386.69061`                                                                                                                                                            | find it (https://amzn.to/49jEgqO) |
| [RT-AX5400](https://asusrouter.vaskivskyi.com/devices/RT-AX5400.md)                            | 💛 Expected to work |                                                                                                                                                                                       | find it (https://amzn.to/4aCdvyu) |
| [RT-AX55](https://asusrouter.vaskivskyi.com/devices/RT-AX55.md)                                | 💚 Confirmed        | Stock:
- `386.50410`
- `386.52041`                                                                                                                                        | find it (https://amzn.to/3Z2ath5) |
| [RT-AX56U](https://asusrouter.vaskivskyi.com/devices/RT-AX56U.md)                              | 💚 Confirmed        | Merlin:
- `386.7_2`
- `388.1_0`
- `388.2_2`                                                                                                                         | find it (https://amzn.to/3vrIeuz) |
| [RT-AX57](https://asusrouter.vaskivskyi.com/devices/RT-AX57.md)                                | 💛 Expected to work |                                                                                                                                                                                       | find it (https://amzn.to/3IWnZNx) |
| [RT-AX57 Go](https://asusrouter.vaskivskyi.com/devices/RT-AX57Go.md)                           | 💛 Expected to work |                                                                                                                                                                                       | find it (https://amzn.to/47kE9db) |
| [RT-AX57M](https://asusrouter.vaskivskyi.com/devices/RT-AX57M.md)                              | 💛 Expected to work |                                                                                                                                                                                       | find it (https://amzn.to/3vbVl6k) |
| [RT-AX58U](https://asusrouter.vaskivskyi.com/devices/RT-AX58U.md)                              | 💚 Confirmed        | Stock:
- `386.49674`
- `388.22237`Merlin:
- `386.7_2`
- `388.1_0`
- `388.4_0`
- `388.7.0`                                                         | find it (https://amzn.to/3jHri0L) |
| [RT-AX59U](https://asusrouter.vaskivskyi.com/devices/RT-AX59U.md)                              | 💛 Expected to work |                                                                                                                                                                                       | find it (https://amzn.to/3CVCVYO) |
| [RT-AX68U](https://asusrouter.vaskivskyi.com/devices/RT-AX68U.md)                              | 💚 Confirmed        | Stock:
- `388.21732`                                                                                                                                                            | find it (https://amzn.to/3WzRwk5) |
| [RT-AX82U](https://asusrouter.vaskivskyi.com/devices/RT-AX82U.md)                              | 💚 Confirmed        | Stock:
- `386.48664`
- `386.49674`Merlin:
- `388.8_4-gnuton1`                                                                                                       | find it (https://amzn.to/3Gv2Bxi) |
| [RT-AX86S](https://asusrouter.vaskivskyi.com/devices/RT-AX86S.md)                              | 💚 Confirmed        | Stock:
- `386.46061`
- `386.48260`
- `386.49447`
- `388.22525`Merlin:
- `386.7_2`                                                                       | find it (https://amzn.to/3GuKac5) |
| [RT-AX86U](https://asusrouter.vaskivskyi.com/devices/RT-AX86U.md)                              | 💚 Confirmed        | Stock:
- `386.46061`
- `386.48260`
- `386.49447`
- `388.22525`Merlin:
- `386.7_2`
- `388.4_0`
- `388.7_beta1`                               | find it (https://amzn.to/3WCBcPO) |
| [RT-AX86U Pro](https://asusrouter.vaskivskyi.com/devices/RT-AX86UPro.md)                       | 💚 Confirmed        | Stock:
- `388.23565`                                                                                                                                                            | find it (https://amzn.to/3ZDM41T) |
| [RT-AX88U](https://asusrouter.vaskivskyi.com/devices/RT-AX88U.md)                              | 💚 Confirmed        | Stock:
- `386.45934`
- `386.48631`
- `388.24198`Merlin:
- `386.5_2`
- `386.8_0`
- `388.1_0`
- `388.2_0`
- `388.4_0`
- `388.7_0` | find it (https://amzn.to/3i2VfYu) |
| [RT-AX88U Pro](https://asusrouter.vaskivskyi.com/devices/RT-AX88UPro.md)                       | 💚 Confirmed        | Merlin:
- `388.4_0`                                                                                                                                                             | find it (https://amzn.to/3QNDpFZ) |
| [RT-AX89X](https://asusrouter.vaskivskyi.com/devices/RT-AX89X.md)                              | 💚 Confirmed        |                                                                                                                                                                                       | find it (https://amzn.to/3i55b3S) |
| [RT-AX92U](https://asusrouter.vaskivskyi.com/devices/RT-AX92U.md)                              | 💚 Confirmed        | Stock:
- `386.46061`                                                                                                                                                            | find it (https://amzn.to/3jJJgzt) |
| [TUF-AX3000 V2](https://asusrouter.vaskivskyi.com/devices/TUF-AX3000V2.md)                     | 💚 Confirmed        | Stock:
- `388.23785`                                                                                                                                                            | find it (https://amzn.to/3QzzD4C) |
| [TUF-AX4200](https://asusrouter.vaskivskyi.com/devices/TUF-AX4200.md)                          | 💛 Expected to work |                                                                                                                                                                                       | find it (https://amzn.to/3kexPjC) |
| [TUF-AX5400](https://asusrouter.vaskivskyi.com/devices/TUF-AX5400.md)                          | 💚 Confirmed        | Stock:
- `386.50224`
- `388.21224`
- `388.22525`
- `388.23285`
- `388.24121`Merlin:
- `388.4_0`                                                   | find it (https://amzn.to/3hXgzyQ) |
| [TUF-AX6000](https://asusrouter.vaskivskyi.com/devices/TUF-AX6000.md)                          | 💚 Confirmed        | Stock:
- `388.32432`                                                                                                                                                            | find it (https://amzn.to/3CXqxaG) |
| [ZenWiFi AX (XT8)](<https://asusrouter.vaskivskyi.com/devices/ZenWiFiAX(XT8).md>)              | 💚 Confirmed        | Stock:
- `386.48706`
- `388.23285`Merlin:
- `386.7_2-gnuton1`                                                                                                       | find it (https://amzn.to/3GuvY2L) |
| [ZenWiFi AX Hybrid (XP4)](<https://asusrouter.vaskivskyi.com/devices/ZenWiFiAXHybrid(XP4).md>) | 💛 Expected to work |                                                                                                                                                                                       | find it (https://amzn.to/3Itxnbb) |
| [ZenWiFi AX Mini (XD4)](<https://asusrouter.vaskivskyi.com/devices/ZenWiFiAXMini(XD4).md>)     | 💚 Confirmed        | Stock:
- `386.48790`
- `386.49599`                                                                                                                                        | find it (https://amzn.to/3hYGuGl) |
| [ZenWiFi Pro XT12](https://asusrouter.vaskivskyi.com/devices/ZenWiFiProXT12.md)                | 💚 Confirmed        | Stock:
- `388.22127`                                                                                                                                                            | find it (https://amzn.to/3im6UC5) |
| [ZenWiFi XD4 Plus](https://asusrouter.vaskivskyi.com/devices/ZenWiFiXD4Plus.md)                | 💛 Expected to work |                                                                                                                                                                                       | find it (https://amzn.to/3XtYOWp) |
| [ZenWiFi XD4S](https://asusrouter.vaskivskyi.com/devices/ZenWiFiXD4S.md)                       | 💛 Expected to work |                                                                                                                                                                                       | find it (https://amzn.to/3E341xI) |
| [ZenWiFi XD5](https://asusrouter.vaskivskyi.com/devices/ZenWiFiXD5.md)                         | 💚 Confirmed        | Stock:
- `388.23949`                                                                                                                                                            | find it (https://amzn.to/3YrhgjM) |
| [ZenWiFi XD6](https://asusrouter.vaskivskyi.com/devices/ZenWiFiXD6.md)                         | 💚 Confirmed        | Stock:
- `388.21380`                                                                                                                                                            | find it (https://amzn.to/3jW23s4) |
| [ZenWiFi XD6S](https://asusrouter.vaskivskyi.com/devices/ZenWiFiXD6S.md)                       | 💚 Confirmed        | Stock:
- `388.21380`                                                                                                                                                            | find it (https://amzn.to/3YMbyIZ) |
| [ZenWiFi XT9](https://asusrouter.vaskivskyi.com/devices/ZenWiFiXT9.md)                         | 💚 Confirmed        | Stock:
- `388_23285`                                                                                                                                                            | find it (https://amzn.to/3JZOgLF) |

### WiFi 5 | 802.11ac

| Model                                                                                     | Status              | Tested firmware                                                                                             | Find it on Amazon[^amazon]                                                             |
| ----------------------------------------------------------------------------------------- | ------------------- | ----------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| [4G-AC55U](https://asusrouter.vaskivskyi.com/devices/4G-AC55U.md)                         | 💚 Confirmed        | Stock:
- `380.8102`                                                                                   | find it (https://amzn.to/3jIWQDu) |
| [BRT-AC828](https://asusrouter.vaskivskyi.com/devices/BRT-AC828.md)                       | 💚 Confirmed        | Stock:
- `382_70348`                                                                                  | find it (https://amzn.to/3X2wSL5) |
| [DSL-AC68U](https://asusrouter.vaskivskyi.com/devices/DSL-AC68U.md)                       | 💚 Confirmed        | Stock:
- `386.47534`
- `386.50117`Merlin:
- `386.4-gnuton2`
- `386.7_2-gnuton1`     | find it (https://amzn.to/3Z5k32H) |
| [RT-AC51U](https://asusrouter.vaskivskyi.com/devices/RT-AC51U.md)                         | 💚 Confirmed        | Stock:
- `380.8591`                                                                                   | find it (https://amzn.to/3WMy2sq) |
| [RT-AC52U B1](https://asusrouter.vaskivskyi.com/devices/RT-AC52UB1.md)                    | 💚 Confirmed        |                                                                                                             | find it (https://amzn.to/3QcrCkk) |
| [RT-AC5300](https://asusrouter.vaskivskyi.com/devices/RT-AC5300.md)                       | 💚 Confirmed        | Merlin:
- `386.7_2`                                                                                   | find it (https://amzn.to/3ZcJQpY) |
| [RT-AC57U V3](https://asusrouter.vaskivskyi.com/devices/RT-AC57UV3.md)                    | 💚 Confirmed        | Stock:
- `386.21649`                                                                                  | find it (https://amzn.to/3VAxDbx) |
| [RT-AC58U](https://asusrouter.vaskivskyi.com/devices/RT-AC58U.md)                         | 💚 Confirmed        |                                                                                                             | find it (https://amzn.to/3G98Mpl) |
| [RT-AC66U](https://asusrouter.vaskivskyi.com/devices/RT-AC66U.md)                         | 💚 Confirmed        | Merlin:
- `380.70_0`                                                                                  | find it (https://amzn.to/3WTtTD8) |
| [RT-AC66U B1](https://asusrouter.vaskivskyi.com/devices/RT-AC66UB1.md)                    | 💚 Confirmed        | Stock:
- `386.51255`                                                                                  | find it (https://amzn.to/3vtZ4Jm) |
| [RT-AC68U](https://asusrouter.vaskivskyi.com/devices/RT-AC68U.md)                         | 💚 Confirmed        | Stock:
- `386.49703`Merlin:
- `386.5_2`
- `386.7_0`                                       | find it (https://amzn.to/3i6dQTE) |
| [RT-AC85P](https://asusrouter.vaskivskyi.com/devices/RT-AC85P.md)                         | 💚 Confirmed        | Stock:
- `382.52516`                                                                                  | find it (https://amzn.to/3kMiDdU) |
| [RT-AC86U](https://asusrouter.vaskivskyi.com/devices/RT-AC86U.md)                         | 💚 Confirmed        | Stock:
- `386.48260`
- `386.49709`Merlin:
- `386.7_0`
- `386.7_2`
- `386.9_0` | find it (https://amzn.to/3CbRarK) |
| [RT-AC87U](https://asusrouter.vaskivskyi.com/devices/RT-AC87U.md)                         | 💚 Confirmed        | Merlin:
- `384.13_10`                                                                                 | find it (https://amzn.to/3i4sUkE) |
| [RT-AC88U](https://asusrouter.vaskivskyi.com/devices/RT-AC88U.md)                         | 💚 Confirmed        | Stock:
- `386.48260`Merlin:
- `386.5_0`
- `386.7_beta1`
- `386.12_2`                | find it (https://amzn.to/3FYRYBy) |
| [RT-ACRH17](https://asusrouter.vaskivskyi.com/devices/RT-ACRH17.md)                       | 💚 Confirmed        | Stock:
- `382.52517`                                                                                  | find it (https://amzn.to/3i6dWL0) |
| [ZenWiFi AC Mini(CD6)](<https://asusrouter.vaskivskyi.com/devices/ZenWiFiACMini(CD6).md>) | 💛 Expected to work |                                                                                                             | find it (https://amzn.to/3RU7vrL) |

### WiFi 4 | 802.11n

| Model                                                           | Status       | Tested firmware | Find it on Amazon[^amazon]                                                             |
| --------------------------------------------------------------- | ------------ | --------------- | -------------------------------------------------------------------------------------- |
| [RT-N66U](https://asusrouter.vaskivskyi.com/devices/RT-N66U.md) | 💚 Confirmed |                 | find it (https://amzn.to/3i7eP5Z) |

## 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](https://github.com/Vaskivskyi/asusrouter/issues).

You are also welcome to submit [pull requests](https://github.com/Vaskivskyi/asusrouter/pulls) 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.

[^amazon]: As an Amazon Associate I earn from qualifying purchases. Not like I ever got anything yet (:
