Page 1 of 3

Pi-Hole (ad blocking DNS server) Controller

PostPosted: Sat Apr 20, 2019 2:22 pm
by Ramias
My first released plugin. Pretty basic.

For those using pi-hole.net's local DNS ad blocking server to block ads, this will allow you to turn it on/off/toggle from an Indigo relay switch device. You can then easily publish this with Alexa Hue Bridge or Homekit Bridge to get voice control to enable/disable your ad block (for example, if the online TV shows you are watching fail to play with ad blocking enabled).

http://www.indigodomo.com/pluginstore/203/

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

PostPosted: Sat Apr 20, 2019 3:20 pm
by jalves
Thanks for this plugin! Its not anything I had thought about before but now that you've done it I can see how this will be useful!

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

PostPosted: Sat Apr 20, 2019 4:45 pm
by jay (support)

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

PostPosted: Sun Apr 21, 2019 6:34 am
by mundmc
Nice! Just what I needed: my wife occasionally needs to look at Google ad images, and it was a hassle for me to whitelist then blacklist the url. Now she can do it via Alexa via Indigo.

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

PostPosted: Sun Apr 21, 2019 11:43 am
by autolog
Fantastic on two counts :

  1. I didn't realise Pi-hole existed and
  2. There's a Plugin to Control it. :D
I have now found a use for a Raspberry pi 3 I had in stock (in truth I had forgotten about it and wasn't using it).

So, I have setup the Raspberry Pi, Installed Pi-hole and installed the Plugin. Just doing intial testing on my MacBook before I switch the router across to use it.

Thanks for the plugin and heads-up on Pi-hole. :D

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

PostPosted: Sun Apr 21, 2019 1:57 pm
by Ramias
I am a big fan of PiHole. I run it as a docker container on my NAS now. It would choke up around 10pm at night for some reason on the Pi. Probably IO issues with the SD card.

Before I wrote the plugin I had a Virtual Device that invoked an ENABLE and a DISABLE action (just a line or two of python code for those actions) but it wouldn't work from Homekit Bridge (but it did with Alexa) so I just hacked together the plugin.

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

PostPosted: Sun Apr 21, 2019 5:44 pm
by johnfdl
Thanks for this. I use one of my Raspberry PiBeacon's installed with PiHole. I've installed the plug-in, but unsure how I control it I created a device for it with my Pi's IP address and password. So how do I disable the PiHole?

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

PostPosted: Sun Apr 21, 2019 6:00 pm
by siclark
Sounds great but I've just wasted 3 hours until 1am trying to install this onto a piBeacon pi. Giving up and going to recreate the SSD tomorrow and try again.
Sometimes you just wish you hadn't started something!!


Sent from my iPhone using Tapatalk

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

PostPosted: Sun Apr 21, 2019 6:40 pm
by mundmc
siclark wrote:
Sounds great but I've just wasted 3 hours until 1am trying to install this onto a piBeacon pi. Giving up and going to recreate the SSD tomorrow and try again.
Sometimes you just wish you hadn't started something!!


Sent from my iPhone using Tapatalk


Out of curiosity, where did you hit a road block? I used to use 2 piBeacons, but I never tried to tweak the actual disk image I downloaded.

Curiosity aside, it’s still worth your endeavors. When I’m not home, I VPN in to my network for no other reason than to benefit from pihole’s DNS server.

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

PostPosted: Sun Apr 21, 2019 6:47 pm
by johnfdl
johnfdl wrote:
Thanks for this. I use one of my Raspberry PiBeacon's installed with PiHole. I've installed the plug-in, but unsure how I control it I created a device for it with my Pi's IP address and password. So how do I disable the PiHole?


Duh.....turn device off to disable, turn on to enable.

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

PostPosted: Sun Apr 21, 2019 8:53 pm
by Ramias
johnfdl wrote:
johnfdl wrote:
Thanks for this. I use one of my Raspberry PiBeacon's installed with PiHole. I've installed the plug-in, but unsure how I control it I created a device for it with my Pi's IP address and password. So how do I disable the PiHole?


Duh.....turn device off to disable, turn on to enable.


Yep you got it.

The main (and probably only) purpose for this is for voice enablement of Pi Hole via he Alexa or HomeKit plug-ins.

Unless you wanted to schedule enabling or disabling; or always turn in at midnight in case you disabled during the day and forgot to reenable.

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

PostPosted: Mon Apr 22, 2019 12:37 am
by siclark
mundmc wrote:
siclark wrote:
Sounds great but I've just wasted 3 hours until 1am trying to install this onto a piBeacon pi. Giving up and going to recreate the SSD tomorrow and try again.
Sometimes you just wish you hadn't started something!!


Sent from my iPhone using Tapatalk


Out of curiosity, where did you hit a road block? I used to use 2 piBeacons, but I never tried to tweak the actual disk image I downloaded.

Curiosity aside, it’s still worth your endeavors. When I’m not home, I VPN in to my network for no other reason than to benefit from pihole’s DNS server.


First pi it had issues with dialog not being installed that caused lots of issues. Eventually got that solved and everything uninstalled so I could reinstall it. That took 2 hours of trial and error.
Then it got half way and I had to manually install the components as the loader failed half way.
Once that done it then fully installed with all the screens appearing. I got to end with the password but got 403 forbidden error loading the admin webpage.

Curiously it installed fully in 5 mins on another pi but that one is more likely to be turned off and unplugged so wanted the original one running it. Might use the other as backup.


Sent from my iPhone using Tapatalk

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

PostPosted: Mon Apr 22, 2019 5:42 am
by johnfdl
Ramias wrote:
johnfdl wrote:
johnfdl wrote:
Thanks for this. I use one of my Raspberry PiBeacon's installed with PiHole. I've installed the plug-in, but unsure how I control it I created a device for it with my Pi's IP address and password. So how do I disable the PiHole?


Duh.....turn device off to disable, turn on to enable.


Yep you got it.

The main (and probably only) purpose for this is for voice enablement of Pi Hole via he Alexa or HomeKit plug-ins.

Unless you wanted to schedule enabling or disabling; or always turn in at midnight in case you disabled during the day and forgot to reenable.

Yes, it's now voice enabled on Alexa and the family (and I) am happy that they no longer need to ask me to turn it off so they can click on ebates links.

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

PostPosted: Thu Apr 25, 2019 7:29 am
by Professor Falken
This is great, thanks. I remember reading about Pi-Hole a while back, but then sort-of forgot about it. This new plugin spurred me to get a Pi, install it, then make it controllable from our Indigo dashboard control page, which the rest of the family will appreciate.

Still waiting to see if it breaks anything important. So far I like it, and may find that I VPN back home when out to utilize the filtering.

As you suggested, I also put in a midnight re-enable command in Indigo.

Thanks for writing the plugin.

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

PostPosted: Sat Apr 27, 2019 6:16 am
by Professor Falken
So I am still playing with this, but in order to keep from too much family conflict, I've pointed the router back to the regular DNS servers for the time being. The Pi-Hole was blocking too much legit traffic , especially links in emails that they want to follow (it's probably blocking them because they're full of tracking cookies, but I'm not sure I can change human behavior nearly as easily as installing network hardware).

What I can't figure out is why it would continue to cause trouble even after I had disabled it using the web console. I assume that just cuts the filters and uses the downstream DNS, which I set to be our exact same previous one. I may try doing a clean install this weekend and see if that helps. It's possible that the micro SD card I used may have been a bit sketchy-- I seem to remember that that one may have given me some trouble in my drone a while a back. Anyway, this is probably a question more for the Pi-Hole forums than here.

But I do have an Indigo issue to ask about. Somewhat anticipating a little bit of growing pains as I searched for some limited "whitelist" items, etc., I put a toggle switch on our main CP dashboard to allow me or my wife to turn it off when it was blocking something that we wanted to see. The action on the CP element (a simple switch tied to the device state) was set to "toggle" the On/Off state of the pi-hole device. When I click the item, it will briefly turn the device off, but it almost immediately toggles right back on. I don't get this behavior when I use the turn-off or turn-on buttons in the device window in Indigo. So I assume it has something to do with the "toggle" command.

I could CP-design around this, I assume, by making separate On and Off buttons on the CP instead of a switch, but that's obviously less elegant. Is there a reason why the toggle command wouldn't work for a device but the On and Off commands would?

Thanks