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()
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 Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aioasuswrt-1.1.22.tar.gz.
File metadata
- Download URL: aioasuswrt-1.1.22.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.5.1 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af789d296bf4c8cb8b5b60f07190c4a0a5f5bf750c36d74b7c4107a550713949
|
|
| MD5 |
666f1faae27453f7f2e11d2e40305027
|
|
| BLAKE2b-256 |
64447b28862fd26b4ab5db3caf514d23c38db5a5e521259143cdab449b37a945
|
File details
Details for the file aioasuswrt-1.1.22-py3-none-any.whl.
File metadata
- Download URL: aioasuswrt-1.1.22-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.5.1 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9674e7de0804499d99c34af43ab8dacab423689d32bf3eb3c9d7e8cb4051e20f
|
|
| MD5 |
e29af0d37fc336d44ebcd06ffaa1810d
|
|
| BLAKE2b-256 |
01a51bc3c536955d427670ed818090a1a31f3845774f73cc152e0da0d8364698
|