Why am I not receiving my WiFiAlert emails?

Do you have a question on how to do something.
Ask in here.
Post Reply
gaberosenfield
Posts: 89
Joined: Thu Mar 08, 2012 5:11 pm
Location: Redwood City, California

Why am I not receiving my WiFiAlert emails?

Post by gaberosenfield »

I think I must be confused as to how the WiFiAlert class works...

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);
}
To test whether my alert system is working properly, I set up the following code to email me every time an AWC occurs:

Code: Select all

static WiFiAlert tempAlert;
    char tempMsg[20] = "An AWC occurred.";
    tempAlert.Send(tempMsg);
Everything compiles fine, but I never receive an email. I know my email address is correct in my portal because the alerts I set there (like low temp, etc) send me emails. What gives? How am I screwing this up?

Thanks,
Gabe
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Why am I not receiving my WiFiAlert emails?

Post by binder »

Someone else asked the same question about WiFiAlert in another thread and I'm looking into it too. I will try to post here if I figure something out.
rrodriguess
Posts: 133
Joined: Sun Mar 09, 2014 11:01 am
Location: Santos - Brazil

Re: Why am I not receiving my WiFiAlert emails?

Post by rrodriguess »

Hey everyone

Is it just me or we cannot have space in the string to be sent?

Instead of:
sprintf(msg, "The AWC at %s:%s:%s failed.", h, m, s);

try:
sprintf(msg, "The+AWC+at+%s:%s:%s failed.", h, m, s);


Tell us if it works...

Rafa
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Why am I not receiving my WiFiAlert emails?

Post by lnevo »

As I mentioned in the other thread you can't have space. You can manually test a notification using the URL

Code: Select all

http://forum.reefangel.com/status/wifialert.aspx?id=login&key=portalkey&msg=1234
Make sure to change login and portalkey to their respective values. If you have no key you can leave out the &key=portalkey part.
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Why am I not receiving my WiFiAlert emails?

Post by binder »

lnevo wrote:
Make sure to change login and portalkey to their respective values. If you have no key you can leave out the &key=portalkey part.
the controller code does not leave it out, it always sends it even if it is empty. at least that was what I was noticing during my tests last night.

Sent from my Nexus 7
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Why am I not receiving my WiFiAlert emails?

Post by lnevo »

Well then it's not required to be a value :) I don't have a portalkey and I have no issues with the alerts. I haven't looked closely at this code. Any luck? still having same issues?
Post Reply