Question: how to debug this and figure out what's wrong?
You can type mqtt in left side of the WebIDE to get details about the status.
Edit:
Sample output for not connected to the broker:
not connected
>mqtt ={ svr: "test.mosquitto.org", prt: 1883, ka: 60, usr: undefined, pwd: undefined, cn: 0, ri: 2000, wt: undefined, wp: "" } >
@MaBe started
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.
You can type mqtt in left side of the WebIDE to get details about the status.
Edit:
Sample output for
not connected
to the broker: