Barnabybear wrote:Hi, try putting a reset in strieght after it wakes from deepsleep. I read someware that wake from deepsleep & reset are not quite the same.
When waking from deep sleep, the ESP starts over with the setup function. If I put and ESP.reset() there, I will only have an endless loop of resetting the ESP. Unless there is a way of determining if the ESP is in it's initial boot, or if it's woken from deep sleep.
Barnabybear wrote:Code: Select all} else {
Serial.println("Can't get HVAC status") ;
What do you get if you swap this to print (acState) I see from the //, you have checked the line earlier.
I do print out acState, before the if, else if, else statement. Except for initial boot, it always returns the null string.
Serial.print("HVAC State: ") ;
Serial.println(acState) ;
if (acState == "cooling") {
Serial.println("HVAC cooling, check vibration sensor to see if window AC is running") ;
if (!acRunning()) {
powerAC() ;
}
} else if (acState == "off") {
Serial.println("HVAC off, check vibration sensor to see if window AC is off") ;
if (acRunning()) {
powerAC() ;
}
} else {
Serial.println("Can't get HVAC status") ;
}