Skip to main content

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

Project description

Small wrapper for asuswrt.

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.2.6.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

aioasuswrt-1.2.6-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aioasuswrt-1.2.6.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.7

File hashes

Hashes for aioasuswrt-1.2.6.tar.gz
Algorithm Hash digest
SHA256 5cb7dfd3badec41c0c5d6c23a9a322417124ba663eda9a3f6753d668aeba8db4
MD5 a11d741952786a7565fc073c1155e508
BLAKE2b-256 fb1c8630c3adced7bf3138fcebe0ee8684e00513021df618464adaca16cc08e8

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: aioasuswrt-1.2.6-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.7

File hashes

Hashes for aioasuswrt-1.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 4ceffcd3d906f11a2d01c444b7e0231da0dc20766c196cf93c9c2eb01bd14d44
MD5 d7434946d1e52720c18838a82f7d6658
BLAKE2b-256 aa298f0af7907077e0a8139462cf51d13350deb4c317818fd557b9782d00af4c

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