mirror of
https://github.com/letscontrolit/ESPEasy.git
synced 2026-09-12 01:24:04 +00:00
113 lines
4.4 KiB
ReStructuredText
113 lines
4.4 KiB
ReStructuredText
.. include:: ../Plugin/_plugin_substitutions_p02x.repl
|
|
.. _P021_page:
|
|
|
|
|P021_typename|
|
|
==================================================
|
|
|
|
|P021_shortinfo|
|
|
|
|
Plugin details
|
|
--------------
|
|
|
|
Type: |P021_type|
|
|
|
|
Name: |P021_name|
|
|
|
|
Status: |P021_status|
|
|
|
|
GitHub: |P021_github|_
|
|
|
|
Maintainer: |P021_maintainer|
|
|
|
|
Used libraries: |P021_usedlibraries|
|
|
|
|
.. Supported hardware
|
|
.. ------------------
|
|
|
|
.. .. |P021_usedby|
|
|
|
|
Introduction
|
|
------------
|
|
|
|
It is always helpful to have some sort of local level control. This is something that would normally be handled by a Home Automation controller, but if you really need to have something like a locally controlled heater, you could use the Level Control plugin.
|
|
|
|
The ESP module can be used as a level controlling device, think of a simple temperature control unit. Use a DS18B20, BME280 or similar temperature sensor and a mechanical or solid state relay to control a heater. Connect this relay to a GPIO pin.
|
|
|
|
Configuration
|
|
-------------
|
|
|
|
.. image:: P021_DeviceConfiguration.png
|
|
:alt: Device Configuration
|
|
|
|
* **Name** A unique name should be entered here.
|
|
|
|
* **Enabled** The device can be disabled or enabled. When not enabled the device should not use any resources.
|
|
|
|
Sensor
|
|
^^^^^^
|
|
|
|
* **GPIO -> Level low** Select a GPIO pin that will be updated when the Level state changes. The state is applied directly on the GPIO pin, so only On (1) and Off (0) will be set.
|
|
|
|
* **Check Task** Select the Task that should be monitored. Initially the first Task will be selected. Only configured tasks can be selected.
|
|
|
|
* **Check Value** After selecting the task, the value that should be monitored can be selected. Initially, the first value of the task is selected.
|
|
|
|
* **Set Level** The value that is to be maintained. Decimals can be used in this value.
|
|
|
|
* **Hysteresis** To avoid 'flip-flopping' of the output, some hysteresis should be applied to the **Set Value**. The value entered here will be applied 'around' that set value, so half of the hysteresis below Set Value will turn on (1) the output state, and half of the hysteresis above the set value will turn off (0) the output state.
|
|
|
|
There is 1 exception to the **Hysteresis**: If the Hysteresis is set to 0, the output state will turn on (1) if the measured value goes *below* Set Value, and the output state will turn off (0) if the measured value reaches ``Set Value + 1.0``.
|
|
|
|
* **Invert Output**: When checked, the output state will be 0 instead of 1 when the level is activated.
|
|
|
|
* **Save 'Set Level' after change via config command** Via the config command, the **Set Level** value can be changed. To avoid wearing out the flash memory of the device by too often saving these settings, the default is now off, for existing tasks (after upgrade of ESPEasy), the old behavior of saving after each change is still active. The user should decide if saving the setting is actually required, or if that can be attained by carefully planning a save command or via a manual save.
|
|
|
|
* **Auto-save interval**: Here a time in minutes can be set after which any changed 'Set Level' via the ``config,task,<taskname>,SetLevel,<value>`` command will be saved. This *requires* that the above setting **Save 'Set Level' after change via config command** is **disabled**! When used, a setting of ca. 30 minutes, or even longer when the Set Level is changed often, seems apropriate, unless the unit often reboots, but then that cause should be investigated and solved. The timer, when activated, should survive a warm reboot.
|
|
|
|
Data Acquisition
|
|
^^^^^^^^^^^^^^^^
|
|
|
|
This group of settings, **Single event with all values** and **Send to Controller** settings are standard available configuration items. Send to Controller is only visible when one or more Controllers are configured.
|
|
|
|
Values
|
|
^^^^^^
|
|
|
|
The output state value is available in ``Output``. No other options are available for Values.
|
|
|
|
|
|
Commands available
|
|
^^^^^^^^^^^^^^^^^^
|
|
|
|
.. include:: P021_commands.repl
|
|
|
|
Events
|
|
~~~~~~
|
|
|
|
When the ``Output`` state changes, an event is generated, with the new state as the payload, so this change can also be handled using Rules.
|
|
|
|
Change log
|
|
----------
|
|
|
|
.. versionchanged:: 2.0
|
|
...
|
|
|
|
|added|
|
|
2023-10-28: Set Hysteresis via ``config`` command and get via ``[<Taskname>#GetHysteresis]`` variable.
|
|
|
|
|added|
|
|
2022-08-22: Auto-save interval option.
|
|
|
|
|added|
|
|
Major overhaul for 2.0 release.
|
|
|
|
.. versionadded:: 1.0
|
|
...
|
|
|
|
|added|
|
|
Initial release version.
|
|
|
|
|
|
|
|
|
|
|