Community Add-on: Pi-hole

Tags: #<Tag:0x00007fd078895558> #<Tag:0x00007fd078895418>


Having a issue with no long term data showing up, even after selecting different dates. I have Hassio installed on HassOS. To add to this, I do see network activity (a call to api_db.php) in Chrome’s network tool when I select a date but no information is returned.

Does this work for other people?


Is it possible to use this addon as DHCP server and keeping the configuration file that (standard) pihole has?

If yes where to put this configuration file?


:tada: Release v2.1.1

Full Changelog

  • Changed past to paste (#53) (@dayofdoom)
  • Upgrades git to 2.18.1-r0
  • Upgrades bind-tools to 9.12.3-r0
  • Upgrades openssl to 1.0.2q-r0
  • Fixes spelling mistake (#55) (@mjrider)
  • Upgrades Perl to 5.26.2-r1
  • Upgrades PHP to 7.2.10-r0
  • Upgrades Pi-hole to 4.1
  • Upgrades nginx to 1.14.2-r0

Questions? Join our Discord server!
Enjoying my add-ons? Consider supporting my work:


Currently I have my hassio and pihole systems running on two separate pi’s.

I did had and have problems running both on one device.
Lately my pi zero w with pihole running made some problems. I had to unplug it to make it work again.
Also my hassio runs on a raspi connected via ethernet (so this might my slightly faster and more reliable)
The main reason why I had to set this up, is because my router does not support nat loopback.
So I first used dnsmasq and than switched to pihole (because of its benefits).

Now I’d like to “merge” both systems to use only one ethernet connected device. So I installed the pihole addon on my hassio. (So I turned off my pi zero, changed the dns in my router to the ip of my hassio)
My setup looks the same like @tod36 posted above, but I’m facing issues with some components. Components like netamo, alexa-mediaplayer and some else don’t get connected. There is however an internet connection, because my ping sensor und Aqara componet work.

I get some errors, most about failing SSL handshakes.
I think this might be the problem (copied from one of the errors).

ssl.CertificateError: hostname 'localhost' doesn't match ‚'

How can I solve this issue?


After commenting out the pihole-sensor the ssl errors are gone.

But still most of my components can’t connect. This is one example (tado):

Error during setup of component tado
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/urllib/", line 1318, in do_open
  File "/usr/local/lib/python3.6/http/", line 1239, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/local/lib/python3.6/http/", line 1285, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.6/http/", line 1234, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.6/http/", line 1026, in _send_output
  File "/usr/local/lib/python3.6/http/", line 964, in send
  File "/usr/local/lib/python3.6/http/", line 1392, in connect
  File "/usr/local/lib/python3.6/http/", line 936, in connect
    (,self.port), self.timeout, self.source_address)
  File "/usr/local/lib/python3.6/", line 704, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
  File "/usr/local/lib/python3.6/", line 745, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Try again

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/", line 148, in _async_setup_component
    component.setup, hass, processed_config)  # type: ignore
  File "/usr/local/lib/python3.6/concurrent/futures/", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/", line 47, in setup
    tado = Tado(username, password)
  File "/usr/local/lib/python3.6/site-packages/PyTado/", line 292, in __init__
    self._loginV2(username, password)
  File "/usr/local/lib/python3.6/site-packages/PyTado/", line 154, in _loginV2
    response =
  File "/usr/local/lib/python3.6/urllib/", line 526, in open
    response = self._open(req, data)
  File "/usr/local/lib/python3.6/urllib/", line 544, in _open
    '_open', req)
  File "/usr/local/lib/python3.6/urllib/", line 504, in _call_chain
    result = func(*args)
  File "/usr/local/lib/python3.6/urllib/", line 1361, in https_open
    context=self._context, check_hostname=self._check_hostname)
  File "/usr/local/lib/python3.6/urllib/", line 1320, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [Errno -3] Try again> 

I hope someone is able to help.


any advice would be helpful.


I also have a UniFi setup with a USG. I had the same issue as you. I was beta testing the dnsmasq dhcp server in the USG. Apparently there is a bug in the local hostnames not registering or something like that. So if you are also beta testing dnsmasq turn it off and go back to the old dhcp.


thanks for the tip, but I’m not beta testing any thing on my USG.



I do not understand this now at all.
I installed the pihole as a add-on into hassio OS.

Made few conf changes ssl -> false, password and ipv6 -> false
and after
basic configuration.yaml setup.

After restarting the PI3 pihole admin-portal only works and perfectly. e.g. configurator is not available from any url.
What I am doing wrong or do not understand?


What’s the equivalent of /etc/unbound/unbound.conf.d/pi-hole.conf on Pihole within hass-io? I’m trying to resolve a Plex direct connect issue by adding private-domain: to the file according to this link. But I can’t find the file, or the docker config location to edit or to create an environmental variable to the file.


Are you still having this issue? I’m having the issue still and have tried all the combinations you tried as well.


I have the same error


I have since some days the error that i do not get any data more from pi hole.
In the past it works fine.


  • platform: pi_hole
    • ads_blocked_today
    • ads_percentage_today
    • dns_queries_today
    • domains_being_blocked
    • unique_clients
    • unique_domains
    • clients_ever_seen

Unable to fetch data from Pi-hole
22:40 components/sensor/ (ERROR)

Pi-hole Version v4.1.1 Web Interface Version v4.1.1 FTL Version v4.1.2
Any changes here ?



You need to change the sensors from sensor.pihole to sensor.pi_hole. This was a breaking change during the last update.

Here is mine


Thank you!
This was the issue.
Changed and now it works fine again.


I have the same issue. Did you find a solution?


Try adding the following to your pi hole sensor:

verify_ssl: false


Has anyone else had any luck with getting the sensor to work with ssl?


Yes. This works for me.

  - platform: pi_hole
    ssl: true
    verify_ssl: false
      - dns_queries_today
      - domains_being_blocked
      - ads_percentage_today
      - unique_domains


Thanks that works.

Is turning verify_ssl to false a security issue?


Wow. That really works.
Must have been the monitored conditions somehow although they are all optional.