Advanced Time Relay
This scenario will allow you to switch your outputs according to setup time intervals.
Installation
Go to the Market and install our Extension.
Then go to the Scenarios section and select the scenario you need in the Create scenario field.
Setup
Specify the period when the sensor turns on and off.
In the example below, it is configured that at 18:15, the Switch sensor will turn on, and at 18:17, it will automatically turn off.
Setpoint list of scenario
- current-state – the current state of scenario execution. In this example, the script is not executed, and the switch is disabled because it is not yet 18:15.
finish-time and start-time – topics designed to set the start and end time of the script on the client-side without logging into the admin panel. To do this, add a String widget, select these two topics, and use them to set the start and end times for the script. See details in the general instructions for scenarios.
Please note that the values specified in these topics have a higher priority than those specified when creating the scenario. If the time specified in the Schedule fields when creating the scenario differs from specified manually, then the rule in which you manually set the time will be executed.
- next-start-time and next-finish-time – the actual values of the time when the scenario will be executed (if you specify custom values, they will be displayed in these fields).
- reset-time – a button to reset custom time values to the default ones you set in the admin panel when creating the scenario.
Thus, in our example, the scenario is configured to run from 18:15 to 18:17. However, if you need to change these time frames temporarily, you can manually specify new custom values on the client-side.
For example, if the scenario should run from 10:00 to 20:00, enter these values in the finish-time and start-time fields. The manually specified values have a higher priority than the settings defined in the admin panel, so the scenario will run at the manually set time. To return to the default values, click the reset-time button, and the scenario will run again from 18:15 to 18:17.
How the scenario works
We see that the current time is 18:11. The sensor is off and waits until 18:15.
The time we need has come, and we see that the state of the sensor has changed to on.
After 18:17 came, the state of the sensor changed again - it turned off.