       if (Device.getMode() == MODE_NORMAL) {
         /* Connect to MQTT if not connected */
         if (Device.configuration.mqttAPI) {
-          Mqtt.connected() ? Mqtt.loop() : Mqtt.connect();
+          Mqtt.listener();
         }
 
         WebServer.listener();

          if (WebServer.httpAPIlistener()) {
            Led.on();
            processHTTPAPIRequest(WebServer.getHTTPCommand());
            Led.off();
          }
        }

        /* Relay related code */
        if (Device.configuration.isRelay[0]) {

          /* Relay turn off event launched */
          if (Relay.autoTurnOff()) {
            Led.on();
            Mqtt.publish(Relay.getMQTTTopic(), "state", "off");
            Led.off();
          }

          /* One of the switches has been shortly pressed */
          if (Switch.isPressed() || ExternalSwitch.isPressed()) {
            Led.on();
            Relay.toggle();
            MQTTPublishRelayState(); // MQTT Listener library
            Led.off();
          }
        }

  Led.begin(0);

  /* If device in configuration mode then start LED blinking */
  if (Device.getMode() == MODE_ACCESS_POINT) {
    Led.blinkingOn(100);
  }

