Now that I got micropython scripts to publish / subscribe to MQTT feeds to work fine using two RPI Pico_W’s, I am ready for the next step: integration of the publisher in HA. My project is to integrate various elements of floor/radiatorheating into one environment: HA.
HiveMQ has a video showing that I need to edit the configuration.yaml file AND insert a certificate somewhere in the HA file system. Scanning various forum topics on MQT, I saw that the UI is now to be used to set-up MQTT for a public broker. Ihope I understood that right.
Following those manual steps, I get stuck with a message “cannot connect” after having supplied data requested:
Host = [ HiveMQ supplied id ]
port = 1883,
user = mqtt_username,
password = mqtt_password
If I use exactly that data in my python program, it also fails with “OSError: [Errno 103] ECONNABORTED”.
When I add SSL data as follows:
mqtt_client = MQTTClient(
client_id = mqtt_client_id,
port = 8883,
server = mqtt_host,
user = mqtt_username,
password = mqtt_password,
keepalive = 7200
ssl = True,
ssl_params = {“server_hostname”:“xxx.eu.hivemq.cloud”})
as recommended in the (micropython) community and by HiveMQ I can connect, publish and subscribe allright. But HA does not enable me to supply SSL information.
Anybody who can advice me how to proceed and possibly has HA icw HiveMQ working ?. Thanks a lot !
Rob