Unifi SSL certificate verify failed

Hi, I use the platform: unifi as a device_tracker.
This worked unitil 0.39.

Now it shows errors… any hints for solution?

ERROR (MainThread) [homeassistant.components.device_tracker] Error setting up platform unifi
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connectionpool.py", line 345, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connectionpool.py", line 844, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connection.py", line 326, in connect
    ssl_context=context)
  File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/util/ssl_.py", line 324, in ssl_wrap_socket
    return context.wrap_socket(sock, server_hostname=server_hostname)
  File "/usr/lib/python3.4/ssl.py", line 364, in wrap_socket
    _context=self)
  File "/usr/lib/python3.4/ssl.py", line 577, in __init__
    self.do_handshake()
  File "/usr/lib/python3.4/ssl.py", line 804, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)

I see this as well. Haven’t had a chance to look into it at all yet though.

Same here, using a self signed cert. Can’t seem to find how to trust this :confused:

Just add verify_ssl: False to your Unifi config entry and it should work.

  - platform: unifi
    host: 192.168.2.163
    username: !secret unifi_username
    password: !secret unifi_password
    verify_ssl: False
2 Likes

Thanks!
That did the trick… shouldn’t this be in the docs?

Works, thanks!
Should definitely be mentioned in https://home-assistant.io/components/device_tracker.unifi/

It should be in the docs soon.

Thanks for this! I ran into the same problem upgrading from 0.38.4 to 0.42.2. Adding ‘verify_ssl: False’ to configuration.yaml seems to have fixed it.

This suggestion of disabling the verification of SSL worked for me.
Thank you

Thank you for this. Still not in the docs.

I’m completely new to Home Assistant.
I dont understand where should I add the config verify_ssl: False
I run Home Assistant from Virtual Box
Please help