   }
 
   // Wenn die Zeit (worktime) kleiner als die Vergangene Zeit ist, Sende die Messdaten.
-  if ((unsigned long)(currmillis - task1) >= stime || (currmillis == 1000)) {
-    //Serial.println(F("check DHT22"));
-    //TransmitData(get_temp(), get_hum());
+  if ((unsigned long)(currmillis - task1) >= stime || (currmillis == 10000)) {
     act(1);
     root["temperature"] = get_temp();
     root["Humidity"] = get_hum();

//Servo Lib
#include <Servo.h> 
int servo_pin = 2; // Declare the Servo pin
Servo servo1; // Create a servo object
int pos_open = 100; // open position in degrees
int pos_close = 50; // close position in degrees

//DHT11 Lib
int dhtPin = 24;

void servo_ctrl(char cmd[5]){
  if(cmd=="open"){
    if(!isopen){
      digitalWrite(servo_power, LOW);
      // servo go to 90 degrees (open)
      for (int i=pos_close; i <= pos_open; i++){
        servo1.write(i);
        delay(25);
      }
      isopen=true;
      Serial.println(F("Servo Control write 130"));
    } else {
      // do nothing
    }
  } else {
    if(isopen){
      digitalWrite(servo_power, LOW);
      // servo go to 0 degrees (close)
      servo1.write(pos_close);
      for (int i=pos_open; i >= pos_close; i--){
        servo1.write(i);
        delay(10);
      }
      isopen=false;
      Serial.println(F("Servo Control write 15"));
    } else {
      // do nothing
    }
  }
  // close by setup
  if(cmd=="start"){
    digitalWrite(servo_power, LOW);
    servo1.write(pos_close);    
    isopen=false;
    Serial.println(F("Servo Control write 15"));
    delay(500);
  }
  digitalWrite(servo_power, HIGH);
}

void connect_wifi(String cmd, int t){
