Closing my blinds so I don't get blinded by the Light
During the summer months, all I cared about with my blinds was cooling the house. Now it is Northern Hemisphere Winter, or what passes for it in California, and the sun is lower, towards the end of the day the sun streams through the French doors and into my Home Office right where I'm sat. Amazingly, not only can it be quite blinding, but it can actually make me quite warm.
This means I want to close my blinds depending on where the sun is in the sky. But it's not just elevation, but also the compass point (Azimuth), and it is specific to my location... San Jose, California.
Once more, enter Homebridge, that wonderful piece of code that enables all kinds of capabilities.
In this case, I'm using a plugin called Homebridge Sun plugin.
It gives me a light sensor, described as Lux, in the Home app.On the left you can see inside Home+, and on the right you can see Eve.
I like that, from the Eve app I can see that there is 1 Automation rule that this accessory is in, but I found that Home+ gave me a great deal more control over the automation than Eve did.
Actually Automating the blinds.
Setting up the plugin.
{"accessory": "SunPosition","name": "SunPosition","location": {"lat": 37.33996,"long": -121.871662}}
All it requires is the longitude and latitude of your location. The more exact you are, the more accurate the sun positioning is.
Restart Homebridge, and now you will start to see the sun position appear in your Homebridge log.
[11/12/2020, 4:05:21 PM] [SunPosition] Sun is 8.824012235586174 high at 239.31251206128667
[11/12/2020, 4:10:21 PM] [SunPosition] Sun is 7.965151039732809 high at 240.1438902628147
[11/12/2020, 4:15:21 PM] [SunPosition] Sun is 7.099117148881614 high at 240.9659701862848
As you can see, you get an update about every 5 minutes.
Essentially you'll have to be there when the Sun gets to a point where you want to block it. It may actually be between the points indicated, say at 3 minutes. Depends on how accurate you want to be. You can always get the current reading from your phone.
For me, the sun becomes inconvenient when:
- Azimuth is GTE 217°, AND
- Altitude is LTE 17°
IFazimuth has changedWHEN (under the condition)Occupancy is Detected in the Study (Home Office)ANDTime of Day is between 30m after Sunrise and 30m before SunsetANDazimuth is GTE 217°ANDaltitude is LTE 17°THENClose the blinds to 60% openENDIF
Home+ doesn't understand groups of accessories, so I actually have to do the blinds as two separate actions.
The automation looks like this in Home+
It works nicely!
I'm intending to enhance this by adding a weather condition. I've covered that for hot days in another post. In this case, I'm thinking of making sure it only happens when I don't have cloud cover. I think I'll let this work for a few days yet before I get too adventurous.
This is the most helpful Homekit / Homebridge post that I've found in a year!!! Now I just need to actually purchase automatable blinds!!
ReplyDelete