santoru / pihole-dashboard

Minimal and clean dashboard to visualize some stats of Pi-Hole with an E-Ink display attached to your Raspberry Pi
GNU General Public License v3.0
125 stars 10 forks source link

No display on the e-paper since the last Pi-hole update #9

Closed Falconcrest closed 1 year ago

Falconcrest commented 1 year ago

After the last update of Pihole/adminLTE, the display on the e-paper no longer works. The same problem existed with a PiTFT and PiOLED display. The solution was communicated to me at https://github.com/pi-hole/AdminLTE/issues/2467 and consisted in the adaptation of api_url = 'http://localhost/admin/api.php?summary&auth=abcdef123456789'.

Unfortunately this doesn't work if I enter it in the init.py among
def update(): url = "http://127.0.0.1:{}/admin/api.php".format(PIHOLE_PORT) r = json.load(urllib.request.urlopen(url))

How should the adjustment be correct?

Falconcrest commented 1 year ago

Dear developer, do you see a way to adapt your script so that it works again with the current Pi-hole version?

This attempt by @rdwebdesign was not the solution yet.

I have now entered everything as described, unfortunately I get the following error message:

pi@alpenblick:~/pihole-dashboard/pihole_dashboard $ python3 __init__.py
   File "/home/pi/pihole-dashboard/pihole_dashboard/__init__.py", line 86
     try:
         ^
IndentationError: unindent does not match any outer indentation level

At the moment I still have to run pihole without a password for pihole-dasboard to work, which isn't great.

felda commented 1 year ago

I followed the installation instructions as normal and received the same error as part of this issue. I just stuffed the raw token in there where 123abc is instead of using a variable. I'm not a programmer so I didn't want to tempt fate by making it more complex than it needed to be.

url = "http://127.0.0.1:{}/admin/api.php?summaryRaw&auth=123abc".format(PIHOLE_PORT)

Pihole FTL version: v5.22 Hardware: Raspberry Pi Zero W Hat: Waveshare 2.13 v2.1

Falconcrest commented 1 year ago

@felda

Thanks for your tip, I will try it soon and give feedback if it worked for me too.

madryboy commented 1 year ago

I followed the installation instructions as normal and received the same error as part of this issue. I just stuffed the raw token in there where 123abc is instead of using a variable. I'm not a programmer so I didn't want to tempt fate by making it more complex than it needed to be.

url = "http://127.0.0.1:{}/admin/api.php?summaryRaw&auth=123abc".format(PIHOLE_PORT)

Pihole FTL version: v5.22 Hardware: Raspberry Pi Zero W Hat: Waveshare 2.13 v2.1

this works can confirm and thank you for providing the solution

santoru commented 1 year ago

Should be fixed with configuration parameters (IP, API Key) added in #11.