Hi,
I am trying to connect to via MQTT to HiveMQ cloud broker(free tier) through my agent but i constantly get:
ERROR: Failed to connect to ssl://XXXX.s1.eu.hivemq.cloud:8883 Error: Socket Error -1
Wiring it up as the docs state:
local client = mqtt.createclient();
function onConnect(resultCode) {
// Called when the client connects (or fails to connect) to the MQTT broker
if (resultCode == 0) {
.....
} else {
server.error("Failed to connect to " + fullPath + " Error: " + error(resultCode) + " " + resultCode);
}
}
.
.
client.onconnect(onConnect.bindenv(this));
local options = {};
options.username <- UN;
options.password <- PW;
client.connect(fullPath, cid, options);
I have used this for other apps(openhab, zigbeemqtt) without issues. Feels like i am missing something.
Any ideas?