Home Assistant Community Add-on: Pi-hole

:tada: Release v2.0.1

Full Changelog

Fixed

  • Corrects incorrect permission of DHCP leases file
  • Migrates additional DNSMasq configuration on upgrade

Questions? Join our Discord server! https://discord.me/hassioaddons
Enjoying my add-ons? Consider supporting my work: https://patreon.com/frenck

I am not forwarding my 80. Do I have to do it even if Iā€™m using direct IP address?

You might want to upgrade to the new 2.0.1 version of the add-on. This new version simplifies the ports used. See the v2.0.0 release notes above.

@frenck I checked but looks its still not showing updated version on Add-on page. The latest it showing is 1.3.0, I am in PST time zone.

There is a refresh buttonā€¦ top rightā€¦ in the add-on storeā€¦

@frenck Refersh button worked, so I went through all installation again. Updated my password in config file. Restarted the add-on. Restarted HA to be on safe side. Now, when I click open web interface it takes me to https://xxxx.duckdns.org:4865 but page is not loading. You mentioned earlier that 2.0.1 handles port differently. Do I have to expose 4865 on my router?

Duckdns domain == outside world.
If you want to expose it to the outside world, youā€™d need a port forward, yes.

Generally, forward the least ports possible and use hassio.local for none forwarded stuff (and disable SSL on those non-forwarded ports as well)

So I was able to get working my putting my local IP address http://local_ip_address::4865/admin in virtual host place. Thank you very much.

Iā€™ve been curious about this for a while. Iā€™m not able to select IPv6 upstream DNS servers. The options are grayed out. I havenā€™t really worried about it, but Iā€™m seeing more and more IPv6 queries. (26%) What do I need to change to also filter these requests?

pi hole does not work for me since the updates in the last 24h. log file tell me that everything looks good but i kep getting line after line containing the following:

dnsmasq: unknown user or group: dnsmasq

i took a look at the breaking changes, and just found that I needed to add a ā€œniceā€ password.

I am not using pi hole in a very fancy way, just the default settings and protect my devices manually, by adding the dns on the device of my choice. However, I am running hassio via duckdns.

any idea?

@k1282 Sorry to hear you are experiencing problems.

Could you please provide me the logs from the start until the first youā€™ve shown occurs?

sure:

> [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
> [s6-init] ensuring user provided files have correct perms...exited 0.
> [fix-attrs.d] applying ownership & permissions fixes...
> [fix-attrs.d] 01-resolver-resolv: applying...
> [fix-attrs.d] 01-resolver-resolv: exited 0.
> [fix-attrs.d] 01-sudo: applying...
> [fix-attrs.d] 01-sudo: exited 0.
> [fix-attrs.d] 02-nginx: applying...
> [fix-attrs.d] 02-nginx: exited 0.
> [fix-attrs.d] 03-pihole: applying...
> [fix-attrs.d] 03-pihole: exited 0.
> [fix-attrs.d] done.
> [cont-init.d] executing container initialization scripts...
> [cont-init.d] 00-banner.sh: executing...
> -----------------------------------------------------------
> [Hass.io](http://hass.io/) Add-on: Pi-hole v2.0.1
> Network-wide ad blocking using your [Hass.io](http://hass.io/) instance
> From: Community [Hass.io](http://hass.io/) Add-ons
> By: Franck Nijhof <[[email protected]](mailto:[email protected])>
> -----------------------------------------------------------
> armhf / Resin OS 2.3.0+rev1 / HA 0.76.2 / SU 127 / stable
> -----------------------------------------------------------
> [cont-init.d] 00-banner.sh: exited 0.
> [cont-init.d] 01-log-level.sh: executing...
> Log level is set to INFO
> [cont-init.d] 01-log-level.sh: exited 0.
> [cont-init.d] 02-updates.sh: executing...
> INFO: You are running the latest version of this add-on
> [cont-init.d] 02-updates.sh: exited 0.
> [cont-init.d] 10-requirements.sh: executing...
> INFO: Password is NOT in the Have I Been Pwned database! Nice!
> [cont-init.d] 10-requirements.sh: exited 0.
> [cont-init.d] 20-patches.sh: executing...
> [cont-init.d] 20-patches.sh: exited 0.
> [cont-init.d] 21-v4-migration.sh: executing...
> [cont-init.d] 21-v4-migration.sh: exited 0.
> [cont-init.d] 30-pihole.sh: executing...
> [cont-init.d] 30-pihole.sh: exited 0.
> [cont-init.d] 31-pihole-ftl.sh: executing...
> [cont-init.d] 31-pihole-ftl.sh: exited 0.
> [cont-init.d] 32-nginx.sh: executing...
> [cont-init.d] 32-nginx.sh: exited 0.
> [cont-init.d] 33-password.sh: executing...
> [āœ“] New password set
> [cont-init.d] 33-password.sh: exited 0.
> [cont-init.d] 34-hostname.sh: executing...
> [cont-init.d] 34-hostname.sh: exited 0.
> [cont-init.d] 35-logfiles.sh: executing...
> [cont-init.d] 35-logfiles.sh: exited 0.
> [cont-init.d] 36-hosts.sh: executing...
> [cont-init.d] 36-hosts.sh: exited 0.
> [cont-init.d] 50-gravity.sh: executing...
> [cont-init.d] 50-gravity.sh: exited 0.
> [cont-init.d] 99-tests.sh: executing...
> dnsmasq: syntax check OK.
> [24-Aug-2018 09:07:53] NOTICE: configuration file /etc/php7/php-fpm.conf test is successful
> nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
> nginx: configuration file /etc/nginx/nginx.conf test is successful
> [cont-init.d] 99-tests.sh: exited 0.
> [cont-init.d] done.
> [services.d] starting services
> [services.d] done.
> dnsmasq: unknown user or group: dnsmasq
> dnsmasq: unknown user or group: dnsmasq
> dnsmasq: unknown user or group: dnsmasq
> dnsmasq: unknown user or group: dnsmasq

Hi,

After upgrading to 2.0.1, I got error:

Log Details (ERROR)

Fri Aug 24 2018 18:29:22 GMT+1000 (AUS Eastern Standard Time)

Unable to fetch data from Pi-hole

However on pi-hole log it seems to be OK, it started and it is working. Any idea please?

Thank you @k1282, meanwhile Iā€™ve received the same issue on GitHub, you can track the issue here:

https://github.com/hassio-addons/addon-pi-hole/issues/35

That is a weird looking error message format. Where do you get this message?
Anything in the add-on logs?

i had same issue upgrading to 2.0:
dnsmasq: unknown user or group: dnsmasq,
since iā€™ve upgraded to 2.1 itā€™s goneā€¦
Phi-hole seems to work flawless ( not fully tested)
but the Hass.io log says:
Unable to fetch data from Pi-hole

The Hassio log does not report these things. I guess you are talking about the home assistant Pi-hole component. Did you change the port number in your Component configuration?

sorry, you where right, the log itā€™s referred to home assistant log not Hass.io!
anyway, iā€™ve not changed the default ports on the config, what do you mean?

{
ā€œlog_levelā€: ā€œinfoā€,
ā€œpasswordā€: ā€œ***ā€,
ā€œupdate_lists_on_startā€: false,
ā€œadmin_portā€: 4865,
ā€œdns_portā€: 53,
ā€œsslā€: false,
ā€œcertfileā€: ā€œfullchain.pemā€,
ā€œkeyfileā€: ā€œprivkey.pemā€,
ā€œinterfaceā€: ā€œā€,
ā€œipv6ā€: true,
ā€œipv4_addressā€: ā€œā€,
ā€œipv6_addressā€: ā€œā€,
ā€œvirtual_hostā€: ā€œā€,
ā€œhostsā€: [],
ā€œhttp_portā€: 80,
ā€œhttps_portā€: 443
}

As per changelog (post above) and the breaking changes, the default admin port is now 4865. Did you change your Home Assistant pihole component configuration to match that?

Which option of the Pi-hole Sensor component should be set? Because there is no specific ā€˜portā€™-option, I assume the following should be correct?

sensor:
  - platform: pi_hole
    host: localhost:4865
    location: ""

I made this assumption knowing the used Python API sets the base_url for requests in the format of {schema}://{host}/{location}/api.php.

EDIT: see frenckā€™s post below for the correct usage. To avoid confusion I updated my example as well.

1 Like