@lbuque Thanks a million to You, I finally got the code working! Looks like the thing I was missing was to use "MQTT apply for messaging" block in the loop. And changing the default 0 keepalive value (after some searching I found it caused problems with my Mosquitto broker).