I just bought a Pi-Hole with the TFT display https://www.adafruit.com/product/4475. The project page https://learn.adafruit.com/pi-hole-ad-b ... w?view=all describes an OLED display. Not surprisingly, while the pi-hole software works (web page coming up), the display remains dark.
Is there a page I missed for the pi-hole with the Mini TFT display?
PI-hole Mini PiTFT issue
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- Didier9
- Posts: 17
- Joined: Sat Jan 04, 2020 9:51 am
Re: PI-hole Mini PiTFT issue
Further information: I have a second R-Pi W with the NOOB distribution. I have installed the Mini PiTFT LCD drivers per this page:
https://learn.adafruit.com/adafruit-min ... thon-setup
and the LCD works. I tried it with the stat.py script from that page:
https://learn.adafruit.com/adafruit-min ... thon-stats
but after I installed the same libraries on the pi-hole, the LCD is still not working, even with the LCD example rgb_display_minipitfttest.py
Maybe I need to restart from scratch because I did not install in the proper order?
https://learn.adafruit.com/adafruit-min ... thon-setup
and the LCD works. I tried it with the stat.py script from that page:
https://learn.adafruit.com/adafruit-min ... thon-stats
but after I installed the same libraries on the pi-hole, the LCD is still not working, even with the LCD example rgb_display_minipitfttest.py
Maybe I need to restart from scratch because I did not install in the proper order?
- Didier9
- Posts: 17
- Joined: Sat Jan 04, 2020 9:51 am
Re: PI-hole Mini PiTFT issue
Or maybe installing the OLED library was a mistake since this is an LCD even though I did eventually install the LCD library?
It would be helpful to have installation instructions for the actual hardware that is being sold.
Otherwise I like the little color LCD display, colors are bright and text is crisp.
It would be helpful to have installation instructions for the actual hardware that is being sold.
Otherwise I like the little color LCD display, colors are bright and text is crisp.
- brubell
- Learn User Page
- Posts: 2017
- Joined: Fri Jul 17, 2015 10:33 pm
Re: PI-hole Mini PiTFT issue
There are instructions for it - are you not able to see this page?
https://learn.adafruit.com/pi-hole-ad-b ... mini-pitft
- brent r.
https://learn.adafruit.com/pi-hole-ad-b ... mini-pitft
- brent r.
- Didier9
- Posts: 17
- Joined: Sat Jan 04, 2020 9:51 am
Re: PI-hole Mini PiTFT issue
This appears to point to the same pages I used to install the LCD library. As I wrote in my earlier posting, I was able to get the mini TFT display to work on the second R-Pi I have with the NOOB distribution, but not on the pi-hole. I suspect that since I first installed the OLED library on the pi-hole as instructed, the LCD library did not get associated with the pi-hole.brubell wrote:There are instructions for it - are you not able to see this page?
https://learn.adafruit.com/pi-hole-ad-b ... mini-pitft
- brent r.
It would be nice to have a set of instructions from start to finish specifically for the LCD, where the OLED library is not installed. I suspect there may be some interaction between the two.
I was not planning on making a big experiment out of this, I wanted to see how effective it was at eliminating ads, the LCD was just something extra I wanted to evaluate. I can still check the pi-hole as an ad blocker since it looks like the pi-hole software works (the web server works) but because of the distraction with the LCD, I have spent most of my weekend fooling with the LCD and did not actually manage to check the pi-hole main functionality...
I bought the second display for the other R-Pi-W I already had and it is working there, so I know I can't be very far.
- brubell
- Learn User Page
- Posts: 2017
- Joined: Fri Jul 17, 2015 10:33 pm
Re: PI-hole Mini PiTFT issue
You may try uninstalling the OLED library by running sudo pip3 uninstall adafruit-circuitpython-ssd1306, although I do not see why there would be a conflict. The code only imports the library (and initializes the LCD) which it's using.It would be nice to have a set of instructions from start to finish specifically for the LCD, where the OLED library is not installed. I suspect there may be some interaction between the two.
It may be possible that your PiTFT is defective or plugged in incorrectly. Are you able to see anything on the display if you run: sudo python3 stats.pyI was not planning on making a big experiment out of this, I wanted to see how effective it was at eliminating ads, the LCD was just something extra I wanted to evaluate. I can still check the pi-hole as an ad blocker since it looks like the pi-hole software works (the web server works) but because of the distraction with the LCD, I have spent most of my weekend fooling with the LCD and did not actually manage to check the pi-hole main functionality...
Could you please post the code for the LCD you're running below?
- Didier9
- Posts: 17
- Joined: Sat Jan 04, 2020 9:51 am
Re: PI-hole Mini PiTFT issue
The LCD code that is running on the NOOB distro is the stats.py example: https://learn.adafruit.com/adafruit-min ... thon-stats
I installed the LCD library per the tutorial there: https://learn.adafruit.com/adafruit-min ... thon-setup
I did not do the kernel install.
I have swapped the SD cards between the two RPi and the problem follows the pi-hole card so the hardware seems OK for both boards. I also swapped the LCD displays and both work when plugged into the NOOB board (I have been doing this long enough that I know better than to have just one of anything if I am serious about it :) I am not using the serial interface so the only thing plugged into the board is the USB connector for power. It is not even plugged into the computer, just a 2A USB charger.
I can access both devices via SSH, there was no issue connecting and the one with the pi-hole installation does have the web server running apparently normally.
I will try uninstalling the OLED library later today.
I have installed the same LCD library and stats.py on the pi-hole (or at least I believe I did). When I try to run the stats.py script on the pi-hole, I get this:
"No I2C device at address: 3c"
I must have missed something during installation of the LCD stuff.
I installed the LCD library per the tutorial there: https://learn.adafruit.com/adafruit-min ... thon-setup
I did not do the kernel install.
I have swapped the SD cards between the two RPi and the problem follows the pi-hole card so the hardware seems OK for both boards. I also swapped the LCD displays and both work when plugged into the NOOB board (I have been doing this long enough that I know better than to have just one of anything if I am serious about it :) I am not using the serial interface so the only thing plugged into the board is the USB connector for power. It is not even plugged into the computer, just a 2A USB charger.
I can access both devices via SSH, there was no issue connecting and the one with the pi-hole installation does have the web server running apparently normally.
I will try uninstalling the OLED library later today.
I have installed the same LCD library and stats.py on the pi-hole (or at least I believe I did). When I try to run the stats.py script on the pi-hole, I get this:
Code: Select all
pi@pi-hole:~ $ sudo python3 stats.py
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/adafruit_bus_device/i2c_device.py", line 163, in __probe_for_device
self.i2c.writeto(self.device_address, b'')
File "/usr/local/lib/python3.7/dist-packages/busio.py", line 84, in writeto
return self._i2c.writeto(address, buffer, stop=stop)
File "/usr/local/lib/python3.7/dist-packages/adafruit_blinka/microcontroller/generic_linux/i2c.py", line 38, in writeto
self._i2c_bus.write_bytes(address, buffer[start:end])
File "/usr/local/lib/python3.7/dist-packages/Adafruit_PureIO/smbus.py", line 256, in write_bytes
self._device.write(buf)
OSError: [Errno 121] Remote I/O error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/adafruit_bus_device/i2c_device.py", line 169, in __probe_for_device
self.i2c.readfrom_into(self.device_address, result)
File "/usr/local/lib/python3.7/dist-packages/busio.py", line 74, in readfrom_into
return self._i2c.readfrom_into(address, buffer, stop=stop)
File "/usr/local/lib/python3.7/dist-packages/adafruit_blinka/microcontroller/generic_linux/i2c.py", line 44, in readfrom_into
readin = self._i2c_bus.read_bytes(address, end-start)
File "/usr/local/lib/python3.7/dist-packages/Adafruit_PureIO/smbus.py", line 155, in read_bytes
return self._device.read(number)
OSError: [Errno 121] Remote I/O error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "stats.py", line 50, in <module>
disp = adafruit_ssd1306.SSD1306_I2C(128, 32, i2c)
File "/usr/local/lib/python3.7/dist-packages/adafruit_ssd1306.py", line 181, in __init__
self.i2c_device = i2c_device.I2CDevice(i2c, addr)
File "/usr/local/lib/python3.7/dist-packages/adafruit_bus_device/i2c_device.py", line 67, in __init__
self.__probe_for_device()
File "/usr/local/lib/python3.7/dist-packages/adafruit_bus_device/i2c_device.py", line 171, in __probe_for_device
raise ValueError("No I2C device at address: %x" % self.device_address)
ValueError: No I2C device at address: 3c
pi@pi-hole:~ $
I must have missed something during installation of the LCD stuff.
- brubell
- Learn User Page
- Posts: 2017
- Joined: Fri Jul 17, 2015 10:33 pm
Re: PI-hole Mini PiTFT issue
Are the I2C/SPI interfaces enabled?ValueError: No I2C device at address: 3c
What do you get when you run: ls /dev/i2c* /dev/spi*
- Didier9
- Posts: 17
- Joined: Sat Jan 04, 2020 9:51 am
Re: PI-hole Mini PiTFT issue
Yes they are:
I verified one more time that I can swap the displays between the two units and either display works on the unit with the NOOBS distro.
Code: Select all
pi@pi-hole:~ $ ls /dev/i2c* /dev/spi*
/dev/i2c-1 /dev/spidev0.0 /dev/spidev0.1
- brubell
- Learn User Page
- Posts: 2017
- Joined: Fri Jul 17, 2015 10:33 pm
Re: PI-hole Mini PiTFT issue
Which distro is on the working SD card? Narrowing it down...
- Didier9
- Posts: 17
- Joined: Sat Jan 04, 2020 9:51 am
Re: PI-hole Mini PiTFT issue
Raspbian 9 (stretch)
- brubell
- Learn User Page
- Posts: 2017
- Joined: Fri Jul 17, 2015 10:33 pm
Re: PI-hole Mini PiTFT issue
OH!
You're running the SSD1306 OLED version of Stats.py, not the one for the PiTFT. It's looking for the OLED display, which doesn't exist.
You need to run...
Then, save the code below as stats.py in your home directory on your Raspberry Pi.
https://github.com/adafruit/Adafruit_Ci ... ftstats.py
and run sudo python3 stats.py
Code: Select all
Traceback (most recent call last):
File "stats.py", line 50, in <module>
disp = [b]adafruit_ssd1306[/b].SSD1306_I2C(128, 32, i2c)
File "/usr/local/lib/python3.7/dist-packages/adafruit_ssd1306.py", line 181, in __init__
self.i2c_device = i2c_device.I2CDevice(i2c, addr)
File "/usr/local/lib/python3.7/dist-packages/adafruit_bus_devic
You need to run...
Code: Select all
sudo pip3 install adafruit-circuitpython-rgb-display
sudo pip3 install --upgrade --force-reinstall spidev
Then, save the code below as stats.py in your home directory on your Raspberry Pi.
https://github.com/adafruit/Adafruit_Ci ... ftstats.py
and run sudo python3 stats.py
- Didier9
- Posts: 17
- Joined: Sat Jan 04, 2020 9:51 am
Re: PI-hole Mini PiTFT issue
Well, it looked like this should have been it.
But no dice. I do not get any error message any more but the display is still dark. The script is not crashing.
Rebooted for good measure, same thing :(
I also tried the minipitfttest.py script and that also does not work on this unit (it works on the other distro).
I looked in /var/log/messages and syslog for any relevant info but did not see anything.
So there is still something missing.
I feel bad your spending so much time on this. Feel free to go to more productive endeavors...
I will use it as is, the web interface is just fine but I would encourage Adafruit to have an install procedure for the display that is being sold with the kit.
Sometimes I buy things with the clear purpose to tinker with them. At other times, I just want to evaluate the product. This was the latter case.
On the positive side, I have actually been using the pi-hole as the ad blocking DNS server it is supposed to be (its intended purpose) and it works fine!
That was my main goal so I will call it success!
Thank you for your efforts!
But no dice. I do not get any error message any more but the display is still dark. The script is not crashing.
Rebooted for good measure, same thing :(
I also tried the minipitfttest.py script and that also does not work on this unit (it works on the other distro).
I looked in /var/log/messages and syslog for any relevant info but did not see anything.
So there is still something missing.
I feel bad your spending so much time on this. Feel free to go to more productive endeavors...
I will use it as is, the web interface is just fine but I would encourage Adafruit to have an install procedure for the display that is being sold with the kit.
Sometimes I buy things with the clear purpose to tinker with them. At other times, I just want to evaluate the product. This was the latter case.
On the positive side, I have actually been using the pi-hole as the ad blocking DNS server it is supposed to be (its intended purpose) and it works fine!
That was my main goal so I will call it success!
Thank you for your efforts!
- brubell
- Learn User Page
- Posts: 2017
- Joined: Fri Jul 17, 2015 10:33 pm
Re: PI-hole Mini PiTFT issue
This is very productive for me - I wrote the guide and would like to make sure you and others get your projects working.I feel bad your spending so much time on this. Feel free to go to more productive endeavors...
Would it be possible for you to wipe the distro and re-install everything according to the guide (TFT first, verify TFT, then Pi-Hole)?
If not - totally OK, I'll do it myself.
- Didier9
- Posts: 17
- Joined: Sat Jan 04, 2020 9:51 am
Re: PI-hole Mini PiTFT issue
I will be glad to try. should have it done today and I will let you know.
Please be positive and constructive with your questions and comments.