Ubiquiti mFI connection help

I have about 30 Ubiquiti mFi mPorts and outlets which I would like to connect to HomeAssistant.

I input the code from the website onto the configuration.yaml like so:
sensor 2:
platform: mfi
host: 10.10.10.252
port: 6443
username: admin
password: NA
ssl: false
verify_ssl: true

But I get an error in the log like so:
16-12-29 06:41:19 homeassistant.components.sensor.mfi: Unable to connect to mFi: (‘Connection aborted.’, BadStatusLine("’’",))
16-12-29 06:41:52 netdisco.ssdp: Found malformed XML at http://10.10.10.252:8080/upnp: Apache Tomcat/7.0.64 - Error report

HTTP Status 404 - /upnp.jsp


type Status report

message /upnp.jsp

description The requested resource is not available.


Apache Tomcat/7.0.64

Additionally, I have no certificate SSL on the mFi server (should I?).

Thanks so much, Jay P

UPDATE: I solved the majority of this problem. I now have to solve this following code:
16-12-31 05:04:08 homeassistant.components.switch.mfi: Unable to connect to mFi: (‘Connection aborted.’, BadStatusLine("’’",))

Does anyone know what this means and what general steps I should take to resolve this?

Thanks.

You must add a certificate to your mFi, not an easy task. It’s big mess:

Experimenting with letsencrypt and certbot now, Keep tuned in.

I eventually ended up just bypassing cerbot and doing the following. `switch:

  • platform: mfi
    host: 10.10.10.x
    username: username
    password: password
    ssl: false
    verify_ssl: false`

Jerry, did you end up with a solution using certbot to add a certificate to the Ubiquit device?

No. Not worth the trouble.