 unsigned long lastSignal = millis();
 unsigned long pumpTimeout = 15*60*1000; // turn off the pump if haven't heard from sensor in 15 mins
 unsigned long pumpOffTime = 60*60*1000; // make sure we don't turn on the pump more than once per hour
-long pumpOffTimeStart = -pumpOffTime; // so we can turn on pump when we startup if we need to
+long lastPumpTimeOff = -60*60*1000; // so we can turn on pump when we startup if we need to
 
 // PIR motion sensor
 int relayPin = 0;

unsigned long measureInterval = 60000; // can send data to thingspeak every 15s, but once a minute is fine

bool pumpOn = false;
float waterHeight = 1000; // we want to make sure the relay isn't falsely triggered on from the get-go
//################### update these vars ###################
float lowerCutoff = 20; // lowest acceptable water height, in inches

		Particle.publish(eventPrefix + "/waterTankPump/pumpOn", boolToText(pumpOn));
		(data == "true") ? lastSignal = millis() : Serial.println(data);
	} else if (event == eventPrefix + "/waterTankSensor/waterHeight") {
		heardFromSensor = true;
		waterHeight = data.toFloat();
	}
}