Skip to content

Cerbrus/piholedisplay

 
 

Repository files navigation

Pihole Display

Pi Hole stats

Hardware

  • Raspberry Pi 3B+ with pihole
  • Waveshare 2.13 inch ePaper display model B (3 colors: black, white and red)

Installation

Waveshare display drivers

  • Install the libraries mentioned here.

  • Enable spi, i2c and edit the modules config file as given here

  • [Optional] Download demo code from here and run it to make sure everything is working

  • Also install the requests library and dotmap libraries (needs pip to be installed)

    sudo pip install requests
    pip3 install dotmap
    

Final steps

  • Clone this repository onto a suitable forlder on your Pi.
    git clone https://github.com/Cerbrus/piholedisplay.git
    
  • Navigate to the /piholedisplay folder
    cd piholedisplay/
    
  • Grant execution permissions to the startup script
    chmod +x start-pihole-stat.sh
    
  • Navigate to the /python folder
    cd python/
    
  • Create api-key.txt containing your pihole API key
    echo "My API key" >> api-key.txt
    
  • Run the stats.py script using
    python stats.py
    

Running on startup

  • Lastly we just want to make this run at boot. This can be done in different ways:

a: Using rc.local:

  • This can be done by editing /etc/rc.local
  • Open rc.local: sudo nano /etc/rc.local
  • Add /home/pi/piholedisplay/start-pihole-stat.sh & before exit 0. Editing rc.local
  • Then save and you can reboot to test it out.

b: As a service:

  • Another option is to run it as a service:
    sudo cp pihole-stats.service /etc/systemd/system
    sudo systemctl daemon-reload
    sudo systemctl enable pihole-stats.service
    journalctl -u pihole-stats.service
    

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.5%
  • Shell 0.5%