Page 1 of 1
Wizard refugium light
Posted: Sun Sep 07, 2014 11:10 pm
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
Re: Wizard refugium light
Posted: Mon Sep 08, 2014 2:58 am
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
Re: Wizard refugium light
Posted: Mon Sep 08, 2014 4:59 pm
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();
}
Re: Wizard refugium light
Posted: Mon Sep 08, 2014 5:33 pm
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
Re: Wizard refugium light
Posted: Mon Sep 08, 2014 6:52 pm
by iiluisii
Port 4 and 6 are the fudge lights I would like them to come on at 9pm and off at 6 am
Re: Wizard refugium light
Posted: Mon Sep 08, 2014 7:05 pm
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:
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
Re: Wizard refugium light
Posted: Mon Sep 08, 2014 7:57 pm
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:
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
Re: Wizard refugium light
Posted: Mon Sep 08, 2014 9:38 pm
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();
}
Re: Wizard refugium light
Posted: Tue Sep 09, 2014 3:07 am
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
Re: Wizard refugium light
Posted: Tue Sep 09, 2014 3:18 am
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
Re: Wizard refugium light
Posted: Mon Sep 29, 2014 4:33 pm
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
Re: Wizard refugium light
Posted: Mon Sep 29, 2014 5:43 pm
by rimai
Do you use the android app?
Re: Wizard refugium light
Posted: Tue Sep 30, 2014 8:20 pm
by iiluisii
Iphone app
Re: Wizard refugium light
Posted: Tue Sep 30, 2014 8:55 pm
by rimai
There is no way to set custom memory locations on iphone app yet
Re: Wizard refugium light
Posted: Wed Oct 01, 2014 7:19 pm
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
Re: Wizard refugium light
Posted: Wed Oct 01, 2014 8:10 pm
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.
Re: Wizard refugium light
Posted: Thu Oct 02, 2014 6:51 am
by iiluisii
The problem is that I did that but I didn't get the text until 5 hours
Wizard refugium light
Posted: Thu Oct 02, 2014 6:53 am
by lnevo
From reeftronics or portal?
Was your internet down at the same time? Did you have a power outage or something?
Re: Wizard refugium light
Posted: Thu Oct 02, 2014 3:39 pm
by iiluisii
From the portal and yes had a power outage
Re: Wizard refugium light
Posted: Thu Oct 02, 2014 3:40 pm
by iiluisii
From the portal and yes had a power outage
Re: Wizard refugium light
Posted: Thu Oct 02, 2014 7:24 pm
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.