Light Timer - ON_OFF then Back ON

Do you have a question on how to do something.
Ask in here.

Posts: 33
Joined: Sun Mar 31, 2013 4:28 am
Location: Montreal,Canada
PostPosted: Sat Apr 01, 2017 1:00 pm
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

Posts: 12309
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Sat Apr 01, 2017 5:10 pm
Try this:
Code: Select all
if (hour()==7 && minute()==1) ReefAngel.Relay.Off(Box1_Port2);
Roberto.

Posts: 33
Joined: Sun Mar 31, 2013 4:28 am
Location: Montreal,Canada
PostPosted: Sun Apr 02, 2017 3:21 am
thnk you , where shoupl I paste this ?

Posts: 12309
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Sun Apr 02, 2017 8:59 am
In the custom section.
Below the last line posted above.
Roberto.

Posts: 33
Joined: Sun Mar 31, 2013 4:28 am
Location: Montreal,Canada
PostPosted: Tue Apr 04, 2017 4:17 am
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

Posts: 12309
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Tue Apr 04, 2017 8:35 am
I didn't get it what you are saying about the Uapp.
Can you rephrase please?
Roberto.

Posts: 33
Joined: Sun Mar 31, 2013 4:28 am
Location: Montreal,Canada
PostPosted: Wed Apr 05, 2017 10:12 am
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

Posts: 12309
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Wed Apr 05, 2017 10:37 am
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.

Posts: 33
Joined: Sun Mar 31, 2013 4:28 am
Location: Montreal,Canada
PostPosted: Wed Apr 05, 2017 12:52 pm
yes I think that could work ! just a couple second Off like 1 or 2 would be great

thank you

Posts: 12309
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Wed Apr 05, 2017 2:50 pm
Just add seconds then.
Code: Select all
if (hour()==7 && minute()==1 && second() <=2) ReefAngel.Relay.Off(Box1_Port2);
Roberto.
Next

Return to How do I code ...

Who is online

Users browsing this forum: No registered users and 4 guests

cron