Skip to content

A simple script to enable Pihole stats on a 16X2 LCD

Notifications You must be signed in to change notification settings

pfidr34/piholestats

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pihole Stats

The following has been tested on a Raspberry Pi 3B+ running Raspian Buster Lite

Screen used: https://www.amazon.com/gp/product/B07CXHC32T
Dupont wire used: https://www.amazon.com/gp/product/B01EV70C78

Setup the Pi

1.) Change to the opt directory cd /opt
2.) Clone the needed files into the direcotry sudo git clone https://github.com/pfidr34/piholestats.git
3.) Change to the opt directory cd /opt/piholestats
4.) Run the installation script sudo bash install.sh

Wire the LCD

1.) Unplug the Pi
2.) GND on the LCD to pin 6 on the Pi GPIO
3.) VCC on the LCD to pin 4 on the Pi GPIO
4.) SDA on the LCD to pin 3 on the Pi GPIO
5.) SCL on the LCD to pin 5 on the Pi GPIO

LCD GPIO

Install as a service

1.) Change to the systemd directory cd /lib/systemd/system/
2.) Start a new file for the service sudo nano pistat.service
3.) Paste the following into nano

[Unit]
Description=Pi Stats LCD
After=multi-user.target

[Service]
Type=simple
ExecStart=/usr/bin/python /opt/piholestats/pistat.py
Restart=on-abort

[Install]
WantedBy=multi-user.target

4.) Set permissions on the script sudo chmod 644 /lib/systemd/system/pistat.service
5.) Make the script executable sudo chmod +x /opt/piholestats/pistat.py
6.) Reload daemon so our service is seen sudo systemctl daemon-reload
7.) Enable the service to run on boot sudo systemctl enable pistat.service
8.) Set permissions on the script sudo systemctl start pistat.service



Project based off of:
https://github.com/the-raspberry-pi-guy/lcd
and
https://www.reddit.com/r/pihole/comments/d1ilob/my_cheap_pihole_monitor_on_16x2_lcd_1/

About

A simple script to enable Pihole stats on a 16X2 LCD

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 86.0%
  • Shell 14.0%