        blinkSlow(3);
 }
 
+void lightLed()
+{
+    if(LED_INVERTED)
+        digitalWrite(LED, HIGH);
+    else
+        digitalWrite(LED, LOW);        
+}
+
+
+void shutLed()
+{
+    if(LED_INVERTED)
+        digitalWrite(LED, LOW);
+    else
+        digitalWrite(LED, HIGH);
+}
 
 void processCommandMsg(char* topic, byte* payload, unsigned int length)
 {

          Serial.println("RELAY STATE ON received");
          currentRelayState= RELAY_STATE_ON;

          digitalWrite(LED, LOW);
          digitalWrite(RELAY, HIGH);
          char tmpChar = RELAY_STATE_ON;
          myMqtt->publishValue("state", &tmpChar);

    {
        currentRelayState = RELAY_STATE_OFF;

        shutLed();
        digitalWrite(RELAY, LOW);
        if(bootMode == BOOT_MODE_MQTT){
            char tmpChar = RELAY_STATE_OFF;
