ESP8266 Jenkins build monitor conversion to home internet alarm

If you have kids like, mine reduced internet bandwidth or, god forbid, loss of internet is a traumatic event.    Any loss of internet is immediately followed by a stampede of feet, in my direction, and shouts of "Dad the internet's not working".   I am then expected to fix the problem immediately; most of which are out of my control as they are not local problems.
So I decided that what I needed was an 'internet monitor', something to alert me when there are problems looming and how widespread they might be e.g. Is it just iplayer thats offline; google, BT or the local router.  I also wanted it to be highly visiable so that the whole family can see it and know when a problem is out of my control.
If you have been following my blog you will have seen my Jenkins build monitor that I built for a previous project that I worked on. Well that project finished, or least I left, and the build monitor came home and has been sitting in the garage......{thinking}...
Jenkins Build Monitor
I have also starting working with the ESP8266 System on a chip. The main strength of the ESP8266 is it's Wi-fi capability and, for me, its Arduino compatibility.
The idea for a big flashy (literally) home internet monitor was born.
Jenkins build monitor control board
The build monitor has a 3.3v bluetooth module to control an Arduino using a simple text command language.  The bluetooth module connected to a Raspberry Pi that queried Jenkins for the build status.  This worked well but needed the seperate Pi to work.
Blue Tooth module
Given that the ESP8266-01 is 3.3v and has 2 serial lines it seemed like a perfect fit for a plug-and-play upgrade :).
ESP8266-01 and programmer
I decided to make a simple pin compatible daughter board that I could plug into the existing socket that originally contained the bluetooth module.

ESP8266-01 and daughter board

All that was needed now was a quick bit of software for the ESP8266-01 to ping various internet resources and determine if they were responding in a reasonable time, or at all, and flash the lights accordingly.

ESP8266-01 installed
Finished !  A highly visible internet monitor for all the family :)
It does the following
  • On startup the Arduino starts a 'Cylon' pattern to show that it is operational
  • The ESP8266 boots and connects to the Arduino over Serial01 (TX only)
  • It then pings a list of sites, each with an expected response time threshold
  • Depending on the response time from each site the lights are lit/flash according to how good/bad it is
  • The ping is performed every 60 seconds
  • If local network is lost we have a disco !
Completed Internet Monitor


Post a comment

Popular Posts