Wizard refugium light

Do you have a question on how to do something.
Ask in here.
Post Reply
iiluisii
Posts: 79
Joined: Mon Jul 09, 2012 10:16 am

Wizard refugium light

Post by iiluisii »

How do I change the refugium code from the wizard to run the refugium less hours. On the wizard is set up to come after the main lights go off and then turn off when the main lights come on making it be on for like 16 hrs I would like the refugium to be on for 9 hours for Now
User avatar
cosmith71
Posts: 1432
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: Wizard refugium light

Post by cosmith71 »

iiluisii wrote:How do I change the refugium code from the wizard to run the refugium less hours. On the wizard is set up to come after the main lights go off and then turn off when the main lights come on making it be on for like 16 hrs I would like the refugium to be on for 9 hours for Now
Post your code and tell us which relay your fuge light is on. Should be easy to fix.

--Colin
iiluisii
Posts: 79
Joined: Mon Jul 09, 2012 10:16 am

Re: Wizard refugium light

Post by iiluisii »

#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 <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
ReefAngel.AddWaterLevelExpansion(); // Water Level Expansion Module
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port7Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port3Bit | Port6Bit | Port7Bit | Port8Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port1Bit | Port2Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port3Bit | Port6Bit | Port7Bit | Port8Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;


// Ports that are always on
ReefAngel.Relay.On( Port7 );
ReefAngel.Relay.On( Port8 );

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


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

void loop()
{
ReefAngel.DayLights( Port1 );
ReefAngel.ActinicLights( Port2 );
ReefAngel.StandardHeater( Port3 );
ReefAngel.MoonLights( Port4 );
ReefAngel.MoonLights( Port5 );
ReefAngel.WaterLevelATO( Port6 );
////// Place your custom code below here


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

// This should always be the last line
ReefAngel.Portal( "iiluisii" );
ReefAngel.ShowInterface();
}
User avatar
cosmith71
Posts: 1432
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: Wizard refugium light

Post by cosmith71 »

Looks like your fuge lights are either on Port4 or Port5. You're also using in-memory settings. We can hard-code the fuge light to be different.

Which port are you using for your fuge, and what times do you want it to run?

--Colin
iiluisii
Posts: 79
Joined: Mon Jul 09, 2012 10:16 am

Re: Wizard refugium light

Post by iiluisii »

Port 4 and 6 are the fudge lights I would like them to come on at 9pm and off at 6 am
User avatar
cosmith71
Posts: 1432
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: Wizard refugium light

Post by cosmith71 »

iiluisii wrote:Port 4 and 6 are the fudge lights I would like them to come on at 9pm and off at 6 am
According to your code, port 6 is your ATO. Are you sure it's not 4 and 5?

Change this line:

Code: Select all

ReefAngel.MoonLights( Port4 );
To this:

Code: Select all

    ReefAngel.StandardLights( Port4,21,0,6,0 );
The syntax is ReefAngel.StandardLights( Port you want to use, start hour, start minute, end hour, end minute );

Hours are in 24 hour format.

Do the same with the other port you want to use.

Hope this helps,

--Colin
iiluisii
Posts: 79
Joined: Mon Jul 09, 2012 10:16 am

Re: Wizard refugium light

Post by iiluisii »

cosmith71 wrote:
iiluisii wrote:Port 4 and 6 are the fudge lights I would like them to come on at 9pm and off at 6 am
According to your code, port 6 is your ATO. Are you sure it's not 4 and 5?

Change this line:

Code: Select all

ReefAngel.MoonLights( Port4 );
To this:

Code: Select all

    ReefAngel.StandardLights( Port4,21,0,6,0 );
The syntax is ReefAngel.StandardLights( Port you want to use, start hour, start minute, end hour, end minute );

Hours are in 24 hour format.

Do the same with the other port you want to use.

Hope this helps,

--Colin
wow thanks man. I'm dumb when it comes to this. yea you are right is port 4 and 5
iiluisii
Posts: 79
Joined: Mon Jul 09, 2012 10:16 am

Re: Wizard refugium light

Post by iiluisii »

can you check this code for me.
i also intagrated safeties for the ato + kalk reactor.
if the water level gets 40 % turn off port6
if water level gets to120% turn off port 6
if waterph gets above 8.4 turn off port 6

#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 <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
ReefAngel.AddWaterLevelExpansion(); // Water Level Expansion Module
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port7Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port3Bit | Port6Bit | Port7Bit | Port8Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port1Bit | Port2Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port3Bit | Port6Bit | Port7Bit | Port8Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;


// Ports that are always on
ReefAngel.Relay.On( Port7 );
ReefAngel.Relay.On( Port8 );

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


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

void loop()
{
ReefAngel.StandardLights( Port1 ,9,0,19,0 );
ReefAngel.StandardLights( Port2 ,8,0,20,0 );
ReefAngel.StandardHeater( Port3 );
ReefAngel.StandardLights( Port4 ,21,0,6,0 );
ReefAngel.StandardLights( Port5 ,21,0,6,0 );
ReefAngel.WaterLevelATO( Port6 );
////// Place your custom code below here
if (ReefAngel.Params.PH>=840) ReefAngel.Relay.Off(Port1);
if (ReefAngel.WaterLevel.GetLevel() > 120 || ReefAngel.WaterLevel.GetLevel() < 40) ReefAngel.Relay.Off(Port6); //



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

// This should always be the last line
ReefAngel.Portal( "iiluisii" );
ReefAngel.ShowInterface();
}
User avatar
cosmith71
Posts: 1432
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: Wizard refugium light

Post by cosmith71 »

Change this:

Code: Select all

if (ReefAngel.Params.PH>=840) ReefAngel.Relay.Off(Port1);
to this:

Code: Select all

if (ReefAngel.Params.PH>=840) ReefAngel.Relay.Off(Port6);
Otherwise looks OK to me.

--Colin
User avatar
cosmith71
Posts: 1432
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: Wizard refugium light

Post by cosmith71 »

Oh, and don't worry about being new at this. Everyone starts out new. :)

Sometimes I'll use the Wizard to "Generate Only" a piece of code that I need (like a light setting) and then copy/paste it. It can save a lot of time and headache.

--Colin
iiluisii
Posts: 79
Joined: Mon Jul 09, 2012 10:16 am

Re: Wizard refugium light

Post by iiluisii »

Is there a way I can be able to adjust my lights from the app instead of having to reload a code everytime
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Wizard refugium light

Post by rimai »

Do you use the android app?
Roberto.
iiluisii
Posts: 79
Joined: Mon Jul 09, 2012 10:16 am

Re: Wizard refugium light

Post by iiluisii »

Iphone app
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Wizard refugium light

Post by rimai »

There is no way to set custom memory locations on iphone app yet :(
Roberto.
iiluisii
Posts: 79
Joined: Mon Jul 09, 2012 10:16 am

Re: Wizard refugium light

Post by iiluisii »

Thanks you. Now next question
How can I set the portal to email me if I loose Internet connection between the angel and the portal. And also how do I set it to send me an email if the temp reach 85 or if the ph reaches 8.5 and can it send text messages
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Wizard refugium light

Post by lnevo »

In the portal you can setup notifications for temp and ph. Look under the section portal settings. For sms you need to know the email gateway for your phone provider (they all have one...) and use that for the email address.

For losing internet connectivity, the portal won't do that although maybe roberto can add something for that :) i recommend setting up an account at www.reeftronics.net and they will send you an email if it can't contact your RA within an hour.
iiluisii
Posts: 79
Joined: Mon Jul 09, 2012 10:16 am

Re: Wizard refugium light

Post by iiluisii »

The problem is that I did that but I didn't get the text until 5 hours
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Wizard refugium light

Post by lnevo »

From reeftronics or portal?

Was your internet down at the same time? Did you have a power outage or something?
iiluisii
Posts: 79
Joined: Mon Jul 09, 2012 10:16 am

Re: Wizard refugium light

Post by iiluisii »

From the portal and yes had a power outage
iiluisii
Posts: 79
Joined: Mon Jul 09, 2012 10:16 am

Re: Wizard refugium light

Post by iiluisii »

From the portal and yes had a power outage
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Wizard refugium light

Post by Sacohen »

As Lee said, Reeftronics will email you when it can't reach the RA within an hour and then it will text you if it still can't reach the RA after 4 hours.

Also as Colin said the wizard is a great way to generate some code and then past it into your INO and modify it to your likings.

Don't worry about learning the code, you will get hang of it sooner or later until then there are plenty of people to help.
Post Reply