Is there any basic code to get sunrise/sunset. I'm not using the PWM expansion and not using dimmable lights, so for now just want to base my lighting schedule on sun up and sun down...worst case I can strip down the full weather example, but hoping someone had an existing simplified version to work with.
Thanks
Lee
Simple sunrise/sunset
- lnevo
- Posts: 5422
- Joined: Fri Jul 20, 2012 9:42 am
-
rimai
- Posts: 12857
- Joined: Fri Mar 18, 2011 6:47 pm
- DrewPalmer04
- Posts: 818
- Joined: Tue May 29, 2012 2:12 pm
- Location: Christopher, IL
Re: Simple sunrise/sunset
No dimmable ballasts? Um...you best you can do is use the ReefAngel.Light and turn on actinic then daylight bulbs?.....Then reverse for sunset?
- lnevo
- Posts: 5422
- Joined: Fri Jul 20, 2012 9:42 am
Re: Simple sunrise/sunset
Yeah, I'll need to just use the Standard Light functions which is why I asked the question, I don't need to do all the calculations for weather / clouds, or PWM slopes to gently rise and set... but I would like my On time and Off time to be synchronized with SunRise and SunSet...
I looked at the code, and it should be pretty easy to get the info I need, I just may have to convert the time info coming from the functions to hour / minute notation in order to make an easy if / then statement...
If anyone has done this already, let me know, otherwise as soon as I get around to modifying the code, I will post it.
I looked at the code, and it should be pretty easy to get the info I need, I just may have to convert the time info coming from the functions to hour / minute notation in order to make an easy if / then statement...
If anyone has done this already, let me know, otherwise as soon as I get around to modifying the code, I will post it.
-
rimai
- Posts: 12857
- Joined: Fri Mar 18, 2011 6:47 pm
Re: Simple sunrise/sunset
I'd love to see what you can come up with. We can eventually add this to the libs 
Roberto.
- lnevo
- Posts: 5422
- Joined: Fri Jul 20, 2012 9:42 am
Re: Simple sunrise/sunset
Yeah, it looks like only a few functions actually came out of the libraries that rufessor used are needed and there are 2 functions used to calculate the SunRise and SunSet that could be made public. The key will be having them come out in a usable format to turn on / off the lights. Would be a similar use to the Moonphase() function hopefully.
- DrewPalmer04
- Posts: 818
- Joined: Tue May 29, 2012 2:12 pm
- Location: Christopher, IL
Re: Simple sunrise/sunset
Oh I get it! Yes I would love this as well!