Fixed the code. Added MQTT