How to activate SSL/TLS on mosquitto and hassbian

IS there any guide, walkthrough?
Thanks

any guidance? Thanks

Not a guide but the following is a redacted version of my mosquitto.conf using letsencrypt certificates:

I did that, now I have this in log. Did I do some mistakes

17-04-27 00:19:34 ERROR (MainThread) [homeassistant.setup] Error during setup of component mqtt
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/setup.py”, line 189, in _async_setup_component
result = yield from component.async_setup(hass, processed_config)
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/mqtt/init.py”, line 380, in async_setup
success = yield from hass.data[DATA_MQTT].async_connect()
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/mqtt/init.py”, line 490, in async_connect
None, self._mqttc.connect, self.broker, self.port, self.keepalive)
File “/usr/lib/python3.4/asyncio/futures.py”, line 388, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.4/asyncio/tasks.py”, line 286, in _wakeup
value = future.result()
File “/usr/lib/python3.4/asyncio/futures.py”, line 277, in result
raise self._exception
File “/usr/lib/python3.4/concurrent/futures/thread.py”, line 54, in run
result = self.fn(*self.args, **self.kwargs)
File “/home/homeassistant/.homeassistant/deps/paho/mqtt/client.py”, line 700, in connect
return self.reconnect()
File “/home/homeassistant/.homeassistant/deps/paho/mqtt/client.py”, line 822, in reconnect
sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0))
File “/usr/lib/python3.4/socket.py”, line 509, in create_connection
raise err
File “/usr/lib/python3.4/socket.py”, line 500, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

17-04-27 00:19:38 ERROR (MainThread) [homeassistant.setup] Unable to setup dependencies of sensor.mqtt. Setup failed for dependencies: mqtt
17-04-27 00:19:38 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform sensor.mqtt: Could not setup all dependencies.
17-04-27 00:19:38 ERROR (MainThread) [homeassistant.setup] Unable to setup dependencies of binary_sensor.mqtt. Setup failed for dependencies: mqtt
17-04-27 00:19:38 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform binary_sensor.mqtt: Could not setup all dependencies.
17-04-27 00:19:38 ERROR (MainThread) [homeassistant.setup] Unable to setup dependencies of camera.mqtt. Setup failed for dependencies: mqtt
17-04-27 00:19:38 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform camera.mqtt: Could not setup all dependencies.
17-04-27 00:19:38 ERROR (MainThread) [homeassistant.setup] Unable to setup dependencies of device_tracker.mqtt_json. Setup failed for dependencies: mqtt
17-04-27 00:19:38 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform device_tracker.mqtt_json: Could not setup all dependencies.
1

anyone can help on the above error?

It says connection refused.

So I added
remote_username MY USERNAME IN HASS MQTT
remote_password MYPASSWORD IN HASS MQTT

but same error

My mosquito server is running on the same server as homeassistant so I am not using SSL/TLS for it’s connection.

You can see my configuration here:

But you can access HASS from outside your home?

I can, using letsencypt +duckdns

Yes I setup port forwarding for the TLS port from outside. I just use the normal port for HASS over loopback.

I use the embedded mqtt, any solution for that?

Did you find answer to your question. I am trying to edit tls protocol version. I don’t use mqtt

Thank you