Simple sunrise/sunset

Do you have a question on how to do something.
Ask in here.
Post Reply
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Simple sunrise/sunset

Post by lnevo »

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
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Simple sunrise/sunset

Post by rimai »

:(
You will need to talk to rufessor or strip his code down
Roberto.
User avatar
DrewPalmer04
Posts: 818
Joined: Tue May 29, 2012 2:12 pm
Location: Christopher, IL

Re: Simple sunrise/sunset

Post by DrewPalmer04 »

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?
Out for now...but not over.

VISIT: Ethernet Module/Wifi Alternative
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Simple sunrise/sunset

Post by lnevo »

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.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Simple sunrise/sunset

Post by rimai »

I'd love to see what you can come up with. We can eventually add this to the libs :)
Roberto.
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Simple sunrise/sunset

Post by lnevo »

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.
User avatar
DrewPalmer04
Posts: 818
Joined: Tue May 29, 2012 2:12 pm
Location: Christopher, IL

Re: Simple sunrise/sunset

Post by DrewPalmer04 »

Oh I get it! Yes I would love this as well!
Out for now...but not over.

VISIT: Ethernet Module/Wifi Alternative
Post Reply