In this post, I am trying to describe what I have done to apply seasonal light timing to a complex Radion lighting profile. I had recently switched my tank temperature to use the seasonal table, and was very interested in doing something similar for my Radions which were already using a complex lighting profile. The temperature seasonal table implementation is much much easier than the lighting profile. I am hopeful this post will provide some additional useful information that was not captured in other posts (at least not in a way obvious to me) and help others wanting to setup a complex lighting profile based on seasonal tables. Up to now, I have used the Radion profile shown in the first image below. To implement most of the original Radion lighting profile, I used a total of 11 profiles (see below for more specifics). The profiles are setup in the Apex Web Interface (not Fusion) with 2 additional profiles for clouds and storms (left identical to the first post from RussM in the Neptune forums). Note: I may either remove the storms or dramatically reduce the lightning intensity due to not wanting to freak out my fish and cause them to jump and injure themselves. Below are the steps I followed....
1) I created an Excel table to translate my existing Radion profile to a format helpful in converting fixed times to "if sun (delta from sunrise)/(delta from sunset)" statements. The Excel table allowed me to more easily list the color temperature using CW, B, RB, G, R, UV settings, starting and ending light intensities, ramp times, and implement a calculation for the delta time parameters in the "if sun" statements. My Excel table is shown below. Note that in my table, the start/end times will have no meaning once I switch to the seasonal table but were used for me to double-check my computations for the delta times. I pulled up the seasonal table with the Apex Web Interface and saw the sunrise time was roughly 06:30 and the sunset time was roughly 19:30 for end of May. Referencing these times provided a sanity check for me in setting up the delta times for the "if sun" statements. Also, I obtained the CW,B,RB,G,R,UV color settings, starting and ending intensities from the original profile using the wizard from the WXM Radion module outlets (see Radion lighting profile image below). Also, I simplified my lighting profile slightly to make programming with the seasonal table a little easier. My previous Radion profile extended past midnight and I was not sure if this would work in the Apex "if sun" statements. Note that at this point, I have not adjusted my seasonal table times to local/preferred times as RussM suggests. I am just adding deltas to the if sun (delta from sunrise)/(delta from sunset) statements to account for these times.
2) I created a series of lighting profiles using the data from the Excel spreadsheet. This is achieved by using the Apex Web Interface under Configuration->Profile Setup. I simply reconfigured PF1 through PF11 to implement each of the entries on my Excel spreadsheet. See the image below for a graphic from my PreDawn(PF1) profile. Upon inspection, it is easy to see where the information from the Excel spreadsheet is simply entered into the appropriate fields of the profile entry.
3) Next, I computed a horizontal bar chart like the one that RussM produced previously on the Neptune forum. I needed this to ensure I setup the program properly referencing each of the "if sun" reference times, so I put a time scale on the horizontal axis as a sanity check. Again these times will become meaningless once I use the seasonal table. Note that the order of the if sun statements is very important. You basically want to start with the broadest time window on the pre-midday portion and work your way through all the other pre-midday profiles. Next you start with your broadest times on the post-midday portion for your "if sun" statements and work your way through the other post-midday profiles. In other words, the "if sun" statements are entered from the top to down order of this chart. The last "if sun" entry will by your midday brightest light listing. RussM reminded me that the last if statement that is satisfied in your script "wins" and will control which profile you are using. Below is my horizontal bar chart with my "if sun" delta times listed along with the intensities. It is important to take a moment and look through the chart and understand the critical points. Starting at the top of the chart the Pre-Dawn (PreDawn) profile will only be active from sunrise-120 minutes to sunrise-60 minutes. This will allow the lighting intensity to ramp from 0% to 2% over a 60 minute period. At the end of 60 minutes, then the Early Morning (EarlyMorn) profile will kick in and ramp from 2% to 7% light intensity over 60 minutes from sunrise-060 to sunrise time. Next, the MidMorn profile will become active from sunrise to sunrise+090 minutes where we continue to increase the intensity from 7% to 22% over 90 minutes. This continues all the way through the horizontal bars until we reach midday which runs from sunrise+360 to sunset-240 minutes. Very important: the second delta time (reference to sunset) for the pre-midday portion of the horizontal bar chart is irrelevant and does not matter - it is just conveniently set to somewhere near the middle of the midday profile. Likewise, the first delta time (reference to sunrise) for the post-midday portion of the chart is irrelevant and is just set to somewhere near the middle of the midday profile. See the chart below.
4) Start writing the code for the Radions using the horizontal bar chart and Excel spreadsheet. Note you have to turn off the wizard for the Radion in order to write the script to control the Radion. Below is my code snippet. So far, it appears to be working just fine.
Fallback OFF
Set OFF
If Sun -120/-330 Then PreDawn
If Sun -060/-330 Then EarlyMorn
If Sun 000/-330 Then MidMorn
If Sun 090/-330 Then LateMorn
If Sun 240/-330 Then EarlyMid
If Sun 450/240 Then Evening
If Sun 450/180 Then LateAfter
If Sun 450/120 Then MidAfter
If Sun 450/030 Then EarlyAft
If Sun 450/-120 Then LateMid
If Sun 360/-240 Then Midday
If Outlet Clouds = ON Then Cloudy
If Outlet Storms = ON Then Stormy
I hope this helps folks. If nothing else, it is a more verbose description of how to implement the seasonal lighting capability. This took me a couple of hours while buying corals online (haha) to a) climb the learning curve, b) ask RussM (genius at large) enough questions to figure it out, and c) get the code developed and somewhat tested. This is probably the hardest programming effort I have had with the Radion to date. Keep in mind, my Apex controls 3 tanks, automatic water changes, temperature control (heating/cooling), lighting, salinity, pH control of kalkwasser, etc. The only more difficult task I have had with the Apex is isolating a stray voltage/EMI issue with my PM2 and conductivity probe. However, with that said, once you have the necessary information, this was only about a dozen lines of code - lol! I hope that this post will help/enable others who have been wanting to do something similar, but found it too cumbersome/challenging. Let me know if you have questions and I will try to help. And a sincere thanks to RussM who provided enough information to me to figure this one out!
1) I created an Excel table to translate my existing Radion profile to a format helpful in converting fixed times to "if sun (delta from sunrise)/(delta from sunset)" statements. The Excel table allowed me to more easily list the color temperature using CW, B, RB, G, R, UV settings, starting and ending light intensities, ramp times, and implement a calculation for the delta time parameters in the "if sun" statements. My Excel table is shown below. Note that in my table, the start/end times will have no meaning once I switch to the seasonal table but were used for me to double-check my computations for the delta times. I pulled up the seasonal table with the Apex Web Interface and saw the sunrise time was roughly 06:30 and the sunset time was roughly 19:30 for end of May. Referencing these times provided a sanity check for me in setting up the delta times for the "if sun" statements. Also, I obtained the CW,B,RB,G,R,UV color settings, starting and ending intensities from the original profile using the wizard from the WXM Radion module outlets (see Radion lighting profile image below). Also, I simplified my lighting profile slightly to make programming with the seasonal table a little easier. My previous Radion profile extended past midnight and I was not sure if this would work in the Apex "if sun" statements. Note that at this point, I have not adjusted my seasonal table times to local/preferred times as RussM suggests. I am just adding deltas to the if sun (delta from sunrise)/(delta from sunset) statements to account for these times.
2) I created a series of lighting profiles using the data from the Excel spreadsheet. This is achieved by using the Apex Web Interface under Configuration->Profile Setup. I simply reconfigured PF1 through PF11 to implement each of the entries on my Excel spreadsheet. See the image below for a graphic from my PreDawn(PF1) profile. Upon inspection, it is easy to see where the information from the Excel spreadsheet is simply entered into the appropriate fields of the profile entry.
3) Next, I computed a horizontal bar chart like the one that RussM produced previously on the Neptune forum. I needed this to ensure I setup the program properly referencing each of the "if sun" reference times, so I put a time scale on the horizontal axis as a sanity check. Again these times will become meaningless once I use the seasonal table. Note that the order of the if sun statements is very important. You basically want to start with the broadest time window on the pre-midday portion and work your way through all the other pre-midday profiles. Next you start with your broadest times on the post-midday portion for your "if sun" statements and work your way through the other post-midday profiles. In other words, the "if sun" statements are entered from the top to down order of this chart. The last "if sun" entry will by your midday brightest light listing. RussM reminded me that the last if statement that is satisfied in your script "wins" and will control which profile you are using. Below is my horizontal bar chart with my "if sun" delta times listed along with the intensities. It is important to take a moment and look through the chart and understand the critical points. Starting at the top of the chart the Pre-Dawn (PreDawn) profile will only be active from sunrise-120 minutes to sunrise-60 minutes. This will allow the lighting intensity to ramp from 0% to 2% over a 60 minute period. At the end of 60 minutes, then the Early Morning (EarlyMorn) profile will kick in and ramp from 2% to 7% light intensity over 60 minutes from sunrise-060 to sunrise time. Next, the MidMorn profile will become active from sunrise to sunrise+090 minutes where we continue to increase the intensity from 7% to 22% over 90 minutes. This continues all the way through the horizontal bars until we reach midday which runs from sunrise+360 to sunset-240 minutes. Very important: the second delta time (reference to sunset) for the pre-midday portion of the horizontal bar chart is irrelevant and does not matter - it is just conveniently set to somewhere near the middle of the midday profile. Likewise, the first delta time (reference to sunrise) for the post-midday portion of the chart is irrelevant and is just set to somewhere near the middle of the midday profile. See the chart below.
4) Start writing the code for the Radions using the horizontal bar chart and Excel spreadsheet. Note you have to turn off the wizard for the Radion in order to write the script to control the Radion. Below is my code snippet. So far, it appears to be working just fine.
Fallback OFF
Set OFF
If Sun -120/-330 Then PreDawn
If Sun -060/-330 Then EarlyMorn
If Sun 000/-330 Then MidMorn
If Sun 090/-330 Then LateMorn
If Sun 240/-330 Then EarlyMid
If Sun 450/240 Then Evening
If Sun 450/180 Then LateAfter
If Sun 450/120 Then MidAfter
If Sun 450/030 Then EarlyAft
If Sun 450/-120 Then LateMid
If Sun 360/-240 Then Midday
If Outlet Clouds = ON Then Cloudy
If Outlet Storms = ON Then Stormy
I hope this helps folks. If nothing else, it is a more verbose description of how to implement the seasonal lighting capability. This took me a couple of hours while buying corals online (haha) to a) climb the learning curve, b) ask RussM (genius at large) enough questions to figure it out, and c) get the code developed and somewhat tested. This is probably the hardest programming effort I have had with the Radion to date. Keep in mind, my Apex controls 3 tanks, automatic water changes, temperature control (heating/cooling), lighting, salinity, pH control of kalkwasser, etc. The only more difficult task I have had with the Apex is isolating a stray voltage/EMI issue with my PM2 and conductivity probe. However, with that said, once you have the necessary information, this was only about a dozen lines of code - lol! I hope that this post will help/enable others who have been wanting to do something similar, but found it too cumbersome/challenging. Let me know if you have questions and I will try to help. And a sincere thanks to RussM who provided enough information to me to figure this one out!