Float swich to shut off skimmer if full

Post Reply
lh2o
Posts: 37
Joined: Sun Mar 31, 2013 4:28 am
Location: Montreal,Canada

Float swich to shut off skimmer if full

Post by lh2o »

Hi

using the RA wizard I was trying to use one of my float swich to shut off my skimmer incase the waste bin is full...so basicly having the port always on and then off when trigerd by the flot swich.

it works but the timer feature is preventing me to run this all the time any idea on how to get around this ?
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Float swich to shut off skimmer if full

Post by lnevo »

Check this thread but leave off the else and everything after.
http://forum.reefangel.com/viewtopic.php?t=5554
lh2o
Posts: 37
Joined: Sun Mar 31, 2013 4:28 am
Location: Montreal,Canada

Re: Float swich to shut off skimmer if full

Post by lh2o »

Thanks for helping me with this

I tried but with no success...

here is what my code looks like

void loop()
{
ReefAngel.StandardLights( Port5,17,0,9,0 );
ReefAngel.SingleATO( false,Port6,30,0 );
ReefAngel.StandardLights( Box1_Port1,7,0,19,0 );
ReefAngel.StandardLights( Box1_Port2,8,0,18,0 );
ReefAngel.StandardLights( Box1_Port3,10,30,15,30 );
ReefAngel.StandardLights( Box1_Port4,10,30,15,30 );
ReefAngel.StandardHeater( Box1_Port5,775,786 );
ReefAngel.StandardHeater( Box1_Port6,775,786 );
////// Place your custom code below here
if(ReefAngel.HighATO.IsActive())
{
ReefAngel.Relay.Override(Port6,0);
}

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


I am new to coding so not sure how to make sense of this
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Float swich to shut off skimmer if full

Post by lnevo »

What port is your skimmer on and I don't see code that turns the skimmer on. Is that your full code?
lh2o
Posts: 37
Joined: Sun Mar 31, 2013 4:28 am
Location: Montreal,Canada

Re: Float swich to shut off skimmer if full

Post by lh2o »

the Skimmer is on port 6 of my main relay box

here is my full code

#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 <PH.h>
#include <WaterLevel.h>
#include <Humidity.h>
#include <DCPump.h>
#include <PAR.h>
#include <ReefAngel.h>

////// Place global variable code below here


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


void setup()
{
// This must be the first line
ReefAngel.Init(); //Initialize controller
ReefAngel.Use2014Screen(); // Let's use 2014 Screen
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port1Bit;
ReefAngel.FeedingModePortsE[0] = Port7Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port3Bit | Port6Bit | Port7Bit;
ReefAngel.WaterChangePortsE[0] = 0;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = 0;
ReefAngel.LightsOnPortsE[0] = Port1Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = 0;
ReefAngel.OverheatShutoffPortsE[0] = Port1Bit | Port2Bit | Port3Bit | Port4Bit | Port5Bit | Port6Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 830 );


// Ports that are always on
ReefAngel.Relay.On( Port1 );
ReefAngel.Relay.On( Port2 );
ReefAngel.Relay.On( Port3 );
ReefAngel.Relay.On( Port4 );
ReefAngel.Relay.On( Port7 );
ReefAngel.Relay.On( Port8 );
ReefAngel.Relay.On( Box1_Port7 );
ReefAngel.Relay.On( Box1_Port8 );

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


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

void loop()
{
ReefAngel.StandardLights( Port5,17,0,9,0 );
ReefAngel.SingleATO( false,Port6,30,0 );
ReefAngel.StandardLights( Box1_Port1,7,0,19,0 );
ReefAngel.StandardLights( Box1_Port2,8,0,18,0 );
ReefAngel.StandardLights( Box1_Port3,10,30,15,30 );
ReefAngel.StandardLights( Box1_Port4,10,30,15,30 );
ReefAngel.StandardHeater( Box1_Port5,775,786 );
ReefAngel.StandardHeater( Box1_Port6,775,786 );
////// Place your custom code below here
if(ReefAngel.HighATO.IsActive())
{
ReefAngel.Relay.Override(Port6,0);
}

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

// This should always be the last line
ReefAngel.Portal( "lh2o" );
ReefAngel.DDNS( "DeadBolt" ); // Your DDNS is lh2o-DeadBolt.myreefangel.com
ReefAngel.ShowInterface();
}
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Float swich to shut off skimmer if full

Post by lnevo »

You need to add the skimmer. You have nothing turning it on. Put ReefAngel.Relay.DelayedOn(Port6); before your custom code
lh2o
Posts: 37
Joined: Sun Mar 31, 2013 4:28 am
Location: Montreal,Canada

Re: Float swich to shut off skimmer if full

Post by lh2o »

thanks a million for your help, this was the first time I looked at codding and your help and prompt replies made it a great experience :D

I did get it to work by doing by using ReefAngel.Relay.On( Port6 ); in red below

I tried the ReefAngel.Relay.DelayedOn(Port6); but it did not work

let m e know if makes sense or If I could have done it better differently:

Now the skimmer is always on, the float switch rising causes it to go off (so if my waste bucked gets full) I can reset it to on using the App and punting it back at ON i m my app the skimmer is not in Auto Mode anymore but in on or off


void setup()
{
// This must be the first line
ReefAngel.Init(); //Initialize controller
ReefAngel.Use2014Screen(); // Let's use 2014 Screen
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port1Bit;
ReefAngel.FeedingModePortsE[0] = Port7Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port3Bit | Port6Bit | Port7Bit;
ReefAngel.WaterChangePortsE[0] = 0;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = 0;
ReefAngel.LightsOnPortsE[0] = Port1Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = 0;
ReefAngel.OverheatShutoffPortsE[0] = Port1Bit | Port2Bit | Port3Bit | Port4Bit | Port5Bit | Port6Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 830 );


// Ports that are always on
ReefAngel.Relay.On( Port1 );
ReefAngel.Relay.On( Port2 );
ReefAngel.Relay.On( Port3 );
ReefAngel.Relay.On( Port4 );
ReefAngel.Relay.On( Port6 );
ReefAngel.Relay.On( Port7 );
ReefAngel.Relay.On( Port8 );
ReefAngel.Relay.On( Box1_Port7 );
ReefAngel.Relay.On( Box1_Port8 );

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


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

void loop()
{
ReefAngel.StandardLights( Port5,17,0,9,0 );
ReefAngel.SingleATO( false,Port6,30,0 );
ReefAngel.StandardLights( Box1_Port1,7,0,19,0 );
ReefAngel.StandardLights( Box1_Port2,8,0,18,0 );
ReefAngel.StandardLights( Box1_Port3,10,30,15,30 );
ReefAngel.StandardLights( Box1_Port4,10,30,15,30 );
ReefAngel.StandardHeater( Box1_Port5,775,786 );
ReefAngel.StandardHeater( Box1_Port6,775,786 );
////// Place your custom code below here
if(ReefAngel.HighATO.IsActive())
{
ReefAngel.Relay.Override(Port6,0);
}

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

// This should always be the last line
ReefAngel.Portal( "lh2o" );
ReefAngel.DDNS( "DeadBolt" ); // Your DDNS is lh2o-DeadBolt.myreefangel.com
ReefAngel.ShowInterface();
}
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Float swich to shut off skimmer if full

Post by lnevo »

DelayedOn means after the controller reboots or during feed modes/warer change mode there will be a delay before it turns on...did you wait long enough? Don't put it in ON mode to clear the override, you need to put it back to auto. However there's no consequence to putting it in On mode. The switch should put it back to Off mode regardless
lh2o
Posts: 37
Joined: Sun Mar 31, 2013 4:28 am
Location: Montreal,Canada

Re: Float swich to shut off skimmer if full

Post by lh2o »

I think your right, I might not have waited long enough with the delay

if I put it in Auto the skimmer shuts off... also the clear ATO alarm is always on on my controller perhaps something can still be done to optimize this, let me know what you think
Post Reply