The most important but also the most complex script is responsible for the automation of my shutters.
The script contains the following features:
Open shutters in the morning
- x minutes after sunrise including random time between +/- 5-15 minutes open to 25 % (privacy protection), but not before e.g. 07:30 in the morning
- then open to 100 % at random time between 15-30 minutes
- open on weekends, holidays and public holidays at a fixed time, e.g. 8:30 a.m. (currently realized with the use of Google Calendar)
Roller shutters close in the evening
- x minutes after sunset including random time between +/- 5-15 minutes close to 25% (privacy)
- then close to 0 % and 9 % (different windows/doors) at random time between 15-30 minutes
- if the patio door is still open, this roller shutter must not close until the door has been closed.
- in a definable time window (e.g. between 9:00 a.m. and 5:00 p.m.) and with an outside temperature of x °C and solar radiation of x lux, the roller shutters in the living room should close to 5%.
- if the temperature falls below x °C and x Lux (check every 15 minutes), the roller shutters should open again, but no later than 17:00 p.m.
- possibility to manually deactivate the automatic sun protection (the shutters should not open suddenly during a cinema afternoon)
- the random times for opening and closing the roller shutters simulate a presence by manual opening/closing. It would be perfect if the privacy screen (currently open/closed to 25 %) could also be randomly varied with values, e.g. between 20-28 %.
- weekends, holidays and public holidays are defined by a variable, which is set by a Lua script and the Google Calendar Api query. The Google Calendar script checks at 00:05 a.m. for an all-day event. If so, then the variable is set. The roller shutter script determines at 00:15 a.m. the daily current values for sunrise and sunset, as well as the Google calendar variable.
And no, I didn’t write this script by myself, I just made some adjustments and added the Google Calendar request.
On the basis of various posts, tutorials, apps which I have read and informed myself about, I think that the “roller shutter script” could be realized at least theoretically almost. But just theoretically, I can’t try anything for myself yet.