   // 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());
+    //TransmitData(get_temp(), get_hum());
+    root["temperature"] = get_temp();
+    root["Humidity"] = get_hum();
+    
     task1 = millis();
   }
 

unsigned long stime = 1800000; // Zeit zwischen den Sendezeiten
unsigned long mtime = 900000; // Zeit zwischen den Messungen

boolean fanOn; // Boolean Feld fuer den Status vom Luefter.

void setup() {
  //Serial.begin(115200);
  // VirtualWire Initialise the IO and ISR
  
  vw_set_ptt_inverted(false); // Required for RF Link module
  vw_set_tx_pin(txPin);
  vw_setup(1200); //Bits pro Sekunde
  
  pinMode(out1, OUTPUT);
  digitalWrite(out1, LOW);
  fanOn = false;
  
  dht.setup(dhtPin);
  //Serial.println(F("setup end"));

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