Kitz Forum

Broadband Related => Router Monitoring Software => Topic started by: 3tdk on March 19, 2021, 09:16:42 PM

Title: SH2Monitor Python - monitoring for BT Smart Hub 2 using Selenium and ThingSpeak
Post by: 3tdk on March 19, 2021, 09:16:42 PM
Well, during a quite protracted support case with BT someone asked whether my line was "stable". BT don't provide tools to monitor that, other than monitoring the time since last retrain, so I set about building some. They also won't fix your broadband issue unless you have one of their smart hubs on the line, so your options for getting stats in another way are quite limited.

The result is a simple python script (I have mine running on a Raspberry Pi) which automatically uses the web interface of the Smart Hub 2 to grab various parameters, and then uploads these to ThingSpeak (an internet MQTT service run by Mathworks, makers of matlab, and which lets you build nice plots of the data).

Data captured in the current version:
The script is available at https://github.com/3tdk/SHM (https://github.com/3tdk/SHM)

I have mine set to monitor the data every 5 minutes. So far it has been very reliable with no crashes over 27 days of development, so I'm confident the SH2 is up to it.

To use it you will need:

Hopefully it should be fairly straightforward to run (for anyone who isn't scared off by those prerequisites)!

Screenshot attached of the type of charts Thingspeak can produce. Matlab code for the example charts is included in the Github repo.

Enjoy and happy monitoring!
Title: Re: SH2Monitor Python - monitoring for BT Smart Hub 2 using Selenium and ThingSpeak
Post by: burakkucat on March 19, 2021, 11:40:41 PM
Thank you for sharing your code. I'm sure it will prove useful to those "in need".  :)