[ST EDGE] Sun Position — Edge Driver for Sun-Aware Automations

Ever wanted your blinds to close automatically when the sun hits your windows? Standard SmartThings automations can’t do this because they have no concept of where the sun is or which side of your building it’s shining on.

This Edge driver calculates the sun’s real-time position for your location and tells you — in simple words — which faces of your building are getting direct sun right now. No math, no complex rules, just straightforward automation conditions like “when West exposure = Direct, close the living room blinds”.

Example automation:

IF Sun Exposure → West = Direct AND Elevation = Low
THEN Close west-facing blinds

This catches the low-angle afternoon sun that causes the worst glare — but leaves blinds open when the sun is high overhead and less bothersome.

What You Get

Capability Attributes Description
Sun Phase Phase (Night/Dawn/Day/Dusk), Period (Night/Dawn/Morning/Afternoon/Evening) High-level time of day
Sun Position Details Altitude, Azimuth, Direction (N/NE/E/SE/S/SW/W/NW), Elevation (Below/Low/Moderate/High) Where the sun is in the sky
Sun Exposure North, East, South, West — each None/Indirect/Direct Which building faces are getting sun
Presence Sensor Present / Not Present Simple sun-up / sun-down trigger

All values are simple strings — no numeric thresholds to figure out. They work directly as conditions in SmartThings Routines.

Installation

  1. Join my driver channel: https://bestow-regional.api.smartthings.com/invite/adMKr769drj9

  2. Install the “Sun Position” driver from the channel

  3. Add the device: SmartThings app → Add Device (+) → Scan Nearby

  4. Configure settings: Open the device → three dots (⋮) → Settings

  • Latitude / Longitude — your location in decimal degrees (find yours on Google Maps — right-click any spot and copy the coordinates)
  • Update Interval — how often to recalculate (default: every 5 minutes)
  • Low / High Elevation — thresholds for the elevation categories (defaults work well for most buildings)

The device starts updating immediately. All attributes are available for Routines and the Rules API.

Tips

  • Use Presence = Not Present to open all blinds at sunset
  • Use Phase = Dawn to trigger morning routines before sunrise
  • Use Period (Morning/Afternoon/Evening) for time-of-day rules without clock schedules
  • Combine Exposure = Direct with Elevation = Low to catch the worst glare angles
  • The driver runs locally on your hub — no cloud dependency for calculations

6 Likes

I’ve installed it out of curiosity and the data seems accurate in Spain :sun: . Also while scanning devices I learned a neighbour got a new Samsung smart fridge :sweat_smile:

I don’t have smart blinds though but maybe the data can be used for other interesting automations or just to remind me in summer I should manually lower the blinds when the sun hits more.

Edit: Thinking out loud for other use cases like lighting: the driver provides current information, it could be useful to know something about the future. For instance, the elevation in the next update and/or the time remaining till the next phase change or to a specific phase.

2 Likes

Thanks for creating this. I’ll need to check this out as I’ve debated about low sun angle glare.

My use case is more complicated, so here are some other ideas that might be useful as well, if you plan to add functionality.

For all east and west applications, I use light level with light level sensor, as I often get fog - in these cases I don’t want the shade to close.

On the east, I’ve implemented daylighting controls so that pairs fairly well with the shades, On the East side, I have a light well, so the geometry is really complex. I’ve used Mariano’s sun position driver along with the light sensor and T&E to set azimuth and elevation for when the shades close and can open. Not the ideal method, but it works well.

On the west side, I have primary focused on closing the shades when its “hot”. I have logic that looks at light level temp and azimuth. It works well for the sun, but not so much for low angle glare or the TV.

On the north side, I’ve dabbled a bit but have not fully fine-tuned it.

Yea I can see how this could be tricky for you. I think that this driver may not be suitable in all conditions and you may need to subsidise it with other sensors but if it helps others as it does me - its a win :slight_smile:

In my case my apparent is East facing so I use a combination of Sun Exposure East = Indirect + Altitude between 45deg and 55deg and both would have to be true.

I think when using this driver, you need to monitor your ideal situation, then take reading and choose the values that match.

Just for information, and not to take anything away from @crashtest 's new driver (:+1: btw) but @Baranauskas also has a sun driver that exposes slightly different, value based, information for routines:

I am now primarily using crashtest’s driver but in combination with Baranauskas’s for degree specific needs…

2 Likes