Pi-hole Monitor is a Wemos D1 Mini (ESP8266) with a SSD1306 OLED display that is managed through a web interface and sits on your local network and will display statistics from your Pi-hole server.
- Display Pi-Hole Statistics
- Total Blocked
- Total Clients
- Percentage Blocked
- Blocked Ads Graph from the last 21.33 hours of data (only 128 lines to show 10 min incriments)
- Top 3 Clients Blocked
- Option to display 24 hour or AM/PM style clock
- Sample rate is every 60 seconds
- Fully configurable from the web interface (not required to edit Settings.h)
- Supports OTA (loading firmware over WiFi connection on same LAN)Basic Authentication to protect your settings
Requires 1 OLED Display and 1 Wemos D1 Mini:
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Solder Up the Wemos D1 Mini With the I2C OLED Display
This step only requires connecting 4 wires between the Wemos D1 Mini and the OLED display.
- SDA -> D2
- SCL -> D5
- VCC -> 5V+
- GND -> GND-
Step 2: 3D Print a Case for Your Pi-hole Monitor
You can use any case you want -- anything that will fit the Wemos D1 Mini (ESP8266) along with the OLED display. You can print my design from Thingiverse:
Fit your Wemos and OLED in the case. You may need to apply some glue to the outer corners of the OLED display to get it to stick into the case. The Wemos will be held into the case by the back panel.
Step 3: Download and Compile Source Code
It is recommended to use Arduino IDE. You will need to configure Arduino IDE to work with the Wemos board and USB port and installed the required USB drivers etc.
- USB CH340G drivers: https://wiki.wemos.cc/downloads
- Enter http://arduino.esp8266.com/stable/package_esp8266... into Additional Board Manager URLs field. You can add multiple URLs, separating them with commas. This will add support for the Wemos D1 Mini to Arduino IDE.
- Open Boards Manager from Tools > Board menu and install esp8266 platform (and don't forget to select your ESP8266 board from Tools > Board menu after installation).
- Select Board: "WeMos D1 R2 & mini"
- Set 1M SPIFFS -- this project uses SPIFFS for saving and reading configuration settings. If you don't do this, you will get a blank screen after uploading. If you get a blank screen after loading -- check to see if you have 1M SPIFFS set in the Arduino IDE tools menu.
Loading Supporting Library Files in Arduino
Use the Arduino guide for details on how to installing and manage libraries https://www.arduino.cc/en/Guide/Libraries
Packages -- the following packages and libraries are used (download and install):
- WiFiManager.h --> https://github.com/tzapu/WiFiManager
- ArduinoOTA.h --> Arduino OTA Library
- "SSD1306Wire.h" --> https://github.com/ThingPulse/esp8266-oled-ssd130...
Compile and load the firmware on to the Wemos D1 Mini.
Step 4: Configure for Your Network and Web Interface
The Printer Monitor uses the WiFiManager so when it can't find the last network it was connected to it will become a AP Hotspot -- connect to it with your phone and you can then enter your WiFi connection information.
After connected to your WiFi network it will display the IP addressed assigned to it and that can be used to open a browser to the Web Interface. Everything can be configured there in the web interface.
Participated in the
Arduino Contest 2019