   scheduleUpdate();
   schedulePumpUpdate();
 }
-  
+
+void pumpOff() {
+  if (isConfigPump) { 
+      digitalWrite(relay[8], relayOff); 
+      configPumpStatus = "off";
+  }
+  if (isPin13Pump) {
+      digitalWrite(pin13Relay, relayOff);
+      pin13PumpStatus="off";
+  }
+}
+
+void pumpOn() {
+  if (isConfigPump) { 
+      digitalWrite(relay[8], relayOn); 
+      configPumpStatus = "on";
+  }
+  if (isPin13Pump) {
+      digitalWrite(pin13Relay, relayOn);
+      pin13PumpStatus = "on";
+  }
+}
+
 void timeToUpdate() {
   scheduleUpdate();
   schedulePumpUpdate();

int relays = 8;  //set up before loading to Arduino (max = 8 with current code)
boolean isActiveHigh=false; //set to true if using "active high" relay, set to false if using "active low" relay
boolean isDebugEnabled=true;    // enable or disable debug in this example
boolean isPin13Pump =true;  //set to true if you add an additional relay to pin13 and use as pump or master valve.  

//set global variables
Timer t;

}

void sendPumpUpdate() {
  if (isConfigPump && configPumpStatus == "enabled") {
    smartthing.send("pumpAdded");
  }
  if (!isConfigPump && !isPin13Pump) {
    smartthing.send("pumpRemoved");
  }
  if (configPumpStatus == "on" || pin13PumpStatus == "on") {
    smartthing.send("onPump");
  }
  if (configPumpStatus =="off" && isConfigPump) {
    smartthing.send("offPump");
  }
  if (pin13PumpStatus =="off" && isPin13Pump) {
    smartthing.send("offPump");
  }
}
