• Yes, you might as well use require("MQTT") for this.

    Thanks for checking into this...

    Looking at the code (here, if you're interested) it seems that the keep-alive and ping are very slightly different - but the end result is Espruino tells the server it has a keep-alive of 60s and then sends pings every 40s by default, which should be ok.

    Having said that, it feels like there's something odd in the mosquitto log. What's the IP of the Espruino that's connecting? And do you know what mqttjs_18553fd6 is? that one doesn't seem to be causing any errors.

About

Avatar for Gordon @Gordon started