Page 1 of 1

Actinic light cycle

Posted: Sat Oct 20, 2012 9:29 pm
by kahlif
I have a basic, non-dimmable actinic light. I want it to come on at different times of the day.

So, lets say on port 2, I want it to be on:

from 8-9:30 am (sunrise),

15 min intervals at 8 different times between 10am and 6pm,

from 6:30-8 pm (sunset).

Any example?

Re: Actinic light cycle

Posted: Sun Oct 21, 2012 7:59 am
by rimai

Code: Select all

// Sunrise
ReefAngel.StandardLights(Port2,8,0,9,30);
//Sunset
ReefAngel.StandardLights(Port2,18,30,20,0);

// 15min interval
ReefAngel.StandardLights(Port2,10,15,10,30);
// Do the same another 7 times

Re: Actinic light cycle

Posted: Sun Jan 20, 2013 9:26 am
by kahlif
So, dredging up my old question, since I finally got my RA up and working...

This little bit isn't working. My actinic stays on all day.

So, code is:

Code: Select all

  // Sunrise
  ReefAngel.StandardLights(Box1_Port2,8,0,9,30);
  //Sunset
  ReefAngel.StandardLights(Box1_Port2,18,30,20,0);

  // 15min interval
  ReefAngel.StandardLights(Box1_Port2,10,15,10,30);
  ReefAngel.StandardLights(Box1_Port2,11,30,11,45);
  ReefAngel.StandardLights(Box1_Port2,13,0,13,15);
  ReefAngel.StandardLights(Box1_Port2,14,15,14,30);
  ReefAngel.StandardLights(Box1_Port2,15,0,15,15);
  ReefAngel.StandardLights(Box1_Port2,16,15,16,30);
  ReefAngel.StandardLights(Box1_Port2,17,15,17,30);
Seems pretty straightforward, what am I missing? I have no other reference to the port through my code.

Re: Actinic light cycle

Posted: Sun Jan 20, 2013 11:30 am
by rimai
Actually...
Sorry... This code would never work....
I don't know what I was thinking when I posted....
Only on StandardLights function would work... The last one would always have priority.

Code: Select all

if (hour()<10)
{
  // Sunrise
  ReefAngel.StandardLights(Box1_Port2,8,0,9,30); 
}
else if (hour()>=18)
{
  //Sunset
  ReefAngel.StandardLights(Box1_Port2,18,30,20,0); 
}
else if (hour()==10)
{
  // 15min interval
  ReefAngel.StandardLights(Box1_Port2,10,15,10,30);
}
else if (hour()==11) 
{
  // 15min interval
  ReefAngel.StandardLights(Box1_Port2,11,30,11,45);
}
else if (hour()==13) 
{
  // 15min interval
  ReefAngel.StandardLights(Box1_Port2,13,0,13,15);
}
else if (hour()==14) 
{
  // 15min interval
  ReefAngel.StandardLights(Box1_Port2,14,15,14,30);
}
else if (hour()==15) 
{
  // 15min interval
  ReefAngel.StandardLights(Box1_Port2,15,0,15,15);
}
else if (hour()==16) 
{
  // 15min interval
  ReefAngel.StandardLights(Box1_Port2,16,15,16,30);
}
else if (hour()==17) 
{
  // 15min interval
  ReefAngel.StandardLights(Box1_Port2,17,15,17,30); 
}

Re: Actinic light cycle

Posted: Mon Jan 21, 2013 10:27 am
by kahlif
So, it seems I am still having the same issue. The actinic stay on all day and night...

Re: Actinic light cycle

Posted: Mon Jan 21, 2013 10:29 am
by rimai
What do you have connected in there?

Re: Actinic light cycle

Posted: Mon Jan 21, 2013 10:37 am
by kahlif
An actinic stunner strip

Re: Actinic light cycle

Posted: Mon Jan 21, 2013 10:40 am
by rimai
Can you try a different port?

Re: Actinic light cycle

Posted: Mon Jan 21, 2013 12:37 pm
by kahlif
That did it!

Port 2 then has a busted relay? I moved it to port 8 and changed the code, and it is cycling on and off like a charm.

So, I have a port that doesn't cycle and the relay expansion module with the loose USB port...

Re: Actinic light cycle

Posted: Mon Jan 21, 2013 3:14 pm
by rimai
Can you load the ControllerTester and test each of your relay boxes?