Home Elements Boards Recipes

Schedule Element

The ScheduleElement creates events based on the current time.

When using this element a real time retrieving element must be configured as well like the NTPTime or DCFTime.

One Schedule Element can be used to create a timespan during a day that creates 2 possible events. The first one when the on-time has passed and a second one when the off-time has passed.

When starting the device the following events are emitted:

The onvalue event is always emitted together with the on and off event situations.

Element Configuration

The following properties are available for configuration of the element:

mode – The element supports 3 modes:

ontime – Specifies the start of the time span.

offtime – Specifies the end of the time span.

onon – These actions are emitted when the on time has passed.

onoff – These actions are emitted when the off time has passed.

onvalue – These actions are emitted when the value is changing.

From the base element implementation the following properties are available for configuration:

title – Caption text for the element. Used by the element specific cards on the dash boards.

description – A line of text that gives a short description of the device used in the web UI.

room – The location of the device.

loglevel – This property holds the element specific log level. The default value is LOGGER_LEVEL_ERR == 1.

startup – This property can be used to start the element using a different initialization phase. Possible values are “sys”, “net”, “time”. See The Startup sequence.

Element State

The following properties are available with the current values at runtime

active – Is set to true when the element is active.

value – Current output value of the element.

Example Configuration

{
  "schedule": {
    "lights": {
      "ontime": "04:00:00",
      "offtime": "18:00:00",
      "onon": "device/main?log=now on.",
      "onoff": " device/main?log=now off."
    }
  }
}

Example State

{
  "button/start": {
    "active": "true",
    "value": ???
  }
}

See also

Tags

Element Time