Skip to main content

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 only used for the custom AsusRouter Home Assistant integrartion. 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.

from asusrouter import AsusRouter

router = AsusRouter(host = "router.my.address",         #required - both IP and URL supported
                    username = "admin",                 #required
                    password = "password",              #required
                    port = None,                        #optional - default port would be selected based on use_ssl parameter
                    use_ssl = False,                    #optional
                    cert_check = True,                  #optional
                    cert_path = "",                     #optional
                    cache_time = 5,                     #optional
                    enable_monitor = True,              #optional
                    enable_control = False)             #optional

The module has the initialization method to load all the known data (all the monitors and methods from the next section, require enable_monitor to be True):

router.async_initialize()

Monitors and additional methods

Most of the values, obtained from the router are grouped in several monitor methods to decrease the amount of data sent between the library and the device. All of them require the enable_monitor parameter of AsusRouter to be set to True.

async_monitor_main()
async_monitor_nvram()
async_monitor_misc()
async_monitor_devices()

A detailed description of monitors and monitoring methods is available here (in work).

Commands

AsusRouter class supports sending commands to the device using the async_command method. Sending commands requires the enable_command parameter of AsusRrouter to be set to True.

For example, to reboot the device:

# This command will REBOOT your device if connected!
router.async_command(commands = {"rc_service": "reboot"}, action_mode = "apply")

Commands to the method should be sent as a dict of command: value. Please, refer to the Command List (in work) for a detailed explanation of the available commands.

Supported devices

AsusRouter supports virtually every AsusWRT-powered device.

WiFi 7 | 802.11be

Model Status Tested firmware Find it on Amazon1
GT-BE98 :yellow_heart: Expected to work find it
RT-BE96U :yellow_heart: Expected to work find it

WiFi 6e | 802.11axe

Model Status Tested firmware Find it on Amazon1
GT-AXE11000 :yellow_heart: Expected to work find it
GT-AXE16000 :yellow_heart: Expected to work find it
RT-AXE7800 :yellow_heart: Expected to work find it

WiFi 6 | 802.11ax

Model Status Tested firmware Find it on Amazon1
DSL-AX82U :green_heart: Confirmed Merlin:
  • 386.07_0-gnuton0_beta2
  • find it
    GT-AX11000 :green_heart: Confirmed Merlin:
  • 386.7_2
  • find it
    GT-AX11000 Pro :yellow_heart: Expected to work find it
    GT-AX6000 :yellow_heart: Expected to work find it
    GT6 :yellow_heart: Expected to work find it
    RT-AX55 :green_heart: Confirmed find it
    RT-AX56U :green_heart: Confirmed Merlin:
  • 386.7_2
  • find it
    RT-AX58U :green_heart: Confirmed Stock:
  • 386_49674
  • Merlin:
  • 386.7_2
  • find it
    RT-AX68U :green_heart: Confirmed find it
    RT-AX82U :green_heart: Confirmed Stock:
  • 386_48664
  • 386.49674
  • find it
    RT-AX86S :green_heart: Confirmed Stock:
  • 386_49447
  • find it
    RT-AX86U :green_heart: Confirmed Stock:
  • 386_46061
  • 386_48260
  • Merlin:
  • 386.7_2
  • find it
    RT-AX88U :green_heart: Confirmed Stock:
  • 386_45934
  • 386_48631
  • Merlin:
  • 386.5_2
  • 386.8_0
  • 388.1_0
  • find it
    RT-AX89X :green_heart: Confirmed find it
    RT-AX92U :green_heart: Confirmed Stock:
  • 386_46061
  • find it
    TUF-AX5400 :green_heart: Confirmed find it
    ZenWiFi AX (XT8) :green_heart: Confirmed Stock:
  • 386_48706
  • Merlin:
  • 386.07_2-gnuton1
  • find it
    ZenWiFi AX Mini (XD4) :green_heart: Confirmed Stock:
  • 386_48790
  • 386_49599
  • find it

    WiFi 5 | 802.11ac

    Model Status Tested firmware Find it on Amazon1
    4G-AC55U :green_heart: Confirmed find it
    DSL-AC68U :green_heart: Confirmed Stock:
  • 386_47534
  • Merlin:
  • 386.04-gnuton2
  • find it
    RT-AC51U :green_heart: Confirmed Stock:
  • 380_8591
  • find it
    RT-AC52U B1 :green_heart: Confirmed find it
    RT-AC5300 :green_heart: Confirmed Merlin:
  • 386.7_2
  • find it
    RT-AC57U V3 :green_heart: Confirmed Stock:
  • 386_21649
  • find it
    RT-AC58U :green_heart: Confirmed find it
    RT-AC66U :green_heart: Confirmed Merlin:
  • 380.70_0
  • find it
    RT-AC66U B1 :green_heart: Confirmed find it
    RT-AC68U :green_heart: Confirmed Merlin:
  • 386.5_2
  • 386.7_0
  • find it
    RT-AC86U :green_heart: Confirmed Stock:
  • 386_48260
  • Merlin:
  • 386.7_0
  • 386.7_2
  • find it
    RT-AC87U :green_heart: Confirmed Merlin:
  • 384.13_10
  • find it
    RT-AC88U :green_heart: Confirmed Merlin:
  • 386.7_beta1
  • find it
    RT-ACRH17 :green_heart: Confirmed Stock:
  • 382.52517
  • find it

    WiFi 4 | 802.11n

    Model Status Tested firmware Find it on Amazon1
    RT-N66U :green_heart: 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

    1. As an Amazon Associate I earn from qualifying purchases. Not like I ever got anything yet (: 2 3 4 5

    Release files for asusrouter 0.18.0

    For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

    Source distribution (sdist)

    Source distribution for asusrouter 0.18.0
    File Size Uploaded
    asusrouter-0.18.0.tar.gz 41.9 kB Details

    Built distribution (wheel)

    Table of built distributions (wheels) for asusrouter 0.18.0
    File Interpreter ABI Platform
    asusrouter-0.18.0-py3-none-any.whl Python 3 none any Details

    Total release size: 84.2 kB

    Release files / asusrouter-0.18.0.tar.gz

    Download URL asusrouter-0.18.0.tar.gz
    Size 41.9 kB
    Tags Source
    SHA-256 checksum
    How to use checksums
    69b6df391e8a1e7b7419d435fab828e4bb8d2dc7d5d73c9a31db3e4155dce170
    BLAKE2b-256 checksum
    How to use checksums
    abcd10bf353f46b5385197a4ff7a36b595735e433566b1d27c003bdbc0a476fd
    Upload date
    Uploaded using Trusted Publishing?
    What is trusted publishing?
    No
    Uploaded via twine/4.0.2 CPython/3.9.16

    Release files / asusrouter-0.18.0-py3-none-any.whl

    Download URL asusrouter-0.18.0-py3-none-any.whl
    Size 42.3 kB
    Tags Python 3
    SHA-256 checksum
    How to use checksums
    c1b009501837251ad57a001e430102c0c3951bb810daf260b61429cd1968078c
    BLAKE2b-256 checksum
    How to use checksums
    96f0ce098833b7c09c161ecff7c9351b8b9d275d3ecc3a5587d79395859dbcbf
    Upload date
    Uploaded using Trusted Publishing?
    What is trusted publishing?
    No
    Uploaded via twine/4.0.2 CPython/3.9.16

    Release history Release notifications | RSS feed

    1.20.1

    2 release files

    1.20.0

    2 release files

    1.19.0

    2 release files

    1.18.2

    2 release files

    1.18.1

    2 release files

    1.18.0

    2 release files

    1.15.1

    2 release files

    1.15.0

    2 release files

    1.14.2

    2 release files

    1.14.1

    2 release files

    1.14.0

    2 release files

    1.13.1

    2 release files

    1.12.2

    2 release files

    1.12.1

    2 release files

    1.12.0

    2 release files

    1.11.0

    2 release files

    1.10.0

    2 release files

    1.9.0

    2 release files

    1.8.0

    2 release files

    1.7.0

    2 release files

    1.6.1

    2 release files

    1.6.0

    2 release files

    1.5.0

    2 release files

    1.4.0

    2 release files

    1.3.0

    2 release files

    1.2.0

    2 release files

    1.1.2

    2 release files

    1.1.1

    2 release files

    1.1.0

    2 release files

    1.0.5

    2 release files

    1.0.4

    2 release files

    1.0.3

    2 release files

    1.0.2

    2 release files

    1.0.1

    2 release files

    1.0.0

    2 release files

    0.20.3

    2 release files

    0.20.2

    2 release files

    0.20.1

    2 release files

    0.19.7

    2 release files

    0.19.6

    2 release files

    0.19.5

    2 release files

    0.19.4

    2 release files

    0.19.3

    2 release files

    0.19.2

    2 release files

    0.19.1

    2 release files

    0.19.0

    2 release files

    0.18.3

    2 release files

    0.18.2

    2 release files

    0.18.1

    2 release files

    This release

    0.18.0 This release

    2 release files

    0.15.2

    2 release files

    0.15.1

    2 release files

    0.15.0

    2 release files

    0.14.0

    2 release files

    0.12.0

    2 release files

    0.11.0

    2 release files

    0.10.1

    2 release files

    0.10.0

    2 release files

    0.9.5

    2 release files

    0.9.4

    2 release files

    0.9.3

    2 release files

    0.9.2

    2 release files

    0.9.1

    2 release files

    0.9.0

    2 release files

    0.8.0

    2 release files

    0.7.0

    2 release files

    0.6.3

    2 release files

    0.6.2

    2 release files

    0.6.1

    2 release files

    0.6.0

    2 release files

    0.5.1

    2 release files

    0.5.0

    2 release files

    0.4.4

    2 release files

    0.4.3

    2 release files

    0.4.2

    2 release files

    0.4.1

    2 release files

    0.4.0

    2 release files

    0.3.2

    2 release files

    0.3.1

    2 release files

    0.3.0

    2 release files

    0.2.10

    2 release files

    0.2.9

    2 release files

    0.2.8

    2 release files

    0.2.7

    2 release files

    0.2.6

    2 release files

    0.2.5

    2 release files

    0.2.4

    2 release files

    0.2.3

    2 release files

    0.2.2

    2 release files

    0.2.1

    2 release files

    0.2.0

    2 release files

    0.1.0

    2 release files

    Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page