Email notifications on ports

Related to the development libraries, released by Curt Binder

Posts: 28
Joined: Thu Jan 02, 2014 1:02 pm
PostPosted: Sun Jan 10, 2016 5:18 am
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
User avatar
Posts: 5342
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Sun Jan 10, 2016 6:14 am
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. :)

Posts: 28
Joined: Thu Jan 02, 2014 1:02 pm
PostPosted: Wed Feb 03, 2016 1:51 pm
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. :)


Hi lnevo,

Any luck yet on the coding?
User avatar
Posts: 5342
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Wed Feb 03, 2016 3:31 pm
Sorry, no I did not. Should have some time tomorrow.

Posts: 28
Joined: Thu Jan 02, 2014 1:02 pm
PostPosted: Fri Feb 05, 2016 12:56 pm
lnevo wrote:Sorry, no I did not. Should have some time tomorrow.


No problem. Thanks for taking the time to help
User avatar
Posts: 5342
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Sun Feb 07, 2016 11:53 am
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.

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.");
    }
  }
}

Posts: 28
Joined: Thu Jan 02, 2014 1:02 pm
PostPosted: Mon Feb 08, 2016 2:54 pm
Thank you kindly lnevo. Can't wait to test it out.
User avatar
Posts: 5342
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Mon Feb 08, 2016 8:28 pm
Oh those spaces in the send message should be + instead as http wont like the space (maybe..)
User avatar
Posts: 2721
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
PostPosted: Tue Feb 09, 2016 2:57 pm
lnevo wrote:Oh those spaces in the send message should be + instead as http wont like the space (maybe..)

you are correct unless something has changed.

Sent from my XT1585 using Tapatalk

Return to Development Libraries

Who is online

Users browsing this forum: No registered users and 2 guests