I closed my Electron APP so there are no more mqtt messages being sent. I let the Espruino IDE just idle for a few minutes and I received multiple "PING" in the console. My mosquito log now shows PINGREQ and PINGRESP from the PICO.
PING seems to halt when messages are being received. To test this I opened my app again, after a few messages I get the same disconnected... reconnecting message. I then closed my app and PING seems to resume again and so does the PINGREQ and PINGRESP in my mosquito log file.
I also downloaded a chrome extension called mqttbox. I'm manually sending the same MQTT message using mqttbox every 30 seconds and again I'm getting the same disconnected... reconnecting. message in the console. I then just sent one message from mqttbox and waited... PING continued to resume without getting and MQTT disconnected... reconnecting. message.
I seem to not get the MQTT disconnected... message for any message received that was sent after 60 seconds. For example, I can send one message every 65 seconds and still receive a PINGREQ properly.
For my project the PICO doesn't need to receive EVERY single message over my mqtt network. Just only messages pertaining to the PICO; however, I will still run into the disconnected... issue if messages are received inside the 60 seconds keepalive window.
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.
Update to my last post
I closed my Electron APP so there are no more mqtt messages being sent. I let the Espruino IDE just idle for a few minutes and I received multiple "PING" in the console. My mosquito log now shows PINGREQ and PINGRESP from the PICO.
PING seems to halt when messages are being received. To test this I opened my app again, after a few messages I get the same disconnected... reconnecting message. I then closed my app and PING seems to resume again and so does the PINGREQ and PINGRESP in my mosquito log file.
I also downloaded a chrome extension called mqttbox. I'm manually sending the same MQTT message using mqttbox every 30 seconds and again I'm getting the same disconnected... reconnecting. message in the console. I then just sent one message from mqttbox and waited... PING continued to resume without getting and MQTT disconnected... reconnecting. message.
I seem to not get the MQTT disconnected... message for any message received that was sent after 60 seconds. For example, I can send one message every 65 seconds and still receive a PINGREQ properly.
For my project the PICO doesn't need to receive EVERY single message over my mqtt network. Just only messages pertaining to the PICO; however, I will still run into the disconnected... issue if messages are received inside the 60 seconds keepalive window.
1 Attachment