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.
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:userandmqtt:passwordfor the authentication, so I have left thetlsfields 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
tlssettings are used, the values are notemptybutNone. So I could fix the issue by modifying the line:system_sensors/src/system_sensors.py
Line 279 in 21a7bb4
to:
if settings['tls']['ca_certs'] is not None and settings['tls']['ca_certs'] != '':That fixes the connection issues in my setup.