Skip to main content

API wrapper for communication with ASUSWRT-powered routers using HTTP protocol

Project description

GitHub Release License
Downloads Commit activityBuy Me A Coffee

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

# 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.

WiFi 7 | 802.11be

Model Status Tested firmware Find it on Amazon[^amazon]
GT-BE19000 ๐Ÿ’› Expected to work find it
GT-BE98 ๐Ÿ’š Confirmed Stock:
  • 102_34372
  • find it
    GT-BE98 Pro ๐Ÿ’› Expected to work find it
    RT-BE58U ๐Ÿ’› Expected to work find it
    RT-BE88U ๐Ÿ’› Expected to work find it
    RT-BE92U ๐Ÿ’› Expected to work find it
    RT-BE96U ๐Ÿ’› Expected to work find it
    TUF-BE3600 ๐Ÿ’› Expected to work find it
    TUF-BE6500 ๐Ÿ’› Expected to work find it
    ZenWiFi BD4 ๐Ÿ’› Expected to work find it
    ZenWiFi BQ16 ๐Ÿ’› Expected to work find it
    ZenWiFi BQ16 Pro ๐Ÿ’› Expected to work find it
    ZenWiFi BT10 ๐Ÿ’› Expected to work find it

    WiFi 6e | 802.11axe

    Model Status Tested firmware Find it on Amazon[^amazon]
    GT-AXE11000 ๐Ÿ’› Expected to work find it
    GT-AXE16000 ๐Ÿ’š Confirmed Stock:
  • 388.21617
  • Merlin:
  • 388.7_beta1_rog
  • 388.7_0_rog
  • find it
    RT-AXE7800 ๐Ÿ’š Confirmed Stock:
  • 388_22068
  • find it
    ZenWiFi ET8 ๐Ÿ’š Confirmed Stock:
  • 388.23759
  • find it
    ZenWiFi ET9 ๐Ÿ’› Expected to work find it
    ZenWiFi Pro ET12 ๐Ÿ’š Confirmed Stock:
  • 388.23013
  • find it

    WiFi 6 | 802.11ax

    Model Status Tested firmware Find it on Amazon[^amazon]
    DSL-AX82U ๐Ÿ’š Confirmed Merlin:
  • 386.07_0-gnuton0_beta2
  • find it
    GT-AX11000 ๐Ÿ’š Confirmed Merlin:
  • 386.7_2
  • 388.1_0
  • 388.4_0
  • 388.7_0_rog
  • find it
    GT-AX11000 Pro ๐Ÿ’š Confirmed Stock:
  • 388.24198
  • Merlin:
  • 388.7_0_rog
  • find it
    GT-AX6000 ๐Ÿ’› Expected to work Merlin:
  • 388.7_beta1
  • find it
    GT6 ๐Ÿ’› Expected to work find it
    RP-AX56 ๐Ÿ’š Confirmed find it
    RT-AX3000P ๐Ÿ’› Expected to work find it
    RT-AX52 ๐Ÿ’› Expected to work find it
    RT-AX53U ๐Ÿ’š Confirmed Stock:
  • 386.69061
  • find it
    RT-AX5400 ๐Ÿ’› Expected to work find it
    RT-AX55 ๐Ÿ’š Confirmed Stock:
  • 386.50410
  • 386.52041
  • find it
    RT-AX56U ๐Ÿ’š Confirmed Merlin:
  • 386.7_2
  • 388.1_0
  • 388.2_2
  • find it
    RT-AX57 ๐Ÿ’› Expected to work find it
    RT-AX57 Go ๐Ÿ’› Expected to work find it
    RT-AX57M ๐Ÿ’› Expected to work find it
    RT-AX58U ๐Ÿ’š Confirmed Stock:
  • 386.49674
  • 388.22237
  • Merlin:
  • 386.7_2
  • 388.1_0
  • 388.4_0
  • 388.7.0
  • find it
    RT-AX59U ๐Ÿ’› Expected to work find it
    RT-AX68U ๐Ÿ’š Confirmed Stock:
  • 388.21732
  • find it
    RT-AX82U ๐Ÿ’š Confirmed Stock:
  • 386.48664
  • 386.49674
  • Merlin:
  • 388.8_4-gnuton1
  • find it
    RT-AX86S ๐Ÿ’š Confirmed Stock:
  • 386.46061
  • 386.48260
  • 386.49447
  • 388.22525
  • Merlin:
  • 386.7_2
  • find it
    RT-AX86U ๐Ÿ’š Confirmed Stock:
  • 386.46061
  • 386.48260
  • 386.49447
  • 388.22525
  • Merlin:
  • 386.7_2
  • 388.4_0
  • 388.7_beta1
  • find it
    RT-AX86U Pro ๐Ÿ’š Confirmed Stock:
  • 388.23565
  • find it
    RT-AX88U ๐Ÿ’š 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
    RT-AX88U Pro ๐Ÿ’š Confirmed Merlin:
  • 388.4_0
  • find it
    RT-AX89X ๐Ÿ’š Confirmed find it
    RT-AX92U ๐Ÿ’š Confirmed Stock:
  • 386.46061
  • find it
    TUF-AX3000 V2 ๐Ÿ’š Confirmed Stock:
  • 388.23785
  • find it
    TUF-AX4200 ๐Ÿ’› Expected to work find it
    TUF-AX5400 ๐Ÿ’š Confirmed Stock:
  • 386.50224
  • 388.21224
  • 388.22525
  • 388.23285
  • 388.24121
  • Merlin:
  • 388.4_0
  • find it
    TUF-AX6000 ๐Ÿ’š Confirmed Stock:
  • 388.32432
  • find it
    ZenWiFi AX (XT8) ๐Ÿ’š Confirmed Stock:
  • 386.48706
  • 388.23285
  • Merlin:
  • 386.7_2-gnuton1
  • find it
    ZenWiFi AX Hybrid (XP4) ๐Ÿ’› Expected to work find it
    ZenWiFi AX Mini (XD4) ๐Ÿ’š Confirmed Stock:
  • 386.48790
  • 386.49599
  • find it
    ZenWiFi Pro XT12 ๐Ÿ’š Confirmed Stock:
  • 388.22127
  • find it
    ZenWiFi XD4 Plus ๐Ÿ’› Expected to work find it
    ZenWiFi XD4S ๐Ÿ’› Expected to work find it
    ZenWiFi XD5 ๐Ÿ’š Confirmed Stock:
  • 388.23949
  • find it
    ZenWiFi XD6 ๐Ÿ’š Confirmed Stock:
  • 388.21380
  • find it
    ZenWiFi XD6S ๐Ÿ’š Confirmed Stock:
  • 388.21380
  • find it
    ZenWiFi XT9 ๐Ÿ’š Confirmed Stock:
  • 388_23285
  • find it

    WiFi 5 | 802.11ac

    Model Status Tested firmware Find it on Amazon[^amazon]
    4G-AC55U ๐Ÿ’š Confirmed Stock:
  • 380.8102
  • find it
    BRT-AC828 ๐Ÿ’š Confirmed Stock:
  • 382_70348
  • find it
    DSL-AC68U ๐Ÿ’š Confirmed Stock:
  • 386.47534
  • 386.50117
  • Merlin:
  • 386.4-gnuton2
  • 386.7_2-gnuton1
  • find it
    RT-AC51U ๐Ÿ’š Confirmed Stock:
  • 380.8591
  • find it
    RT-AC52U B1 ๐Ÿ’š Confirmed find it
    RT-AC5300 ๐Ÿ’š Confirmed Merlin:
  • 386.7_2
  • find it
    RT-AC57U V3 ๐Ÿ’š Confirmed Stock:
  • 386.21649
  • find it
    RT-AC58U ๐Ÿ’š Confirmed find it
    RT-AC66U ๐Ÿ’š Confirmed Merlin:
  • 380.70_0
  • find it
    RT-AC66U B1 ๐Ÿ’š Confirmed Stock:
  • 386.51255
  • find it
    RT-AC68U ๐Ÿ’š Confirmed Stock:
  • 386.49703
  • Merlin:
  • 386.5_2
  • 386.7_0
  • find it
    RT-AC85P ๐Ÿ’š Confirmed Stock:
  • 382.52516
  • find it
    RT-AC86U ๐Ÿ’š Confirmed Stock:
  • 386.48260
  • 386.49709
  • Merlin:
  • 386.7_0
  • 386.7_2
  • 386.9_0
  • find it
    RT-AC87U ๐Ÿ’š Confirmed Merlin:
  • 384.13_10
  • find it
    RT-AC88U ๐Ÿ’š Confirmed Stock:
  • 386.48260
  • Merlin:
  • 386.5_0
  • 386.7_beta1
  • 386.12_2
  • find it
    RT-ACRH17 ๐Ÿ’š Confirmed Stock:
  • 382.52517
  • find it
    ZenWiFi AC Mini(CD6) ๐Ÿ’› Expected to work find it

    WiFi 4 | 802.11n

    Model Status Tested firmware Find it on Amazon[^amazon]
    RT-N66U ๐Ÿ’š Confirmed find it

    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.

    Buy Me A Coffee

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

    Project details


    Release history Release notifications | RSS feed

    Download files

    Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

    Source Distribution

    asusrouter-1.14.2.tar.gz (94.1 kB view details)

    Uploaded Source

    Built Distribution

    asusrouter-1.14.2-py3-none-any.whl (103.9 kB view details)

    Uploaded Python 3

    File details

    Details for the file asusrouter-1.14.2.tar.gz.

    File metadata

    • Download URL: asusrouter-1.14.2.tar.gz
    • Upload date:
    • Size: 94.1 kB
    • Tags: Source
    • Uploaded using Trusted Publishing? Yes
    • Uploaded via: twine/6.1.0 CPython/3.12.9

    File hashes

    Hashes for asusrouter-1.14.2.tar.gz
    Algorithm Hash digest
    SHA256 b6e61f42ca42e1c3fe3f154307328682c8a5adf14741da2ab34cfda1410617b7
    MD5 814208c29599394d0e4e9baada69dc88
    BLAKE2b-256 76cd3400361c0d147aed8e182658f8e9f3f71193a7ce13d5fdd0f37e59ab6dba

    See more details on using hashes here.

    Provenance

    The following attestation bundles were made for asusrouter-1.14.2.tar.gz:

    Publisher: release.yml on Vaskivskyi/asusrouter

    Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

    File details

    Details for the file asusrouter-1.14.2-py3-none-any.whl.

    File metadata

    • Download URL: asusrouter-1.14.2-py3-none-any.whl
    • Upload date:
    • Size: 103.9 kB
    • Tags: Python 3
    • Uploaded using Trusted Publishing? Yes
    • Uploaded via: twine/6.1.0 CPython/3.12.9

    File hashes

    Hashes for asusrouter-1.14.2-py3-none-any.whl
    Algorithm Hash digest
    SHA256 be6b94eb3f229042ebe96dd62e3da941b2b47ac793e5898abafc7a00e738a4e9
    MD5 239fd731afe2392ff1decf03c4768496
    BLAKE2b-256 a8a4d1a78ea47e2417eb55efddaef5ceb44bcd6ffc6d5b9068eb6b5f46062d31

    See more details on using hashes here.

    Provenance

    The following attestation bundles were made for asusrouter-1.14.2-py3-none-any.whl:

    Publisher: release.yml on Vaskivskyi/asusrouter

    Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

    Supported by

    AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page