Unable to connect to mFi dh key too small

Hello,

I am new to HA and think it is a great platform so far. I went on the Ubiquiti mfi bandwagon early on and am in the process of migrating off the platform. I had already decided to jump to HA and then found out mfi is supported! Huge bonus. I am struggling getting the component to load. Here is the error I get in the log:

homeassistant.components.sensor.mfi: Unable to connect to mFi: [SSL] dh key too small (_ssl.c:600)

I did some searching and cannot find a solution. My mfi server is loaded on a mac, and my HA server is on a raspi. Any help would be great

@chorob This works for me and controls outlets very well but is under the switch component. To control light switches I had to jump through a few whoops and it is unfavorable. It does not keep track of the state.

  - platform: mfi
    host: 192.168.X.X
    port: 6443
    username: !Secret!
    password: !Secret!
    ssl: true
    verify_ssl: false

You have to fix it on the mFi Controller side. On your Mac go to applications then right click on the mfi controller app, and click Show Package Contents, then open Contents --> Resources --> conf --> and open server.xml in a text editor. You need to add the following ciphers in bold:


<Connector
port="${unifi.https.port}" minSpareThreads=“5” maxSpareThreads=“75”
enableLookups=“true”
disableUploadTimeout=“true”
compression=“on”
compressableMimeType=“text/ccs,text/html,text/javascript,application/json”
acceptCount=“100”
maxThreads=“200”
scheme=“https”
secure=“true”
SSLEnabled=“true”
keystoreFile=“data/keystore”
keystorePass="${unifi.keystore.pass}"
clientAuth=“false”
ciphers="TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA"
sslProtocol=“TLS”
protocol=“org.apache.coyote.http11.Http11NioProtocol”/>

<Connector port="${portal.http.port}" 
       connectionTimeout="20000"
       compression="on"
       compressableMimeType="text/ccs,text/html,text/javascript,application/json"
       maxThreads="200" 
							protocol="org.apache.coyote.http11.Http11NioProtocol"/>
<Connector
   port="${portal.https.port}" minSpareThreads="5" maxSpareThreads="75"
   enableLookups="true" disableUploadTimeout="true"
   compression="on"
   compressableMimeType="text/ccs,text/html,text/javascript,application/json"
   acceptCount="100"  maxThreads="200"
   scheme="https" secure="true" SSLEnabled="true"
   keystoreFile="data/keystore" keystorePass="${unifi.keystore.pass}"
   clientAuth="false" sslProtocol="TLS"

ciphers="TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA"
protocol=“org.apache.coyote.http11.Http11NioProtocol”/>

<!-- Define an AJP 1.3 Connector on port 8009
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />

I upgraded to Java 1.7 and it fixed my issue