External pi-holes and 0.99.2, cannot configure more than one

I have 2 pi-holes running and until now was able to monitor both. With the new configuration.yaml directive, I can configure only 1 of the units.

The first does not work because you can only use the key “host” 1 time and the second does not work because the name pi_hole2 is not valid.

Can someone explain how I can see both units?

pi_hole:
  host: 192.168.1.4
  host: 192.168.1.7

    
pi_hole2:
  host: 192.168.1.7

Me too - that’s one of my problems - although can’t get my Raspbian setup to even connect to one. I’m guessing it works for the hassbian version for a single pihole instance?

It does work for a single pi-hole. The sensor names even remained the same. I have also tried the following which the config editor is happy with… but it still throws an error at boot and results in none of the pi-holes showing up.

pi_hole:
  host: 
    - 192.168.1.4
    - 192.168.1.7

I am beginning to think that they made the assumption that a person would only run 1 pi-hole and did not include the option for 2.

Sounds like a bug to me.

Even more annoying, the configurator option to restart hass does not seem to do a full restart now. It is doing something as I get new notifications, but it is not restarting the whole thing. I am having to restart via the CLI.

I’ve seen it where a component causes it not to gracefully shutdown and keep running and you have to kill the hass daemon or restart the OS to fix it.

I think that they may have tested or chosen to support only a single pihole?

I’ve tried the following in configuration.yaml

pi_hole:
  host: pihole.local
  location: admin
  ssl: true
  verify_ssl: false
2019-09-21 18:20:34 ERROR (MainThread) [hole] Can not load data from *hole: pihole.local
2019-09-21 18:20:34 ERROR (MainThread) [homeassistant.components.pi_hole] Unable to fetch data from Pi-hole
2019-09-21 18:25:55 ERROR (MainThread) [homeassistant.core] Error doing job: SSL handshake failed on verifying the certificate
Traceback (most recent call last):
  File "/usr/lib/python3.7/asyncio/sslproto.py", line 625, in _on_handshake_complete
    raise handshake_exc
  File "/usr/lib/python3.7/asyncio/sslproto.py", line 189, in feed_ssldata
    self._sslobj.do_handshake()
  File "/usr/lib/python3.7/ssl.py", line 763, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1056)
2019-09-21 18:25:55 ERROR (MainThread) [homeassistant.core] Error doing job: SSL error in data received
Traceback (most recent call last):
  File "/usr/lib/python3.7/asyncio/sslproto.py", line 526, in data_received
    ssldata, appdata = self._sslpipe.feed_ssldata(data)
  File "/usr/lib/python3.7/asyncio/sslproto.py", line 189, in feed_ssldata
    self._sslobj.do_handshake()
  File "/usr/lib/python3.7/ssl.py", line 763, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1056)
2019-09-21 18:25:55 ERROR (MainThread) [hole] Can not load data from *hole: pihole.local
2019-09-21 18:25:55 ERROR (MainThread) [homeassistant.components.pi_hole] Unable to fetch data from Pi-hole

It seems to not accept the verify_ssl command that ignores that it is a self signed certificate (and it worked in previous versions when it was in sensors.yaml.

Oddly enough… adding the following as stated below finds my lowest ip numbered pi-hole but still does not find the second.

pi_hole:

According to https://www.home-assistant.io/components/pi_hole/
It defaults to pi.hole. If you resolve pi.hole I guess you’ll get that first IP address 192.168.1.4

That is exactly what is happening. An nslookup from the home assistant cli results in that ip address.

Looks like others are wanting to support more than one pihole and have reported it!

Thanks, I was just prepping to do the same thing! This is a big oversight, or admins do not understand how these are implemented.

Hopefully it’ll be an easy fix to implement!. I’ve logged my issue too

I’ve been having the exact same issue, the PR currently in review.