mirror of
https://github.com/esphome/esphome-docs.git
synced 2024-12-26 17:27:47 +01:00
DHT12
This commit is contained in:
parent
876ff4b64b
commit
ef6ea48a89
27
api/sensor/dht12.rst
Normal file
27
api/sensor/dht12.rst
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
DHT12 Temperature/Humidity Sensor
|
||||||
|
=================================
|
||||||
|
|
||||||
|
Example Usage
|
||||||
|
-------------
|
||||||
|
|
||||||
|
.. code-block:: cpp
|
||||||
|
|
||||||
|
// Basic
|
||||||
|
App.make_dht12_sensor("Outside Temperature", "Outside Humidity");
|
||||||
|
|
||||||
|
.. cpp:namespace:: nullptr
|
||||||
|
|
||||||
|
See :cpp:func:`Application::make_dht12_sensor`.
|
||||||
|
|
||||||
|
API Reference
|
||||||
|
-------------
|
||||||
|
|
||||||
|
.. cpp:namespace:: nullptr
|
||||||
|
|
||||||
|
.. doxygentypedef:: sensor::DHT12TemperatureSensor
|
||||||
|
.. doxygentypedef:: sensor::DHT12HumiditySensor
|
||||||
|
|
||||||
|
.. doxygenclass:: sensor::DHT12Component
|
||||||
|
:members:
|
||||||
|
:protected-members:
|
||||||
|
:undoc-members:
|
@ -13,6 +13,7 @@ See :cpp:func:`Application::register_sensor`.
|
|||||||
adc-sensor.rst
|
adc-sensor.rst
|
||||||
dallas.rst
|
dallas.rst
|
||||||
dht.rst
|
dht.rst
|
||||||
|
dht12.rst
|
||||||
pulse-counter.rst
|
pulse-counter.rst
|
||||||
ultrasonic.rst
|
ultrasonic.rst
|
||||||
ads1115.rst
|
ads1115.rst
|
||||||
|
BIN
esphomeyaml/components/sensor/dht12-full.jpg
Normal file
BIN
esphomeyaml/components/sensor/dht12-full.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 58 KiB |
63
esphomeyaml/components/sensor/dht12.rst
Normal file
63
esphomeyaml/components/sensor/dht12.rst
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
DHT12 Temperature+Humidity Sensor
|
||||||
|
=================================
|
||||||
|
|
||||||
|
.. warning::
|
||||||
|
|
||||||
|
This sensor is experimental has not been fully tested yet as I do not own all sensors. If you
|
||||||
|
can verify it works (or if it doesn't), please notify me on `discord <https://discord.gg/KhAMKrd>`__.
|
||||||
|
|
||||||
|
The DHT12 Temperature+Humidity sensor allows you to use your DHT12
|
||||||
|
(`datasheet <http://www.robototehnika.ru/file/DHT12.pdf>`__,
|
||||||
|
`electrodragon`_) i2c-based sensor with esphomelib.
|
||||||
|
|
||||||
|
.. figure:: /esphomeyaml/components/sensor/dht12-full.jpg
|
||||||
|
:align: center
|
||||||
|
:target: `electrodragon`_
|
||||||
|
:width: 50.0%
|
||||||
|
|
||||||
|
DHT12 Temperature & Humidity Sensor. Image by `electrodragon`_.
|
||||||
|
|
||||||
|
.. _electrodragon: http://www.electrodragon.com/product/dht12/
|
||||||
|
|
||||||
|
|image0|
|
||||||
|
|
||||||
|
.. |image0| image:: /esphomeyaml/components/sensor/temperature-humidity.png
|
||||||
|
:class: align-center
|
||||||
|
:width: 80.0%
|
||||||
|
|
||||||
|
.. code:: yaml
|
||||||
|
|
||||||
|
# Example configuration entry
|
||||||
|
sensor:
|
||||||
|
- platform: dht12
|
||||||
|
temperature:
|
||||||
|
name: "Living Room Temperature"
|
||||||
|
humidity:
|
||||||
|
name: "Living Room Humidity"
|
||||||
|
update_interval: 15s
|
||||||
|
|
||||||
|
Configuration variables:
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
- **temperature** (**Required**): The information for the temperature
|
||||||
|
sensor
|
||||||
|
|
||||||
|
- **name** (**Required**, string): The name for the temperature
|
||||||
|
sensor.
|
||||||
|
- All other options from
|
||||||
|
`Sensor </esphomeyaml/components/sensor/index.html#base-sensor-configuration>`__
|
||||||
|
and `MQTT
|
||||||
|
Component </esphomeyaml/components/mqtt.html#mqtt-component-base-configuration>`__.
|
||||||
|
|
||||||
|
- **humidity** (**Required**): The information for the humidity sensor
|
||||||
|
|
||||||
|
- **name** (**Required**, string): The name for the humidity sensor.
|
||||||
|
- All other options from
|
||||||
|
`Sensor </esphomeyaml/components/sensor/index.html#base-sensor-configuration>`__
|
||||||
|
and `MQTT
|
||||||
|
Component </esphomeyaml/components/mqtt.html#mqtt-component-base-configuration>`__.
|
||||||
|
|
||||||
|
- **update_interval** (*Optional*, `time </esphomeyaml/configuration-types.html#time>`__): The interval to check the
|
||||||
|
sensor. Defaults to ``15s``.
|
||||||
|
- **id** (*Optional*, `id </esphomeyaml/configuration-types.html#id>`__): Manually specify the ID used for code
|
||||||
|
generation.
|
BIN
esphomeyaml/images/dht12.jpg
Normal file
BIN
esphomeyaml/images/dht12.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 30 KiB |
@ -39,6 +39,9 @@ Features
|
|||||||
Using With
|
Using With
|
||||||
~~~~~~~~~~
|
~~~~~~~~~~
|
||||||
|
|
||||||
|
This list contains guides for how to use esphomeyaml with different devices. Note that
|
||||||
|
it's far from complete right now and esphomeyaml can be used with many more devices than this.
|
||||||
|
|
||||||
================== ================== ==================
|
================== ================== ==================
|
||||||
|Sonoff S20|_
|
|Sonoff S20|_
|
||||||
------------------ ------------------ ------------------
|
------------------ ------------------ ------------------
|
||||||
@ -128,9 +131,9 @@ Sensor Components
|
|||||||
---------------------- ---------------------- ----------------------
|
---------------------- ---------------------- ----------------------
|
||||||
`BME280`_ `BME680`_ `TSL2561`_
|
`BME280`_ `BME680`_ `TSL2561`_
|
||||||
---------------------- ---------------------- ----------------------
|
---------------------- ---------------------- ----------------------
|
||||||
|SHT3X-D|_
|
|SHT3X-D|_ |DHT12|_
|
||||||
---------------------- ---------------------- ----------------------
|
---------------------- ---------------------- ----------------------
|
||||||
`SHT3X-D`_
|
`SHT3X-D`_ `DHT12`_
|
||||||
====================== ====================== ======================
|
====================== ====================== ======================
|
||||||
|
|
||||||
.. |Sensor Core| image:: /esphomeyaml/images/folder-open.svg
|
.. |Sensor Core| image:: /esphomeyaml/images/folder-open.svg
|
||||||
@ -197,6 +200,10 @@ Sensor Components
|
|||||||
:class: component-image
|
:class: component-image
|
||||||
.. _SHT3X-D: /esphomeyaml/components/sensor/sht3xd.html
|
.. _SHT3X-D: /esphomeyaml/components/sensor/sht3xd.html
|
||||||
|
|
||||||
|
.. |DHT12| image:: /esphomeyaml/images/dht12.jpg
|
||||||
|
:class: component-image
|
||||||
|
.. _DHT12: /esphomeyaml/components/sensor/dht12.html
|
||||||
|
|
||||||
|
|
||||||
Binary Sensor Components
|
Binary Sensor Components
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
@ -490,4 +497,5 @@ Full Index
|
|||||||
components/sensor/bme680.rst
|
components/sensor/bme680.rst
|
||||||
components/sensor/tsl2561.rst
|
components/sensor/tsl2561.rst
|
||||||
components/sensor/sht3xd.rst
|
components/sensor/sht3xd.rst
|
||||||
|
components/sensor/dht12.rst
|
||||||
components/using-with/sonoff-s20.rst
|
components/using-with/sonoff-s20.rst
|
||||||
|
@ -32,6 +32,7 @@ a light is a combination of output components.
|
|||||||
api/sensor/bmp085.rst
|
api/sensor/bmp085.rst
|
||||||
api/sensor/dallas.rst
|
api/sensor/dallas.rst
|
||||||
api/sensor/dht.rst
|
api/sensor/dht.rst
|
||||||
|
api/sensor/dht12.rst
|
||||||
api/sensor/htu21d.rst
|
api/sensor/htu21d.rst
|
||||||
api/sensor/hdc1080.rst
|
api/sensor/hdc1080.rst
|
||||||
api/sensor/pulse-counter.rst
|
api/sensor/pulse-counter.rst
|
||||||
|
Loading…
Reference in New Issue
Block a user