How to use the trigger options in the Portal

Related to the Portal
lukeluke
Posts: 88
Joined: Mon Apr 04, 2011 4:12 am
Location: Rome, Italy

Re: How to use the trigger options in the Portal

Post by lukeluke »

T probe, the value is 251 or 25.1 or 25,1 °C ? :-D
lukeluke
Posts: 88
Joined: Mon Apr 04, 2011 4:12 am
Location: Rome, Italy

Re: How to use the trigger options in the Portal

Post by lukeluke »

The Portal say:

"Send email notifications:

For multiple email addresses, separate them with a comma. Only one email notification will be sent during one hour period. "

One email for every trigger ?
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: How to use the trigger options in the Portal

Post by binder »

lukeluke wrote:there is a way to check if the Relay is set manually to on or off ? and not in auto ?
It will show ON or OFF if it is manually set to one of those. If it is auto it will show AUTO.
lukeluke
Posts: 88
Joined: Mon Apr 04, 2011 4:12 am
Location: Rome, Italy

Re: How to use the trigger options in the Portal

Post by lukeluke »

binder wrote:
lukeluke wrote:there is a way to check if the Relay is set manually to on or off ? and not in auto ?
It will show ON or OFF if it is manually set to one of those. If it is auto it will show AUTO.
For make it , i use :

RON > 0 for check force ON state
ROFF < 255 for check force OFF state
lukeluke
Posts: 88
Joined: Mon Apr 04, 2011 4:12 am
Location: Rome, Italy

Re: How to use the trigger options in the Portal

Post by lukeluke »

how can i check the ATO or overheat alarms ?
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: How to use the trigger options in the Portal

Post by binder »

lukeluke wrote:how can i check the ATO or overheat alarms ?
You would have to monitor them separately. They would need to be handled in the custom variables.
lukeluke
Posts: 88
Joined: Mon Apr 04, 2011 4:12 am
Location: Rome, Italy

Re: How to use the trigger options in the Portal

Post by lukeluke »

ok...

i made it so:


void loop(){
ReefAngel.ShowInterface();
if ( InternalMemory.read(ATO_Single_Exceed_Flag) == 1 )
{
ReefAngel.CustomVar[0]=1;
}
else
{
ReefAngel.CustomVar[0]=0;
}
if ( InternalMemory.read(Overheat_Exceed_Flag) == 1 )
{
ReefAngel.CustomVar[1]=1;
}
else
{
ReefAngel.CustomVar[1]=0;
}

}


Right ?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: How to use the trigger options in the Portal

Post by rimai »

Hey Luca, I remember once a long time ago when you said you couldn't code....
Man, you the master of RA :)
Roberto.
lukeluke
Posts: 88
Joined: Mon Apr 04, 2011 4:12 am
Location: Rome, Italy

Re: How to use the trigger options in the Portal

Post by lukeluke »

I look at your script and replied :-P
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: How to use the trigger options in the Portal

Post by binder »

Make sure you are putting the custom variable updating BEFORE the Portal() function. Otherwise the values will not be sent until the next time through.

Code: Select all

void loop()
{
  // modify custom variables

  ReefAngel.Portal("userid");
  ReefAngel.ShowInterface();
}
lukeluke
Posts: 88
Joined: Mon Apr 04, 2011 4:12 am
Location: Rome, Italy

Re: How to use the trigger options in the Portal

Post by lukeluke »

i don't use ReefAngel.Portal() is the server to get the value. i don't have space for send parameters... ;-)
lukeluke
Posts: 88
Joined: Mon Apr 04, 2011 4:12 am
Location: Rome, Italy

Re: How to use the trigger options in the Portal

Post by lukeluke »

work

<RA>
<T1>268</T1>
<T2>0</T2>
<T3>0</T3>
<PH>642</PH>
<R>11</R>
<RON>0</RON>
<ROFF>255</ROFF>
<ATOLOW>0</ATOLOW>
<ATOHIGH>1</ATOHIGH>
<EM>0</EM>
<REM>0</REM>
<PWMA>0</PWMA>
<PWMD>0</PWMD>
<C0>0</C0>
<C1>0</C1>
<C2>0</C2>
<C3>0</C3>
<C4>0</C4>
<C5>0</C5>
<C6>0</C6>
<C7>0</C7>
</RA>
lukeluke
Posts: 88
Joined: Mon Apr 04, 2011 4:12 am
Location: Rome, Italy

Re: How to use the trigger options in the Portal

Post by lukeluke »

i put this trigger:

T1 <= 24 Temp too less
T1 >= 27.5 Temp too high
RON > 0 Relay force on
ROFF < 255 Relay force off
C0 = 1 ATO Alarm
C1 = 1 Overheat Alarm

;-)
lukeluke
Posts: 88
Joined: Mon Apr 04, 2011 4:12 am
Location: Rome, Italy

Re: How to use the trigger options in the Portal

Post by lukeluke »

i try the ATO Alarm , C0=1... but i see that the alarm don't arrive.

so i try to connect to wifi of the controller... but not work. /wifi or /r99 nothing ......

i restart my controller, but nothing the web server don't respond....

i try to clear the ato alarm and..... magically the web server work!

there is some bug to customs ?
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: How to use the trigger options in the Portal

Post by binder »

The alarm is only sent when the data is sent to the portal. If you are only sending the data every 3 minutes, then it can take up to 3 minutes for the alarm to be sent once it is triggered. Also, make sure you are setting the alarm / custom variable BEFORE the call to Portal() (or webbanner()). Otherwise, the value will not be sent until the next time it is sent (which could be another 3 minutes later).
lukeluke
Posts: 88
Joined: Mon Apr 04, 2011 4:12 am
Location: Rome, Italy

Re: How to use the trigger options in the Portal

Post by lukeluke »

the problem is not the alarm...but the internal web server of the RA.

When the ato alarm is on and the c0=1 the internal web server of the RA don't work.

when i write on my browser ip:2000/wifi o /r99 it not answer
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: How to use the trigger options in the Portal

Post by rimai »

I'll have to check on that.
Roberto.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: How to use the trigger options in the Portal

Post by rimai »

This is the code I use to test:

Code: Select all

#include <Salinity.h>
#include <ReefAngel_Features.h>
#include <Globals.h>
#include <RA_Wifi.h>
#include <Wire.h>
#include <OneWire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <InternalEEPROM.h>
#include <RA_NokiaLCD.h>
#include <RA_ATO.h>
#include <RA_Joystick.h>
#include <LED.h>
#include <RA_TempSensor.h>
#include <Relay.h>
#include <RA_PWM.h>
#include <Timer.h>
#include <Memory.h>
#include <InternalEEPROM.h>
#include <RA_Colors.h>
#include <RA_CustomColors.h>
#include <RF.h>
#include <IO.h>
#include <ORP.h>
#include <ReefAngel.h>

void setup()
{
  ReefAngel.Init();  
}

void loop()
{
  ReefAngel.SingleATO(true,Port1,4,1);

  if ( InternalMemory.read(ATO_Single_Exceed_Flag) == 1 )
  {
    ReefAngel.CustomVar[0]=1;
  }
  else
  {
    ReefAngel.CustomVar[0]=0;
  }

  ReefAngel.ShowInterface();
}

With this features:

Code: Select all

#ifndef __REEFANGEL_FEATURES_H__
#define __REEFANGEL_FEATURES_H__


#define DisplayLEDPWM
#define wifi
#define SIMPLE_MENU
#define ENABLE_EXCEED_FLAGS
#define CUSTOM_VARIABLES


#endif  // __REEFANGEL_FEATURES_H__
When I pull the data without timeout, I get this:

Code: Select all

HTTP/1.1 200 OK
Server: ReefAngel
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Connection: close
Content-Type: text/xml
Content-Length: 257

<RA><T1>0</T1><T2>0</T2><T3>0</T3><PH>505</PH><R>0</R><RON>0</RON><ROFF>255</ROFF><ATOLOW>0</ATOLOW><ATOHIGH>0</ATOHIGH><EM>0</EM><REM>0</REM><PWMA>20</PWMA><PWMD>20</PWMD><C0>0</C0><C1>0</C1><C2>0</C2><C3>0</C3><C4>0</C4><C5>0</C5><C6>0</C6><C7>0</C7></RA>
When I pull data with the timeout, I get this:

Code: Select all

HTTP/1.1 200 OK
Server: ReefAngel
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Connection: close
Content-Type: text/xml
Content-Length: 257

<RA><T1>0</T1><T2>0</T2><T3>0</T3><PH>504</PH><R>0</R><RON>0</RON><ROFF>255</ROFF><ATOLOW>0</ATOLOW><ATOHIGH>0</ATOHIGH><EM>0</EM><REM>0</REM><PWMA>20</PWMA><PWMD>20</PWMD><C0>1</C0><C1>0</C1><C2>0</C2><C3>0</C3><C4>0</C4><C5>0</C5><C6>0</C6><C7>0</C7></RA>
I could not get the same behavior you experienced.
Can you post your code and features?
Roberto.
lukeluke
Posts: 88
Joined: Mon Apr 04, 2011 4:12 am
Location: Rome, Italy

Re: How to use the trigger options in the Portal

Post by lukeluke »

this is my pde
// Autogenerated file by RAGen (v1.2.1.158), (02/21/2012 19:09)
// RA_022112_1909.ino
//
// This version designed for v0.9.0 or later

/* The following features are enabled for this File:
#define DisplayLEDPWM
#define wifi
#define WDT
#define SIMPLE_MENU
#define CUSTOM_MAIN
#define ENABLE_ATO_LOGGING
#define ENABLE_EXCEED_FLAGS
#define CUSTOM_VARIABLES
*/


#include <ReefAngel_Features.h>
#include <Globals.h>
#include <RA_Wifi.h>
#include <Wire.h>
#include <OneWire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <InternalEEPROM.h>
#include <RA_NokiaLCD.h>
#include <RA_ATO.h>
#include <RA_Joystick.h>
#include <LED.h>
#include <RA_TempSensor.h>
#include <Relay.h>
#include <RA_PWM.h>
#include <Timer.h>
#include <Memory.h>
#include <ReefAngel.h>

int DP3_Timer = InternalMemory.DP1Timer_read() * 4;

void DrawCustomMain()
{
// the graph is drawn/updated when we exit the main menu &
// when the parameters are saved
ReefAngel.LCD.DrawDate(6, 112);
pingSerial();
#if defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.LCD.DrawMonitor(15, 10, ReefAngel.Params,
ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue());
#else // defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.LCD.DrawMonitor(15, 10, ReefAngel.Params);
#endif // defined DisplayLEDPWM && ! defined RemoveAllLights
pingSerial();
byte x = 8;
byte y = 45;
char text[7];
ReefAngel.LCD.DrawText(DefaultFGColor, DefaultBGColor, x, y, "DP1:");
ReefAngel.LCD.DrawText(DefaultFGColor, DefaultBGColor, x+25, y, InternalMemory.DP1Timer_read());
ReefAngel.LCD.DrawText(DefaultFGColor, DefaultBGColor, x+37, y, "DP2:");
ReefAngel.LCD.DrawText(DefaultFGColor, DefaultBGColor, x+62, y, InternalMemory.DP2Timer_read());
ReefAngel.LCD.DrawText(DefaultFGColor, DefaultBGColor, x+75, y, "DP3:");
ReefAngel.LCD.DrawText(DefaultFGColor, DefaultBGColor, x+101, y, DP3_Timer);
x = 6;
y += MENU_START_ROW+6;
y -= 3;
ReefAngel.LCD.Clear(COLOR_BLACK, x, y, 124, y);
y +=1;
ReefAngel.LCD.Clear(COLOR_BLUE, x+1, y, 123, y+10);
y +=11;
ReefAngel.LCD.Clear(COLOR_BLACK, x, y, 124, y);
ReefAngel.LCD.Clear(COLOR_BLACK, x, y-11, x, y+16);
ReefAngel.LCD.Clear(COLOR_BLACK, 124, y-11, 124, y+16);
ReefAngel.LCD.DrawText(COLOR_WHITE, COLOR_BLUE, x+40, y-9, "Alarms");
y += 6;
x += 2;
byte fcolor;
// This is for the LOW Ato switch
ReefAngel.LCD.DrawText(DefaultFGColor, DefaultBGColor, x+2, y,"ATO:");
if ( InternalMemory.read(ATO_Single_Exceed_Flag) == 1 )
{
// add in InternalMemory.write(700, 1) when ato is tripped
// add in InternalMemory.write(700, 0) when ato is cleared
fcolor = COLOR_RED;
ReefAngel.LCD.DrawText(fcolor, DefaultBGColor, x+30, y, "YES");
}
else
{
fcolor = COLOR_GREEN;
ReefAngel.LCD.DrawText(fcolor, DefaultBGColor, x+30, y, "NO ");
}
ReefAngel.LCD.DrawText(DefaultFGColor, DefaultBGColor, x+55, y,"OverH:");
if ( InternalMemory.read(Overheat_Exceed_Flag) == 1 )
{
// add in InternalMemory.write(701, 1) when overheat is tripped
// add in InternalMemory.write(701, 0) when overheat is cleared
fcolor = COLOR_RED;
strcpy(text, "YES");
}
else
{
fcolor = COLOR_GREEN;
strcpy(text, "NO ");
}
ReefAngel.LCD.DrawText(fcolor, DefaultBGColor, x+94, y, text);
ReefAngel.LCD.Clear(COLOR_BLACK, x-2, y+11, 124, y+11);
byte TempRelay = ReefAngel.Relay.RelayData;
TempRelay &= ReefAngel.Relay.RelayMaskOff;
TempRelay |= ReefAngel.Relay.RelayMaskOn;
ReefAngel.LCD.DrawOutletBox(12, 95, TempRelay);
}

void DrawCustomGraph()
{
// ReefAngel.LCD.DrawGraph(5, 5);
}


void setup()
{
ReefAngel.Init(); //Initialize controller
ReefAngel.SetTemperatureUnit(1); // set to Celsius Temperature
ReefAngel.PWM.SetActinic(0);
ReefAngel.PWM.SetDaylight(0);
int DP3_Timer = InternalMemory.DP1Timer_read() * 4;

}

void loop()
{
// Specific functions
ReefAngel.StandardFan(Port1);
ReefAngel.MHLights(Port2);
// ReefAngel.DosingPump1(Port3);
//ReefAngel.DosingPumpRepeat(Port3, 0, 360, InternalMemory.DP1Timer_read());
ReefAngel.Relay.DelayedOn(Port4, 5);
// ReefAngel.DosingPump2(Port5);
//ReefAngel.DosingPumpRepeat(Port5, 10, 360, InternalMemory.DP2Timer_read());
ReefAngel.SingleATOHigh(Port6);
ReefAngel.StandardHeater(Port8);

ReefAngel.DosingPump(Port3, 1, 23, 20, InternalMemory.DP1Timer_read());
ReefAngel.DosingPump(Port3, 1, 05, 00, InternalMemory.DP1Timer_read());
ReefAngel.DosingPump(Port3, 1, 11, 00, InternalMemory.DP1Timer_read());
ReefAngel.DosingPump(Port3, 1, 17, 00, InternalMemory.DP1Timer_read());

ReefAngel.DosingPump(Port5, 2, 23, 30, InternalMemory.DP2Timer_read());
ReefAngel.DosingPump(Port5, 2, 05, 10, InternalMemory.DP2Timer_read());
ReefAngel.DosingPump(Port5, 2, 11, 10, InternalMemory.DP2Timer_read());
ReefAngel.DosingPump(Port5, 2, 17, 10, InternalMemory.DP2Timer_read());

// ReefAngel.DosingPump(Port7, 23, 20, DP3_Timer); // Setup Dosing Pump 3 Oligo

ReefAngel.ShowInterface();
if ( InternalMemory.read(ATO_Single_Exceed_Flag) == 1 )
{
ReefAngel.CustomVar[0]=1;
}
else
{
ReefAngel.CustomVar[0]=0;
}
if ( InternalMemory.read(Overheat_Exceed_Flag) == 1 )
{
ReefAngel.CustomVar[1]=1;
}
else
{
ReefAngel.CustomVar[1]=0;
}

}
with the new version the dosingpump repeat don't work.... or i' m not able.... :-D

if you want, this evening i retry it ;-)
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: How to use the trigger options in the Portal

Post by rimai »

Did you download 0.9.2 for the dosing pump fix?
I'll look over your code to see what I get.
Roberto.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: How to use the trigger options in the Portal

Post by rimai »

Just to confirm, but you do have this on the features file, righ?

Code: Select all

#define ENABLE_EXCEED_FLAGS
Roberto.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: How to use the trigger options in the Portal

Post by rimai »

I tested your code and got the same thing I posted earlier.
Seems it is working fine here.
Roberto.
lukeluke
Posts: 88
Joined: Mon Apr 04, 2011 4:12 am
Location: Rome, Italy

Re: How to use the trigger options in the Portal

Post by lukeluke »

i try it now...and it's work

<RA><T1>266</T1><T2>0</T2><T3>0</T3><PH>924</PH><R>11</R><RON>0</RON><ROFF>255</ROFF><ATOLOW>0</ATOLOW><ATOHIGH>0</ATOHIGH><EM>0</EM><REM>0</REM><PWMA>0</PWMA><PWMD>0</PWMD><C0>1</C0><C1>0</C1><C2>0</C2><C3>0</C3><C4>0</C4><C5>0</C5><C6>0</C6><C7>0</C7></RA>
lukeluke
Posts: 88
Joined: Mon Apr 04, 2011 4:12 am
Location: Rome, Italy

Re: How to use the trigger options in the Portal

Post by lukeluke »

Hi,
i enable the Portal in my .ino code, and it' s work.

Now, i have the ATO in Alarms :

<RA><T1>270</T1><T2>0</T2><T3>0</T3><PH>665</PH><R>15</R><RON>0</RON><ROFF>255</ROFF><ATOLOW>0</ATOLOW><ATOHIGH>1</ATOHIGH><EM>0</EM><REM>0</REM><PWMA>0</PWMA><PWMD>0</PWMD><C0>1</C0><C1>0</C1><C2>0</C2><C3>0</C3><C4>0</C4><C5>0</C5><C6>0</C6><C7>0</C7></RA>

i set the trigger, but the portal don't send the email.

Image

Image

What is wrong ?
lukeluke
Posts: 88
Joined: Mon Apr 04, 2011 4:12 am
Location: Rome, Italy

Re: How to use the trigger options in the Portal

Post by lukeluke »

Roberto, have any news?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: How to use the trigger options in the Portal

Post by rimai »

Yes, it should've been fixed a while ago.
Sorry I forgot to post.
Can you try?
Roberto.
lukeluke
Posts: 88
Joined: Mon Apr 04, 2011 4:12 am
Location: Rome, Italy

Re: How to use the trigger options in the Portal

Post by lukeluke »

rimai wrote:Yes, it should've been fixed a while ago.
Sorry I forgot to post.
Can you try?
i don't try it....

but,
do you think is possible add at the trigger a lable ?

for example i set this:

T1 <= 23.7
T1 >= 27.5
RON > 0
C0 = 1
C1 = 1

Is possible add a lable, so the email object use it ?

Like :

T1 <= 23.7 Label: Water temp too low
T1 >= 27.5 Label: Water temp too high
RON > 0 Label: test
C0 = 1 Label: ATO Alarm
C1 = 1 Label: Overheat Alarm

Do you think is possible configure a rearm ?

TNX ;-)
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: How to use the trigger options in the Portal

Post by rimai »

I think it already sends the trigger as well as the actual value, so you know exactly what happened.
The trigger is always active and will send alerts every consecutive hour if the alert condition is still active.
Roberto.
btorrenga
Posts: 100
Joined: Mon Apr 16, 2012 10:22 pm

Re: How to use the trigger options in the Portal

Post by btorrenga »

I am trying to do similar. I would like to set a custom variable when the ATO timeout is exceeded. The code compiles fine, but my custom variable is not set for some reason. Here are (I think) the relevant portions of my ino file:

Code: Select all

/* The following features are enabled for this File: 

#define DisplayImages
#define SetupExtras
#define OverheatSetup
#define DateTimeSetup
#define VersionMenu
#define wifi
#define SaveRelayState
#define RelayExp
#define InstalledRelayExpansionModules 1
#define DosingPumpIntervalSetup
#define WDT
#define CUSTOM_MENU
#define CUSTOM_MENU_ENTRIES 9
#define CUSTOM_MAIN
#define COLORS_PDE
#define ENABLE_ATO_LOGGING
#define ENABLE_EXCEED_FLAGS
#define IOEXPANSION
#define FONT_8x8
#define FONT_8x16
#define FONT_12x16
#define NUMBERS_8x8
#define NUMBERS_8x16
#define NUMBERS_12x16
#define NUMBERS_16x16
#define CUSTOM_VARIABLES

*/


#include <ReefAngel_Features.h>
#include <RA_Colors.h>
#include <RA_CustomColors.h>
#include <Globals.h>
#include <RA_Wifi.h>
#include <Wire.h>
#include <OneWire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <InternalEEPROM.h>
#include <RA_NokiaLCD.h>
#include <RA_ATO.h>
#include <RA_Joystick.h>
#include <LED.h>
#include <RA_TempSensor.h>
#include <Relay.h>
#include <Timer.h>
#include <Memory.h>
#include <IO.h>
#include <ReefAngel.h>
#include <RA_PWM.h>
#include <avr/pgmspace.h>

.
.
.


void MyCustomATO(int ATOTimeout)
{
    /*
    This function works as follows:

    When it's time to topoff the system, we check the levels of each
    of the three reservoirs.  If a reservoir is empty, we set a custom
    flag to indicate it's empty on the portal and we do not start that
    pump.  Otherwise, we clear the custom flag for the reservoir and
    start the pump.
    The function monitors the switch levels like normal.
    Monitor the status of the reservoirs while topping off.
    When the high switch is triggered (aka, finished topping off), 
    ALL ports are turned off regardless of status (doesn't hurt to do this).
    If the timeout occurs, the LED light comes on and all ports are 
    turned off just like when we finish topping off.
    
    */
    unsigned long TempTimeout = ATOTimeout;
    TempTimeout *= 1000;

    if ( ReefAngel.LowATO.IsActive() && ( !ReefAngel.LowATO.IsTopping()) )
    {
        ReefAngel.LowATO.Timer = millis();
        ReefAngel.LowATO.StartTopping();

        // Check the level of each reservoir
        // If empty, set the alert and don't start topping off
        // otherwise if not empty, clear the alert and start topping
        CheckReservoirStatus(0, Port5);
        CheckReservoirStatus(1, Port6);
        CheckReservoirStatus(2, Box1_Port5);
    }

    // Monitor levels while topping off, to prevent a reservoir from running dry
    // Might need to remove this check here -- Nope, this seems to work fine.
    
    if ( ReefAngel.LowATO.IsTopping() )
    {
        CheckReservoirStatus(0, Port5);
        CheckReservoirStatus(1, Port6);
        CheckReservoirStatus(2, Box1_Port5);
    }

    if ( ReefAngel.HighATO.IsActive() )
    {
        ReefAngel.LowATO.StopTopping();  // stop the low ato timer
        ReefAngel.Relay.Off(Port5);
        ReefAngel.Relay.Off(Port6);
        ReefAngel.Relay.Off(Box1_Port5);
    }

    if ( (millis()-ReefAngel.LowATO.Timer > TempTimeout) && ReefAngel.LowATO.IsTopping() )
    {
        ReefAngel.LED.On();
#ifdef ENABLE_EXCEED_FLAGS
        InternalMemory.write(ATO_Exceed_Flag, 1);
#endif  // ENABLE_EXCEED_FLAGS
        ReefAngel.Relay.Off(Port5);
        ReefAngel.Relay.Off(Port6);
        ReefAngel.Relay.Off(Box1_Port5);
#ifdef ENABLE_ATO_LOGGING
        // bump the counter if a timeout occurs
        AtoEventCount++;
        if ( AtoEventCount >= MAX_ATO_LOG_EVENTS ) { AtoEventCount = 0; }
#endif  // ENABLE_ATO_LOGGING
    }
}

.
.
.

loop section:


//If the ATO float switch is stuck, and the topoff pump timeout flag is set, then set C5=1
if ( InternalMemory.read(ATO_Exceed_Flag) == 1 )
{
ReefAngel.CustomVar[5]=1;
}
else
{
ReefAngel.CustomVar[5]=0;
}
When compiling I get this output, which I think indicates the exceed flagging is enabled, and which I think is required for the custom ATO function to set the ato flag properly:

Code: Select all

The following feature was automatically added:
Watchdog Timer
Version Menu

The following features were detected:
Dimming Signal
I/O Expansion Module
Wifi
Relay Expansion Module
Number of Relay Expasions: 1
Custom Main Screen
Custom Menu
Number of Menu Options: 9
Custom Variable
Exceed Flagging
Extra Font - Medium Size (8x8 pixels)
Extra Font - Large Size (8x16 pixels)
Extra Font - Extra Large Size (12x16 pixels)
Extra Font - Numbers Only - Medium Size (8x8 pixels)
Extra Font - Numbers Only - Large Font (8x16 pixels)
Extra Font - Numbers Only - Extra Large Font (12x16 pixels)
Extra Font - Numbers Only - Huge Font (16x16 pixels)
Date/Time Setup Menu
Binary sketch size: 41,740 bytes (of a 258,048 byte maximum)
What the heck am I missing?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: How to use the trigger options in the Portal

Post by rimai »

Just to be sure, you do have MyCustomATO() inside loop(), correct?
Other than that, everything looks good.
Does the red status led turn on when the you get ato timeout?
Roberto.
Post Reply