I searched the community, but I'm not finding anything to address my scenario. (It could be an unusual request?) My goal is to set up a Rule to automate a motorized shade on the exterior patio of my West-facing patio. The purpose of the shade is to eliminate light coming into my family room in the afternoon. I already set up the shade in HE and can control it through my Dashboard. I'm hoping for help on how to build the automation Rule.
The trick is I want the shade to lower when the sun just begins to enter the room, then raise when the sun dips behind my neighbor's roof. Of course, the times when those events occur changes slightly day to day. I've been creating a spreadsheet with times for the past few weeks with the hope that someone here can point me in the right direction.
Is it possible to create a Rule that's linked to a spreadsheet (database) containing times to lower/raise the shade? I could populate the spreadsheet over time, and it would become more and more accurate. I apologize in advance, I'm not a coder, but here's my idea:
The Rule knows the current date, so it looks for the most recently dated time entries in the spreadsheet. (Column A, month and day data like 0521 for May 21st)
It lowers/raises the shade at the times associated with the most recent date. (Columns B & C, like 14:18 and 19:10, seen in example below)
As soon as it passes another date in the spreadsheet, it then begins using those times.
Example:
DATE LOWER RAISE
May 21 2:18pm 7:10pm
May 26 2:23pm 7:12pm
May 30 2:25pm 7:15pm
In the example, the shade lowers at 2:18pm May 21 through 25. Then on May 26 it lowers at 2:23pm. Beginning May 30 it lowers at 2:25pm.
That way, as I update the spreadsheet with dates and times, the schedule will become more and more accurate. Is this possible? Can anyone point me in the right direction? Thank you in advance!
An illuminance sensor in that window would make more sense. Have it close to a certain % based on how much light is coming in the Window. It will be easier to find a single formula to calculate a % open from illuminance than to use a spreadsheet.
Take the illuminance value when you want the shade to be fully open, and the value where you want it fully closed. Convert that illuminance range to a range that falls between 0 and 100% for your shade. Then calculate a % open every time illuminance changes.
It will then inch open/closed as the day goes on, based on the illuminance value changing.
Iād recommend using the suncalc driver to know the sun position and an illuminance sensor to know how bright it is. I still use the same automation to accomplish your stated goal with some minor tweaks to the sun position, no spreadsheet required.
You can use what you already have to help determine what sun coordinates trigger your shades positions.
Thanks! I think the SunCalc driver sounds great, but now I'm confused/scared to use it. I didn't want to overly complicate my OP, but I have two shades that I want to control independently. They're each children of a Bond Bridge integration, which is using the Bond Bridge 2 driver. If I change the driver to SunCalc will it break my shades? (There's also a 3rd interior shade controlled by the Bond Bridge which is not part of this scenario)
I just got all this installed and working and my fear is my Wife Acceptance Factor will drop if I screw up the shades by trying to automate them. Apologies again, this is my first time using a custom driver.
Also, I'm wondering if it's possible to use SunCalc as a Virtual Device and maybe use it as a Trigger Event or similar in Rule Machine? In case messing with the Bond Bridge driver is a bad idea. I really want to avoid using illuminance sensors in my setup.
You don't change your shade driver. This new driver is (to simplify) a math calculator that you can feed into a rule. It isn't intended to use that suncalc driver for a physical device, as far as I know anyway.
I don't currently use that suncalc, but I recently installed some smart blinds and I want to do something similar to what you want to do, change the shade to block the sun at certain times of the day. I have looked into that driver a bit, but haven't had the time or energy to implement it yet.
For now I just close them partway at 11am and open them at 4pm, but that isn't quite accurate for my South facing windows.
I did limit the midday opening and closing to the Summer months, for now. the shade needs some different logic in the Spring/Fall and again in the Winter.
The link i posted has an example of me doing exactly this. What you want to do and how you want to do it is very possible, all you need to do is read, understand and implement whats already been provided by the community. Youāre already tracking the right data. This is the hard part and youre doing it naturally.
Until AI replaces us all, don't be scared of your own I.
The big thing these sun position drivers miss is the position of one's windows. The window direction is pretty important in setting the desired shade position. It's not too hard to write a rule to manually take the position into account. But it also would not be too hard to extend an existing driver. Here was a quick Grok conversation: https://grok.com/share/c2hhcmQtMg%3D%3D_cb9ef466-ebf4-4b9c-9741-f6e854412d3d
Thanks for your support so far! My brain really hurts from trying to figure all this out. I have zero coding experience. I think I'm on the right track, but when I saved my Rule my awning opened, even though it's well past sunset. Any more tips on what I'm doing wrong? Here's my Rule so far:
In my posted example in the āselect actions to runā i have IF statements that include the altitude and azimuth conditions. You arenāt doing this, as in your example they say unused. What you have right now is āevery time the sun altitude changes, open the patio awningā This is not your stated goal.
Also as WAF is a consideration, it might be a good idea to create a virtual shade to test your automation on first. Testing in āProductionā can be bad for WAF.