This is a fork from: pihole-oled
I faced installation-problems with the original code, so I forked it, and changed the code.
- skipped addafruit module -> use "luma.oled"
- Integrate Fritzconnection
- Maybe change the UI -> Grafics? Animations?
The OLED display is connected via I2C with 4 wires: SDA
, SCL
, 3.3V
and
GND
.
This project requires:
- a Raspberry Pi Zero (or 3/4 with wifi -> "wlan0" is used in the code, not "eth0")
- An 0.96" Oled (ssd1306) with i2c
- Raspbian Buster Lite Image
Use "Win32Diskimager"
-
Open "config.txt" -> remove the "#" before "dtparam=spi=on" to activate SPI -> add "dtparam=i2c_vc=on" for second display/i2c bus
-
make a new textfile called "ssh" -> no .txt at the end!
-
Make a new textfile called "wpa_supplicant.conf" -> put this text in it, and edit it for your case:
country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="NETWORK-NAME"
psk="NETWORK-PASSWORD"
}
put SD-Card in your Pi Zero and let it boot (takes a few minutes)
Use Putty/Kitty (User: pi / PW: raspberry)
sudo apt-get update
sudo dpkg-reconfigure tzdata
-> Select your Timezone
sudo raspi-config
-> 5 Interfacing Options -> P5 I2C -> enable i2c
curl -sSL https://install.pi-hole.net | bash
-> follow the setup... -> note the password in the last step!
sudo apt-get install -y python3-dev python3-setuptools python3-pip libfreetype6-dev libjpeg-dev build-essential python-rpi.gpio python3-rpi.gpio libopenjp2-7 libopenjp2-7-dev libtiff5 libcurl4-openssl-dev libssl-dev git
sudo pip3 install -U pip
sudo pip3 install -U setuptools
sudo pip3 install humanize
sudo pip3 install psutil
sudo pip3 install luma.oled
git clone https://github.com/Maschine2501/PiHole-UI.git /home/pi/PiHole-UI
cd PiHole-UI
sudo cp pihole-oled.service /etc/systemd/user/
sudo systemctl enable /etc/systemd/user/pihole-oled.service
sudo systemctl start pihole-oled.service
sudo reboot
follow the installation steps above, until you finished step 3.
After Step 3 continue with this:
sudo pip3 install fritzconnection
git clone https://github.com/Maschine2501/PiHole-UI.git /home/pi/PiHole-UI
cd PiHole-UI
sudo cp pihole-nightly.service /etc/systemd/user/
sudo systemctl enable /etc/systemd/user/pihole-nightly.service
sudo systemctl start pihole-nightly.service
sudo reboot
follow the installation steps above, until you finished step 3.
After Step 3 continue with this:
sudo pip3 install fritzconnection
git clone https://github.com/Maschine2501/PiHole-UI.git /home/pi/PiHole-UI
cd PiHole-UI
sudo cp pihole-dual-z.service /etc/systemd/user/
sudo systemctl enable /etc/systemd/user/pihole-dual-z.service
sudo systemctl start pihole-dual-z.service
sudo reboot
follow the installation steps above, until you finished step 3.
After Step 3 continue with this:
sudo pip3 install fritzconnection
git clone https://github.com/Maschine2501/PiHole-UI.git /home/pi/PiHole-UI
cd PiHole-UI
sudo cp pihole-dual.service /etc/systemd/user/
sudo systemctl enable /etc/systemd/user/pihole-dual.service
sudo systemctl start pihole-dual.service
sudo reboot
follow the installation steps above, until you finished step 3.
After Step 3 continue with this:
sudo pip3 install fritzconnection
sudo pip3 install gpiozero
git clone https://github.com/Maschine2501/PiHole-UI.git /home/pi/PiHole-UI
cd PiHole-UI
sudo cp dual-test.service /etc/systemd/user/
sudo systemctl enable /etc/systemd/user/dual-test.service
sudo systemctl start dual-test.service
sudo reboot
sudo journalctl -fu pihole-oled.service
sudo journalctl -fu pihole-nightly.service
- Pi Zero:
sudo journalctl -fu pihole-dual-z.service
- Pi 2/3/4:
sudo journalctl -fu pihole-dual-z.service