@vanihada Have a look at these two posts, I use a generic MQTT client in both and describe how it works.