[SOLVED] Yup, another PADD + DietPi Question Topic is solved

Having issues with your DietPi installation or found a bug? Post it here.
User avatar
dwr
Posts: 35
Joined: Thu Feb 18, 2021 3:46 am

[SOLVED] Yup, another PADD + DietPi Question

Post by dwr »

---------------------------------------------------------------------------------------------------------------------
tl;dr - How do I install PADD on a Raspberry Pi 3B running Pi-Hole?
---------------------------------------------------------------------------------------------------------------------

Let me first apologize for yet another question regarding the installation and use of PADD on Diet Pi. I will say, however, that I did a thorough search of the Diet Pi Forums, Docs, as well as multiple Google searches without any results.

I have attempted to install PADD on a Raspberry Pi 3B (running Pi-Hole and Unbound) multiple times without success. I even tried on a separate Pi Zero W and Pi 4B with the same lacking results. With that said, I want to keep the amount of processes low on the Pi 3B so that Pi-Hole and Unbound can perform it's magic at full throttle (since I have fiber internet here and I want the throughput to be at it's max), so I decided to build a Pi Zero W with an attached 3.5 inch LCD Touch Panel to display PADD. As mentioned above, due to the multiple failures I encountered, I ended up simply running either 'pihole -c' or 'dietpi-cloudshell 2' (by SSH'ing into the Pi 3B) on the separate Pi Zero - the issue that I am running into now is the screen resolution on the 3.5 inch screen is waaaaay to small to read either 'pihole -c' and 'dietpi-cloudshell 2' from afar, so, here I am asking how to setup PADD since my other projects haven't worked out. I have changed multiple variables on the Pi Zero W to increase the size of the display, but again, no success (but this is not what I am looking to discuss in this post).

So, can anyone please provide a bit of clarity as to how I can go above installing PADD on the Pi 3B so that I can SSH into it with the Pi Zero W and access it?

Thanks in advance!
Last edited by dwr on Sun Jul 04, 2021 4:55 pm, edited 1 time in total.
dwr - SpicyLimes.io
User avatar
Joulinar
Posts: 5090
Joined: Sat Nov 16, 2019 12:49 am

Re: Yup, another PADD + DietPi Question

Post by Joulinar »

PADD needs to be executed directly on the system running PiHole.

How to setup is described on PiHole Github https://github.com/pi-hole/PADD

I tested via SSH. It was working fine on my RPi4B and I got PADD output on my putty session
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
dwr
Posts: 35
Joined: Thu Feb 18, 2021 3:46 am

Re: Yup, another PADD + DietPi Question

Post by dwr »

Sorry, let me clarify, I am not intending on running PADD on the Pi Zero W. My goal here is to install PADD on the Pi 3B, which is running the instance of Pi-Hole, and then SSH into the Pi 3B using the Pi Zero W and then running PADD. Last year I installed Pi-Hole on Rasp OS and ran PADD from another PC (running Linux) without issue, so I know it can be done.

Regarding the link you provided; that is the guide that I followed and had no success. Do I need to 'cd' into a specific directory and then run the 'wget'? Do I need to be installing this as the 'root' user or 'dietpi' user? I assume that it doesn't matter as far as the "user", but should I be within the '/mnt/dietpi_userdata' directory when installing, or does it even matter?
dwr - SpicyLimes.io
User avatar
dwr
Posts: 35
Joined: Thu Feb 18, 2021 3:46 am

Re: Yup, another PADD + DietPi Question

Post by dwr »

Ok, so just to prove my point, I followed the exact instructions listed on https://github.com/pi-hole/PADD.

See below for the steps I took, and the error I am getting.

Using Remmina from a remote computer, I logged into the Pi 3B via 'root' user, and ran:

1. cd ~
2. wget -N https://raw.githubusercontent.com/pi-ho ... er/padd.sh
3. sudo chmod +x padd.sh
4. nano ~/.bashrc
5. Added the following to the file, followed by 'Ctrl X', 'Y', 'Enter':

Code: Select all

	# Run PADD
	# If we’re on the PiTFT screen (ssh is xterm)
	if [ "$TERM" == "linux" ] ; then
	  while :
	  do
	    ./padd.sh
	    sleep 1
	  done
	fi
6. reboot
7. Using Remmina from a remote computer, I logged into the Pi 3B via 'root' user, and ran: 'sh padd.sh'
8. Error Message Received:

Code: Select all

root@dietpi:~# sh padd.sh
padd.sh: 26: padd.sh: declare: not found
padd.sh: 154: padd.sh: Syntax error: redirection unexpected
I tried doing the above steps within the standard 'root' directory as well as '/home/dietpi' directory. And still no luck.
dwr - SpicyLimes.io
User avatar
dwr
Posts: 35
Joined: Thu Feb 18, 2021 3:46 am

Re: Yup, another PADD + DietPi Question

Post by dwr »

Nevermind - I figured out the issue by searching for the issue in Google.

To run the PADD script, you don't need to run

Code: Select all

sh padd.sh
from the directory containing the

Code: Select all

padd.sh
script. Simply running

Code: Select all

./padd.sh
from

Code: Select all

user@dietpi~#:
does the trick.

Solved!
dwr - SpicyLimes.io
User avatar
Joulinar
Posts: 5090
Joined: Sat Nov 16, 2019 12:49 am

Re: [SOLVED] Yup, another PADD + DietPi Question

Post by Joulinar »

but I guess it is not refreshing. Or does it fresh the screen automatically? Usually you would need to place padd.sh into a loop
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
dwr
Posts: 35
Joined: Thu Feb 18, 2021 3:46 am

Re: [SOLVED] Yup, another PADD + DietPi Question

Post by dwr »

It was refreshing, but after running both PHAD and PADD on the separate Pi Zero (via SSH'ing into the Pi 3B and running either Cloudshell, PADD, or PHAD), I realized that my old (although only 32 years old) eyes were just straining too much so I went back to utilizing DietPi's Chromium Kiosk with the Pi-Hole Web GUI setup as the default view.

My final configuration works great and is easy to read from most angles. See below for the final outcome of the project - mind you, I am a Trekkie, so I attempted to make it look similar to a Borg Cube (but failed, haha, but it was good enough).
Attachments
20210706_001933927_iOS.jpg
20210706_001920370_iOS.jpg
dwr - SpicyLimes.io
User avatar
dwr
Posts: 35
Joined: Thu Feb 18, 2021 3:46 am

Re: [SOLVED] Yup, another PADD + DietPi Question

Post by dwr »

Although, I am struggling to find a solution to having the screen go blank after a certain amount time. I know that these LCD TFT screens aren't capable of completely shutting off or going into standby mode, but I have seen (many months ago) that it is possible to simply blank the screen - thoughts?
dwr - SpicyLimes.io
User avatar
Joulinar
Posts: 5090
Joined: Sat Nov 16, 2019 12:49 am

Re: [SOLVED] Yup, another PADD + DietPi Question

Post by Joulinar »

I guess you would need to activate power save mod. But I need to say, I'm not an expert on x application as all my systems are headless.

@MichaIng
any ideas? I guess something to set on xinit?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
MichaIng
Site Admin
Posts: 3088
Joined: Sat Nov 18, 2017 6:21 pm

Re: [SOLVED] Yup, another PADD + DietPi Question

Post by MichaIng »

PADD is not X application, but a terminal application like DietPi-CloudShell, so X configs/methods won't work, as long as you do not start it from within a desktop's terminal emulator or so.

PADD indeed needs to be placed into a loop as it only prints the current state and then exists.

... ah, screen blanking is for Chromium kiosk mode? In this case remove the X config which explicitly aims to disable DPMS:

Code: Select all

rm /etc/X11/xorg.conf.d/98-dietpi-disable_dpms.conf
Not sure if this has any effect on the LCD, but worth to give it a try.
Post Reply