Skip to content

Installing Speedtest Mod

itsmesid edited this page Apr 21, 2021 · 37 revisions

Remove Python CLI

sudo pip3 uninstall speedtest-cli

OR

sudo pip uninstall speedtest-cli

OR

sudo apt-get remove speedtest-cli


Install Speedtest CLI

The official test methord will only work after you have removed Python CLI and installed Install Speedtest CLI

Please follow the following guide

Install Speedtest CLI


Start with installing required packages on your Raspberry Pi / Linux

sudo apt install python-pip # not required for official CLI

sudo pip install speedtest-cli # not required for official CLI

sudo apt install sqlite3

sudo apt install jq -y

Configure correct timezone for graph *Need for graph to work correctly

sudo dpkg-reconfigure tzdata  

Select your timezone

Find php version

php -v

if it is 5.x

sudo apt install php5-sqlite

if it is 7.x

sudo apt install php7.x-sqlite  // change `x` to your version # if failed try php7.x-sqlite3

Restart Pi###

sudo reboot

You can try run it using

speedtest

If Everything is ok, proceed to next step

Backup original admin folder

sudo su
cd /var/www/html
mv admin org_admin
git clone https://github.com/arevindh/AdminLTE admin

Get latest webscripts file

cd /opt/pihole/
mv webpage.sh webpage.sh.org
wget https://github.com/arevindh/pi-hole/raw/master/advanced/Scripts/webpage.sh

Copy Databasefile

cp /var/www/html/admin/scripts/pi-hole/speedtest/speedtest.db /etc/pihole/

Go to the settings page

Set speedtest schedule and Display range Tick Flush speedtest history (for the first time only) Set speedtest mode to Official CLI

Select server choice (optional)

Get your server id from here https://c.speedtest.net/speedtest-servers-static.php (Thanks to Afraidium)

Test Pihole speedtest from commandline

sudo "/var/www/html/admin/scripts/pi-hole/speedtest/speedtest-official.sh" 

Done

Instructions

Clone this wiki locally