Giter Site home page Giter Site logo

aioasuswrt's Introduction

Small wrapper for asuswrt. Python package

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

aioasuswrt's People

Contributors

magnusknutas avatar kennedyshead avatar jjdevries avatar bskaplou avatar chen-il avatar ollo69 avatar fabaff avatar tmin10 avatar wdullaer avatar omarali avatar pkishino avatar roblandry avatar kangaroomadman avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.