           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();
           }
         }

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

        WebServer.listener();

    Mqtt.begin();
  }

  Network.listener();

  /* Initializing HTTP WebServer */
  WebServer.handle("/", handleHTTPRequests);
