spdMerlin spdMerlin - Automated speedtests with graphs

  • ATTENTION! You'll notice a Prefix dropdown when you create a thread. If your post applies to one of the topics listed, please use that Prefix for your post. When browsing the thread list you can use the Prefix to filter the view.

Jack Yaz

Part of the Furniture
v3.6.1
Updated 2020-05-25

Run automated speedtests for your Internet on your router with graphs available on the Addons page of the WebUI.

This script began as a user-friendly installer for a personal project developed by @JGrana

spdMerlin is free to use under the GNU General Public License version 3 (GPL 3.0).

spdMerlin uses SpeedTest CLI
If the speeds from this utility are significantly lower than those you see from the desktop app/browser test, the limiting factor will be your router's CPU. That being said, there is probably room for improvement/optimisation by the Ookla team in the CLI binary itself. Please direct feedback about speed issues to Ookla via the above link. There is nothing that I can do about them.

spdMerlin includes the required licenses, which must be accepted on first run of Speedtest CLI.

A swap file is required to ensure smooth operation of the script.

The speedtest is scheduled to run at 12 past and 42 past the hour, every hour, by default

This project is hosted on GitHub

Love the script and want to support future development? Any and all donations gratefully received!
PayPal donation
Buy me a coffee

Supported firmware versions
You must be running firmware Merlin 384.15/384.13_4 or Fork 43E5 (or later) Asuswrt-Merlin

Installation
Using your preferred SSH client/terminal, copy and paste the following command, then press Enter:
Code:
/usr/sbin/curl --retry 3 "https://raw.githubusercontent.com/jackyaz/spdMerlin/master/spdmerlin.sh" -o "/jffs/scripts/spdmerlin" && chmod 0755 /jffs/scripts/spdmerlin && /jffs/scripts/spdmerlin install
Usage
To launch the spdMerlin menu after installation, use:
Code:
spdmerlin
If this does not work, you will need to use the full path:
Code:
/jffs/scripts/spdmerlin
Updating
Launch spdmerlin and select option u
 
Last edited:

L&LD

Part of the Furniture
You're teasing us! :D

But the name already sounds great! 'spdMerlin'. :)
 

skeal

Part of the Furniture
Sorry SPD?
 

L&LD

Part of the Furniture

L&LD

Part of the Furniture

Jack Yaz

Part of the Furniture
Yes - see first post (now updated)
 

L&LD

Part of the Furniture
Looks like RT-AC68U is not supported. :(

But the graphs look great in the GUI (not populated right now, of course)! :) :) :)

Code:
ASUSWRT-Merlin RT-AC68U 384.10-0 Sun Mar 24 21:35:16 UTC 2019
[email protected]:/tmp/home/root# /usr/sbin/curl --retry 3 "https://raw.githubusercontent.com/jackyaz/spdMerlin/mas
ter/spdmerlin.sh" -o "/jffs/scripts/spdmerlin" && chmod 0755 /jffs/scripts/spdmerlin && /jffs/scripts/spdmerlin install
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 19527  100 19527    0     0  41109      0 --:--:-- --:--:-- --:--:-- 45201
spdMerlin: Welcome to spdMerlin v1.0.0, a script by JackYaz

spdMerlin: Checking your router meets the requirements for spdMerlin

Installing python (2.7.15-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/python_2.7.15-5_armv7-2.6.ipk
Installing python-base (2.7.15-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/python-base_2.7.15-5_armv7-2.6.ipk
Installing libffi (3.2.1-3) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/libffi_3.2.1-3_armv7-2.6.ipk
Installing libbz2 (1.0.6-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/libbz2_1.0.6-5_armv7-2.6.ipk
Configuring python-base.
Configuring libffi.
Collected errors:
 * opkg_download: Failed to download http://bin.entware.net/armv7sf-k2.6/libbz2_1.0.6-5_armv7-2.6.ipk, wget returned 8.
 * opkg_install_pkg: Failed to download libbz2. Perhaps you need to run 'opkg update'?
 * opkg_install_cmd: Cannot install package python.
Package rrdtool (1.2.30-3a) installed in root is up to date.
spdMerlin: Starting speedtest now...

Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Traceback (most recent call last):
  File "/jffs/scripts/spdcli.py", line 20, in <module>
    import csv
ImportError: No module named csv
spdMerlin: Finished speedtest
 

Jack Yaz

Part of the Furniture
Looks like RT-AC68U is not supported. :(

Code:
ASUSWRT-Merlin RT-AC68U 384.10-0 Sun Mar 24 21:35:16 UTC 2019
[email protected]:/tmp/home/root# /usr/sbin/curl --retry 3 "https://raw.githubusercontent.com/jackyaz/spdMerlin/mas
ter/spdmerlin.sh" -o "/jffs/scripts/spdmerlin" && chmod 0755 /jffs/scripts/spdmerlin && /jffs/scripts/spdmerlin install
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 19527  100 19527    0     0  41109      0 --:--:-- --:--:-- --:--:-- 45201
spdMerlin: Welcome to spdMerlin v1.0.0, a script by JackYaz

spdMerlin: Checking your router meets the requirements for spdMerlin

Installing python (2.7.15-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/python_2.7.15-5_armv7-2.6.ipk
Installing python-base (2.7.15-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/python-base_2.7.15-5_armv7-2.6.ipk
Installing libffi (3.2.1-3) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/libffi_3.2.1-3_armv7-2.6.ipk
Installing libbz2 (1.0.6-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/libbz2_1.0.6-5_armv7-2.6.ipk
Configuring python-base.
Configuring libffi.
Collected errors:
 * opkg_download: Failed to download http://bin.entware.net/armv7sf-k2.6/libbz2_1.0.6-5_armv7-2.6.ipk, wget returned 8.
 * opkg_install_pkg: Failed to download libbz2. Perhaps you need to run 'opkg update'?
 * opkg_install_cmd: Cannot install package python.
Package rrdtool (1.2.30-3a) installed in root is up to date.
spdMerlin: Starting speedtest now...

Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Traceback (most recent call last):
  File "/jffs/scripts/spdcli.py", line 20, in <module>
    import csv
ImportError: No module named csv
spdMerlin: Finished speedtest
Try opkg update?

If not, this ipkg looks right: http://bin.entware.net/armv7sf-k2.6/libbz2_1.0.6-5a_armv7-2.6.ipk

Code:
curl -fsL --retry 3 "http://bin.entware.net/armv7sf-k2.6/libbz2_1.0.6-5a_armv7-2.6.ipk" -o /tmp/libbz.ipk
opkg install /tmp/libbz.ipk
 

L&LD

Part of the Furniture
I did try opkg update:
Code:
[email protected]:/tmp/home/root# opkg update
Downloading http://bin.entware.net/armv7sf-k2.6/Packages.gz
Updated list of available packages in /opt/var/opkg-lists/entware
[email protected]:/tmp/home/root#
I'm not quite sure what to do with the link you provided? I can't seem to see the page, no matter how many times I click it.
 

Jack Yaz

Part of the Furniture
I did try opkg update:
Code:
[email protected]:/tmp/home/root# opkg update
Downloading http://bin.entware.net/armv7sf-k2.6/Packages.gz
Updated list of available packages in /opt/var/opkg-lists/entware
[email protected]:/tmp/home/root#
I'm not quite sure what to do with the link you provided? I can't seem to see the page, no matter how many times I click it.
See my edit, I added a code sample. Once done, try re-running spdMerlin's install routine

EDIT: This appears to be an Entware repo problem with a mismatched dependency, rather than the script. Not sure what to do with that information though...

EDIT2: https://github.com/Entware/Entware/issues/263
 

L&LD

Part of the Furniture
See my edit, I added a code sample. Once done, try re-running spdMerlin's install routine

EDIT: This appears to be an Entware repo problem with a mismatched dependency, rather than the script. Not sure what to do with that information though...
Thanks, the ipkg worked to install that package, but now this is showing.

Code:
spdMerlin: Starting speedtest now...

Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Traceback (most recent call last):
  File "/jffs/scripts/spdcli.py", line 20, in <module>
    import csv
ImportError: No module named csv
spdMerlin: Finished speedtest

Press enter to continue...
 

Jack Yaz

Part of the Furniture
Thanks, the ipkg worked to install that package, but now this is showing.

Code:
spdMerlin: Starting speedtest now...

Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Traceback (most recent call last):
  File "/jffs/scripts/spdcli.py", line 20, in <module>
    import csv
ImportError: No module named csv
spdMerlin: Finished speedtest

Press enter to continue...
Did you re-run the install command for spdMerlin?
 

L&LD

Part of the Furniture
Did you re-run the install command for spdMerlin?
Should I uninstall it first? I ran 'u' and 'uf'. :oops:

I'll re-run the actual installer. Thank you!
 

Jack Yaz

Part of the Furniture
Should I uninstall it first? I ran 'u' and 'uf'. :oops:

I'll re-run the actual installer. Thank you!
No don't uninstall as that'll wipe the package you just installed. Hopefully the installer will work

(equally opkg install python)

EDIT: If it doesn't, we get to start trying to find which packages got installed on HND/ARMv8 that don't get installed on ARMv7
 

L&LD

Part of the Furniture
The only error seems to be an SSL certificate error now.

Code:
[email protected]:/tmp/home/root# /usr/sbin/curl --retry 3 "https://raw.githubusercontent.com/jackyaz/spdMerlin/mas
ter/spdmerlin.sh" -o "/jffs/scripts/spdmerlin" && chmod 0755 /jffs/scripts/spdmerlin && /jffs/scripts/spdmerlin install
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 19527  100 19527    0     0  89986      0 --:--:-- --:--:-- --:--:--  100k
spdMerlin: Welcome to spdMerlin v1.0.0, a script by JackYaz

spdMerlin: Checking your router meets the requirements for spdMerlin

Installing python (2.7.15-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/python_2.7.15-5_armv7-2.6.ipk
Installing libtirpc (1.1.4-1) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/libtirpc_1.1.4-1_armv7-2.6.ipk
Installing python-light (2.7.15-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/python-light_2.7.15-5_armv7-2.6.ipk
Installing python-ctypes (2.7.15-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/python-ctypes_2.7.15-5_armv7-2.6.ipk
Installing python-pydoc (2.7.15-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/python-pydoc_2.7.15-5_armv7-2.6.ipk
Installing python-multiprocessing (2.7.15-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/python-multiprocessing_2.7.15-5_armv7-2.6.ipk
Installing python-codecs (2.7.15-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/python-codecs_2.7.15-5_armv7-2.6.ipk
Installing libsqlite3 (3260000-3) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/libsqlite3_3260000-3_armv7-2.6.ipk
Installing python-sqlite3 (2.7.15-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/python-sqlite3_2.7.15-5_armv7-2.6.ipk
Installing python-logging (2.7.15-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/python-logging_2.7.15-5_armv7-2.6.ipk
Installing libgdbm (1.11-1) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/libgdbm_1.11-1_armv7-2.6.ipk
Installing python-gdbm (2.7.15-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/python-gdbm_2.7.15-5_armv7-2.6.ipk
Installing python-email (2.7.15-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/python-email_2.7.15-5_armv7-2.6.ipk
Installing python-distutils (2.7.15-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/python-distutils_2.7.15-5_armv7-2.6.ipk
Installing libexpat (2.2.6-1) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/libexpat_2.2.6-1_armv7-2.6.ipk
Installing python-xml (2.7.15-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/python-xml_2.7.15-5_armv7-2.6.ipk
Installing python-compiler (2.7.15-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/python-compiler_2.7.15-5_armv7-2.6.ipk
Installing libxml2 (2.9.9-1) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/libxml2_2.9.9-1_armv7-2.6.ipk
Installing libdb47 (4.7.25.4.NC-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/libdb47_4.7.25.4.NC-5_armv7-2.6.ipk
Installing python-db (2.7.15-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/python-db_2.7.15-5_armv7-2.6.ipk
Installing python-openssl (2.7.15-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/python-openssl_2.7.15-5_armv7-2.6.ipk
Installing python-decimal (2.7.15-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/python-decimal_2.7.15-5_armv7-2.6.ipk
Installing python-unittest (2.7.15-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/python-unittest_2.7.15-5_armv7-2.6.ipk
Installing libncursesw (6.1-3) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/libncursesw_6.1-3_armv7-2.6.ipk
Installing libncurses (6.1-3) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/libncurses_6.1-3_armv7-2.6.ipk
Installing python-ncurses (2.7.15-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/python-ncurses_2.7.15-5_armv7-2.6.ipk
Configuring libtirpc.
Configuring python-light.
Configuring python-codecs.
Configuring libxml2.
Configuring libdb47.
Configuring python-db.
Configuring python-decimal.
Configuring python-distutils.
Configuring python-pydoc.
Configuring python-ctypes.
Configuring python-multiprocessing.
Configuring libsqlite3.
Configuring python-sqlite3.
Configuring python-logging.
Configuring libgdbm.
Configuring python-gdbm.
Configuring python-email.
Configuring libexpat.
Configuring python-xml.
Configuring python-compiler.
Configuring python-openssl.
Configuring python-unittest.
Configuring libncursesw.
Configuring libncurses.
Configuring python-ncurses.
Configuring python.
Package rrdtool (1.2.30-3a) installed in root is up to date.
spdMerlin: Starting speedtest now...

Cannot retrieve speedtest configuration
ERROR: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)>
spdMerlin: Finished speedtest

[email protected]:/tmp/home/root#
 

Jack Yaz

Part of the Furniture
The only error seems to be an SSL certificate error now.

Code:
[email protected]:/tmp/home/root# /usr/sbin/curl --retry 3 "https://raw.githubusercontent.com/jackyaz/spdMerlin/mas
ter/spdmerlin.sh" -o "/jffs/scripts/spdmerlin" && chmod 0755 /jffs/scripts/spdmerlin && /jffs/scripts/spdmerlin install
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 19527  100 19527    0     0  89986      0 --:--:-- --:--:-- --:--:--  100k
spdMerlin: Welcome to spdMerlin v1.0.0, a script by JackYaz

spdMerlin: Checking your router meets the requirements for spdMerlin

Installing python (2.7.15-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/python_2.7.15-5_armv7-2.6.ipk
Installing libtirpc (1.1.4-1) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/libtirpc_1.1.4-1_armv7-2.6.ipk
Installing python-light (2.7.15-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/python-light_2.7.15-5_armv7-2.6.ipk
Installing python-ctypes (2.7.15-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/python-ctypes_2.7.15-5_armv7-2.6.ipk
Installing python-pydoc (2.7.15-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/python-pydoc_2.7.15-5_armv7-2.6.ipk
Installing python-multiprocessing (2.7.15-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/python-multiprocessing_2.7.15-5_armv7-2.6.ipk
Installing python-codecs (2.7.15-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/python-codecs_2.7.15-5_armv7-2.6.ipk
Installing libsqlite3 (3260000-3) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/libsqlite3_3260000-3_armv7-2.6.ipk
Installing python-sqlite3 (2.7.15-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/python-sqlite3_2.7.15-5_armv7-2.6.ipk
Installing python-logging (2.7.15-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/python-logging_2.7.15-5_armv7-2.6.ipk
Installing libgdbm (1.11-1) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/libgdbm_1.11-1_armv7-2.6.ipk
Installing python-gdbm (2.7.15-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/python-gdbm_2.7.15-5_armv7-2.6.ipk
Installing python-email (2.7.15-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/python-email_2.7.15-5_armv7-2.6.ipk
Installing python-distutils (2.7.15-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/python-distutils_2.7.15-5_armv7-2.6.ipk
Installing libexpat (2.2.6-1) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/libexpat_2.2.6-1_armv7-2.6.ipk
Installing python-xml (2.7.15-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/python-xml_2.7.15-5_armv7-2.6.ipk
Installing python-compiler (2.7.15-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/python-compiler_2.7.15-5_armv7-2.6.ipk
Installing libxml2 (2.9.9-1) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/libxml2_2.9.9-1_armv7-2.6.ipk
Installing libdb47 (4.7.25.4.NC-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/libdb47_4.7.25.4.NC-5_armv7-2.6.ipk
Installing python-db (2.7.15-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/python-db_2.7.15-5_armv7-2.6.ipk
Installing python-openssl (2.7.15-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/python-openssl_2.7.15-5_armv7-2.6.ipk
Installing python-decimal (2.7.15-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/python-decimal_2.7.15-5_armv7-2.6.ipk
Installing python-unittest (2.7.15-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/python-unittest_2.7.15-5_armv7-2.6.ipk
Installing libncursesw (6.1-3) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/libncursesw_6.1-3_armv7-2.6.ipk
Installing libncurses (6.1-3) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/libncurses_6.1-3_armv7-2.6.ipk
Installing python-ncurses (2.7.15-5) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/python-ncurses_2.7.15-5_armv7-2.6.ipk
Configuring libtirpc.
Configuring python-light.
Configuring python-codecs.
Configuring libxml2.
Configuring libdb47.
Configuring python-db.
Configuring python-decimal.
Configuring python-distutils.
Configuring python-pydoc.
Configuring python-ctypes.
Configuring python-multiprocessing.
Configuring libsqlite3.
Configuring python-sqlite3.
Configuring python-logging.
Configuring libgdbm.
Configuring python-gdbm.
Configuring python-email.
Configuring libexpat.
Configuring python-xml.
Configuring python-compiler.
Configuring python-openssl.
Configuring python-unittest.
Configuring libncursesw.
Configuring libncurses.
Configuring python-ncurses.
Configuring python.
Package rrdtool (1.2.30-3a) installed in root is up to date.
spdMerlin: Starting speedtest now...

Cannot retrieve speedtest configuration
ERROR: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)>
spdMerlin: Finished speedtest

[email protected]:/tmp/home/root#
Looks like the --secure flag not playing nice. Not sure what'd cause that :/
 

L&LD

Part of the Furniture
Looks like the --secure flag not playing nice. Not sure what'd cause that :/
Would any of the other scripts be interfering? Like Stubby or Skynet? Maybe an AiProtection interaction as it is enabled too (sorry, just guessing)?
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top