Home Assistant Community Add-on: Pi-hole

Hi @frenck I just wanted to clarify something…
I had thought that with a generic linux install of hass.io, I need to keep the OS (Debian in my case) up-to-date using the first command (and apt-get upgrade) which will also update docker and then just use the Hass.io update option to update Hassio? The second and third commands seem to be installing dependencies and then hassio all over again…

I’m getting the same errors as you but I can’t understand how you solved it… my config looks like this:

  - platform: pi_hole
    host: localhost:4865
    monitored_conditions:
      - ads_blocked_today
      - dns_queries_today
      - unique_clients

isn’t the default location admin anymore?

It wasn’t for a while, this is fixed in v2.0.2 (the dashboard can now be accessed either way).

I’ve had a pi-hole for years. I’m new to HA.
Can I use your sensor setting to point to my old pi-hole in my new HA?
If so, would the port# be the same as yours or is it the web port I’m currently using?

  - platform: pi_hole
    host: localhost:4865
    monitored_conditions:
      - ads_blocked_today
      - dns_queries_today
      - unique_clients

you can never have too many RPis

You can, a simple Pi-hole only install uses port 80 by default.
Make sure to set the host: to the correct IP, e.g. host: 192.168.1.20 without port.

cool, I’ll try it when I get home.

:tada: Release v2.0.4

Sorry for not posting regular release notes. Since I’m on a holiday and working of a 4G connection.

The dnsmasq user issue has been resolved in this release. Also v2.0.3 (unnannouced) fixes an issue with a none working secrets functionality.

Please forgive me for the issues this might have caused.

3 Likes

Unfortunately 2.0.4 still doesn’t show up under hassio community repo after refreshing, anyone care to tell a noob how to pull this container into my hass.io or how to install this latest version through hassio cli?

After upgrade to 2.0.3 error again and sensor is not working, great, at least pi-hole is doing it’s job.

Unable to fetch data from Pi-hole

‎11‎:‎00‎ ‎AM components/sensor/pi_hole.py (ERROR)
Can not load data from *hole: localhost
‎11‎:‎00‎ ‎AM core.py (ERROR)

Refresh again :wink:

1 Like

Mine wasn’'t a reply addressed to you specifically so you could ignore it and continue enjoying your holidays. :smile:

Anyway now the dnsmasq issue is gone for good, thanks a lot.

I fixed it again, I replaced localhost for my raspi ip address where pi-hole is installed and magically it worked.

host: 192.168.1.100:4865

So happy ending again.

1 Like

Just updated and rebooted but I still get the same error:

2018-08-28 18:07:20 ERROR (MainThread) [hole] Can not load data from *hole: 192.168.1.119:4865
2018-08-28 18:07:20 ERROR (MainThread) [homeassistant.components.sensor.pi_hole] Unable to fetch data from Pi-hole

Config is

  - platform: pi_hole
    host: 192.168.1.119:4865
    monitored_conditions:
      - ads_blocked_today
      - dns_queries_today
      - unique_clients

Please provide your addon configuration

Ah sorry, here it is!

{
  "log_level": "info",
  "password": "SuperS3cretPazz",
  "update_lists_on_start": false,
  "admin_port": 4865,
  "dns_port": 53,
  "ssl": true,
  "certfile": "fullchain.pem",
  "keyfile": "privkey.pem",
  "interface": "",
  "ipv6": true,
  "ipv4_address": "",
  "ipv6_address": "",
  "virtual_host": "",
  "hosts": []
}

Can I just ask…is this a good idea? Adding a Pi-Hole to the Hass? It’s not going to overload Hass??

@daneboom that question has been asked and answered multiple time in this thread, please use the search before asking questions.

2 Likes

I can’t state that I know the resource consumption rate of this addon. But one would imagine that the overloading scenario depends on how many machines and how many queries those machines request.

BTW @frenck , my pi-hole sensors don’t work either, here’s my addon config:

{
  "log_level": "info",
  "password": "the password",
  "update_lists_on_start": true,
  "admin_port": 4865,
  "dns_port": 53,
  "ssl": true,
  "certfile": "fullchain.pem",
  "keyfile": "privkey.pem",
  "interface": "enp0s3",
  "ipv6": true,
  "ipv4_address": "192.168.1.60",
  "ipv6_address": "",
  "virtual_host": "MYSUBDOMAIN.duckdns.org",
  "hosts": []
}

I’ve tried restricting to one interface or leaving it on auto, same result

Heres the excerpt from sensors.yaml:

  - platform: pi_hole
    host: MYSUBDOMAIN.duckdns.org:4865 #I tried w/o port and as internal IP w & w/o port same result
    monitored_conditions:
      - ads_blocked_today
      - dns_queries_today
      - unique_clients

It must be the machine HASS is installed on that decide how it can handle the Pihole, not Hass. On my nuc the use of resources for Pihole is no noticeable

Is your Pi-Hole webpage accessible via DuckDNS ?

My Pi-Hole sensors weren’t updating either - and so the hosts entry I’ve had to use in sensors to get them displaying correctly is 192.168.1.233:4865. Now that’s obviously a non DuckDNS address … but something is a bit weird with an internal network address exposed by the Pi-Hole container. 233 is not the address of my HomeAssistant machine either … see