Hi Again @perak. I’ve been working more on this issue and am having troubles replicating your success connecting to the MQTT broker properly. In your code:
Sensors.mqttConnect('mqtt://m21.cloudmqtt.com', ['#'], {
clientId: "123456",
username: "my_username",
password: "my_password"
});
CloudMQTT says they need traffic on port 12310, but it sounds like you got it working without the port identified. Unfortunately, that didn’t work for me so I’m using:
MyGoals.mqttConnect("mqtt://m10.cloudmqtt.com", ['goals'], {
insert: true,
raw: true
},
{ servers: [{ host: 'mqtt://m10.cloudmqtt.com', port: 12310 }],
clientId: "uniqueID",
username: "mqttClientUsername",
password: "mqttClientPassword",
clean:false
});
My insert statement is just added to the button click events helper in the standard meteor create
javascript file:
MyGoals.insert({
topic: "goals",
message: "There were " + Session.get('counter') + " clicks.",
broadcast: true
});
My traffic does show up in MiniMongo, but never seems to hit CloudMQTT’s traffic console.
If I replace the ‘goals’ topic with the ‘#’ topic wildcard, I do see other users’ traffic entering my MiniMongo, but either way, my traffic never seems to hit CloudMQTT’s console.
Do you have any suggestions on how I might debug this?