diff --git a/components/binary_sensor/ttp229.rst b/components/binary_sensor/ttp229.rst index a2b48ce8e..7e0967098 100644 --- a/components/binary_sensor/ttp229.rst +++ b/components/binary_sensor/ttp229.rst @@ -6,8 +6,13 @@ TTP229 Capacitive Touch Sensor :image: ttp229.jpg :keywords: TTP229 -The ``ttp229_lsf`` sensor platform allows you to use your TTP229 `datasheet `__ -Capacitive Touch Sensor with ESPHome. The :ref:`I²C ` is required to be set up in your configuration for this sensor to work. +The ``ttp229`` component allows you to use your TTP229 `datasheet `__ +Capacitive Touch Sensor with ESPHome. + +There are two types of this sensor: + +- **ttp229_lsf**: The :ref:`I²C ` version of the sensor, uses SDA+SCL pins. +- **ttp229_bsf**: The pin-based version of the sensor, uses SDO+SCL pins. .. figure:: images/ttp229-full.jpg :align: center @@ -17,6 +22,9 @@ Capacitive Touch Sensor with ESPHome. The :ref:`I²C ` is required to be se .. _RobotDyn: https://www.tinytronics.nl/shop/nl/sensoren/touch/robotdyn-touch-module-ttp229-lsf-16-kanaals +``ttp229_lsf`` Type +------------------- + .. code-block:: yaml # Example configuration entry @@ -28,13 +36,48 @@ Capacitive Touch Sensor with ESPHome. The :ref:`I²C ` is required to be se channel: 0 Configuration variables: ------------------------- +************************ The configuration is made up of two parts: The central component, and individual Binary sensors per channel. Base Configuration: -- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor. +- **id** (*Optional*, :ref:`config-id`): Manually set the ID of this sensor. + +Binary Sensor Configuration: + +- **name** (**Required**, string): The name of the binary sensor. +- **channel** (**Required**, integer): The channel number at the ttp229 the touchkey is connected to. +- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation. +- All other options from :ref:`Binary Sensor `. + +``ttp229_bsf`` Type +------------------- + +.. code-block:: yaml + + # Example configuration entry + ttp229_bsf: + sdo_pin: D0 + scl_pin: D1 + + binary_sensor: + - platform: ttp229_bsf + name: TTP229 Channel 0 + channel: 0 + +Configuration variables: +************************ + +The configuration is made up of two parts: The central component, and individual Binary sensors per channel. + +Base Configuration: + +- **sdo_pin** (**Required**, :ref:`Pin Schema `): The pin the + SDO pin is connected to. +- **scl_pin** (**Required**, :ref:`Pin Schema `): The pin the + SCL pin is connected to. +- **id** (*Optional*, :ref:`config-id`): Manually set the ID of this component. Binary Sensor Configuration: @@ -48,4 +91,5 @@ See Also - :ref:`sensor-filters` - :apiref:`ttp229_lsf/ttp229_lsf.h` +- :apiref:`ttp229_bsf/ttp229_bsf.h` - :ghedit:`Edit` diff --git a/components/gps.rst b/components/gps.rst new file mode 100644 index 000000000..1d127aef4 --- /dev/null +++ b/components/gps.rst @@ -0,0 +1,63 @@ +GPS Component +============= + +.. seo:: + :description: Instructions for setting up GPS integration in ESPHome. + :image: crosshair-gps.png + +.. warning:: + + This component has not been fully tested yet, if you have this component + and can confirm it works, please create a quick new issue here + https://github.com/esphome/issues/ + + Thanks! + +The ``gps`` component allows you to connect GPS modules to your ESPHome project. +Any GPS module that uses the standardized NMEA communication protocol will work. + +.. figure:: images/gps-full.jpg + :align: center + :width: 50.0% + + GPS Module. Image by `Adafruit`_ + +.. _Adafruit: https://www.adafruit.com/product/746 + +For this integration to work you need to have set up a :ref:`UART bus ` +in your configuration - only the RX pin should be necessary. + +.. code-block:: yaml + + # Example configuration entry + uart: + rx_pin: D0 + baud_rate: 9600 + + # Declare GPS module + gps: + + # GPS as time source + time: + - platform: gps + +Configuration variables: +------------------------ + +The component is split up in platforms. + +First you need to define a global GPS module hub (as seen above). + +Currently, the only data that can be extracted from GPS is the current time. +GPS can be used as a time platform to get the current date and time via the +very accurate GPS clocks that are also independent of any network connection. + +See :doc:`time` for config options for the GPS time source. + +See Also +-------- + +- :ref:`sensor-filters` +- `TinyGPS++ library `__ +- :apiref:`gps/gps.h` +- :ghedit:`Edit` diff --git a/components/images/gps-full.jpg b/components/images/gps-full.jpg new file mode 100644 index 000000000..3295ecef5 Binary files /dev/null and b/components/images/gps-full.jpg differ diff --git a/components/sensor/ccs811.rst b/components/sensor/ccs811.rst new file mode 100644 index 000000000..eb506fd6c --- /dev/null +++ b/components/sensor/ccs811.rst @@ -0,0 +1,108 @@ +CCS811 CO_2 and Volatile Organic Compound Sensor +================================================ + +.. seo:: + :description: Instructions for setting up CCS811 sensors. + :image: ccs811.jpg + +.. warning:: + + This component has not been fully tested yet, if you have this component + and can confirm it works, please create a quick new issue here + https://github.com/esphome/issues/ + + Thanks! + +The ``ccs811`` sensor platform allows you to use CCS811 CO_2 and volatile organic compound sensors +(`Adafruit`_) with ESPHome. + +.. figure:: images/ccs811-full.jpg + :align: center + :width: 50.0% + + CCS811 Sensor. Image by `Adafruit`_ + +.. _Adafruit: https://www.adafruit.com/product/3566 + +The communication with this sensor is done via :ref:`I²C Bus `, so you need to have +an ``i2c:`` section in your config for this integration to work. + +.. code-block:: yaml + + # Example configuration entry + i2c: + sda: D0 + scl: D1 + + sensor: + - platform: ccs811 + eco2: + name: "CCS811 eCO2 Value" + tvoc: + name: "CCS811 Total Volatile Organic Compound" + address: 0x5A + update_interval: 60s + +Configuration variables: +------------------------ + +- **eco2** (**Required**): The eCO_2 data from the sensor in parts per million (ppm). + + - **name** (**Required**, string): The name for the CO_2 sensor. + - **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas. + - All other options from :ref:`Sensor `. + +- **tvoc** (**Required**): The information for the total volatile organic compound sensor in + parts per billion (ppm). + + - **name** (**Required**, string): The name for the tvoc sensor. + - **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use in lambdas. + - All other options from :ref:`Sensor `. + +- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the + sensor. Defaults to ``60s``. + +- **address** (*Optional*, int): The :ref:`I²C ` address of the sensor. + +- **baseline** (*Optional*, int): The baseline value for the unit, for calibration + purposes. See :ref:`ccs811-calibrating` for more info. + +.. _ccs811-calibrating: + +Calibrating Baseline +-------------------- + +The CCS811 sensor will re-calibrate itself each time it is powered on. Unfortunately +that also means that if the sensor reboots at a time when the air is less clean than normal, +the values will have a constant offset and cannot be compared to the values before the last +boot. + +To have consistent values, you need to specify a static **baseline** value (the calibration factor). +To do this, first let the sensor boot up with no baseline set and let the sensor calibrate +itself. After around 20-30 minutes you can then view the remote logs on the ESP. The next +time the sensor is read out, you will see a log message with something like ``baseline=0xA483``. + +Now set the baseline property in your configuration file like so with the value you got +via the logs: + +.. code-block:: yaml + + # Example configuration entry + sensor: + - platform: ccs811 + # ... + baseline: 0xA483 + +The next time you upload the code, the CCS811 will be informed of this static baseline +and you will get consistent values. + +Please note that after some time (a couple of months), the baseline will need to be +re-calibrated because the internal sensor has a slight value drift over time. + +See Also +-------- + +- :ref:`sensor-filters` +- `CCS811 Application Note `__ +- :apiref:`ccs811/ccs811.h` +- :ghedit:`Edit` diff --git a/components/sensor/images/ccs811-full.jpg b/components/sensor/images/ccs811-full.jpg new file mode 100644 index 000000000..cbb4ac139 Binary files /dev/null and b/components/sensor/images/ccs811-full.jpg differ diff --git a/images/ccs811.jpg b/images/ccs811.jpg new file mode 100644 index 000000000..4b9c8003a Binary files /dev/null and b/images/ccs811.jpg differ diff --git a/images/crosshairs-gps.svg b/images/crosshairs-gps.svg new file mode 100644 index 000000000..087df012f --- /dev/null +++ b/images/crosshairs-gps.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/display_time_temp_oled_2.jpg b/images/display_time_temp_oled_2.jpg index 9bb7fd1ec..be4831587 100644 Binary files a/images/display_time_temp_oled_2.jpg and b/images/display_time_temp_oled_2.jpg differ diff --git a/images/sds011.jpg b/images/sds011.jpg index 674d3dc6f..7ee6c4ea6 100644 Binary files a/images/sds011.jpg and b/images/sds011.jpg differ diff --git a/images/ttp229.jpg b/images/ttp229.jpg index ce4810754..935e8bd52 100644 Binary files a/images/ttp229.jpg and b/images/ttp229.jpg differ diff --git a/index.rst b/index.rst index 4bbeed3d7..a691bd916 100644 --- a/index.rst +++ b/index.rst @@ -95,6 +95,7 @@ Sensor Components BME680, components/sensor/bme680, bme680.jpg BMP085, components/sensor/bmp085, bmp180.jpg BMP280, components/sensor/bmp280, bmp280.jpg + CCS811, components/sensor/ccs811, ccs811.jpg CSE7766, components/sensor/cse7766, cse7766.svg Dallas, components/sensor/dallas, dallas.jpg DHT, components/sensor/dht, dht.jpg @@ -154,7 +155,7 @@ Binary Sensor Components Remote Receiver, components/binary_sensor/remote_receiver, remote.svg PN532, components/binary_sensor/pn532, pn532.jpg RDM6300, components/binary_sensor/rdm6300, rdm6300.jpg - TTP229-LSF Capacitive Touch Sensor, components/binary_sensor/ttp229, ttp229.jpg + TTP229, components/binary_sensor/ttp229, ttp229.jpg Custom Binary Sensor, components/binary_sensor/custom, language-cpp.svg Output Components @@ -276,6 +277,7 @@ Misc Components Sun, components/sun, weather-sunny.svg ESP32 Ethernet, components/ethernet, ethernet.svg ESP32 Camera, components/esp32_camera, camera.svg + GPS, components/gps, crosshairs-gps.svg Additional Custom Components ----------------------------