 
 void tempControl() {
 
-  if (controlMode == 1)                            // If we're in bypass mode, proceed:
-  {
-
-    if (coolingMode == 0 && controllingTemp != 0 && controllingTemp < setpointTemp)       // If mode is heat and room falls equal or below the target temp...
+  if (controlMode == 1 && setpointTemp != 0 && controllingTemp != 0)     // If we're in bypass mode, and established setpoint and control temps, then proceed:
+  {
+
+    if (coolingMode == 0 && controllingTemp < setpointTemp)       // If mode is heat and room falls equal or below the target temp...
     {
       digitalWrite(heatingRelay, LOW);                            // turn on the heat. But when
-    }
-    else if (coolingMode == 0 && controllingTemp != 0 && controllingTemp >= (setpointTemp + controlSplit))   // If mode is heat and room is warmer then target temp...
+      terminal.println((millis() / 1000) + String(" SETPOINT: Heat relay closed."));
+      terminal.println(String("   SP:") + setpointTemp + " Ctrl:" + controllingTemp);
+      terminal.flush();
+    }
+    else if (coolingMode == 0 && controllingTemp >= (setpointTemp + controlSplit))   // If mode is heat and room is warmer then target temp...
     {
       digitalWrite(heatingRelay, HIGH);                           // everything is turned off.
-    }
-    else if (coolingMode == 1 && controllingTemp != 0 && controllingTemp > setpointTemp)  // If mode is cool and room rises equal or above the target temp...
+      terminal.println((millis() / 1000) + String(" SETPOINT: Heat relay open."));
+      terminal.println(String("   SP:") + setpointTemp + " Ctrl:" + controllingTemp);
+      terminal.flush();
+    }
+    else if (coolingMode == 1 && controllingTemp > setpointTemp)  // If mode is cool and room rises equal or above the target temp...
     {
       digitalWrite(coolingRelay, LOW);                            // turn on cooling. Then,
-    }
-    else if (coolingMode == 1 && controllingTemp != 0 && controllingTemp <= (setpointTemp - controlSplit))   // when mode is cool and room is cooler then target temp...
+      terminal.println((millis() / 1000) + String(" SETPOINT: Cool relay closed."));
+      terminal.println(String("   SP:") + setpointTemp + " Ctrl:" + controllingTemp);
+      terminal.flush();
+    }
+    else if (coolingMode == 1 && controllingTemp <= (setpointTemp - controlSplit))   // when mode is cool and room is cooler then target temp...
     {
       digitalWrite(coolingRelay, HIGH);                           // turn everything off.
-    }
-
+      terminal.println((millis() / 1000) + String(" SETPOINT: Heat relay opem."));
+      terminal.println(String("   SP:") + setpointTemp + " Ctrl:" + controllingTemp);
+      terminal.flush();
+    }
+
+  }
+}
+
+void tempControlSafety() {      // Safeties running every second
+  if  (digitalRead(blowerPin) == LOW && (setpointTemp == 0 || controllingTemp  == 0) )  // If HVAC is running and the setpoint or controlling temp are 0, then open relays. Control will be locked out until those temps are != 0.
+  {
+    digitalWrite(coolingRelay, HIGH);
+    digitalWrite(heatingRelay, HIGH);
+
+    Blynk.notify(hour() + String(":") + minute() + ":" + second() + " " + month() + "/" + day() + " ERROR: Ctrl attempted with no setpointTemp or controllingTemp");
   }
 }
 

    resetTimeDate = currentTimeDate;
    Blynk.virtualWrite(16, currentStatus);
    Blynk.setProperty(V16, "label", String("Current Status:                    SYSTEM RESET at ") + resetTimeDate);
    Blynk.setProperty(V16, "color", "#808080");
  }

  // Purpose: To keep the display showing a system reset state until the HVAC has turned on or off.

{
  setpointTemp = param.asInt();
}

void controlReset() {
  controlMode = 0;
  controllingSpace = "";
  Blynk.setProperty(V39, "label", "Setpoint");
  digitalWrite(fanRelay, HIGH);
  digitalWrite(coolingRelay, HIGH);
  digitalWrite(heatingRelay, HIGH);
  digitalWrite(bypassRelay, HIGH);
  Blynk.virtualWrite(V40, 1);

  terminal.println((millis() / 1000) + String(" House in Ctrl mode."));
  terminal.flush();
}
// ******************************************************** HVAC CTRL END **********************************************

void vsync1()
{
  Blynk.syncVirtual(V16);    // currentStatus
  Blynk.syncVirtual(V39);    // setpointTemp
}

void vsync2()
{
