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](https://github.com/mvn23)
[@halkeye](https://github.com/halkeye)
[@maweki](https://github.com/maweki)
[@quarcko](https://github.com/quarcko)

## 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:
```python
#!/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


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

aioasuswrt-1.1.14-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aioasuswrt-1.1.14-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0

File hashes

Hashes for aioasuswrt-1.1.14-py3-none-any.whl
Algorithm Hash digest
SHA256 e5ff3f1028c8cbbc88bb9c36952ed985c475f0496c8a97b04f5e19f35ab40a01
MD5 5e713c7252445d6044e0d7a0a5886a9e
BLAKE2b-256 5ffa292a8c33287a765fb023d924ee996ea8d9d16c1ba936fe5b6710fbd9ef56

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