Closed EmilSepa closed 1 year ago
Same issue.
The pi-hole api has changed and now requires an apikey.
I have used the entire url with the new request and included the api key and still no love from within Fenrus. I get replies without issue using the url in the browser.
The pi-hole api has changed and now requires an apikey.
Hey @damda58 :), yeah i know, that is what i meant with "APITOKEN". I also tried @cvondra approach, before i opend the issue.
Fixed in the next version (dotnet rewrite)
Hey :) First of all, thank you for your great work 👍 I have an issue with the API Call for the SmartApp Pi-Hole.
Every time I try to set the API data, I get an error.
In the logs of Fenrus I saw that Fenrus adds
/admin/api.php
to the API URL .However, I believe that this is no longer supported in this form. If you are already logged in to PiHole in another browser tab, you can still call the API this way, but for a call without login another solution is used now (correct me if I'm wrong)
If I'm right, the API is now called like this:
/admin/api.php/?summary&auth=APITOKEN
.Therefore I have adapted the call in the file
code.js
under/app/apps/Smart/Pi-Hole
accordingly.If I now try the call via Fenrus again, an error still appears. Maybe it is because of the different JSON formatting? (see picture 1 and picture 2)
Picture 1 (API Call per
/summary/&auth=APITOKEN
)Picture 2 (API call per
/api.php
, but with login before on another browser tab)When I test it, "test result false" appears in the logs .
After saving then later in the logs appears:
13:56:23.146error in app: Pi-hole TypeError: percent.toFixed is not a function