Skip to main content

Api wrapper for Asuswrt https://www.asus.com/ASUSWRT/

Project description

Small wrapper for asuswrt. Python package

How to run tests

python setup.py test

Credits:

@mvn23 @halkeye @maweki @quarcko @wdullaer

Info

There are many different versions of asuswrt and sometimes they just dont work in current implementation. If you have a problem with your specific router open an issue, but please add as much info as you can and atleast:

  • Version of router
  • Version of Asuswrt

Known issues

Bugs

You can always create an issue in this tracker. To test and give us the information needed you could run:

#!/usr/bin/env python
import asyncio
import logging

import sys

from aioasuswrt.asuswrt import AsusWrt

component = AsusWrt('192.168.1.1', 22, username='****', password='****')
logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)
logger = logging.getLogger(__name__)


async def print_data():
    logger.debug("wl")
    logger.debug(await component.connection.async_run_command('for dev in `nvram get wl_ifnames`; do wl -i $dev assoclist; done'))
    dev = await component.async_get_wl()
    logger.debug(dev)
    logger.debug("arp")
    logger.debug(await component.connection.async_run_command('arp -n'))
    dev.update(await component.async_get_arp())
    logger.debug(dev)
    logger.debug("neigh")
    logger.debug(await component.connection.async_run_command('ip neigh'))
    dev.update(await component.async_get_neigh(dev))
    logger.debug(dev)
    logger.debug("leases")
    logger.debug(await component.connection.async_run_command('cat /var/lib/misc/dnsmasq.leases'))
    dev.update(await component.async_get_leases(dev))
    logger.debug(dev)


loop = asyncio.get_event_loop()

loop.run_until_complete(print_data())
loop.close()

Coffeefund: 1Huz6vNN6drX3Fq1sU98wPqNSdMPvkMBJG

Project details


Download files

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

Source Distribution

aioasuswrt-1.3.4.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

aioasuswrt-1.3.4-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file aioasuswrt-1.3.4.tar.gz.

File metadata

  • Download URL: aioasuswrt-1.3.4.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.9

File hashes

Hashes for aioasuswrt-1.3.4.tar.gz
Algorithm Hash digest
SHA256 86c7bf7b89c3ebc8b2004711cad32dcaa091aa99c56995ecbab28fa80811c25c
MD5 b290bc39373b45968a2a06304c25b942
BLAKE2b-256 85eed0ad3c8eb81f1b6cfba69c957f4b3d2bf3237e80c72105282d5836b6a758

See more details on using hashes here.

Provenance

File details

Details for the file aioasuswrt-1.3.4-py3-none-any.whl.

File metadata

  • Download URL: aioasuswrt-1.3.4-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.9

File hashes

Hashes for aioasuswrt-1.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 50a843e7f0bd2bf9bdacd57c3f581e103ff48d99f1c62a9c801762b77d3e85aa
MD5 3e361481c3707d39f137a3f3b7b9ec86
BLAKE2b-256 81e7eadfc96ea4c964232ca9cad93299d384b8383dba898a0d2a07745210c336

See more details on using hashes here.

Provenance

Supported by

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