You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/Plugin/P033.rst
+83-1
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,14 @@ You can use a special dummy device within ESP Easy to provide additional feature
28
28
29
29
The dummy device can be used like any other sensor to send it's data to a Controller. But this is not mandatory if you only want to use it within your own rules section.
30
30
31
-
The dummy device has it's own special command to set values from rules:
31
+
Dummy tasks can be used like temporary variables to store data.
32
+
One nice benefit is that these task values of Dummy tasks are also kept in RTC memory.
33
+
So these may survive a reboot, as long as the ESP remains powered.
34
+
35
+
Storing Values
36
+
--------------
37
+
38
+
Typically, one can only interact with a Dummy task via the ``TaskValueSet`` command:
32
39
33
40
.. code-block:: none
34
41
@@ -54,6 +61,78 @@ So for a Dummy device named ``Dummy``, Output Data Type set to Temp / Hum, and V
54
61
55
62
Note: You can use multiple Dummy devices if needed!
56
63
64
+
Output Configuration
65
+
--------------------
66
+
67
+
A Dummy can be configured to output a specific data type.
68
+
Especially Domoticz controllers require some specific data type to properly handle specific devices which output several units of measure.
69
+
70
+
For example "Temp / Hum / Baro" are obviously intended to mimic the well known Bosch BME280 sensor.
71
+
72
+
Basic data types like "Single", "Dual", "Triple", "Quad" are intended to set resp. 1 ... 4 ``float`` values.
73
+
74
+
Extended Output Data Types
75
+
^^^^^^^^^^^^^^^^^^^^^^^^^^
76
+
77
+
Added: 2023/04/15
78
+
79
+
Storing data in ``float`` values may result in loss of decimals.
80
+
A float can only store upto 22 bit if numerical information.
81
+
82
+
For example the "UnixTime" (number of seconds since 1970/01/01) cannot accurately be stored in a float.
83
+
84
+
To overcome these issues, a number of integer types are added:
85
+
86
+
* Int32 - Integer value ranging from ``-2147483648`` ... ``2147483647`` (-1 * 2^31 ... (2^31 - 1))
87
+
* UInt32 - Integer value ranging from ``0`` ... ``4294967295`` (2^32 - 1)
88
+
* Int64 - Integer value ranging from -1 * 2^63 ... (2^63 - 1)
89
+
* UInt64 - Integer value ranging from 0 ... (2^64 - 1)
90
+
* Double - "Double" Floating point value capable of storing 52 bit of numerical information.
91
+
92
+
The offered selection also shows the number of task values being configured.
93
+
For example ``Int32 (3x)`` implies 3 task values of type ``Int32``.
94
+
95
+
Since 64 bit ints and double need 8 bytes, where the other types only require 4 bytes.
96
+
Therefore the maximum number of those task values possible is half that of the other types.
97
+
98
+
Storing data in 64 bit ints may not allow to store the full range as one may expect to store based on the integer types.
99
+
The ``TaskValueSet`` command internally processes data as ``double``, thus limiting the maximum range of these integer values to -9007199254740992 ... 9007199254740991.
100
+
101
+
One can store larger values in these 64 bit int types, but this will result in loss of bits.
102
+
103
+
For example:
104
+
105
+
* ``9007199254740993`` cannot be stored in such a data type as it will be rounded back to ``9007199254740992`` when used.
106
+
* ``1234567890123456789`` will be read back as ``1234567890123456768``, which may seem correct at first sight, but the last few digits are wrong.
107
+
108
+
Storing large values in other integer types, like ``UInt32``, will be clipped to the maximum value that can be handled by that type.
109
+
110
+
For example:
111
+
112
+
* ``1234567890123456789`` stored in an ``UInt32`` will be read back as ``4294967295``
113
+
* ``-1`` stored in an ``UInt32`` will be read back as ``4294967295``
114
+
* ``1234567890123456789`` stored in an ``Int32`` will be read back as ``2147483647``
115
+
* ``-1`` stored in an ``Int32`` will be read back as ``-2147483648``
116
+
117
+
118
+
119
+
Data Acquisition
120
+
----------------
121
+
122
+
In ESPEasy, a task can be triggered to yield some new sample data.
123
+
For other plugins, this means the sensor is read and when successful there is some new data to process.
124
+
125
+
However, since the Dummy device doesn't interact with a device, it will always be "successful" on a task run.
126
+
127
+
One may set the "Interval" to periodically trigger a new task run, or trigger a task run via the command ``TaskRun``.
128
+
129
+
.. note:: The command ``TaskValueSetAndRun`` is a combination of ``TaskValueSet`` and ``TaskRun``.
130
+
131
+
On a task run, there will be one or more events fired (depending on whether or not "Single event with all values" is checked).
132
+
And all connected controllers of that task will be handed over the values present in the task values.
133
+
134
+
Especially Domoticz controllers are very specific to the output data type.
135
+
57
136
58
137
.. Supported hardware
59
138
.. ------------------
@@ -76,6 +155,9 @@ Change log
76
155
.. versionchanged:: 2.0
77
156
...
78
157
158
+
|improved|
159
+
2023-04-15 Add more types of task values, like (u)int32, (u)int64 and double.
160
+
79
161
|improved|
80
162
2021-08-18 Make Interval optional, so no interval (0) can be used.
The Honeywell TruStability™ HSC Series are calibrated pressure sensors with internal temperature compensation.
28
+
This series has a lot of versions of pressure sensors ranging in form factor, pressure range, etc.
29
+
30
+
31
+
Hardware
32
+
--------
33
+
34
+
See the `datasheet <https://prod-edam.honeywell.com/content/dam/honeywell-edam/sps/siot/en-us/products/sensors/pressure-sensors/board-mount-pressure-sensors/trustability-hsc-series/documents/sps-siot-trustability-hsc-series-high-accuracy-board-mount-pressure-sensors-50099148-a-en-ciid-151133.pdf?download=false>`_ for all versions.
35
+
36
+
* Page 13 is a must to help decode the nomenclature of the model numbers.
37
+
* Pages 17 - 29 are about the various form factors of these sensors.
38
+
39
+
The digital versions of these sensors typically output a 14 bit value ranging from ``0`` ... ``16383``.
40
+
41
+
The usable (and compensated) range is typically 10% - 90% of the full range.
42
+
These 10% and 90% points are also the specified range of the sensor.
43
+
44
+
For example, a differential sensor ranging -1 ... 1 bar, will output:
45
+
46
+
* ``1638`` = -1 bar
47
+
* ``14746`` = 1 bar
48
+
49
+
In practice, the sensor can measure from 2.5% upto 97.5% of the full range before it will start clipping.
50
+
51
+
52
+
Configuration
53
+
-------------
54
+
55
+
* **Name**: Required by ESPEasy, must be unique among the list of available devices/tasks.
56
+
57
+
* **Enabled**: The device can be disabled or enabled. When not enabled the device should not use any resources.
58
+
59
+
60
+
Device Settings
61
+
^^^^^^^^^^^^^^^
62
+
63
+
Sensor Output Min and Max must be set to resp. 10% and 90% of the digital count range.
64
+
65
+
* ``Sensor Output Min`` Default to 1638 (10% of 2^14)
66
+
* ``Sensor Output Max`` Default to 14745 (90% of 2^14)
67
+
* ``Pressure Min`` Minimal stated pressure for the given sensor.
68
+
* ``Pressure Max`` Maximal stated pressure for the given sensor.
69
+
70
+
For example, given the ``HCSMANV001BA2A3`` sensor:
71
+
72
+
* ``M`` SMT
73
+
* ``AN`` Single Axial barbed port
74
+
* ``V`` Liquid Media port 1, diagnostics on
75
+
* ``001BA`` 0 bar to 1 bar
76
+
* ``2`` I2C address 0x28
77
+
* ``A`` 10% to 90% 2^14 digital
78
+
* ``3`` 3V3
79
+
80
+
The measurement range for this sensor is 0 ... 1 bar.
81
+
This means the ``Pressure Min`` and ``Pressure Max`` should be set to resp. 0 and 1.
82
+
However, if the pressure in some container needs to be compared to some outside pressure, measured by for example a Bosch BMP280, it might be useful to directly output to mbar.
83
+
Thus for this purpose the ``Pressure Max`` should be set to ``1000``.
0 commit comments