   unsigned long time;
   int temperature;
   int humidity;
+  int doorOpening;
+  int doorClosing;
 };
 
 

    // Make a HTTP request:

    char req[256];
    sprintf(req, "GET /add?apiKey=%s&d=%lu&t=%d&h=%d HTTP/1.1", API_KEY, m.time, m.temperature, m.humidity);
    debugln(req);
    client.println(req);
    client.println("Host: myStatServer.net");


  unsigned long time = getTime();

  int buttonStatus = digitalRead(BUTTONPIN);
  if (buttonStatus != lastButtonStatus) {
    printTime(time);
    debug("Button status changed to: ")
    debugln(buttonStatus);

    sendMeasurement({time, 0, 0, buttonStatus==HIGH, buttonStatus==LOW});

    lastButtonStatus = buttonStatus;
  }
  
  // Do a new temperature and humidity measurement for the first time or if interval since last one reached MEASUREMENT_INTERVAL value
  if (time - lastMeasurementTime >= MEASUREMENT_INTERVAL) {
    lastMeasurementTime = time;
