after giving up the beta version of openHab2 trying to connect securely to my mqtt broker, I was trying again with the release version. There were some great improvements like being able to set up a secure connection with client certificate connections to openHAB itself.
Unfortunately the MQTT connection problem does not seem to be solved. And that’s a bit disapointing as it was possible in OpenHAB 1.x. There it was possible doing it via the Java framework, setting the following parameters in the openhab start script (/etc/init.d/openhab):
Unfortunately I cannot seem to get these parameters working in OpenHAB2, I tried setting the options in the /usr/share/openhab2/bin/setenv as well as in /var/lib/openhab2/etc/jre.properties.
I also verified the connection working with an openssl s_client … test on the openhab2 machine. In case I do not submit the client cert the connection is closed the same way the openhab connection is. In case I provide the client cert i can connect with openssl.
I know that there is another base used with karaf but it should be possible nevertheless, right?
There are enough threads on the net connecting to mqtt from openhab1.x via SSL, but nobody seems to try to do it from 2.0.
Thank you @porsche
I was looking for this exactly and unfortunately the knowledge surrounding HB is very messy and not easy to find.
Your summary is great, but for a fairly newcomer to the platform it is a verbal summary of what needs to be done without the actual steps of how to do it.
Would it be too much to ask of you to actually write the process down in a step by step process, with the associated commands to complete this? I am sure this will be beneficial for many others as well. Especially with MQTT being extremely easy to use and simple for Home Automation, but with many security risks. I believe this is very important to make sure the implementation is also secure.