 
   // Sende Messdaten wenn die Befeuchtung aktiv ist alle 60 Sekunden
   if(isopen){
-    if((unsigned long)(currmillis - task3) >= 60000){
+    if((unsigned long)(currmillis - task3) >= 900000){
       //TransmitData(get_temp(), get_hum());
       act(1);
-      root["temperature"]=get_temp();
-      root["Humidity"]=get_hum();
+      root["temp"]=get_temp();
+      root["hum"]=get_hum();
       TransmitData();
       task3 = millis();
       act(0);
     }
-  }
+  } 
 
   // checke die Luftfeuchtigkeit und wenn zu niedrig schalte die Befeuchtung ein.
   if ((unsigned long)(currmillis - task2) >= mtime) {

int pos_close = 85; // close position in degrees

//DHT11 Lib
int dhtPin = 24;
#include "DHT.h"
DHT dht;

// delay between the measurements in Milliseconds
unsigned long stime = 1800000; // delay time between the transmitting
unsigned long mtime = 900000; // delay time between the measurements

boolean isopen; // Field to check if open or closed


  servo_ctrl("start");
  
  dht.setup(dhtPin);

  // by default, we'll generate the high voltage from the 3.3v line internally! (neat!)
  display.begin(SSD1306_SWITCHCAPVCC, 0x3C);  // initialize with the I2C addr 0x3D (for the 128x64)
  blankOLED();
  printOLED(content="Humidor Monitor v0.3", X=0, Y=0, textsize=1);
  clearOLED();
  
  pinMode(inPin, INPUT); // declare pushbutton

  //only 1 time activate for new wifi
  //wifi_init();

  //time_t t=timestart;
  Serial.println(F("Setup End"));
}

unsigned long task1, task2, task3, task4, task5, task6 = 0;
void loop() {
  unsigned long currmillis = millis();

  //falls die Befeuchtung aktiv ist pruefe alle 30 Sekunden die Werte
  if (isopen) {
    if ((unsigned long)(currmillis - task2) >= 900000) {
      act(1);
      //Serial.println(F("check if hum"));
      if ((float)(get_hum() <= 65.0 || get_hum() <= 70.0)) {
