Even though it says it's not connected, if you do mqtt.publish("test","hello") and you're looking at the server with mosquitto_sub -t "#" do you actually see the message coming out?
Similarly if you call mqtt.subscribe("test"); does it work?
I just tried here and it all seems ok except the connection callback isn't working at all for me (no error or anything)
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Even though it says it's not connected, if you do
mqtt.publish("test","hello")
and you're looking at the server withmosquitto_sub -t "#"
do you actually see the message coming out?Similarly if you call
mqtt.subscribe("test");
does it work?I just tried here and it all seems ok except the connection callback isn't working at all for me (no error or anything)