COUPLE QUICK QUESTIONS


Posts: 26
Joined: Fri Jul 06, 2012 5:22 pm
PostPosted: Wed Dec 12, 2012 1:33 pm
I have just a few questions for anyone who may know the answer or can help. thanks in advance

1. Can I do an overheat clear from the portal online or from my phone app while im away from home to get my
halides to come back on without having to manually clear it at home on the controller itself?

2. Im currently not using my 2 float switchs that came with my RA but would like to use them just as a means to monitor my water level if it get to low and that the water level is staying put. So I would like to utlize them as monitors is all. Anyhow can somone give me the code that I need to input into mine and weres about to place the code. thanks

my current code example:

void DrawCustomGraph()
{

}

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

ReefAngel.Init();
ReefAngel.AddWifi();

// Ports that are always on


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


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

void loop()
{
ReefAngel.MHLights( Port1,13,0,19,0,15 );
if ( hour() >=20 || hour() < 5)
ReefAngel.DosingPumpRepeat( Port2,0,60,240 );
else
ReefAngel.Relay.Off( Port2 );

if ( hour() >=9 && hour() <18)
ReefAngel.DosingPumpRepeat( Port3,0,60,240 );
else
ReefAngel.Relay.Off( Port3 );
ReefAngel.StandardFan( Port4,785,789 );
ReefAngel.StandardHeater( Port5,780,783 );
if (( hour()==10 && minute()<15) || (hour()==13 && minute()<15))
ReefAngel.Relay.Off (Port6);
else
ReefAngel.Relay.On (Port6);
ReefAngel.StandardLights( Port7,17,0,10,0 );
ReefAngel.MHLights( Port8,13,0,19,0,15 );
////// Place your custom code below here


////// Place your custom code above here

// This should always be the last line
ReefAngel.Portal( "iceman330824" );
ReefAngel.ShowInterface();
}
Image
User avatar
Posts: 2753
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
PostPosted: Wed Dec 12, 2012 2:32 pm
1. yes, you can clear the overheat flag from the android app.

2. yes, you can use the ato ports and switches to monitor levels. you would not use the predefined functions. an example will follow later.

Posts: 26
Joined: Fri Jul 06, 2012 5:22 pm
PostPosted: Wed Dec 12, 2012 2:45 pm
binder wrote:1. yes, you can clear the overheat flag from the android app.

2. yes, you can use the ato ports and switches to monitor levels. you would not use the predefined functions. an example will follow later.


OK GREAT. I saw the answer to question number 1 and look forward to example for number 2. thanks again
Image
User avatar
Posts: 2753
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
PostPosted: Wed Dec 12, 2012 6:24 pm
With the ATO, there are 2 ports available. This means that you will be able to have 2 switches to monitor 2 different water levels if you desire. I'm just going to give an example for 1 of the switches. The switches are called LowATO and HighATO.

I'm going to get a little creative for you with this one. It may not be what you are looking for, but it can show you the robust capabilities of the system. Since you are using the portal, this will work well for you.

We are going to have the LowATO port monitor the level of the water. When the level is too low it activates the switch and the portal will be notified of the ATO timeout being exceeded (which will be too low in our case). Then you can have the portal trigger an email alert to you. I'm using this topic (viewtopic.php?f=20&t=2248&p=17140) as a reference.

Place this code inside the loop() between the lines that say "Place custom code here".
Code: Select all
// If the Low ATO switch is active, write a 1 to the ato single exceed location
// to indicate that the reservoir is low
if ( ReefAngel.LowATO.IsActive() )
{
    InternalMemory.write(ATO_Single_Exceed_Flag, 1);
}

// Read the memory location for the reservoir to be updated on the portal
ReefAngel.CustomVar[0]=InternalMemory.read(ATO_Single_Exceed_Flag);
ReefAngel.CustomVar[7]=255;

To clear the alert, you need to write a 0 to the ATO_Single_Exceed_Flag using either the Portal or one of the Apps (smartphone or java).

Lastly, from the other thread, you must set an alert in the Portal using C0>0 as the trigger for the email alert.

To sum it up, the controller will run and always monitor the switch levels. Once it is triggered, it is set. The controller will not clear it and you have to manually clear it....even if the controller is restarted because it's stored in the internal memory.

Return to Ask anything here

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron