Light Timer - ON_OFF then Back ON

Do you have a question on how to do something.
Ask in here.
Post Reply
lh2o
Posts: 37
Joined: Sun Mar 31, 2013 4:28 am
Location: Montreal,Canada

Light Timer - ON_OFF then Back ON

Post by lh2o »

Hi

Greetings ,

I woul like to have port 2 (bellowin red ) (go ON at 7 :00 then OFF at 7:01and then back ON until 19:00 when it goes OFF

it sounds weird but it's to corect a strange issues I have with my Euroaquatic LED T5... they do not start up when the ports goes ON but if I put it OFF the back ON again they start up fine

below is what I have generated from teh Wizard

thanks


void loop()
{
ReefAngel.Relay.DelayedOn( Port3,5 );
ReefAngel.StandardLights( Port4,16,0,10,0 );
ReefAngel.StandardHeater( Port5,775,786 );
ReefAngel.StandardHeater( Port6,775,786 );
ReefAngel.StandardLights( Box1_Port1,8,0,18,0 );
ReefAngel.StandardLights( Box1_Port2,7,0,19,0 );
ReefAngel.StandardLights( Box1_Port3,10,30,15,30 );
ReefAngel.StandardLights( Box1_Port4,10,30,15,30 );
////// Place your custom code below here
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Light Timer - ON_OFF then Back ON

Post by rimai »

Try this:

Code: Select all

if (hour()==7 && minute()==1) ReefAngel.Relay.Off(Box1_Port2);
Roberto.
lh2o
Posts: 37
Joined: Sun Mar 31, 2013 4:28 am
Location: Montreal,Canada

Re: Light Timer - ON_OFF then Back ON

Post by lh2o »

thnk you , where shoupl I paste this ?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Light Timer - ON_OFF then Back ON

Post by rimai »

In the custom section.
Below the last line posted above.
Roberto.
lh2o
Posts: 37
Joined: Sun Mar 31, 2013 4:28 am
Location: Montreal,Canada

Re: Light Timer - ON_OFF then Back ON

Post by lh2o »

thanks Roberto , It's doing what I wanted wich is great but not solving the issue I have with the T5 bulbs not lighting
when I use the UAPP and manualy togle the port to OFF then Auto the T5 go on ...woudl there be another way to try coding this

thanks
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Light Timer - ON_OFF then Back ON

Post by rimai »

I didn't get it what you are saying about the Uapp.
Can you rephrase please?
Roberto.
lh2o
Posts: 37
Joined: Sun Mar 31, 2013 4:28 am
Location: Montreal,Canada

Re: Light Timer - ON_OFF then Back ON

Post by lh2o »

when this port is set ON by the timer (at 7:00) the light flicker but do not stay ON, witwhat you suegested I paste they fliker again about 1 min later but do not stay on.

If I use the Universal App on my I phone and set the port to Off the Auto the lights start up.

thsi is not an issue with this relay or the controler... the issue is linked to the E5 led tT5 because when I put regular T5 I have no problems

what I am looking for in terms of code is somthing that would mimic what I am doing in the U app

hope thsi makes sens

thanks
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Light Timer - ON_OFF then Back ON

Post by rimai »

So, what do you need?
A shorter off interval?
Right now it stays for a whole minute.
Maybe you just need a few seconds?
Roberto.
lh2o
Posts: 37
Joined: Sun Mar 31, 2013 4:28 am
Location: Montreal,Canada

Re: Light Timer - ON_OFF then Back ON

Post by lh2o »

yes I think that could work ! just a couple second Off like 1 or 2 would be great

thank you
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Light Timer - ON_OFF then Back ON

Post by rimai »

Just add seconds then.

Code: Select all

if (hour()==7 && minute()==1 && second() <=2) ReefAngel.Relay.Off(Box1_Port2);
Roberto.
lh2o
Posts: 37
Joined: Sun Mar 31, 2013 4:28 am
Location: Montreal,Canada

Re: Light Timer - ON_OFF then Back ON

Post by lh2o »

thanks a lot !!! it works perfect

am I glad I went with a Reff Angel :D !!! your support is awsome

all teh best
Post Reply