• Ok - so this is unrelated to the recent changes then?

    If I understood your question correctly... after about 3 messages I receive: MQTT disconnected... reconnecting for both mqtt = require("MQTT").connect({ and require("https://raw.githubusercontent.c­om/espruino/EspruinoDocs/master/modules/­MQTT.js").connect({

    For the sake of debugging this, should I just use the normal require("MQTT")?

    What MQTT server are you using?

    I followed your guide: http://www.espruino.com/Home+Automation , I am using mosquitto.

    Could you see if you can read the logs for it? It's entirely likely it
    doesn't like something that Espruino's MQTT client is doing, and so it
    drops it.

    exceeded timeout and Socket error on client is what stood out the most. You are probably right, the mqtt broker doesn't like what the Espruino's MQTT client is doing, and so it drops the connection. I'm really not sure why or what the Socket error means and why I've exceeded the timeout, disconnecting. I executed mqtt in the console which spits out "keep_alive": 60 so, I'm not sure why it keeps timing out. So I can understand the keep_alive setting, does the Espruino mqtt client ping every 60 seconds to keep the session alive?

    Log segment:

    1533682953: New connection from 192.168.0.18 on port 1883.
    1533682953: New client connected from 192.168.0.18 as 3b2ac31a3c98 (c1, k60).
    1533683015: New connection from 192.168.0.9 on port 1883.
    1533683015: New client connected from 192.168.0.9 as mqttjs_18553fd6 (c1, k60).
    1533683016: Client 768aa6e0d3bc has exceeded timeout, disconnecting.
    1533683016: Socket error on client 768aa6e0d3bc, disconnecting.
    1533683121: Client 3b2ac31a3c98 has exceeded timeout, disconnecting.

About

Avatar for d0773d @d0773d started