Kitz ADSL Broadband Information
adsl spacer  
Support this site
Home Broadband ISPs Tech Routers Wiki Forum
   Compare ISP   Rate your ISP
   Glossary   Glossary
Please login or register.

Login with username, password and session length
Advanced search  


Author Topic: SH2Monitor Python - monitoring for BT Smart Hub 2 using Selenium and ThingSpeak  (Read 226 times)


  • Just arrived
  • *
  • Posts: 17

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:
  • Current line sync (up/down)
  • Max reported line sync (up/down)
  • SNR (up/down)
  • DSL uptime
The script is available at

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:
  • An always-on computer like a Raspberry PI, running python, selenium, a web browser, and the other bits outlined in the package readme
  • A free Thingspeak account at

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!


  • Global Moderator
  • Senior Kitizen
  • *
  • Posts: 32304
  • Over the Rainbow Bridge
    • The ELRepo Project

Thank you for sharing your code. I'm sure it will prove useful to those "in need".  :)
:cat:  100% Linux and, previously, Unix. Co-founder of the ELRepo Project.

Please consider making a donation to support the running of this site.