I have tried setting up unifi to use it for tracking. (through configuration- integrations.). It seems to work in the sense that after setting up the password and user, I can choose my site name from the list. (I only have one, I tried bot picking it manually, and using “default”) in the webui it says “This integration has no devices.”. And i get an error in the logs, the error is in the bottom of the post. Any suggestions?
Error setting up platform unifi
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/urllib3/connection.py”, line 159, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw)
File “/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py”, line 57, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File “/usr/local/lib/python3.7/socket.py”, line 748, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name does not resolveDuring handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py”, line 600, in urlopen
chunked=chunked)
File “/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py”, line 343, in _make_request
self._validate_conn(conn)
File “/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py”, line 839, in _validate_conn
conn.connect()
File “/usr/local/lib/python3.7/site-packages/urllib3/connection.py”, line 301, in connect
conn = self._new_conn()
File “/usr/local/lib/python3.7/site-packages/urllib3/connection.py”, line 168, in _new_conn
self, “Failed to establish a new connection: %s” % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7f28c2a73c18>: Failed to establish a new connection: [Errno -2] Name does not resolveDuring handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/requests/adapters.py”, line 449, in send
timeout=timeout
File “/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py”, line 638, in urlopen
_stacktrace=sys.exc_info()[2])
File “/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py”, line 398, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host=‘unifi’, port=8443): Max retries exceeded with url: /api/login (Caused by NewConnectionError(‘<urllib3.connection.VerifiedHTTPSConnection object at 0x7f28c2a73c18>: Failed to establish a new connection: [Errno -2] Name does not resolve’))During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/homeassistant/components/device_tracker/init.py”, line 177, in async_setup_platform
platform.get_scanner, hass, {DOMAIN: p_config})
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/local/lib/python3.7/site-packages/homeassistant/components/device_tracker/unifi.py”, line 80, in get_scanner
site_id=site_id, ssl_verify=verify_ssl)
File “/usr/local/lib/python3.7/site-packages/pyunifi/controller.py”, line 89, in init
self._login()
File “/usr/local/lib/python3.7/site-packages/pyunifi/controller.py”, line 137, in _login
r = self.session.post(login_url, json=params)
File “/usr/local/lib/python3.7/site-packages/requests/sessions.py”, line 581, in post
return self.request(‘POST’, url, data=data, json=json, **kwargs)
File “/usr/local/lib/python3.7/site-packages/requests/sessions.py”, line 533, in request
resp = self.send(prep, **send_kwargs)
File “/usr/local/lib/python3.7/site-packages/requests/sessions.py”, line 646, in send
r = adapter.send(request, **kwargs)
File “/usr/local/lib/python3.7/site-packages/requests/adapters.py”, line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host=‘unifi’, port=8443): Max retries exceeded with url: /api/login (Caused by NewConnectionError(‘<urllib3.connection.VerifiedHTTPSConnection object at 0x7f28c2a73c18>: Failed to establish a new connection: [Errno -2] Name does not resolve’)