Pi-Hole (ad blocking DNS server) Controller

Posted on
Mon Jan 03, 2022 4:44 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Pi-Hole (ad blocking DNS server) Controller

Ah good, it is working for you then :?:

Posted on
Sun Feb 06, 2022 8:43 pm
Ramias offline
Posts: 272
Joined: Nov 24, 2015

Re: Pi-Hole (ad blocking DNS server) Controller

Pi Hole devs have an open issue breaking the status ability of this plugin. Tracking here: https://github.com/pi-hole/AdminLTE/issues/2051. Workaround here: https://github.com/Ramias1/indigo-pi-hole/issues/2. though I think I'll wait for them to push a new pihole release and see if that fixes things.

Posted on
Sat May 14, 2022 9:55 am
sumocomputers offline
Posts: 267
Joined: Jun 23, 2008

Re: Pi-Hole (ad blocking DNS server) Controller

I am on:

macOS 12.3.1
Indigo 2022.1
Pi-Hole Plugin v2.0.0

I am getting this error in the log repeatedly:

Code: Select all
Pi Hole DNS Controller Error    Error in plugin execution runConcurrentThread:

  File "plugin.py", line 163, in runConcurrentThread
  File "plugin.py", line 140, in udpateStatus
type: local variable 'response' referenced before assignment

   Pi Hole DNS Controller Error    plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)

Posted on
Sat May 14, 2022 10:18 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Pi-Hole (ad blocking DNS server) Controller

Double check that the IP address is set in the configuration of the Indigo Pi-Hole device.

The plugin is setting response only if the response is PiHole is Enabled or PiHole is Disabled, so in your case it must be something else, hence the suggestion to check the IP is set correctly.

Posted on
Sat May 14, 2022 10:30 am
sumocomputers offline
Posts: 267
Joined: Jun 23, 2008

Re: Pi-Hole (ad blocking DNS server) Controller

I checked the IP addresses and they are correct.

For fun I deleted the devices and re-added them, with the same errors.

I reverted to v1.1.0 and everything works again...

Posted on
Sat May 14, 2022 10:33 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Pi-Hole (ad blocking DNS server) Controller

It was worth a try.

Actually, I am also still on V1.1.0 which is working for me on Indigo 2022.1.0. :wink:

I'll await an update on the fix for V2 before upgrading.

Posted on
Sat May 14, 2022 12:39 pm
Ramias offline
Posts: 272
Joined: Nov 24, 2015

Re: Pi-Hole (ad blocking DNS server) Controller

I will look at this today.

Posted on
Sat May 14, 2022 2:01 pm
Ramias offline
Posts: 272
Joined: Nov 24, 2015

Re: Pi-Hole (ad blocking DNS server) Controller

This is working fine for me.

Do you have your Pi Hole running on a different port?

Do you have a password set?

what do you get when you run this from your terminal?

curl http://IP_ADDRESS_OF_PI_HOLE/admin/api.php

This issue has come up before: https://github.com/Ramias1/indigo-pi-hole/issues/2

This is my version of Pi Hole that is working:

Docker Tag 2022.04.3 Pi-hole v5.10 FTL v5.15 Web Interface v5.12

Posted on
Sat May 14, 2022 2:25 pm
sumocomputers offline
Posts: 267
Joined: Jun 23, 2008

Re: Pi-Hole (ad blocking DNS server) Controller

Not running on a different port, and I do have a password for the admin interface.

Pi-hole v5.10 FTL v5.15 Web Interface v5.12

Reverting to v1.1.0 works for now.

Here is the curl output:

Code: Select all
 {"domains_being_blocked":1115427,"dns_queries_today":40191,"ads_blocked_today":3903,"ads_percentage_today":9.711129,"unique_domains":7975,"queries_forwarded":32229,"queries_cached":3980,"clients_ever_seen":53,"unique_clients":40,"dns_queries_all_types":40191,"reply_UNKNOWN":368,"reply_NODATA":7209,"reply_NXDOMAIN":1415,"reply_CNAME":13667,"reply_IP":17260,"reply_DOMAIN":219,"reply_RRNAME":0,"reply_SERVFAIL":2,"reply_REFUSED":0,"reply_NOTIMP":0,"reply_OTHER":0,"reply_DNSSEC":0,"reply_NONE":0,"reply_BLOB":51,"dns_queries_all_replies":40191,"privacy_level":0,"status":"enabled","gravity_last_updated":{"file_exists":true,"absolute":1652007927,"relative":{"days":6,"hour

Posted on
Sat May 14, 2022 2:49 pm
Ramias offline
Posts: 272
Joined: Nov 24, 2015

Re: Pi-Hole (ad blocking DNS server) Controller

Not sure what is going on. Maybe upgrade and turn on debugging and see what it shows?

Posted on
Sat May 14, 2022 3:28 pm
sumocomputers offline
Posts: 267
Joined: Jun 23, 2008

Re: Pi-Hole (ad blocking DNS server) Controller

Here is the debug output from v2.0.0:

Code: Select all
   Pi Hole DNS Controller Debug    Starting concurrent thread
   Pi Hole DNS Controller Debug    Sent "PiHole Primary" status request
   Pi Hole DNS Controller Debug    data     <!doctype html>
    <html lang='en'>
        <head>
            <meta charset='utf-8'>
            <meta name="viewport" content="width=device-width, initial-scale=1">
            <title>● 192.168.2.15</title>
            <link rel='stylesheet' href='/pihole/blockingpage.css'>
            <link rel='shortcut icon' href='/admin/img/favicons/favicon.ico' type='image/x-icon'>
        </head>
        <body id='splashpage'>
            <div id="pihole_card">
              <img src='/admin/img/logo.svg' alt='Pi-hole logo' id="pihole_logo_splash" />
              <p>Pi-<strong>hole</strong>: Your black hole for Internet advertisements</p>
              <a href='/admin'>Did you mean to go to the admin panel?</a>
            </div>
        </body>
    </html>
   Pi Hole DNS Controller Error    Error in plugin execution runConcurrentThread:

  File "plugin.py", line 163, in runConcurrentThread
  File "plugin.py", line 140, in udpateStatus
type: local variable 'response' referenced before assignment

   Pi Hole DNS Controller Error    plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)

Posted on
Sat May 14, 2022 7:41 pm
Ramias offline
Posts: 272
Joined: Nov 24, 2015

Re: Pi-Hole (ad blocking DNS server) Controller

Ok just pushed 2.0.1 and tested with a password set. Take a look now. Thanks

Posted on
Sat May 14, 2022 10:50 pm
sumocomputers offline
Posts: 267
Joined: Jun 23, 2008

Re: Pi-Hole (ad blocking DNS server) Controller

2.0.1 works. Thank you so much!

Chris

Posted on
Mon Dec 26, 2022 9:22 am
dherren offline
Posts: 32
Joined: Nov 26, 2003
Location: Shoreham, VT USA

latest version returning an error

Greetings-

I had been using this excellent plugin for as long as I've had Pi-Hole running on my network. After the update to the latest version, I'm seeing the following errors and the plugin is no longer functional;


Dec 26, 2022 at 10:12:40 AM
Enabling plugin "Pi Hole DNS Controller 2.0.1" using API v3.0
Starting plugin "Pi Hole DNS Controller 2.0.1" (pid 66734)
Started plugin "Pi Hole DNS Controller 2.0.1"
Pi Hole DNS Controller Debug deviceStartComm: Pi-Hole Ad Blocking
Pi Hole DNS Controller Debug Starting concurrent thread
Pi Hole DNS Controller Debug Sent "Pi-Hole Ad Blocking" status request
Pi Hole DNS Controller Debug Calling URL http://192.168.1.2/admin/api.php
Pi Hole DNS Controller Debug data []
Pi Hole DNS Controller Error Error in plugin execution runConcurrentThread:

File "plugin.py", line 164, in runConcurrentThread
File "plugin.py", line 141, in udpateStatus
type: local variable 'response' referenced before assignment

Pi Hole DNS Controller Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)

----

Any suggestions for what I may have done wrong? Thanks!

Posted on
Mon Dec 26, 2022 10:27 am
sumocomputers offline
Posts: 267
Joined: Jun 23, 2008

Re: Pi-Hole (ad blocking DNS server) Controller

Same here with latest PiHole update

Who is online

Users browsing this forum: No registered users and 8 guests