Ubiquiti Unifi WAP, port 443, lots of errors, bug?

Hi

I’m trying to setup the Ubiquiti Unifi WAP (I already have it working but want the avoid the SSL error), by using a reverse proxy with a Let’s Encrypt cert.

I can access the unifi controller just fine in the browser by going to the URL I’m using.

If I change the host in my HASS config, it fails as it expects port 8443 (This was expected) if I add my port number (port: 443) I get this error on repeat:

[pyunifi.controller] Expecting value: line 1 column 1 (char 0)

Here is the full config for unifi:

- platform: unifi
  host: !secret unifi_url
  port: 443
  username: !secret unifi_username
  password: !secret unifi_password
  consider_home: 0:03:00
  track_new_devices: no

I have already tried using both single and double quotes around the port number, and I even tried prepending zeroes in front on the port number. (Fun fact 0443 is interpreted as port 291). As a last resort I tried encoding the port number as 443 but this gave me an error about it not being an int.

Does anyone know if there is a fix for this or if it’s a bug in the pyunifi.controller?

I am having the same SSL issue. Unifi does issue a self-signed certificate but I get the SSL error. Anyone was able to get this to work?

@cnrd

I spoke too soon. Add to your configuration verify_ssl: False
If you still want to use a certificate verify_ssl: /path to your certificate
That worked for me.

Cheers