https://github.com/rob2n/pihole_monitor
Display PiHole statistics on 128x64 I²C LCD
https://github.com/rob2n/pihole_monitor
Last synced: about 2 months ago
JSON representation
Display PiHole statistics on 128x64 I²C LCD
- Host: GitHub
- URL: https://github.com/rob2n/pihole_monitor
- Owner: Rob2n
- License: mit
- Created: 2022-07-31T17:23:30.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-31T18:52:08.000Z (almost 4 years ago)
- Last Synced: 2025-01-28T01:13:53.119Z (over 1 year ago)
- Language: Python
- Size: 66.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PiHole_Monitor
Display PiHole statistics on ssd1306 128x64 I²C LCD
> Inspired by [this tutorial](https://www.raspberrypi-spy.co.uk/2019/10/pi-hole-oled-status-screen/) but tweaked, updated for 2022 libraries and without LED (and it works)
## Circuit Diagram

## Installation
For Raspberry OS, make sure I²C is enabled within config
```
sudo raspi-config
```
Install required libraries (might work without all of them but just in case)
```
sudo apt install python3-gpiozero & pip install RPi.GPIO adafruit-circuitpython-ssd1306
```
Download PiHole_mon.py and font file
```
wget https://raw.githubusercontent.com/Rob2n/PiHole_Monitor/main/PiHole_mon.py ; wget https://raw.githubusercontent.com/Rob2n/PiHole_Monitor/main/VCR_OSD_MONO_1.001.ttf
```
### Run on startup
Add a cron task by doing
```
crontab -e
```
and add the following line to the end
```
@reboot python3 /home/pi/PiHole_mon.py &
```
Every 30 seconds the screen refreshes the displayed data.
By pressing the button you can switch screens to display more info.
The different screens are:
* Screen 1 (Main)
* Total blocked percentage
* Total blocked count
* Screen 2
* Total blocked count
* Total number of queries
* CPU temperature
* Screen 3
* CPU usage
* Memory in use/Total memory
* Disk space used/Total disk space