Pihole with miniPiTFT Screen

Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Locked
User avatar
cmaleblanc
 
Posts: 8
Joined: Mon Apr 18, 2022 11:32 am

Pihole with miniPiTFT Screen

Post by cmaleblanc »

Hi Everyone,

I've been using my Pihole for a while now, but recently had to do a full update which included the change to enter the API into the program for it to work. Everything is working fine, except for one part of the TFT screen.

if I run the "sudo python3 ~pi/stats.py" the stats will display on the screen, and the buttons will correctly swap between screens. But, it will only update/run on the pi as long as I have my CMD window open and running. Soon as I close the CMD window on my PC. The screen will freeze on the Pi. It will continue to show the information, but only the last record, the number of Ads blocked will not update or anything else. The button will also not change the screen.

I've followed the next step to create the file, which is saved to my Pi, but again, even after a reboot it won't display new information until I open a CMD, connect to the pi and run the command above.

The file is sudo nano /etc/rc.local

and found on the instructions at https://learn.adafruit.com/pi-hole-ad-b ... mini-pitft
It's the last step to getting the screen going, it seems.

I'm wondering if anyone has any advise on getting this corrected. I would rather not do a complete reinstall as I've been successfully updating the device without issue, it's just the behavior of the TFT screen that's the issue.

thanks.

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: Pihole with miniPiTFT Screen

Post by adafruit_support_carter »

Have you updated /etc/rc.local as shown?

The guide is showing two different ways of running the stats programming. Using

Code: Select all

sudo python3 ~pi/stats.py
in a terminal will run it interactively. If you close the terminal window, it will also stop the program. So the screen no longer updates.

Editing /etc/rc.local runs the program in the background at boot. So there is no need to run it interactively.

User avatar
cmaleblanc
 
Posts: 8
Joined: Mon Apr 18, 2022 11:32 am

Re: Pihole with miniPiTFT Screen

Post by cmaleblanc »

adafruit_support_carter wrote: Mon Jun 05, 2023 3:19 pm Have you updated /etc/rc.local as shown?

The guide is showing two different ways of running the stats programming. Using

Code: Select all

sudo python3 ~pi/stats.py
in a terminal will run it interactively. If you close the terminal window, it will also stop the program. So the screen no longer updates.

Editing /etc/rc.local runs the program in the background at boot. So there is no need to run it interactively.
Thanks! yes, I have updated the Stats.py per those steps. The screen will display, but will not update even after a reboot.

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: Pihole with miniPiTFT Screen

Post by adafruit_support_carter »

What version of the Pi operating system did you start with? Sounds like maybe the rc.local hack is no longer working.

User avatar
cmaleblanc
 
Posts: 8
Joined: Mon Apr 18, 2022 11:32 am

Re: Pihole with miniPiTFT Screen

Post by cmaleblanc »

adafruit_support_carter wrote: Fri Jun 09, 2023 12:11 pm What version of the Pi operating system did you start with? Sounds like maybe the rc.local hack is no longer working.
Honestly, I'm not sure, anyway I can tell from the unit. I had to break it down a few months back and update the whole thing after the API change because it wouldn't accept the -update command. Some differences in the libraries I believe. So I flattened the whole thing and rebuilt it, with the new steps on the site.

Locked
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Return to “Adafruit Raspberry Pi® accessories”