Skip to content

MQTT connection failed due to protocol error #181

Description

@benszau

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions