   if (millis() > lastPowerCheck + POWER_CHECK_FREQUENCY) {
     if (relayOn && relayOffWhenPowerDown && !computerOn) {
       //It looks like we're shutdown, but lets make sure.
-      delay(500);
+      delay(100);
       if (digitalRead(POWER_LED) == 0) {
         //OK then, power off Relay.
         delay(2000);


  // Expose variables to REST API
  rest.variable("relayOn",&relayOn);
  rest.variable("relayOnSince",&relayOnSince);
  rest.variable("computerOn",&computerOn);
  rest.variable("computerOnSince",&computerOnSince);
  rest.variable("relayOffWhenPowerDown",&relayOffWhenPowerDown);

  // Function to be exposed

  }
  // Check status to update variables
  computerOn = digitalRead(POWER_LED);
  delay(1);
}

void initWifi() {
