Closed Falconcrest closed 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.
around line 35, add PIHOLE_APITOKEN
:
PIHOLE_PORT = 80
PIHOLE_APITOKEN = "abcdef123456789"
Inside the update()
function, add ?summaryRaw&auth={}
to the URL and add PIHOLE_APITOKEN
to .format()
def update():
url = "http://127.0.0.1:{}/admin/api.php?summaryRaw&auth={}".format(PIHOLE_PORT, PIHOLE_APITOKEN)
r = json.load(urllib.request.urlopen(url))
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.
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
@felda
Thanks for your tip, I will try it soon and give feedback if it worked for me too.
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
Should be fixed with configuration parameters (IP, API Key) added in #11.
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?