Ato trigger for portal

Related to the Portal
Post Reply
dbmet
Posts: 235
Joined: Thu Nov 10, 2011 11:49 am

Ato trigger for portal

Post by dbmet »

How do I set the trigger for on the portal to email me when the high float switch is made on the controller. I'm guessing there is some code in the custom variables to add to the controller. But not sure what to add or where.
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Ato trigger for portal

Post by rimai »

Use ATOHIGH=1
Roberto.
dbmet
Posts: 235
Joined: Thu Nov 10, 2011 11:49 am

Re: Ato trigger for portal

Post by dbmet »

Last Stupid Question but Where does it go?


/* The following features are enabled for this File:
#define Fan 8
#define LightWhite 7
#define Main Pump 6
#define Skimmer 5
#define Heater 4
#define Powerhead 3
#define ATO 2
#define LightBlue 1

#define DisplayLEDPWM
#define wifi
#define WDT
#define SIMPLE_MENU
#define CUSTOM_MAIN
#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 <InternalEEPROM.h>
#include <RA_Colors.h>
#include <RA_CustomColors.h>
#include <Salinity.h>
#include <RF.h>
#include <IO.h>
#include <ORP.h>
#include <AI.h>
#include <ReefAngel.h>

////// Place global variable code below here
void DrawCustomMain()
{
byte x = 6;
byte y = 2;
byte t;
char text[8];


ReefAngel.LCD.DrawDate(6, 2);
ReefAngel.LCD.Clear(COLOR_BLACK, 1, 11, 132, 11);
pingSerial();

ReefAngel.LCD.DrawText(0,255,3,17,"Daryl's 90 Reef");



pingSerial();

ReefAngel.LCD.DrawText(COLOR_BLACK,255, 6, 90, "--------------------");
ReefAngel.LCD.DrawText(COLOR_BLACK,255, 6, 126, "--------------------");
ReefAngel.LCD.DrawText(COLOR_BLACK,255, 2, 93, "|");
ReefAngel.LCD.DrawText(COLOR_BLACK,255, 2, 103, "|");
ReefAngel.LCD.DrawText(COLOR_BLACK,255, 2, 113, "|");
ReefAngel.LCD.DrawText(COLOR_BLACK,255, 2, 123, "|");
ReefAngel.LCD.DrawText(COLOR_BLACK,255, 126, 93, "|");
ReefAngel.LCD.DrawText(COLOR_BLACK,255, 126, 103, "|");
ReefAngel.LCD.DrawText(COLOR_BLACK,255, 126, 113, "|");
ReefAngel.LCD.DrawText(COLOR_BLACK,255, 126, 123, "|");


ReefAngel.LCD.DrawText(0,255,10,30,"Water");
ConvertNumToString(text, ReefAngel.Params.Temp[T1_PROBE], 10);
ReefAngel.LCD.DrawText(COLOR_BLACK, 255, 10, 40, text);


ReefAngel.LCD.DrawText(0,255,100,30,"pH");
ConvertNumToString(text, ReefAngel.Params.PH, 100);
ReefAngel.LCD.DrawText(COLOR_BLACK, 255, 95, 40, text);

pingSerial();

byte TempRelay = ReefAngel.Relay.RelayData;
TempRelay &= ReefAngel.Relay.RelayMaskOff;
TempRelay |= ReefAngel.Relay.RelayMaskOn;
ReefAngel.LCD.DrawOutletBox(12, 77, TempRelay);

pingSerial();

ReefAngel.LCD.DrawText(0,255,8,100, "CWLED");
ReefAngel.LCD.DrawText(COLOR_BLACK,255,15,119, ReefAngel.PWM.GetDaylightValue());

ReefAngel.LCD.DrawText(0,255,88,100, "RBLED");
ReefAngel.LCD.DrawText(COLOR_BLACK,255,90,119, ReefAngel.PWM.GetActinicValue());


}
void DrawCustomGraph()
{
}

////// Place global variable code above here


void setup()
{
// This must be the first line
ReefAngel.Init(); //Initialize controller
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port4Bit | Port3Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port5Bit | Port6Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port1Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = 0;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 828 );


// Ports that are always on

ReefAngel.Relay.On( Port6 );

////// Place additional initialization code below here


////// Place additional initialization code above here
}

void loop()
{
ReefAngel.StandardLights( Port1,14,15,21,15 );
ReefAngel.SingleATO( true,Port2,420,0 );
if (!ReefAngel.HighATO.IsActive()) ReefAngel.Relay.Off (Port2);
ReefAngel.StandardLights( Port7,14,45,20,45 );
ReefAngel.StandardFan( Port8,815,816 );
ReefAngel.Relay.DelayedOn( Port5,5 );
////// Place your custom code below here


////// Place your custom code above here
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Ato trigger for portal

Post by rimai »

On the portal.
Go to "Portal Settings" and enable send email notifications.
Then you can add any trigger you wish.
Roberto.
dbmet
Posts: 235
Joined: Thu Nov 10, 2011 11:49 am

Re: Ato trigger for portal

Post by dbmet »

Got it.. Should the Ato high light on the portal be green but go red when the switch makes?
d
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Ato trigger for portal

Post by rimai »

yeap.
green means it is closed (not floating)
Roberto.
dbmet
Posts: 235
Joined: Thu Nov 10, 2011 11:49 am

Re: Ato trigger for portal

Post by dbmet »

Thanks!!!
d
Image
dbmet
Posts: 235
Joined: Thu Nov 10, 2011 11:49 am

Re: Ato trigger for portal

Post by dbmet »

Not sure why I keep getting an email alert even when the switch isn't made.. I checked to make sure the switch is working and when the ato is calling for water I can trip the upper level switch as a failsafe and it turns off the ato port.

Anything else to check?
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Ato trigger for portal

Post by rimai »

Humm...
Sorry... my bad.
You need to use ATOHIGH=0
Roberto.
dbmet
Posts: 235
Joined: Thu Nov 10, 2011 11:49 am

Re: Ato trigger for portal

Post by dbmet »

Lol I was gonna change it to that just for giggles but I was SCARED.. hehe

thanks Now to figure out my heater programming..

Daryl
Image
Post Reply