There are a few main ideas that gave life to this app:
In the app you setup rules of when different things shall happen.
The meaning of “when” in this context is two things. When to trigger flows, and to change values of tags.
The meaning of “different things” in this context is: what should happen in the flows. This is controlled by how the flows are setup AND the values of the tags mentioned in the row above this.
Below is an overview of the structure of a schedule as defined in the app. The app can contain many schedules.
Schedule
|
|- Contains tag definitions (zero or more)
|
-- Contains schedule events (zero or more)
|
-- Contains tags with values to be set (zero or more from tag definitions above)
So a schedule can contain tag definitions (more on that topic soon) and schedule events. Each schedule event represents a time in the schedule. This time can be fixed or based on solar events (sunset, sunrise and so on). A schedule event also has info on what day of the week it is active. That can be everyting from zero days (which doesn’t really make sense) to all seven days per week in every combination you want.
The tag definitions in the schedule is simply a way to communicate with the “outside world” and make it possible to control flows. You define tags with a type (boolean, numeric or string) and give them a meaningful name.
After setting up tag definitions in the schedule, they can be added in the schedule events. When a schedule event is created all the tags defined in that schedule is automagically added to the schedule event. For every tag in the schedule event you set a value. This value (or these values if multiple tags are used) will be set by the app when the schedule event triggers.
A schedule can trigger based on a fixed time or solar events. Apart from this it is possible to make additions and exceptions to the triggers.
If you specify a random time, the app will set a triggering time between the main trigger and the random time. The random time can be a fixed time or a solar event.
When using a solar event the triggering time varies depending on the time of year. If you for example want to turn on a lamp at sunset, but not later than 21:00 then you setup the schedule event to trigger at the first of sunset and 21:00. The same can be used but triggering the last of two times.
When using a solar event the triggering time varies depending on the time of year. If you for example want to turn on a lamp at sunset, but not if later than 21:00 then you setup the schedule event to trigger at sunset but only if before 21:00.
The possibilities described above can be combined as desired. Please note that some combinations will result in the schedule event never triggering. Consider for example triggering at sunrise but not before 21:00. This will not happen in many places of the world :-)
Turn lamp or other on/off device on or off at regular times, in this scenario turn on at 19:00 and turn off at 07:00 every day.
Solution:
This can all seem excessive, it could be accomplished with two simple flows, but the power of the app will be shown in the comming scenarios.
Turn lamp or other on/off device on or off at solar triggered times (with offsets if desired), in this scenario turn on at sunset and turn off at sunrise every day.
Solution:
This can all seem excessive, it could be accomplished with two flows using the Sun Event app, but the power of the app will be shown in the comming scenarios.
Turn lamp or other on/off device on or off at solar triggered times (with offsets if desired) and have it turned off during part of the night, in this scenario turn on at sunset and turn off at sunrise every day. Also have turned off between 23:00 and 05:00.
Solution:
This could be accomplished with two more flows (for a total of four flows) and times to trigger, so the power of the app is starting to show.
Turn lamp or other on/off device on or off at regular times, different times for different days of week.
Solution:
Turn lamp or other on/off device on or off at regular times AND dim dimmable device at the same time, different times for different days of week.
Solution:
The drawback of this is that you need two action cards for dimming as we have “Then/Else” logic.
Turn lamp or other on/off device on or off at regular times AND dim dimmable device at the same time, different times for different days of week.
Solution:
As you see, you can create VERY complex schedules easily with this app, without the need of complex flows.
It is totally possible to have tags defined in a schedule that are not used in the schedule events. The tag values for a specific tag will only be changed if there is a tag added to that schedule event. Perhaps you only want to change a specific tag value in some of the events. In that case simply removed the tags in question with the trashcan button.