Hi, your example does work fine. However, like my original code, under the condition of incorrect broker details, my code runs for approx 30 minutes, then I get a reset (all my ram variables are zero). My version of the MQTT did that every 15 min. I have no idea why this behaviour exists ..