Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MQTT connection failed due to protocol error #181

Open
benszau opened this issue Nov 16, 2024 · 0 comments
Open

MQTT connection failed due to protocol error #181

benszau opened this issue Nov 16, 2024 · 0 comments

Comments

@benszau
Copy link

benszau commented Nov 16, 2024

I have installed the script according to the documentation and used a copy of the settings_example.yaml to create my own config. I use mqtt:user and mqtt:password for the authentication, so I have left the tls fields untouched (empty).

But the connection to my HAOS MQTT broker (mosquitto) could not be established. I was able to find & fix the problem: If no tls settings are used, the values are not empty but None. So I could fix the issue by modifying the line:

if settings['tls']['ca_certs'] != '':

to:
if settings['tls']['ca_certs'] is not None and settings['tls']['ca_certs'] != '':

That fixes the connection issues in my setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant