[RELEASE] SunCalc Driver

Good call!

Updated... right now it's pretty basic with the 10 min delay. Eventually i'll have to calculate out all the specific degrees and adjust off that.

1 Like

I did not. Too much math :expressionless:

1 Like

@Donald Could you possibly share how you added this to the code? I'm looking to do the same set up, but I'm new to coding in Hubitat. This would be a HUGE help to 'completing' my home automation set-up. (Is it ever really complete though?)

Throwing down my dumb-question chit...could you explain how this compares to using Sunrise/Sunset (w/offsets) to drive adjusting shades or blinds? Is this more accurate/reliable than using Sunrise/Sunset values, or ?

Thanks!

@danabw Not dumb at all. It can be more accurate, but it's really more about how the information is supplied.

The Sunrise/sunset values will return a time value that you can use to make adjustments, where this driver will return the sun's position that you can use to calculate the angle of light entering your house.

By using the angle of the light, I can lower my shades bit-by-bit and keep the sunlight in my office from sitting on (and roasting) my desktop!

1 Like

Thanks, makes sense. We have that issue in our office, wife works where the sun starts hitting her desk in the afternoon. I've been using a Sunset-based approach to adjust the blinds (iBlinds), but will look into changing over to this and give it a go. Thanks for posting it!

Sure!

I just added two lines to SunCalc to convert the altitude to a shutter position between 25 (down, but air vents are open) and 100 (completely up). The lines also include the constant of 4 feet which was the maximum amount of sun exposure I wanted on the terrace floor (see earlier posts in this thread).

Have fun,

Don

1 Like

That's perfect! Thank you @Donald for the hack and thank you @augoisms for the original code that made this possible!

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.