Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Neat project!

I've been trying to figure out a smart home automated system to determine if shades should be open or closed to optimize for energy efficiency, accounting for sun intensity, time of day, and orientation of the window. I suppose I could throw something like this on rather than relying on generic sunrise and sunset times.

Did you have a lot of wrangling with coordinate systems and the location of the sun changing throughout the year?



Suncalc [1] is the library I use to calculate the position of the sun. Mapzen [2] host public elevation tile data. This blog post [3] is a good overview of the calculations involved.

[1] https://github.com/mourner/suncalc

[2] https://www.mapzen.com/blog/terrain-tile-service/

[3] http://www.liedman.net/2014/06/25/sunshine/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: