   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();

/**
* 
 ****************************************************************************************************************************
 * Irrigation Controller v2.51
 * Simple, elegant irrigation controller that takes advantage of the cloud and SmartThings ecosystem
 * Arduino UNO with SmartThings Shield  and an 8 Relay Module
 * Works by receiving irrigation run times from the Cloud and then builds a queue to execute

    allOff();
  }
  if (strcmp(inValue[0],"pump")==0) {
    if (strcmp(inValue[1],"0")==0) {
      isConfigPump = false;
      stations = relays;
    }
    if (strcmp(inValue[1],"1")==0) {
      pumpOff();
    }
    if (strcmp(inValue[1],"2")==0) {
       pumpOn();
    }
    if (strcmp(inValue[1],"3")==0) {
      isConfigPump = true;
      digitalWrite(relay[8], relayOff); 
      configPumpStatus = "enabled";
      stations = relays - 1;
    }
    schedulePumpUpdate();
  }
