I have an automatic water change system that works wonderfully. I'm going out of town for 10 days and I want to make sure I am notified immediately if my daily AWC fails. I have all kinds of failsafes that will shut down the AWC and future AWCs. I also have a boolean that triggers the following code if an AWC fails:
Code: Select all
//This function will send me an email alert if an AWC fails.
void AWCAlert()
{
static WiFiAlert AWCReport;
char msg[30];
char h[2];
char m[2];
char s[2];
dtostrf((float) hour(), 2, 0, h);
dtostrf((float) minute(), 2, 0, m);
dtostrf((float) second(), 2, 0, s);
sprintf(msg, "The AWC at %s:%s:%s failed.", h, m, s);
AWCReport.Send(msg);
}
Code: Select all
static WiFiAlert tempAlert;
char tempMsg[20] = "An AWC occurred.";
tempAlert.Send(tempMsg);
Thanks,
Gabe