Notification for ATO Low

Related to the Portal
Post Reply
howaboutme
Posts: 245
Joined: Tue Jan 28, 2014 11:10 am
Location: Northern VA

Notification for ATO Low

Post by howaboutme »

Hi all,

I'm trying to set up an email notification trigger for anytime the ATO low is on. What value do I input in the box after I select "ATO Low Port" and then "=" (or something else?) and "_____________"?

Thanks!
Jack
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Notification for ATO Low

Post by Sacohen »

On the Andriod App 1 = on and 0 = off.
I'm assuming the Portal and U-App are the same.
howaboutme
Posts: 245
Joined: Tue Jan 28, 2014 11:10 am
Location: Northern VA

Re: Notification for ATO Low

Post by howaboutme »

Thanks! I'll give it a test tonight.
Jack
howaboutme
Posts: 245
Joined: Tue Jan 28, 2014 11:10 am
Location: Northern VA

Re: Notification for ATO Low

Post by howaboutme »

Well..I realized that this won't work for my purpose because the portal doesn't ping the unit in real time....Oh well..

What I was thinking of doing is to get notification each time my ATO goes off. First, since this is a new thing, to double check that everything works and 2nd, just to see how often it goes off in a period of time. If anyone has another, hard coded, way, please let me know!

Thanks!
Jack
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Notification for ATO Low

Post by Sacohen »

The notifications on the Android app are not real time,but are still a little more frequent then the portal is.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Notification for ATO Low

Post by lnevo »

You can use WiFiAlert Jack. There should be sample code in my INO. You pretty much initialize it and then use a Send function to trigger the alert. The only issue with this is the frequency of the alert. Default is 15 minutes. You can set a flag on the send to ALWAYS send but you have to be careful because it could easily send you a thousand messages if your not careful. And you may need the dev libraries, I forget when it got added, but it should be there I think...
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Notification for ATO Low

Post by lnevo »

You could set the frequency as low as once per minute which would help, but if the ATO kicks in every 30 seconds for example it will only alert you every other time.
howaboutme
Posts: 245
Joined: Tue Jan 28, 2014 11:10 am
Location: Northern VA

Re: Notification for ATO Low

Post by howaboutme »

Thanks Lee. I will take a look at your code later. Once a minute frequency would work. My timeout is at 8 minutes so it has to be sooner than that.

I will look and then ask questions. Thanks all.

Sent from my Galaxy Nexus using Tapatalk
Jack
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Notification for ATO Low

Post by lnevo »

If you need it within the 8 minutes, then normal portal alert would work. RA sends data to portal every 5
howaboutme
Posts: 245
Joined: Tue Jan 28, 2014 11:10 am
Location: Northern VA

Re: Notification for ATO Low

Post by howaboutme »

Okay, the five minutes may work. I thought it was more than that. I still want to see what you did though. Thanks!

Sent from my Galaxy Nexus using Tapatalk
Jack
howaboutme
Posts: 245
Joined: Tue Jan 28, 2014 11:10 am
Location: Northern VA

Re: Notification for ATO Low

Post by howaboutme »

Lee...Looked over your code a bit last night. I saw the wifialert but that's where my understanding stopped. Need some more direction...pleeeeaassseeee..... :)
Jack
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Notification for ATO Low

Post by lnevo »

Code: Select all

static WiFiAlert myAlert;
myAlert.SetDelay(3600); // send every hour, default is 15 minutes

// Turn off Skimmer if waste collector is full.
if (ReefAngel.LowATO.IsActive()) { 
  myAlert.Send("Skimmate+container+full!+Skimmer+disabled.");
  ReefAngel.Relay.Override(Skimmer,0);
}
howaboutme
Posts: 245
Joined: Tue Jan 28, 2014 11:10 am
Location: Northern VA

Re: Notification for ATO Low

Post by howaboutme »

Thanks Lee. After a few days, I've noticed that the portal notifications work fine for me. Since it's every 5 minutes, my ATO will run somewhere in between that and it has triggered the alert each time. I'll keep my code simple for now.
Jack
howaboutme
Posts: 245
Joined: Tue Jan 28, 2014 11:10 am
Location: Northern VA

Re: Notification for ATO Low

Post by howaboutme »

Another question..I want to add a delay after wc mode.

Can I just add this (time is controlled by portal):

Code: Select all

ReefAngel.Relay.DelayedOn( Port1 )
After this:

Code: Select all

ReefAngel.SingleATOLow( Port1 )
So it looks like this:

Code: Select all

ReefAngel.SingleATOLow( Port1 );
ReefAngel.Relay.DelayedOn( Port1 );
ReefAngel.DayLights( Port3 );
ReefAngel.ActinicLights( Port4 );
ReefAngel.Relay.DelayedOn( Port5 );
ReefAngel.DosingPumpRepeat1( Port6 );
ReefAngel.StandardHeater( Port8 );
ReefAngel.DCPump.UseMemory = true;
ReefAngel.DCPump.DaylightChannel = None;
ReefAngel.DCPump.ActinicChannel = Sync;
Since I already have port 5 on delay start, can I combine port 1 into the same line or vice versa or does each port have to have it's own? Thanks!
Jack
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Notification for ATO Low

Post by rimai »

It won't work.
The last line would always take effect ad disregard the previous ones.
So, ReefAngel.SingleATOLow( Port1 ); would never do anything.
Roberto.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Notification for ATO Low

Post by lnevo »

Each would need its own line and if you repeat a port like that as Roberto said, they overwrite each other. We'll have to write a timer and have an if else to have it control the ATO. I'll throw together some code later
howaboutme
Posts: 245
Joined: Tue Jan 28, 2014 11:10 am
Location: Northern VA

Re: Notification for ATO Low

Post by howaboutme »

Is it something similar to this:

Code: Select all

    {
static time_t wcTimer;
    if (ReefAngel.DisplayedMenu == WATERCHANGE_MODE) wcTimer=now();
    if (now()-wcTimer > 0 && now()-wcTimer < 600) {
     ReefAngel.Relay.Off(Port8);
    } else {
      ReefAngel.WaterLevelATO(Port8,720,0,1);
    }
Except replace this:

Code: Select all

ReefAngel.WaterLevelATO(Port8,720,0,1)
With this:

Code: Select all

ReefAngel.SingleATOLow( Port1 )
And adjust the time to whatever I want?
Jack
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Notification for ATO Low

Post by lnevo »

Yes exactly. Except the first { is an artifact of wherever you got it from.
howaboutme
Posts: 245
Joined: Tue Jan 28, 2014 11:10 am
Location: Northern VA

Re: Notification for ATO Low

Post by howaboutme »

Thanks. I'll give a shot but realized something last night during my water change.

I put the relay that the ATO pump is on to off during wc. I realized that after the water change, my ATO clear was triggered. In theory, if the ATO clear is triggered each time, why would I need to do the time delay if I need to manually clear the ATO anyways? Am I thinking about this way too deeply?
Jack
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Notification for ATO Low

Post by lnevo »

Did you have it in ReefAngel.WaterChangePorts? Not sure I follow the sequence.
howaboutme
Posts: 245
Joined: Tue Jan 28, 2014 11:10 am
Location: Northern VA

Re: Notification for ATO Low

Post by howaboutme »

lnevo wrote:Did you have it in ReefAngel.WaterChangePorts?
Yes, it's part of it.
Jack
Post Reply