Merge branch 'next' of https://github.com/esphome/esphome-docs into next
@ -58,6 +58,9 @@ Configuration variables:
|
||||
- **assumed_state** (*Optional*, boolean): Whether the true state of the cover is not known.
|
||||
This will make the Home Assistant frontend show buttons for both OPEN and CLOSE actions, instead
|
||||
of hiding one of them. Defaults to ``false``.
|
||||
- **has_position** (*Optional*, boolean): Whether this cover will publish its position as a floating point number.
|
||||
By default (``false``), the cover only publishes OPEN/CLOSED position.
|
||||
By setting this to true you can also send any position in between using the publish action.
|
||||
- **tilt_action** (*Optional*, :ref:`Action <config-action>`): The action that should
|
||||
be performed when the remote (like Home Assistant's frontend) requests the cover be set to a specific
|
||||
tilt position.
|
||||
|
@ -97,18 +97,20 @@ option you can tell ESPHome which arduino framework to use for compiling.
|
||||
For the ESP8266, you currently can manually pin the arduino version to these values (see the full
|
||||
list of arduino frameworks `here <https://github.com/esp8266/Arduino/releases>`__):
|
||||
|
||||
* `2.5.2 <https://github.com/esp8266/Arduino/releases/tag/2.5.2>`__
|
||||
* `2.5.2 <https://github.com/esp8266/Arduino/releases/tag/2.5.2>`__ (default)
|
||||
* `2.5.1 <https://github.com/esp8266/Arduino/releases/tag/2.5.1>`__
|
||||
* `2.5.0 <https://github.com/esp8266/Arduino/releases/tag/2.5.0>`__
|
||||
* `2.4.2 <https://github.com/esp8266/Arduino/releases/tag/2.4.2>`__ (default)
|
||||
* `2.4.2 <https://github.com/esp8266/Arduino/releases/tag/2.4.2>`__
|
||||
* `2.4.1 <https://github.com/esp8266/Arduino/releases/tag/2.4.1>`__
|
||||
* `2.4.0 <https://github.com/esp8266/Arduino/releases/tag/2.4.0>`__
|
||||
* `2.3.0 <https://github.com/esp8266/Arduino/releases/tag/2.3.0>`__ (used by Tasmota etc)
|
||||
|
||||
For the ESP32, there are these arduino `framework versions <https://github.com/espressif/arduino-esp32/releases>`__:
|
||||
|
||||
- `1.0.4 <https://github.com/espressif/arduino-esp32/releases/tag/1.0.4>`__ (default)
|
||||
- `1.0.3 <https://github.com/espressif/arduino-esp32/releases/tag/1.0.3>`__
|
||||
- `1.0.2 <https://github.com/espressif/arduino-esp32/releases/tag/1.0.2>`__
|
||||
- `1.0.1 <https://github.com/espressif/arduino-esp32/releases/tag/1.0.1>`__ (default)
|
||||
- `1.0.1 <https://github.com/espressif/arduino-esp32/releases/tag/1.0.1>`__
|
||||
- `1.0.0 <https://github.com/espressif/arduino-esp32/releases/tag/1.0.0>`__
|
||||
|
||||
.. _esphome-esp8266_restore_from_flash:
|
||||
|
184
components/http_request.rst
Normal file
@ -0,0 +1,184 @@
|
||||
HTTP Request
|
||||
============
|
||||
|
||||
.. seo::
|
||||
:description: Instructions for setting up HTTP Requests in ESPHome
|
||||
:image: connection.png
|
||||
:keywords: http, request
|
||||
|
||||
|
||||
The ``http_request`` component lets you make HTTP/HTTPS requests.
|
||||
|
||||
.. note::
|
||||
|
||||
This component works only with :ref:`arduino framework <esphome-arduino_version>` 2.5.0 or newer.
|
||||
|
||||
First, you need to setup a component:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# Example configuration entry
|
||||
http_request:
|
||||
useragent: esphome/device
|
||||
timeout: 10s
|
||||
|
||||
Configuration variables:
|
||||
------------------------
|
||||
|
||||
- **useragent** (*Optional*, string): User-Agent header for requests. Defaults to ``ESPHome``.
|
||||
- **timeout** (*Optional*, :ref:`time <config-time>`): Timeout for request. Defaults to ``5s``.
|
||||
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
|
||||
|
||||
HTTP Request Actions
|
||||
--------------------
|
||||
|
||||
Component support a number of :ref:`actions <config-action>` that can be used to send requests.
|
||||
|
||||
.. _http_request-get_action:
|
||||
|
||||
``http_request.get`` Action
|
||||
***************************
|
||||
|
||||
This :ref:`action <config-action>` sends a GET request.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
on_...:
|
||||
- http_request.get:
|
||||
url: https://esphome.io
|
||||
headers:
|
||||
Content-Type: application/json
|
||||
verify_ssl: false
|
||||
# Short form
|
||||
- http_request.get: https://esphome.io
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **url** (**Required**, string, :ref:`templatable <config-templatable>`): URL to send request.
|
||||
- **headers** (*Optional*, mapping): Map of HTTP headers. Values are :ref:`templatable <config-templatable>`.
|
||||
- **verify_ssl** (*Optional*, boolean): Verify the SSL certificate of the endpoint. Defaults to ``true``.
|
||||
|
||||
.. note::
|
||||
|
||||
Currently ESPHome **can't verify the SSL certificate** of the endpoint.
|
||||
Set ``verify_ssl: false`` to make HTTPS request.
|
||||
|
||||
.. _http_request-post_action:
|
||||
|
||||
``http_request.post`` Action
|
||||
****************************
|
||||
|
||||
This :ref:`action <config-action>` sends a POST request.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
on_...:
|
||||
- http_request.post:
|
||||
url: https://esphome.io
|
||||
headers:
|
||||
Content-Type: application/json
|
||||
json:
|
||||
key: value
|
||||
verify_ssl: false
|
||||
# Short form
|
||||
- http_request.post: https://esphome.io
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **body** (*Optional*, string, :ref:`templatable <config-templatable>`): A HTTP body string to send with request.
|
||||
- **json** (*Optional*, mapping): A HTTP body in JSON format. Values are :ref:`templatable <config-templatable>`. See :ref:`http_request-examples`.
|
||||
- All other options from :ref:`http_request-get_action`.
|
||||
|
||||
.. _http_request-send_action:
|
||||
|
||||
``http_request.send`` Action
|
||||
****************************
|
||||
|
||||
This :ref:`action <config-action>` sends a request.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
on_...:
|
||||
- http_request.send:
|
||||
method: PUT
|
||||
url: https://esphome.io
|
||||
headers:
|
||||
Content-Type: application/json
|
||||
body: "Some data"
|
||||
verify_ssl: false
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **method** (**Required**, string): HTTP method to use (``GET``, ``POST``, ``PUT``, ``DELETE``, ``PATCH``).
|
||||
- All other options from :ref:`http_request-post_action`.
|
||||
|
||||
.. _http_request-examples:
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Templatable values
|
||||
******************
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
on_...:
|
||||
- http_request.post:
|
||||
url: !lambda |-
|
||||
return ((std::string) "https://esphome.io?state=" + id(my_sensor).state).c_str();
|
||||
headers:
|
||||
X-Custom-Header: !lambda |-
|
||||
return ((std::string) "Value-" + id(my_sensor).state).c_str();
|
||||
body: !lambda |-
|
||||
return id(my_sensor).state;
|
||||
|
||||
|
||||
Body in JSON format (syntax 1)
|
||||
******************************
|
||||
|
||||
**Note:** all values of the map should be a strings.
|
||||
It's impossible to send ``boolean`` or ``numbers`` with this syntax.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
on_...:
|
||||
- http_request.post:
|
||||
url: https://esphome.io
|
||||
verify_ssl: false
|
||||
json:
|
||||
key: !lambda |-
|
||||
return id(my_sensor).state;
|
||||
greeting: "Hello World"
|
||||
|
||||
# Will send:
|
||||
# {"key": "42.0", "greeting": "Hello World"}
|
||||
|
||||
Body in JSON format (syntax 2)
|
||||
******************************
|
||||
|
||||
**Note:** use this syntax to send ``boolean`` or ``numbers`` in JSON.
|
||||
|
||||
The JSON message will be constructed using the `ArduinoJson <https://github.com/bblanchon/ArduinoJson>`__ library.
|
||||
In the ``json`` option you have access to a ``root`` object which will represents the base object
|
||||
of the JSON message. You can assign values to keys by using the ``root["KEY_NAME"] = VALUE;`` syntax
|
||||
as seen below.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
on_...:
|
||||
- http_request.post:
|
||||
url: https://esphome.io
|
||||
verify_ssl: false
|
||||
json: |-
|
||||
root["key"] = id(my_sensor).state;
|
||||
root["greeting"] = "Hello World";
|
||||
|
||||
# Will send:
|
||||
# {"key": 42.0, "greeting": "Hello World"}
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
- :doc:`index`
|
||||
- :apiref:`http_request/http_request.h`
|
||||
- :ghedit:`Edit`
|
BIN
components/sensor/images/ina226-full.jpg
Normal file
After Width: | Height: | Size: 124 KiB |
BIN
components/sensor/images/max31865-full.jpg
Normal file
After Width: | Height: | Size: 953 KiB |
BIN
components/sensor/images/ruuvitag-full.jpg
Normal file
After Width: | Height: | Size: 34 KiB |
BIN
components/sensor/images/ruuvitag-ui.jpg
Normal file
After Width: | Height: | Size: 27 KiB |
69
components/sensor/ina226.rst
Normal file
@ -0,0 +1,69 @@
|
||||
INA226 DC current and power sensor
|
||||
==================================
|
||||
|
||||
.. seo::
|
||||
:description: Instructions for setting up INA226 DC current and power sensors
|
||||
:image: ina226.jpg
|
||||
:keywords: ina226
|
||||
|
||||
The ``ina226`` sensor platform allows you to use your INA226 DC Current and Power Sensor
|
||||
(`datasheet <http://www.ti.com/lit/ds/symlink/ina226.pdf>`__,
|
||||
`eBay`_) sensors with
|
||||
ESPHome. The :ref:`I²C Bus <i2c>` is
|
||||
required to be set up in your configuration for this sensor to work.
|
||||
|
||||
|
||||
.. figure:: images/ina226-full.jpg
|
||||
:align: center
|
||||
:width: 50.0%
|
||||
|
||||
INA226 DC Current and Power Sensor.
|
||||
|
||||
.. _eBay: https://www.ebay.com/sch/i.html?_nkw=INA226
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# Example configuration entry
|
||||
sensor:
|
||||
- platform: ina226
|
||||
address: 0x40
|
||||
shunt_resistance: 0.1 ohm
|
||||
current:
|
||||
name: "INA226 Current"
|
||||
power:
|
||||
name: "INA226 Power"
|
||||
bus_voltage:
|
||||
name: "INA226 Bus Voltage"
|
||||
shunt_voltage:
|
||||
name: "INA226 Shunt Voltage"
|
||||
max_current: 3.2A
|
||||
update_interval: 60s
|
||||
|
||||
Configuration variables:
|
||||
------------------------
|
||||
|
||||
- **address** (*Optional*, int): Manually specify the i^2c address of the sensor. Defaults to ``0x40``.
|
||||
- **shunt_resistance** (*Optional*, float): The value of the shunt resistor on the board for current calculation.
|
||||
Defaults to ``0.1 ohm``.
|
||||
- **max_current** (*Optional*, float): The maximum current you are expecting. ESPHome will use this to
|
||||
configure the sensor optimally. Defaults to ``3.2A``.
|
||||
- **current** (*Optional*): Use the current value of the sensor in amperes. All options from
|
||||
:ref:`Sensor <config-sensor>`.
|
||||
- **power** (*Optional*): Use the power value of the sensor in watts. All options from
|
||||
:ref:`Sensor <config-sensor>`.
|
||||
- **bus_voltage** (*Optional*): Use the bus voltage (voltage of the high side contact) value of the sensor in V.
|
||||
All options from :ref:`Sensor <config-sensor>`.
|
||||
- **shunt_voltage** (*Optional*): Use the shunt voltage (voltage across the shunt resistor) value of the sensor in V.
|
||||
All options from :ref:`Sensor <config-sensor>`.
|
||||
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the sensor. Defaults to ``60s``.
|
||||
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
- :ref:`sensor-filters`
|
||||
- :doc:`ina219`
|
||||
- :doc:`ina3221`
|
||||
- :apiref:`ina226/ina226.h`
|
||||
- `INA226 Arduino Library <https://github.com/SV-Zanshin/INA226>`__
|
||||
- :ghedit:`Edit`
|
@ -8,7 +8,7 @@ MAX31855 K-Type Thermocouple Temperature Sensor
|
||||
The ``max31855`` temperature sensor allows you to use your max31855 thermocouple
|
||||
temperature sensor (`datasheet <https://datasheets.maximintegrated.com/en/ds/MAX31855.pdf>`__) with ESPHome
|
||||
|
||||
As the communication with the MAX66775 is done using SPI, you need
|
||||
As the communication with the MAX31855 is done using SPI, you need
|
||||
to have an :ref:`spi bus <spi>` in your configuration with the **miso_pin** set (mosi is not required).
|
||||
|
||||
Connect ``GND`` to ``GND``, ``VCC`` to ``3.3V`` and the other three ``MISO`` (or ``SO`` for short),
|
||||
@ -37,9 +37,8 @@ Configuration variables:
|
||||
- **name** (**Required**, string): The name for the temperature sensor.
|
||||
- **cs_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The Chip Select pin of the SPI interface.
|
||||
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the sensor. Defaults to ``60s``.
|
||||
|
||||
- **spi_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the :ref:`SPI Component <spi>` if you want
|
||||
to use multiple SPI buses.
|
||||
- **reference_temperature** (*Optional*, :ref:`Sensor <config-sensor>`): Access the internal temperature sensor of the MAX31855. Requires a **name** and/or **id**.
|
||||
- **spi_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the :ref:`SPI Component <spi>` if you want to use multiple SPI buses.
|
||||
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
|
||||
- All other options from :ref:`Sensor <config-sensor>`.
|
||||
|
||||
@ -51,6 +50,7 @@ See Also
|
||||
- :doc:`dht`
|
||||
- :doc:`adc`
|
||||
- :doc:`max6675`
|
||||
- :doc:`max31865`
|
||||
- `MAX31855 Library <https://github.com/adafruit/Adafruit-MAX31855-library>`__ by `Adafruit <https://www.adafruit.com/>`__
|
||||
- :apiref:`max31855/max31855.h`
|
||||
- :ghedit:`Edit`
|
||||
|
70
components/sensor/max31865.rst
Normal file
@ -0,0 +1,70 @@
|
||||
MAX31865 Platinum RTD Temperature Sensor
|
||||
========================================
|
||||
|
||||
.. seo::
|
||||
:description: Instructions for setting up MAX31865 platinum RTD temperature sensors.
|
||||
:image: max31865.jpg
|
||||
|
||||
The ``max31865`` temperature sensor allows you to use your max31865 RTD
|
||||
temperature sensor (`datasheet <https://datasheets.maximintegrated.com/en/ds/MAX31865.pdf>`__) with ESPHome
|
||||
|
||||
.. figure:: images/max31865-full.jpg
|
||||
:align: center
|
||||
:width: 50.0%
|
||||
|
||||
MAX31865 Sensor. Image by `Adafruit`_
|
||||
|
||||
.. _Adafruit: https://www.adafruit.com/product/3328
|
||||
|
||||
As the communication with the MAX31865 is done using SPI, you need
|
||||
to have an :ref:`spi bus <spi>` in your configuration with both **miso_pin** and **mosi_pin** set.
|
||||
|
||||
- ``VIN`` connects to 5V (``3V3`` will output 3.3V), or directly connect ``3V3`` to 3.3V
|
||||
- ``GND`` connects to ground
|
||||
- ``CLK`` connects to the SPI **clk_pin**
|
||||
- ``SDO`` connects to the SPI **miso_pin**
|
||||
- ``SDI`` connects to the SPI **mosi_pin**
|
||||
- ``CS`` connects to a free GPIO pin
|
||||
- ``RDY`` is not used by ESPHome
|
||||
|
||||
.. code:: yaml
|
||||
|
||||
# Example configuration entry
|
||||
spi:
|
||||
miso_pin: D0
|
||||
mosi_pin: D1
|
||||
clk_pin: D2
|
||||
|
||||
sensor:
|
||||
- platform: max31865
|
||||
name: "Living Room Temperature"
|
||||
cs_pin: D3
|
||||
reference_resistance: 430 Ω
|
||||
rtd_nominal_resistance: 100 Ω
|
||||
|
||||
Configuration variables:
|
||||
------------------------
|
||||
|
||||
- **name** (**Required**, string): The name for the temperature sensor.
|
||||
- **cs_pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The Chip Select pin of the SPI interface.
|
||||
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the sensor. Defaults to ``60s``.
|
||||
- **reference_resistance** (**Required**, float): Reference resistor on the PCB. Adafruit's PT100 (#3328) uses 430 Ω, their PT1000 (#3648) uses 4300 Ω.
|
||||
- **rtd_nominal_resistance** (**Required**, float): Nominal resistance of the RTD at 0°C. PT100 is 100 Ω, PT1000 is 1000 Ω.
|
||||
- **mains_filter** (*Optional*, string): The mains power frequency to reject (``50 Hz`` or ``60 Hz``). Defaults to ``60 Hz``.
|
||||
- **rtd_wires** (*Optional*, int): The number of RTD wires. Be sure to solder board jumpers to match! Defaults to ``4``.
|
||||
- **spi_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the :ref:`SPI Component <spi>` if you want to use multiple SPI buses.
|
||||
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
|
||||
- All other options from :ref:`Sensor <config-sensor>`.
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
- :ref:`sensor-filters`
|
||||
- :doc:`dallas`
|
||||
- :doc:`dht`
|
||||
- :doc:`adc`
|
||||
- :doc:`max6675`
|
||||
- :doc:`max31855`
|
||||
- `MAX31865 Library <https://github.com/adafruit/Adafruit_MAX31865>`__ by `Adafruit <https://www.adafruit.com/>`__
|
||||
- :apiref:`max31865/max31865.h`
|
||||
- :ghedit:`Edit`
|
187
components/sensor/ruuvitag.rst
Normal file
@ -0,0 +1,187 @@
|
||||
RuuviTag Open Source BLE Sensor
|
||||
===============================
|
||||
|
||||
.. seo::
|
||||
:description: Instructions for setting up RuuviTag bluetooth-based sensors in ESPHome.
|
||||
:image: ruuvitag.jpg
|
||||
:keywords: Ruuvi, RuuviTag, BLE, Bluetooth
|
||||
|
||||
The ``ruuvitag`` sensor platform lets you track the output of RuuviTag
|
||||
Bluetooth Low Energy devices using the :doc:`/components/esp32_ble_tracker`.
|
||||
This component will track the temperature, humidity, acceleration and battery
|
||||
voltage of a RuuviTag device with RAWv1 protocol every time the sensor sends
|
||||
out a BLE broadcast. RAWv2 protocol is supported too. Then tx power,
|
||||
movement count and measurement sequence number are also tracked.
|
||||
|
||||
.. figure:: images/ruuvitag-full.jpg
|
||||
:align: center
|
||||
:width: 80.0%
|
||||
|
||||
RuuviTagSensor over BLE.
|
||||
|
||||
.. figure:: images/ruuvitag-ui.jpg
|
||||
:align: center
|
||||
:width: 80.0%
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# Example configuration entry
|
||||
esp32_ble_tracker:
|
||||
|
||||
sensor:
|
||||
- platform: ruuvitag
|
||||
mac_address: FF:56:D3:2F:7D:E8
|
||||
humidity:
|
||||
name: "RuuviTag Humidity"
|
||||
temperature:
|
||||
name: "RuuviTag Temperature"
|
||||
pressure:
|
||||
name: "RuuviTag Pressure"
|
||||
acceleration:
|
||||
name: "RuuviTag Acceleration"
|
||||
acceleration_x:
|
||||
name: "RuuviTag Acceleration X"
|
||||
acceleration_y:
|
||||
name: "RuuviTag Acceleration Y"
|
||||
acceleration_z:
|
||||
name: "RuuviTag Acceleration Z"
|
||||
battery_voltage:
|
||||
name: "RuuviTag Battery Voltage"
|
||||
tx_power:
|
||||
name: "RuuviTag TX Power"
|
||||
movement_counter:
|
||||
name: "RuuviTag Movement Counter"
|
||||
measurement_sequence_number:
|
||||
name: "RuuviTag Measurement Sequence Number"
|
||||
|
||||
Configuration variables:
|
||||
------------------------
|
||||
|
||||
- **mac_address** (**Required**, MAC Address): The MAC address of the RuuviTag
|
||||
device.
|
||||
- **humidity** (*Optional*): The information for the humidity sensor
|
||||
|
||||
- **name** (**Required**, string): The name for the humidity sensor.
|
||||
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use
|
||||
in lambdas.
|
||||
- All other options from :ref:`Sensor <config-sensor>`.
|
||||
|
||||
- **temperature** (*Optional*): The information for the temperature sensor.
|
||||
|
||||
- **name** (**Required**, string): The name for the temperature sensor.
|
||||
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use
|
||||
in lambdas.
|
||||
- All other options from :ref:`Sensor <config-sensor>`.
|
||||
|
||||
- **pressure** (*Optional*): The information for the pressure sensor.
|
||||
|
||||
- **name** (**Required**, string): The name for the pressure sensor.
|
||||
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use
|
||||
in lambdas.
|
||||
- All other options from :ref:`Sensor <config-sensor>`.
|
||||
|
||||
- **acceleration** (*Optional*): The information for the acceleration
|
||||
sensor.
|
||||
|
||||
- **name** (**Required**, string): The name for the acceleration sensor.
|
||||
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use
|
||||
in lambdas.
|
||||
- All other options from :ref:`Sensor <config-sensor>`.
|
||||
|
||||
- **acceleration_x** (*Optional*): The information for the acceleration x
|
||||
sensor.
|
||||
|
||||
- **name** (**Required**, string): The name for the acceleration x sensor.
|
||||
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use
|
||||
in lambdas.
|
||||
- All other options from :ref:`Sensor <config-sensor>`.
|
||||
|
||||
- **acceleration_y** (*Optional*): The information for the acceleration y
|
||||
sensor.
|
||||
|
||||
- **name** (**Required**, string): The name for the acceleration y sensor.
|
||||
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use
|
||||
in lambdas.
|
||||
- All other options from :ref:`Sensor <config-sensor>`.
|
||||
|
||||
- **acceleration_z** (*Optional*): The information for the acceleration z
|
||||
sensor.
|
||||
|
||||
- **name** (**Required**, string): The name for the acceleration z sensor.
|
||||
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use
|
||||
in lambdas.
|
||||
- All other options from :ref:`Sensor <config-sensor>`.
|
||||
|
||||
- **battery_voltage** (*Optional*): The information for the battery voltage
|
||||
sensor.
|
||||
|
||||
- **name** (**Required**, string): The name for the battery voltage sensor.
|
||||
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use
|
||||
in lambdas.
|
||||
- All other options from :ref:`Sensor <config-sensor>`.
|
||||
|
||||
- **tx_power** (*Optional*): The information for the transmit power
|
||||
sensor
|
||||
|
||||
- **name** (**Required**, string): The name for the transmit power sensor.
|
||||
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use
|
||||
in lambdas.
|
||||
- All other options from :ref:`Sensor <config-sensor>`.
|
||||
- Only available if RAWv2 protocol is used.
|
||||
|
||||
- **movement_count** (*Optional*): The information for the movement count
|
||||
sensor
|
||||
|
||||
- **name** (**Required**, string): The name for the movement count sensor.
|
||||
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use
|
||||
in lambdas.
|
||||
- All other options from :ref:`Sensor <config-sensor>`.
|
||||
- Only available if RAWv2 protocol is used.
|
||||
|
||||
- **measurement_sequence_number** (*Optional*): The information for the
|
||||
measurment sequence number sensor
|
||||
|
||||
- **name** (**Required**, string): The name for the measurment sequence
|
||||
number sensor.
|
||||
- **id** (*Optional*, :ref:`config-id`): Set the ID of this sensor for use
|
||||
in lambdas.
|
||||
- All other options from :ref:`Sensor <config-sensor>`.
|
||||
- Only available if RAWv2 protocol is used.
|
||||
|
||||
Setting Up Devices
|
||||
------------------
|
||||
|
||||
To set up RuuviTag devices you first need to find their MAC Address so that
|
||||
ESPHome can identify them. So first, create a simple configuration without any
|
||||
``ruuvitag`` entries like so:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
esp32_ble_tracker:
|
||||
|
||||
After uploading the ESP32 will immediately try to scan for BLE devices.
|
||||
When it detects these sensors, it will automatically parse the BLE message
|
||||
print a message like this one:
|
||||
|
||||
.. code::
|
||||
|
||||
Got ruuvi RuuviTag (FF:56:D3:2F:7D:E8): Humidity: 67.5%, Temperature: 22.97°C,
|
||||
Pressure: 977.09hPa, Acceleration X: 0.005G, Acceleration Y: 0.017G, Acceleration Z: 1.066G,
|
||||
Battery Voltage: 3.223V
|
||||
|
||||
Then just copy the address (``FF:56:D3:2F:7D:E8``) into a new
|
||||
``sensor.ruuvitag`` platform entry like in the configuration example at the top.
|
||||
|
||||
.. note::
|
||||
|
||||
The ESPHome Ruuvi BLE integration listens passively to packets the RuuviTag device sends by itself.
|
||||
ESPHome therefore has no impact on the battery life of the device.
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
- :doc:`/components/esp32_ble_tracker`
|
||||
- :doc:`/components/sensor/index`
|
||||
- :apiref:`ruuvitag/ruuvitag.h`
|
||||
- `Ruuvi <https://ruuvi.com>`__
|
||||
- :ghedit:`Edit`
|
@ -368,6 +368,7 @@ All Actions
|
||||
- :ref:`sim800l.send_sms <sim800l-send_sms_action>`
|
||||
- :ref:`mhz19.calibrate_zero <mhz19-calibrate_zero_action>` / :ref:`mhz19.abc_enable <mhz19-abc_enable_action>` / :ref:`mhz19.abc_disable <mhz19-abc_disable_action>`
|
||||
- :ref:`sensor.rotary_encoder.set_value <sensor-rotary_encoder-set_value_action>`
|
||||
- :ref:`http_request.get <http_request-get_action>` / :ref:`http_request.post <http_request-post_action>` / :ref:`http_request.send <http_request-send_action>`
|
||||
|
||||
.. _config-condition:
|
||||
|
||||
|
1
images/connection.svg
Normal file
@ -0,0 +1 @@
|
||||
<?xml version="1.0" ?><svg height="48" viewBox="0 0 48 48" width="48" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h48v48H0z" fill="none"/><path d="M15.54 13.52l-3.08-2.55L1.64 24l10.82 13.04 3.08-2.55L6.84 24l8.7-10.48zM14 26h4v-4h-4v4zm20-4h-4v4h4v-4zm-12 4h4v-4h-4v4zm13.54-15.04l-3.08 2.55L41.16 24l-8.7 10.48 3.08 2.55L46.36 24 35.54 10.96z"/></svg>
|
After Width: | Height: | Size: 357 B |
BIN
images/ina226.jpg
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
images/max31865.jpg
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
images/ruuvitag.jpg
Normal file
After Width: | Height: | Size: 7.4 KiB |
@ -117,10 +117,12 @@ Sensor Components
|
||||
Home Assistant, components/sensor/homeassistant, home-assistant.svg
|
||||
HX711, components/sensor/hx711, hx711.jpg
|
||||
INA219, components/sensor/ina219, ina219.jpg
|
||||
INA226, components/sensor/ina226, ina226.jpg
|
||||
INA3221, components/sensor/ina3221, ina3221.jpg
|
||||
Integration, components/sensor/integration, sigma.svg
|
||||
HTU21D, components/sensor/htu21d, htu21d.jpg
|
||||
MAX31855, components/sensor/max31855, max31855.jpg
|
||||
MAX31865, components/sensor/max31865, max31865.jpg
|
||||
MAX6675, components/sensor/max6675, max6675.jpg
|
||||
MH-Z19, components/sensor/mhz19, mhz19.jpg
|
||||
MPU6050, components/sensor/mpu6050, mpu6050.jpg
|
||||
@ -135,6 +137,7 @@ Sensor Components
|
||||
PZEM DC, components/sensor/pzemdc, pzemdc.svg
|
||||
Resistance, components/sensor/resistance, omega.svg
|
||||
Rotary Encoder, components/sensor/rotary_encoder, rotary_encoder.jpg
|
||||
RuuviTag, components/sensor/ruuvitag, ruuvitag.jpg
|
||||
SenseAir, components/sensor/senseair, senseair_s8.jpg
|
||||
SDS011 Sensor, components/sensor/sds011, sds011.jpg
|
||||
SCD30, components/sensor/scd30, scd30.jpg
|
||||
@ -302,6 +305,7 @@ Misc Components
|
||||
Remote Receiver, components/remote_receiver, remote.svg
|
||||
Remote Transmitter, components/remote_transmitter, remote.svg
|
||||
Status LED, components/status_led, led-on.svg
|
||||
HTTP Request, components/http_request, connection.svg
|
||||
|
||||
Time, components/time, clock-outline.svg
|
||||
Sun, components/sun, weather-sunny.svg
|
||||
|