Professional Front End Engineer. Unprofessional tinkerer.

Bandwidth Gauge

13 Apr 2022

What it do?

Reads current internet bandwidth usage from local router and displays it on the guage with coloured background.

Hard ingredients

  • Wemos D1 Mini ESP12
  • 3V Panel Meter
  • MCP4725 Dac (Digital-to-analog convertor)
  • WS2812B Addressable RGB LED

Soft ingredients

Notes

Using the DAC to control the dial and NeoPixel for just a single RGB LED was no bother at all but getting the router’s data and parsing it was a whole other story..

The TL;DR however, is that it provides a router info HTML page behind basic auth which I managed to GET relatively easily thanks to HTTPClient.setAuthorization but then.. it’s not JSON, it’s just a chonk of HTML the router fires at you.

Parsing XML on an Arduino is supposedly impossible, according to most forum posts I could find but this ESP12 is significantly more capable and I did find an XML parsing library. Would I recommend it? Not necessarily, I mean you can’t do selector queries so it was a nightmare to figure out. Not all that far away from just regexing. Anyway, I got it done and it works! Hopefully Sky won’t update the router software too soon.. lol

Future plans

It’s crying out for a nice swanky mantel clock style case, so I’ll get onto that in one of the brief windows of time when my 3D printer is working.

© MichaelCook.tech 2024