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.2.1.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.2.1-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: asuswrtspeedtest-0.2.1.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.2.1.tar.gz
Algorithm Hash digest
SHA256 8f9ae5fbee66afaa0cde79dcf1e4cfd4fb066db5f6b90bd21e0d212be67e7f02
MD5 aedb126b697a2e4a5cba0132c6c58695
BLAKE2b-256 15fa5ea42724125a5565823ea39e6693152a19b851b7f19e2d5889ba329cc6f7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for asuswrtspeedtest-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 403e0d5219b153aed1d3b6b53649834edfa6cfbb424549be411ecc9cc46b8139
MD5 4bed5b495018b26e9ab7905158a2616d
BLAKE2b-256 40338310563807782899a49087084e93225fda723a3e123b423b1b3b8fcb61df

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