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
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
Built Distributions
File details
Details for the file aioasuswrt-1.3.2.tar.gz
.
File metadata
- Download URL: aioasuswrt-1.3.2.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00d6ac697c8aab46b22ec5be9c646c5521969e153ca5e287b159786cb8090d19 |
|
MD5 | e39db3a9abf70919964f7ea91faf0eb5 |
|
BLAKE2b-256 | 02a8609533d8836dcc167fb1419cf28d15630637e7b75c9443cfcf4ea46d0e81 |
Provenance
File details
Details for the file aioasuswrt-1.3.2-py3.7.egg
.
File metadata
- Download URL: aioasuswrt-1.3.2-py3.7.egg
- Upload date:
- Size: 21.7 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09cabb87fc6848615015de254341d68a2883fa73c31bac28a54220d21221e699 |
|
MD5 | a310ff718b39fc69c6c7ed85eb09541c |
|
BLAKE2b-256 | 8000dc2f2645725580d4a770a858b051f1366185e7b1852768faf4b87751e7c9 |
Provenance
File details
Details for the file aioasuswrt-1.3.2-py3-none-any.whl
.
File metadata
- Download URL: aioasuswrt-1.3.2-py3-none-any.whl
- Upload date:
- Size: 11.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6840d3d1e420ea87be107125dd95ea25b5854686a481241c050acfe35fb04210 |
|
MD5 | 14e669ada1e0ebce28caa52799e7527a |
|
BLAKE2b-256 | 260e9cce9fb71849ccf9e220d06ec458062badf934fe0ef572755b9b500cd290 |