   if ((unsigned long)(currmillis - task1) >= stime || (currmillis == 1000)) {
     //Serial.println(F("check DHT22"));
     //TransmitData(get_temp(), get_hum());
+    act(1);
     root["temperature"] = get_temp();
     root["Humidity"] = get_hum();
     TransmitData();
     task1 = millis();
+    act(0);
   }
 
   // Sende Messdaten wenn die Befeuchtung aktiv ist alle 60 Sekunden
   if(isopen){
     if((unsigned long)(currmillis - task3) >= 60000){
       //TransmitData(get_temp(), get_hum());
+      act(1);
       root["temperature"]=get_temp();
       root["Humidity"]=get_hum();
       TransmitData();
       task3 = millis();
+      act(0);
     }
   }
 

void setup() {
  Serial.begin(115200);
  wifi.begin(115200);
  //wifi_init();
  
  root["ID"] = ID;

    byte i;
    //Serial.println(F("check if hum"));
    if ((float)(get_hum() <= 65.0 || get_hum() <= 70.0)) {
      act(1);
      if (!isopen) {
        //oeffne die Belueftung und starte den Luefter
        Serial.println(F("Switch fan on"));
        servo_ctrl("open");
      }
      act(0);
    } else {
      if (isopen) {
        // switch fan1 off und schliesse den Schlitz
        Serial.println(F("Switch fan off"));
        servo_ctrl("close");
        act(0);
      }
    }
    task2 = millis();
