i am a beginner when it comes to openhab.
I have a raspberrypi3, installed openhab2 and installed mosquitto server and client.
I have made certificates using this guid: https://jamielinux.com/docs/openssl-certificate-authority/introduction.html
Now when i connect trou ssh to my Pi, i can send and receive massages with the following comments:
when i place the ca-chain.cert.pem on my pc en link it to MQTT.fx and connect to topic test, i also receive the massage “Hello Wold”
When i start Openhab2 and look at my openhab.log i see:
2018-04-21 21:18:35.446 [INFO ] [ternal.dhcp.DHCPPacketListenerServer] - DHCP request packet listener online
2018-04-21 21:18:37.975 [INFO ] [basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app
2018-04-21 21:18:38.107 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
2018-04-21 21:18:38.242 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2018-04-21 21:18:38.617 [INFO ] [penhab.io.transport.mqtt.MqttService] - MQTT Service initialization completed.
2018-04-21 21:18:38.620 [INFO ] [t.mqtt.internal.MqttBrokerConnection] - Starting MQTT broker connection ‘mosquitto’
2018-04-21 21:18:39.001 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Started HABmin servlet at /habmin
But when i look at the mosquitto log i see:
1524338319: New client connected from 127.0.0.1 as paho620498316594915 (c1, k60, u’openhab2’).
1524338817: Client paho620498316594915 disconnected.
1524338852: New connection from 127.0.0.1 on port 8883.
So my question, is openhab2 now connected correctly to mosquitto?
The openHAB mqtt binding doesn’t support ssl
You can set it up by following:
However, I would recommend that you start by getting everything up and running without ssl, especially if you are running mosquitto only inside your own network, there is no need to use ssl. I had to use it because I had to use a cloud server due to my stupid cellular/mobile provider.
Once you have everything up and running without ssl then by all means set it up it you still need/want to,
To my Mosquitto.conf. I am now able to connect MQTT.fx to Mosquitto without the use of a certificate.
I go play around and see iff i now get my Openhab2 connected to Mosquitto.
When i have it working i will try to get ssl working, thanks for the link.
The reason i would like ssl is that i dont what to send my username en pass over my LAN unincrypted.
i now receive this on the mosquitto.log:
1524410095: New client connected from 127.0.0.1 as paho5894986274797 (c1, k60, u’openhab2’).
1524410159: Client paho5894986274797 disconnected.
1524410190: New connection from 127.0.0.1 on port 1883.
So only the port changed, rest off massage is the same.