naimo84/node-red-contrib-pi-hole-remote

[BUG]: Pi-Hole API has changed

Opened this issue · 1 comments

Describe the bug
Pi-Hole changed the API
Please see https://pi-hole.net/blog/2022/11/17/upcoming-changes-authentication-for-more-api-endpoints-required/#page-content

To Reproduce
Steps to reproduce the behavior:

  1. Use example flow
  2. Update the API key and user name credentials
  3. ECONNREFUSED is returned, like this;
3/31/2023, 11:37:05 AM[node: 7c83bfa0.af8d9](http://rp3plus:1880/#)
msg.payload : Object
{ status: "offline", error_code: "ECONNREFUSED", name: "admin", pihole: "admin" }

Test to demonstrate Pi-Hole is up and running

  1. Use a suitable text editor to create the URL as specified in the pi-hole notice
  2. Paste URL http://pi.hole/admin/api.php?status&auth=[your key] into browser
  3. Get {"status":"enabled"} back from pi-hole

Expected behavior
I expect to get the "status" back from Pi-Hole when using the example flow provided.

Hey @hrafnkel,

I've completely overseen this issue... sorry for that...

As you can see here: https://github.com/naimo84/pi-hole-remote/blob/main/src/piHoleRemoteApi.ts#L52
Every call I'm sending to pihole contains an authkey. So the problem might be somewhere else?

What do you mean by 1. Use example flow? Unfortunately I don't have an example yet 😉 I can't remember, or I'm unable to find it ^^