Automatic blinds / sunscreen control based on sun platform

It’s really not that complicated. It just calculates the height of the blind should be at to cast a shade at distance d. You don’t have to understand how the math works to use it. If you have issues then we can help with that.

Don’t sweat it, I think it’s really neat but overkill for my use case. In my situation it’s much easier to simply hard code the blind to close 70% for a few hours on sunny weekdays.

This is SO amazing - now my blinds close around my house perfectly in line with where the sun is!

I have a couple questions:

I am not sure what the Max/Min Elevation do. I have mine set at min = 5 and max = 90 and this seems to open the shade when the elevation drops below 5. So what does the max do? I set it at 10 and all my blinds opened. What might this be for?

Also I cannot get my blinds to close all the way then the sun is dead on, they go to 10%. Is there a way to adjust this? I have the correct measurements for the size…maybe just tinker with those?

Hi, sorry I missed your message.

Max and min elevation refer to this picture in the description:

So it’s the angle with respect to the horizon. 90 degrees would be fully vertical, 0 degrees is fully horizontal. Tracking is only active if the sun’s elevation angle falls inside the min and max elevation. If it falls outside this range the blind is set to the default value.

Try to use the default values for elevation (min=0 and max=90) and azimuth (min=max=90), as those affect the tracking FOV. (think of FOV like a huge rectangular area in the sky, if the sun is inside the rectangle tracking is active)

1 Like

Here is an image of the situation.

I have a large stand of high trees to the left, looking outward. I want the shade to adapt to not close until the sun of over / beyond the trees.

What should my FOV, FOV R, and FOV L be set at. I know you might not know the EXACT number, but I have tried various combinations and used the notebook. I am stumped. Am I thinking of this incorrectly?

I would assume that FOV would be 90, left would be maybe e 45, and right 90.

Thanks!!

FOV, FOV_left and FOV_right are in principle the same thing, as long as FOV_left = FOV_right. The field FOV is actually a remnant of an earlier version of this blueprint. Which has mostly been kept for the sake of backwards compatibility, but you can still use it. (removing it would break existing automations that try to set this variable)

For your case, you can leave FOV to 90, which just leaves it inactive.

If your window is situated at azimuth = 196 degrees, then setting an FOV_left=45 and FOV_right=90 would create a total FOV for azimuth of [196-45, 196+90] = [151, 286].

PERFECT! Ok well I adjusted it for those numbers and we shall see how it behaves tomorrow as it is now at 194.48° which is nearly straight on. THANKS!!!

1 Like

In case this is useful to anyone else :slight_smile: I made a template sensor to simplify the Boolean used in determining if the shades automation should fire:

  - binary_sensor:
      - name: "Shades Should Close"
        unique_id: binary_sensor.the_shade_should_close
        state: >
            {% if (states('sensor.openweathermap_cloud_coverage') | float < 60.0
            or states('sensor.weatherflow_brightness') | float > 5000.0
            or states('weather.weatherflow_hourly_based_forecast') | contains('sun')
            or states('weather.weatherflow_day_based_forecast') | contains('sun')
            or states('binary_sensor.weatherflow_is_raining') == 'off')
            and states('sensor.outside_average_temperature') | float > 65.0
            and states('sensor.openweathermap_precipitation_kind') == 'None'
            and states('sensor.sun_solar_elevation') | float > 5.0
            %}
              {{ true }}
            {% else %}
              {{ false }}
            {% endif %}

I also created a secondary automation to open the shades if that Boolean goes to false for 30 min. I will be tuning this over time as I move through the year.

The goal is basically to look for cloudy weather, rain, darkness, etc… so far so good because it is raining here and they didn’t close!

6 Likes

Looks good, thx for sharing.

We didn’t include any weather- or luminosity based conditions on purpose as it would complicate the blueprint significantly and it wouldn’t be as flexible anymore.

2 Likes

This is exactly what I wanted - thanks :slight_smile:

This is great, if you have pull down blinds! But mine are venetian style. I automated them with iBlinds Z-Wave motors and then coded a bunch of stuff in Node-Red for the 3 in the south facing kitchen windows. Opening them to 50% daytime/closing them inside-up at night was easy but I went waaaay beyond that. I templated 3 binary sensors as azimuth switches with lower and upper limits that are input numbers I can adjust the trigger points for the SE, S and SW azimuth binary sensors as the three kitchen blinds are in a bay window type area with one facing ~SE, the middle one faces ~S and the 3rd one ~SW. If the azimuth binary sensor is on for a window, the slats tilt based on season and outside temperature: As azimuth, elevation and outside temp change thoughout the day, so do the slats.
Winter: tilt to allow maximum sunlight in.
Sping/Summer/Fall: tilt to a) allow maximum light in if outside temp is <72 °F or b) tilt to block sunlight. The amount of tilt is calculated based on the altitude of the sun so the slats are either 90° to the sun or parallel with it, if the sun is shining on that window, otherwise they are flat at 50%.

You can use this blueprint to adjust the height of the blind and then use another automation to adjust the tilt of the slats, based on whatever parameters you find useful. We purposely didn’t include parameters such as the amount of light because that would make the blueprint way too complex.

1 Like

My venetians are too heavy to motorize raising them, plus I never raise them anyway!

As for tilt, if I want to block the sun (i.e. summer and warm outside), it would be 50% + a tilt offset or to permit maximum sunlight then subtract the tilt offset. Tilt offset is the elevation of the sun from 0-90 as a value from 49-0.

BTW, I used a compass app on my phone to determine the azimuth angle of my windows.

Screenshot_20230813_112139_Compass|233x500

Ok, I thought I got it but now i’m confused again about the “left” and “right” azimuth.
is that from the inside or from the outside of the house?

Inside of the house looking outside

1 Like

Thanks.

Is it possible your latest jupiter notebook is missing the lines for the azi_min and azi_max stuff?

I just updated that this week, can you pull again?

I would be careful with using your phone as a compass, it can be quite unreliable

1 Like

It’s the one uploaded 2 days ago I’m trying out now. The previous one had a cap on azu_min and azu_max where the blinds would trigger, this version just draws out the actual cover height calculation without capping.

Edit: nevermind, it actually does cap it :slight_smile:

1 Like

Nice :slight_smile:

@basbrus is actually working on a HACS integration of this with a few more extra features

1 Like