Output - Clock¶
.
Plugin details¶
Type: Output
Name: Clock
Status ESP32: NORMAL CLIMATE
Status ESP8266: NORMAL CLIMATE
GitHub: P043_ClkOutput.ino
Maintainer: .
Used libraries: .
.
Description¶
Every minute the set schedule will be checked for a match, and if a value for a scheduled time is set, the GPIO will be set to that state (On/Off) when configured, or when no GPIO is configured and the value is not 0 or empty, an event is generated with the field number that caused the trigger, and another event with the set value if the Number Output Values is set to Dual or higher.
Configuration¶
Name: Required by ESPEasy, must be unique among the list of available devices/tasks.
Enabled: The device can be disabled or enabled. When not enabled the device should not use any resources.
Sensor¶
GPIO -> Clock event Select a GPIO that will get the stated as configured for the Day,Time. When a GPIO is configured, the allowed valies for a scheduled time will be empty, Off and On only.
Device Settings¶
Nr. of Day,Time fields: Select a number between 1 and 16 for the number of Day,Time fields to be available. Will be applied after the page is submitted. (Default: 8)
Value input On/Off only: When checked, the selection for Value will be for On/Off (or empty) only, to avoid misconfiguration for less experienced users, and the Output variable response the same as if a GPIO was selected. The default is unchecked.
Day,Time X: Select the Day and Time that should be checked. For Limited builds the day and time have to be entered manually, for other builds, the Day can be selected from a combobox, and the time can be selected from a predefined list and set to a desired time.
For Day, the available options are All, Sun, Mon, Tue, Wed, Thu, Fri, Sat, Wrk (workday), Wkd (weekend).
For time, besides the 24h HH:MM notation, there can also be chosen to use %sunrise% or %sunset%, optionally with an offset in hours, minutes or seconds like %sunrise-1h% or %sunset+30m%.
Output Configuration¶
Number Output Values: Select Single (default), Dual, Triple or Quad. The Triple and Quad options aren’t actually used in this plugin.
Data Acquisition¶
This group of settings are standard available configuration items.
Single event with all values: When this setting is enabled, all available values will be sent in a single event
<TaskName>#All, with all values in order as arguments to the event.Show derived values: When checked, the Devices overview page, and the
/jsonendpoint (used for updating the Devices overview page) will include any Derived values as defined. See theTaskValueSetDerivedandTaskValueSetPresentationcommands.Event & Log derived values: When checked, the Derived values will be generated as Events, to be handled in Rules, and sent to logging devices like the Syslog server and/or SD-card logging.
(The derived values options are only available if String variables feature is included in the build.)
Send to Controller: Select the Controller(s) to send the Values to, either on a
TaskRuncommand applied to the task, or on an Interval time action.
Send to Controller is only visible when one or more Controllers are configured.
Depending on the controller capabilities, some configuration settings may be shown:
All configured Controllers are shown here, including the enabled or disabled state (multiple Controllers can be enabled, only a single MQTT Controller can be enabled at one time!).
For each controller the user can select wether the data should be sent on each Interval (or explicit TaskRun).
For the Domoticz controllers the value index (IDX) has to be configured.
For some controllers, like Home Assistant/openHAB, there are extra options available.
Group: This represents the group id to combine all values from multiple tasks into a single grouped-device during MQTT AutoDiscovery. Groups, by design, can span multiple ESPEasy devices, if desired, as long as the Task/Valuename combinations are unique. If a group should only combine Tasks from a single ESPEasy unit, the group id should be unique across multiple ESPEasy units. The group description, default Group <n>, can be adjusted in Home Assistant. If the Group value matches the current Unit nr, the Unit name,
%sysname%, is used instead of Group <nr>.Retained: For MQTT Controllers, this setting can be enabled to send the values for the current task with the Retain flag set. The Publish Retain flag in the Controller settings will override this by sending all task values with Retain flag enabled.
Send derived: This checkbox determines if any configured Derived values should also be sent to the controller (and included in the AutoDiscovery if that’s available and enabled).
Resend MQTT Discovery: When checked, will start a resend of the MQTT Discovery process for this task after a random delay, when Submit is clicked, so any changed settings will be updated in the MQTT broker. This setting is only available if the controller is enabled, the Auto Discovery feature is available and enabled for the controller. This setting is not stored.
Other controllers, like f.e. FHEM HTTP, do not support additional settings besides the checkbox to enable sending the data.
Values¶
The default names for the values are named Output, and get a numeric suffix for the Dual, Triple and Quad configuration.
Commands available¶
Command Syntax |
Extra information |
|---|---|
config,task,<taskName>,SetTime,<timeIndex>,<timeString>[,<value>]Change the configuration of the plugin for the timeIndex provided:
|
This (generic) command allows to update the configuration. Warning Every time this command is used, the configuration is saved to flash storage. When changing this often, the flash memory may wear out quickly! Example command to use, when using
Will be stored like |
Events¶
Event |
Example |
|---|---|
If no GPIO is configured and ‘Value input On/Off only’ is unchecked, the configured value is provided as Events are only generated if the value is not set to 0 or empty. |
Get Config Values¶
Get Config Values retrieves values or settings from the sensor or plugin, and can be used in Rules, Display plugins, Formula’s etc. The square brackets are part of the variable. Replace <taskname> by the Name of the task.
Config value |
Information |
|---|---|
|
Returns the configured Day,Time string for line X (Range: 1..Nr. of Day,Time fields), as shown in the UI. Examples:
|
|
Returns the configured value for line X (Range: 1..Nr. of Day,Time fields), with a twist: If a GPIO is configured, or the setting ‘Value input On/Off only’ is checked, a 0 is returned for Off and 1 for On (the stored value is actualy 1 higher) When no GPIO is configured and the setting ‘Value input On/Off only’ is unchecked, the shown value is returned. |
Change log¶
Changed in version 2.0: …
added 2023-12-16:
Selectors for Day and Time, %sunrise% and %sunset% support, config command and get config values.
added Major overhaul for 2.0 release.
Added in version 1.0: …
added Initial release version.