Skip to content

Commit f6de0fd

Browse files
authored
Merge pull request letscontrolit#3854 from tonhuisman/feature/p117-scd30-co2-humidity-temperature-sensor
[P117] Add SCD30 CO2, humidity and temperature sensor
2 parents 2556826 + 49af08a commit f6de0fd

18 files changed

+1323
-5
lines changed

docs/source/Plugin/P117.rst

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
.. include:: ../Plugin/_plugin_substitutions_p11x.repl
2+
.. _P117_page:
3+
4+
|P117_typename|
5+
==================================================
6+
7+
|P117_shortinfo|
8+
9+
Plugin details
10+
--------------
11+
12+
Type: |P117_type|
13+
14+
Name: |P117_name|
15+
16+
Status: |P117_status|
17+
18+
GitHub: |P117_github|_
19+
20+
Maintainer: |P117_maintainer|
21+
22+
Used libraries: |P117_usedlibraries|
23+
24+
Description
25+
-----------
26+
27+
The SCD30 is a CO2 sensor unit that also provides Humidity and Temperature measurement, supports auto-calibration, and has temperature and altitude compensation settings.
28+
29+
Configuration
30+
-------------
31+
32+
.. image:: P117_DeviceConfiguration.png
33+
:alt: Device configuration
34+
35+
36+
* **Name** Required by ESPEasy, must be unique among the list of available devices/tasks.
37+
38+
* **Enabled** The device can be disabled or enabled. When not enabled the device should not use any resources.
39+
40+
I2C options
41+
^^^^^^^^^^^
42+
43+
.. note:: According to manufacturer specification, the I2C ClockStretchLimit setting should be configured at a minimum value of 20 milliseconds, and can take up to 150 msec once a day. For ESP8266 and ESP32 there are somewhat different values to fill, ESP8266 expects microseconds (usec) there, 20000 to 150000, and ESP32 needs 1/80 usec, 1600000 to 12000000, so a factor 80 difference.
44+
45+
The available settings here depend on the build used. At least the **Force Slow I2C speed** option is available, but selections for the I2C Multiplexer can also be shown. For details see the :ref:`Hardware_page`
46+
47+
.. note:: The SCD30 sensor supports a max. I2C Clock Speed of 100 kHz, so **Force Slow I2C speed** should be checked! (ESPEasy has a default setting of 100 kHz for I2C Slow device Clock Speed).
48+
49+
Device Settings
50+
^^^^^^^^^^^^^^^
51+
52+
* **Altitude** Set the altitude above sealevel in meters, where the sensor is placed. The range is 0..2000 meter.
53+
54+
* **Temp offset** Offset for temperature correction. Can be set to compensate any self-heating of the device, by comparing the temperature measurement with another calibrated temperature measured close to the device. The difference can be set here, and is (also) stored in the sensor (but re-written every time ESPEasy initializes the sensor).
55+
56+
The Data Acquisition, Send to Controller and Interval settings are standard available configuration items. Send to Controller only when one or more Controllers are configured.
57+
58+
**Interval** By default, Interval will be set to 60 sec. The data will be measured and optionally sent to any configured controllers using this interval.
59+
60+
Values
61+
^^^^^^
62+
63+
The used library provides an averaged CO2 value of the last 5 measurements in value ``CO2``. The last single CO2 measurement is also available as ``CO2raw``.
64+
65+
``Humidity`` shows the relative humidity RH in a range of 0..100%.
66+
67+
``Temperature`` shows the temperature of the sensor in degrees Celcius, with the **Temp offset** applied.
68+
69+
Commands available
70+
^^^^^^^^^^^^^^^^^^
71+
72+
.. include:: P117_commands.repl
73+
74+
Change log
75+
----------
76+
77+
.. versionchanged:: 2.0
78+
...
79+
80+
|added|
81+
2021-11-20 Initial release version.
82+
83+
84+
85+
86+
43.6 KB
Loading

docs/source/Plugin/P117_commands.repl

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
.. csv-table::
2+
:header: "Command Syntax", "Extra information"
3+
:widths: 20, 30
4+
5+
"
6+
7+
| ``scdgetabc``
8+
9+
","
10+
11+
| Shows automatic calibration period in days, 0 = disable.
12+
13+
"
14+
"
15+
16+
| ``scdgetalt``
17+
18+
","
19+
20+
| Shows altitude compensation configuration in meters above sea level.
21+
22+
"
23+
"
24+
25+
| ``scdgettmp``
26+
27+
","
28+
29+
| Shows temperature offset in degrees C.
30+
31+
"

docs/source/Plugin/_Plugin.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ There are different released versions of ESP Easy:
140140
":ref:`P113_page`","|P113_status|","P113"
141141
":ref:`P114_page`","|P114_status|","P114"
142142
":ref:`P115_page`","|P115_status|","P115"
143+
":ref:`P117_page`","|P117_status|","P117"
143144

144145

145146
Internal GPIO handling

docs/source/Plugin/_plugin_categories.repl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
.. |Plugin_Energy_Heat| replace:: :ref:`P088_page`, :ref:`P093_page`
99
.. |Plugin_Environment| replace:: :ref:`P004_page`, :ref:`P005_page`, :ref:`P006_page`, :ref:`P014_page`, :ref:`P024_page`, :ref:`P028_page`, :ref:`P030_page`, :ref:`P031_page`, :ref:`P032_page`, :ref:`P034_page`, :ref:`P039_page`, :ref:`P047_page`, :ref:`P051_page`, :ref:`P068_page`, :ref:`P069_page`, :ref:`P072_page`, :ref:`P103_page`, :ref:`P104_page`, :ref:`P105_page`, :ref:`P106_page`
1010
.. |Plugin_Extra_IO| replace:: :ref:`P011_page`, :ref:`P022_page`
11-
.. |Plugin_Gases| replace:: :ref:`P049_page`, :ref:`P052_page`, :ref:`P083_page`, :ref:`P090_page`
11+
.. |Plugin_Gases| replace:: :ref:`P049_page`, :ref:`P052_page`, :ref:`P083_page`, :ref:`P090_page`, :ref:`P117_page`
1212
.. |Plugin_Generic| replace:: :ref:`P003_page`, :ref:`P026_page`, :ref:`P033_page`, :ref:`P037_page`, :ref:`P081_page`, :ref:`P100_page`
1313
.. |Plugin_Gesture| replace:: :ref:`P064_page`
1414
.. |Plugin_Gyro| replace:: :ref:`P045_page`

docs/source/Plugin/_plugin_substitutions_p11x.repl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,16 @@
6262
.. |P115_maintainer| replace:: `TD-er`
6363
.. |P115_compileinfo| replace:: `.`
6464
.. |P115_usedlibraries| replace:: `https://github.com/sparkfun/SparkFun_MAX1704x_Fuel_Gauge_Arduino_Library`
65+
66+
.. |P117_name| replace:: :cyan:`SCD30`
67+
.. |P117_type| replace:: :cyan:`Gases`
68+
.. |P117_typename| replace:: :cyan:`Gases - SCD30 CO2, Humidity, Temperature`
69+
.. |P117_porttype| replace:: `.`
70+
.. |P117_status| replace:: :yellow:`TESTING D`
71+
.. |P117_github| replace:: _P117_SCD30.ino
72+
.. _P117_github: https://github.com/letscontrolit/ESPEasy/blob/mega/src/_P117_SCD30.ino
73+
.. |P117_usedby| replace:: `.`
74+
.. |P117_shortinfo| replace:: `SCD30 CO2 sensor`
75+
.. |P117_maintainer| replace:: `tonhuisman`
76+
.. |P117_compileinfo| replace:: `.`
77+
.. |P117_usedlibraries| replace:: `https://github.com/Frogmore42/Sonoff-Tasmota/tree/development/lib/FrogmoreScd30 (corrected local copy)`

docs/source/Reference/Command.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,3 +663,9 @@ P115 :ref:`P115_page`
663663
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
664664

665665
.. include:: ../Plugin/P115_commands.repl
666+
667+
668+
P117 :ref:`P117_page`
669+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
670+
671+
.. include:: ../Plugin/P117_commands.repl

0 commit comments

Comments
 (0)