Closed cjbaar closed 1 hour ago
Hey there @emontnemery, @jbouwh, @bdraco, mind taking a look at this issue as it has been labeled with an integration (mqtt
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
mqtt documentation mqtt source (message by IssueLinks)
You need to enable advanced options. https://www.home-assistant.io/integrations/mqtt/#advanced-broker-configuration This will allow you to set a TLS and certificate options through the UI.
Thanks. So, I figured out I have to enable "advanced" features for my user profile before those show up. Not super-intuitive, but I see the advanced MQTT options now. I have tried certificate validation set to Off, Auto, and Custom, but none connect. When using Custom, I am uploading the CA for my letsencrypt cert. Is this what it needs? I am not trying to use client cert-based authentication.
OK, well I tried going back to "Auto" after uploading the custom cert, and now it seems to connect. Not sure if that is the intended setup. Thanks for the quick assistance.
If you run a broker for own use, it might consider to install a self signed certificate, but Let's Encrypt should work as well. For Lets Encrypt Auto
is the way to go, as it will use the trusted public certs as a base to validate.
To use client based authentication you probably end up signing those against a self signed root,
The problem
I am attempting to use the MQTT integration with TLS/SSL. I have a mosquitto broker configured with a certificate from LetsEncrypt, and I have successfully tested connecting over the secure connection with the local
mosquitto_sub
command. However, attempting to connect to the same host and port within the HA GUI fails without explanation. The mosquitto logs show "error:0A00010B:SSL routines::wrong version number."When I search this issue, the related content seems to indicate that home assistant needs to be configured with a CA cert. When I do this through configuration.yaml, as shown on multiple posts, I get similar errors in the HA logs:
The 'broker' option near /config/configuration.yaml:38 has been removed, please remove it from your configuration 'mqtt->0'
But there is not GUI options for providing certs or enabling SSL. What is the proper way to configure these settings for secure communication with the MQTT broker?
What version of Home Assistant Core has the issue?
core-2024.11.1
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Container
Integration causing the issue
mqtt
Link to integration documentation on our website
https://www.home-assistant.io/integrations/mqtt/
Diagnostics information
No response
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
No response