esphome-docs/components/sensor/cse7766.rst

63 lines
1.8 KiB
ReStructuredText
Raw Normal View History

2018-10-17 21:00:30 +02:00
CSE7766 Power Sensor
====================
2018-11-14 22:12:27 +01:00
.. seo::
:description: Instructions for setting up CSE7766 power sensors for the Sonoff Pow R2
:image: cse7766.png
2018-11-14 22:12:27 +01:00
:keywords: cse7766, Sonoff Pow R2
2018-10-17 21:00:30 +02:00
The ``cse7766`` sensor platform allows you to use your CSE7766 voltage/current and power sensors
(`datasheet <http://dl.itead.cc/S31/CSE7766.pdf>`__) sensors with
2019-02-16 23:25:23 +01:00
ESPHome. This sensor is commonly found in Sonoff POW R2.
2018-10-17 21:00:30 +02:00
As the communication with the CSE7766 done using UART, you need
to have an :ref:`UART bus <uart>` in your configuration with the ``rx_pin`` connected to the CSE7766.
2018-10-27 13:19:51 +02:00
Additionally, you need to set the baud rate to 4800.
2018-10-17 21:00:30 +02:00
.. code-block:: yaml
2018-10-17 21:00:30 +02:00
# Example configuration entry
# Disable logging over USB
logger:
baud_rate: 0
uart:
rx_pin: RX
2018-10-27 13:19:51 +02:00
baud_rate: 4800
2018-10-17 21:00:30 +02:00
sensor:
- platform: cse7766
current:
name: "Sonoff Pow R2 Current"
voltage:
name: "Sonoff Pow R2 Voltage"
power:
name: "Sonoff Pow R2 Power"
.. note::
The configuration above should work for Sonoff POWs (R2).
Configuration variables:
------------------------
- **current** (*Optional*): Use the current value of the sensor in amperes. All options from
2019-02-17 12:28:17 +01:00
:ref:`Sensor <config-sensor>`.
2018-10-17 21:00:30 +02:00
- **power** (*Optional*): Use the (active) power value of the sensor in watts. All options from
2019-02-17 12:28:17 +01:00
:ref:`Sensor <config-sensor>`.
2018-10-17 21:00:30 +02:00
- **voltage** (*Optional*): Use the voltage value of the sensor in V (RMS).
2019-02-17 12:28:17 +01:00
All options from :ref:`Sensor <config-sensor>`.
2018-12-01 13:19:42 +01:00
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the
2019-01-06 18:56:14 +01:00
sensor. Defaults to ``60s``.
2018-10-17 21:00:30 +02:00
- **uart_id** (*Optional*, :ref:`config-id`): Manually specify the ID of the :ref:`UART Component <uart>` if you want
to use multiple UART buses.
See Also
--------
- :ref:`sensor-filters`
- :apiref:`sensor/cse7766.h`
- :ghedit:`Edit`
.. disqus::