How to use the trigger options in the Portal

Related to the Portal

Posts: 12226
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Mon Mar 05, 2012 10:06 am
Just to confirm, but you do have this on the features file, righ?
Code: Select all
#define ENABLE_EXCEED_FLAGS
Roberto.

Posts: 12226
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Mon Mar 05, 2012 10:11 am
I tested your code and got the same thing I posted earlier.
Seems it is working fine here.
Roberto.

Posts: 88
Joined: Mon Apr 04, 2011 4:12 am
Location: Rome, Italy
PostPosted: Mon Mar 05, 2012 12:08 pm
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>

Posts: 88
Joined: Mon Apr 04, 2011 4:12 am
Location: Rome, Italy
PostPosted: Tue Apr 17, 2012 12:04 pm
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 ?

Posts: 88
Joined: Mon Apr 04, 2011 4:12 am
Location: Rome, Italy
PostPosted: Mon Apr 30, 2012 1:48 pm
Roberto, have any news?

Posts: 12226
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Mon Apr 30, 2012 1:52 pm
Yes, it should've been fixed a while ago.
Sorry I forgot to post.
Can you try?
Roberto.

Posts: 88
Joined: Mon Apr 04, 2011 4:12 am
Location: Rome, Italy
PostPosted: Fri May 11, 2012 1:44 am
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 ;-)

Posts: 12226
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Fri May 11, 2012 8:16 am
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.

Posts: 100
Joined: Mon Apr 16, 2012 10:22 pm
PostPosted: Sat Jun 02, 2012 5:51 pm
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?

Posts: 12226
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Sat Jun 02, 2012 6:57 pm
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.
PreviousNext

Return to Portal

Who is online

Users browsing this forum: No registered users and 2 guests

cron