 
   if (( millis() - startMills ) < 600 ) {
     return;
-  }
-
-  if (( millis() - startMills ) < ( revMills / 3 )) {
-    return;
+    /*
+      }
+
+      if (( millis() - startMills ) < ( revMills / 3 )) {
+       return;
+    */
   } else {
     revMills   = (millis() - startMills)  ;
     startMills = millis();
     irStatus   = !irStatus ;
     revCounts++;
   }
-
 }
 
 String macToStr(const uint8_t* mac)

  ArduinoOTA.onError([](ota_error_t error) {
    //ESP.restart();
    /*
    if (error == OTA_AUTH_ERROR) abort();
    else if (error == OTA_BEGIN_ERROR) abort();
    else if (error == OTA_CONNECT_ERROR) abort();
    else if (error == OTA_RECEIVE_ERROR) abort();
    else if (error == OTA_END_ERROR) abort();
    */
  });

  ArduinoOTA.begin();

  pinMode(IRPIN, INPUT);
  pinMode(DOORPIN, INPUT_PULLUP);

  doorStatus = digitalRead(DOORPIN);
  olddoorStatus = doorStatus;

  attachInterrupt(4, IRCHECKING_START, FALLING);
  attachInterrupt(5, DOORCHECKING, CHANGE);

  //emon1.current(A0, 60.6);


void IRCHECKING_START() {
  detachInterrupt(4);
  attachInterrupt(4, count_powermeter, RISING);
  startMills = millis();
  oldirStatus = HIGH ;
}
