Skip to main content

Programatically run internet speedtests on your AsusWRT-powered routers

Project description

python-asuswrt-speedtest

Programatically run internet speedtests on your AsusWRT-powered routers.

It uses the pyasuswrt package to make http(s) requests to the router.

Confirmed to be working with AsusWRTMerlin. It should work for other AsusWRT-powered routers with the Internet Spedtest function available, but this has not been tested. Use at your own risk.

Usage

Config

Configuration is stored in the config/config.ini file.

    [asus_router]
    host = 
    port = 8443
    use_https = true
    username = 
    password = 

    [speedtest]
    timeout = 120
    poll_frequency = 15
    history_limit = 10

Script

The following will run a speedtest on your router. The results will be available on the Internet Speed page

  1. Clone the repository
  2. Copy config/config.example.ini to config/config.ini
  3. Update the config/config.ini file with your router credentials and desired settings
  4. Run python3 ./run_speedtest.py

Package

The latest package release is available on PyPI

pip install asuswrtspeedtest

Example of how to use this package in your own project:

import asyncio
import configparser
from asuswrtspeedtest import SpeedtestClient


config = configparser.ConfigParser()
config.read('config/config.ini')


async def run_speedtest():
    async with SpeedtestClient(config) as speedtest_client:
        await speedtest_client.run()

asyncio.run(run_speedtest())

Project details


Download files

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

Source Distribution

asuswrtspeedtest-0.1.0.tar.gz (23.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

asuswrtspeedtest-0.1.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file asuswrtspeedtest-0.1.0.tar.gz.

File metadata

  • Download URL: asuswrtspeedtest-0.1.0.tar.gz
  • Upload date:
  • Size: 23.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for asuswrtspeedtest-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6e1671fc35133e04c029acffb242167fbcc31dede01fa1483ecec0b861f11d3b
MD5 ab3331c17491f4bc286f526b388920e7
BLAKE2b-256 3f3c715e0d4c093d12e1669b3c568dc7acda079689a4e18eed73c92c2255b98d

See more details on using hashes here.

File details

Details for the file asuswrtspeedtest-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for asuswrtspeedtest-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ea03e157194a36394a71a63dc8aec09938365812361b37b79f0c6b598c850cc4
MD5 e8b1326357fc7fb84665bc5b9d37e5f5
BLAKE2b-256 cf3c7be4aad8359f8e6a085239ce74b9a69cff2af72b72030812de878905283a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page