• You might be hitting a classic Espruino USB issue here. What happens if you power it from a USB Wall supply or Power Bank?

    Basically Espruino is using USB flow control and is trying not to lose any text that you output with console.log - it doesn't know if the PC isn't reading data because the IDE is busy, or because nothing is running, so when its output buffer gets full it just waits for it to start emptying before it continues.

    It's a bit buried now, but it's worth checking out "I typed save() but Espruino won't work (or stops working quickly) when powered from a computer (it only works from a USB power supply, battery, or the computer when the Web IDE is running)" in http://www.espruino.com/Troubleshooting for a more detailed explanation.

    As far as the MQTT message though, I'm not sure. Is it possible you were saving after running onInit (so it was basically saving with an open socket connection), or that you had 'save on send' turned on in the IDE so it was basically already saved?

About

Avatar for Gordon @Gordon started