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
aioasuswrt-1.2.7.tar.gz
(7.0 kB
view hashes)
Built Distributions
aioasuswrt-1.2.7-py3.7.egg
(15.4 kB
view hashes)
Close
Hashes for aioasuswrt-1.2.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46a55dddc3829848ae91cc68b6ed498b5ebd4d14108eb0e5abc449166cc759a4 |
|
MD5 | 325df3ce53a6802f339b1acbf34e3e69 |
|
BLAKE2b-256 | e6138471a8ba9a86471383a655b2304146ad92402e950f9935712297ecb0a032 |