Shades by Sun position (Azimuth and elevation)

I recently bought shades for my house… I used Lutron (RA2 select) and they added well into hubitat and homeassistant.

The app allows you to time the shades, but sun moves around quite a bit, so I’ve been working on automating them based on azimuth and elevation. The Sharptools Rules has worked really nicely for me as I’ve never coded before and the visual approach was very helpful.

  • The website Suncalc was super helpful at estimating azimuth. The rest will be by observing real world conditions.

  • Both HA and Hubitat have devices which give sun position in azimuth and elevation.
    -Still experimenting with conditions to avoid dropping the shades on cloudy days. Options are Illumence value in some weather devices (I didnt think was very accurate), actual LUM sensors (I’ve ordered but still waiting on arrival), Cloudiness percent value on some weather devices (using OWM on hubitat).

  • I have battery powered shades, so i wanted to limit the requests sent the shade to only when movement is required. I found virtual switch in hubitat to be super useful for this.

  • Current setup had 4 Rules

  1. If Azimuth changes and is > (starting value for that window) With conditions of (azimuth < exit value for that window AND Elevation > 0 AND elevation <40 (depending on window) AND Cloudiness < 95%) then turn virtual switch to ON.
  2. If Virtual switch changes to on set shade percent to value (this should be the only communication direct to the shade to drop (instead of every 5 minutes telling it to stay at the same level).
  3. If azimuth > exit value of that window change virtual switch to OFF.
  4. If virtual switch changes to off, then raise shade.

Additionally, I have made an additional rule that of reported cloudiness > 95% to turn all switches to off (would raise shades if weather changes and becomes 100% cloudy during the time shade was down.

Any suggestions are welcome. I’m really impressed w/ the Rules machine for someone very new to all of this.

2 Likes

I love this. I’m going to give it a go. My shed (office) has so many windows that I’m constantly adjusting the blinds to track the sun. Thanks!

1 Like

Thanks so much. Please let me know if you have any issues, and share what works well for you.

My main issue was how cloudy it was (often where I live) . If it’s cloudy wouldn’t want to waste battery and darken the room unnecessarily.

Some solutions to think about if that’s an issue in your location:

  • I’ve used lum sensors and will try to calibrate based on time of day and luminosity. I think if you work out what the settings are for time of day based on cloudy vs sunny that would work best (I think it also works best if i base it off a sensor that hits the sun before that window - i do one window over).
  • The cloudiness data that you can get from hubitat or HA weather apps is ok… Not super granular, i’ve had some success not activating if clouds > 95%.
  • I’m thinking of making a virtual button on the dashboard called AUTO that you can push if its sunny (and the room is occupied) and making that a condition for each rule.

Other than that, its been great… Azimuth works so much better than time or offset from sunset which were the only options I had in the app for my shades.

Good luck!