Pi-Hole Integration

I’ve recently set up my Raspberry Pi Zero W to be a dedicated traffic filtering machine in my home network.
A fantastic tool for this is Pi-Hole. It blocks ads on any device in your network, improves overall network performance and allows you to monitor the traffic and statistics.

After I’ve set up my Pi0W:

  • renamed the hostname to pihole with sudo raspi-config (optional)
  • installed Pi-Hole with sudo curl -sSL https://install.pi-hole.net | bash

I started integrating it with openHAB, obviously :wink:

A few notes:

  • I don’t run openHAB and Pi-Hole on the same machine. I would strongly advise to use separate devices for performance reasons.

  • You need JSONPATH transformation add-on installed

  • You also need HTTP binding (from openHAB 1.x, since there’s no 2.x equivalent for now)

Screenshot

Files

/icons/classic/pihole.svg
Save the file from there -> https://wally3k.github.io/style/phv.svg

/services/http.cfg

Add the following lines at the bottom. Change the IP address in pihole.url parameter to match your Pi-Hole address.
Update interval is set to 10 minutes (600000 milliseconds).

pihole.url="http://192.168.X.XX/admin/api.php"
pihole.updateInterval=600000

/items/pihole.items

Group    gPiHole                      "Pi-Hole"                         <pihole>    
Number   PiHole_DomainsBeingBlocked   "Domains being blocked [%d]"      <pihole>    (gPiHole)   {http="<[pihole:100000:JSONPATH($.domains_being_blocked)]"}
Number   PiHole_DnsQueriesToday       "DNS queries today [%d]"          <chart>     (gPiHole)   {http="<[pihole:100000:JSONPATH($.dns_queries_today)]"}
Number   PiHole_AdsBlockedToday       "Ads blocked today [%d]"          <keyring>   (gPiHole)   {http="<[pihole:100000:JSONPATH($.ads_blocked_today)]"}
Number   PiHole_AdsPercentageToday    "Ads percentage today [%.2f %%]"  <keyring>   (gPiHole)   {http="<[pihole:100000:JSONPATH($.ads_percentage_today)]"}
Number   PiHole_UniqueDomains         "Unique domains [%d]"             <network>   (gPiHole)   {http="<[pihole:100000:JSONPATH($.unique_domains)]"}
Number   PiHole_QueriesForwarded      "Queries forwarded [%d]"          <chart>     (gPiHole)   {http="<[pihole:100000:JSONPATH($.queries_forwarded)]"}
Number   PiHole_QueriesCached         "Queries cached [%d]"             <wind>      (gPiHole)   {http="<[pihole:100000:JSONPATH($.queries_cached)]"}
Number   PiHole_ClientsEverSeen       "Clients ever seen [%d]"          <screen>    (gPiHole)   {http="<[pihole:100000:JSONPATH($.clients_ever_seen)]"}
Number   PiHole_UniqueClients         "Unique clients [%d]"             <screen>    (gPiHole)   {http="<[pihole:100000:JSONPATH($.unique_clients)]"}
String   PiHole_Status                "Status [%s]"                     <status>    (gPiHole)   {http="<[pihole:100000:JSONPATH($.status)]"}

sitemap

sitemap something {
...

            Frame item=gPiHole label="Pi-Hole" {
                Text item=PiHole_DomainsBeingBlocked
                Text item=PiHole_DnsQueriesToday
                Text item=PiHole_AdsBlockedToday
                Text item=PiHole_AdsPercentageToday
                Text item=PiHole_UniqueDomains
                Text item=PiHole_QueriesForwarded
                Text item=PiHole_QueriesCached
                Text item=PiHole_ClientsEverSeen
                Text item=PiHole_UniqueClients
                Text item=PiHole_Status
            }
...
}

And you’re all set!
You can now write some automation rules e.g.:

  • If Pi-Hole is disabled (PiHole_Status.state == "disabled"), do something
  • If a new client has been connected (PiHole_UniqueClients.state), flash a light or notify me
  • If number of queries cached increased (PiHole_QueriesCached), play a sound
  • And so on :wink:

Please share your automation ideas in this thread.

Bonus - dashboard link

Modify your /services/dashboard.cfg file by adding the following at the bottom:


pihole.link-name=Pi-Hole
pihole.link-url=http://192.168.X.XX/admin/
pihole.link-imageurl=data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCADTAV4DASIAAhEBAxEB/8QAHQABAAICAwEBAAAAAAAAAAAAAAcIBQYBAwQCCf/EAEMQAAICAQMBBQUFBgMECwAAAAABAgMEBQYRBxIhMUFRE2FxgZEiM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//Z

And you’ll have direct access to it from openHAB dashboard (http://youropenhab/start/index) :slight_smile:

Cheers

40 Likes

Sounds interesting and thanks for the tutorial! Maybe I should replace my bind dns server with this.

This looks great. I had a pi-hole setup before and never put it back up when I upgraded network hardware. We occasionally had a problem with it blocking some sites or features that we didn’t want blocked. It would be very helpful would be to disable pi-hole from openhab when it blocks things we dont want it to. Any thoughts on adding the disable/enable…or a disable for X minutes option?

1 Like

@B34N it could be possible, I think. But you need to generate a token each time you’re logged in, so I don’t think it’s a long-term solution at all.

  1. Go to http://yourpihole/admin/index.php?login and sign in
  2. Hit F12 and go to Console tab.
  3. Paste this code -> encodeURIComponent($('#token')[0].textContent) and hit enter.
  4. Now you’ve obtained your token.
http://yourpihole/admin/api.php?disable=10&token=YOURTOKEN

The URL above should disable Pi-Hole for 10 seconds. But as I said before, there’s no proper token management/generator in Pi-Hole API, so I’d search on Pi-Hole forums for advice.

Cheers

Awesome! :heart_eyes:

I don’t run openHAB and Pi-Hole on the same machine. I would strongly advise to use separate devices for performance reasons.

I happen to do just that since June or so (on a Raspberry Pi 3 clone) and it’s not so bad actually.

1 Like

Works like a charm!
(Except my pi-hole version is too old and doesn’t include the “total clients ever seen” and “status” properties, so I had to temporarily remove them until I update).

Also to be complete, the stats are apparently for the last 24 hours, not for “today” as the API implies:

2 Likes

@kubawolanin

I’ve installed PiHole as docker and it works perfectly with your items. Thx!

Questions:

  1. Is there a way to get the number of queries as shown in the PiHole dashboard (for storing in InfluxDB)?

  2. I see only 2 clients but I expect to see more devices. Is this because I am not using PiHole as DHCP server?

Thx for the help

Have you configured all your devices to use piHole as a DNS?
Did you confure them both on IPv4 and IPv6?

Yes, that is the item:

Number   PiHole_DnsQueriesToday       "DNS queries today [%d]"          <chart>     (gPiHole)   {http="<[pihole:100000:JSONPATH($.dns_queries_today)]"}

Add it to your persistence group

Not sure I understand “all your devices”. I have configured the router only. Do I need to configure each device (LIFX light is a device?).
Not sure but I think I saw something that says that because my router forward the DNS request , PiHole see it as the only device (this is what i see, only my router actually).

I will try to use PiHole as my DHCP (as I want to add the ability to have names and ability for presence detection). Might the issue be related to the fact that DHCP is no enabled (probably not, just to be sure)?

Thx for your help and comments

That is correct. I have a different set-up as my router can’t redirected the DNS. So I have all my web accessing device using the piHole as DNS directly.

This shows the number of queries from beginning of day (I assume). I want to have the number from last sampling time. So either I will use a rule to do the subtraction or there is a way in InfluxDB / Grafana to do it (at least to show it).

This shows the queries for the last 24 hours

The pihole icon is not working for me. I have downloaded the *.svg and renamed it to pihole.svg.

I also controlled linux owner, rights, … All like the other icons in the folder. But all other icons are *.png

Do i have to change the svg-file to a png too? I can do this with irfan view…

Yes you do,
You can choose either svg icons XOR png icons. The UI cannot show both

Thank you . awesome project!

so clearly explained and so simple to do.

it works perfectly with the pihole as dhcp.
i have a few questions:

  1. could it possible to disable the pihole domain filtering from a switch displayed in a sitemap ?

  2. for a parental control purpose, could it be possible to lock wifi or internet access for some devices from a switch?

  3. for a parental control purpose, could it be possible to lock a game access like fortnite from a switch?

@nakh_Home

This is another topic really
Everything is possible…

  • 1 - Possibly by changing the DNS in your router. Does your router has an API?
  • 2 - See 1
  • 3 - See 1 or Pihole API
1 Like

There is a new http api available, which was made public some days ago and seems to replace the existing php on some day.

Source can be found here.

Let’s wait for some more content/documentation and see what will be integrated there.
Maybe this could be extended to a binding with not only read but also write/command capabilities then.

2 Likes

Thanks but my Asus ac52u do not have API ( as far i have understood)

Quick question for those running a local DNS for LAN based name resolutions:

How would you place your PiHole DNS?

a) Client -> LAN DNS -> PiHole DNS -> Public DNS
or
b) Client -> PiHole DNS -> LAN DNS -> Public DNS

I think both options are going to work ok but I will go with (a) :slight_smile: (disadvantage is that PiHole will see only 1 client)

I use BIND with DDNS settings for my LAN

From my point of view the KAN Dns and the PiHole DNS are the same. Why would you have two dns servers in your local network?