Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sensors unavailable when HASS and UniFi run on the same node #33

Open
ualex73 opened this issue Mar 21, 2021 · 5 comments
Open

Sensors unavailable when HASS and UniFi run on the same node #33

ualex73 opened this issue Mar 21, 2021 · 5 comments

Comments

@ualex73
Copy link

ualex73 commented Mar 21, 2021

I got Home Assistant and my UniFi controller running on the same node (in Docker) and when my node is rebooted, the UniFi sensors are always unavailable. In the logging I see the following exception:

requests.exceptions.ConnectionError: HTTPSConnectionPool(host='192.168.1.1', port=8443): Max retries exceeded with url: /api/login (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fcec0af9c10>: Failed to establish a new connection: [Errno 111] Connection refused'))

@CrouchingWorm
Copy link

CrouchingWorm commented Jun 15, 2021

Same issue for me...
I used to use this as custom integration. Love it. Thanks very much.
I've since tried to use it since it was installed via HACS.
I simply un commented out the previous config, and it's failing to connect to my controller.
I'm running HAS on Debian (x86_64), with the Unifi Controller in a docker on the same machine. Current Version 0.23.1. Default ports. No cert installed.
I'm seeing this error in the HA logs:

Error while setting up unifigateway platform for sensor
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 169, in _new_conn
conn = connection.create_connection(
File "/usr/local/lib/python3.8/site-packages/urllib3/util/connection.py", line 96, in create_connection
raise err
File "/usr/local/lib/python3.8/site-packages/urllib3/util/connection.py", line 86, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
Here's my configuration.yaml extract:

  • platform: unifigateway
    username: Admin
    password: !secret unifi_gw_sysmon
    monitored_conditions:
    • www

    • wlan

    • lan

    • wan

    • firmware

I tried commenting out the host ip to see if that would help at all..

What silly mistake am I making?

Thanks in advance,

@CrouchingWorm
Copy link

hi @ualex73 I just tried again this time specifying the IP and port (8443) on my host device and everthing came up okay..

@phixion
Copy link

phixion commented Sep 29, 2021

HTTPSConnectionPool(host='192.168.1.1', port=8443):

It looks like you're trying to connect to the unifi device (i.e. router, usg udm) directly, however you have to connect to your unifi controller.

@ualex73
Copy link
Author

ualex73 commented Oct 1, 2021

@phixion I replaced the IP I used with a dummy IP (before posting on the internet), in this case 192.168.1.1.

@phixion
Copy link

phixion commented Oct 1, 2021

@phixion I replaced the IP I used with a dummy IP (before posting on the internet), in this case 192.168.1.1

oops, disregard my comment then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants