RanjibGot it. Thank you so much for reporting this. I’ll get it fixed. Much appreciated
Thanks for all your efforts. Most of what I use is working just fine all the time. I can even graph all lights on same graph now INCLUDING LUNAR!
Not sure how you approach lunar on and off times but it seems that the moon on/off time pretty much stays at the time you put in lunar start/end time. At least it seems that way for me. I look at the moon rise time and it hasn't changed from the start time in over a week. So I change the full moon schedule every month.
I had a DIY controller I made and I modified some online code I found and created a function to calculate the actual luminance, rise and set times using Lat and Long of your location. It would be likely not possible without a lot of work on your part to incorporate this C++ code (I did find some Python code once though online if interested).
However, I learned a couple of things to easily incorporate for a simple moon rise/set:
1. The moon averages 12 hours up and 12 hours down throughout its 29.5 day cycle. It gets complicated if you
you try to change from 8 hours to 16 hours and then back to 8 hours over the 29.5 day cycle, but it is not too
difficult.
2. Moon rises 53 minute cycle later every day. So just changing the rise and set times emulates the moon more
accurately.
3. Luminance just goes from 0% to 100% then back to 0% every 29.5 days.
I broke it all down to minutes to even more accurately estimate the cycle times (the 29.5 and 53 are rounded).
If you want to more accurately emulate the moon rise and set times you may consider this. This helps spawning for some sea creatures.
Keep up the good work!
PS I'm watching the esp32 thread that seems very interesting to me.

