 int fanRelay = 16;      // WeMos pin D0.
 int bypassRelay = 0;    // WeMos pin D3.
 
-int controlSplit = 1;   // Predefined value of how much I want to heat or cool above trigger point.
+int controlSplit = 2;   // Predefined value of how much I want to heat or cool above/below setpoint.
 int controllingTemp;
 int setpointTemp;
 String controllingSpace;
 bool coolingMode;       // 1 = cooling. 0 = heating.
 bool controlMode;
-int tempKK, tempLK;
+int tempKK, tempLK, tempAT;
 
 long controlStart;
 long controlRuntime;
 long heatControlTimeout = 600000; // 600000 millis = 10 minutes
 long coolControlTimeout = 120000000; // 120000000 millis = 20 minutes
 bool controlLatch = FALSE;
+
+bool blynkFlag;
+int blynkDisconnectCount;
+bool ranOnce;
 
 void setup()
 {

        break;
      }
    case 7: {                             // Keaton-controlled heating
        Blynk.syncVirtual(V39);
        controlMode = 1;
        controllingSpace = "KK";
        coolingMode = 0;
        controllingTemp = tempKK;
        Blynk.setProperty(V39, "label", String("Setpoint: ") + setpointTemp + "F. Controlled by KK (currently " + tempKK + "F).");
        digitalWrite(fanRelay, HIGH);
        digitalWrite(coolingRelay, HIGH);
        digitalWrite(heatingRelay, HIGH);
        digitalWrite(bypassRelay, LOW);
        break;
      }
    case 8: {                             // Liv-controlled cooling
        controlMode = 1;

  timer.setInterval(30000L, tempUpdater);      // When bypass on, this evaluates controlling space against setpoint.
  timer.setInterval(30000L, tempControl);     // Temps (controlling space) that can control HVAC are synced.
  timer.setInterval(1000L, tempControlSafety);
  timer.setInterval(250L, disconnectWatcher);     // Watches for a disconnect event
  timer.setInterval(5000L, disconnectReporter);   // Reports disconnects to the app every 5 seconds

}

