Hi everyone,
Can someone please help with coding for the following.
Email notification when heater port comes on and when it switches off, when auto topup port comes on( no need for when it switches off as its timeout is 10sec, maybe a mail notification if it exceeds 10 sec) and lastly when my chiller port comes on and when it switches off.
Thank you in advance
Email notifications on ports
Email notifications on ports
The code will be very similar for the heater and the chiller. I'll try and work on something later tonight, but more than likely next weekend.
For the ATO timeout you can set that one up in the portal.
For the ATO timeout you can set that one up in the portal.
Re: Email notifications on ports
Hi lnevo,lnevo wrote:The code will be very similar for the heater and the chiller. I'll try and work on something later tonight, but more than likely next weekend.
For the ATO timeout you can set that one up in the portal.
Any luck yet on the coding?
Re: Email notifications on ports
Sorry, no I did not. Should have some time tomorrow.
Re: Email notifications on ports
No problem. Thanks for taking the time to helplnevo wrote:Sorry, no I did not. Should have some time tomorrow.
Re: Email notifications on ports
Here you go. Please make sure to change the ports for your heater and chiller. This will alert when the heater goes on but not when it goes off. It will alert when the chiller goes on and when it goes off. Please keep in mind there is a 15 minute delay between each alert and if they both go at the same time (like if the controller reboots) you may only get one alert.
To use it, paste the function at the end of your INO and then call it from your loop AFTER your heater and chiller call.
To use it, paste the function at the end of your INO and then call it from your loop AFTER your heater and chiller call.
Code: Select all
void HeaterAndChillerAlerts() {
static boolean heaterStatus;
static boolean chillerStatus;
static WiFiAlert heaterAlert;
static WiFiAlert chillerAlert;
byte heaterPort=Port1;
byte chillerPort=Port2;
if (ReefAngel.Relay.Status(heaterStatus)) {
if (!heaterStatus) {
heaterStatus=true;
heaterAlert.Send("Heater is on.");
}
} else {
heaterStatus=false;
}
if (ReefAngel.Relay.Status(chillerStatus)) {
if (!chillerStatus) {
chillerStatus=true;
chillerAlert.Send("Chiller is on.");
}
} else {
if (chillerStatus) {
chillerStatus=false;
chillerAlert.Send("Chiller is off.");
}
}
}
Re: Email notifications on ports
Thank you kindly lnevo. Can't wait to test it out.
Email notifications on ports
Oh those spaces in the send message should be + instead as http wont like the space (maybe..)
Re: Email notifications on ports
you are correct unless something has changed.lnevo wrote:Oh those spaces in the send message should be + instead as http wont like the space (maybe..)
Sent from my XT1585 using Tapatalk