Added documentation for bl0942 (#2286)

This commit is contained in:
David Buezas 2022-09-11 23:36:13 +02:00 committed by GitHub
parent c735cc2253
commit e2a524bd5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 69 additions and 0 deletions

View File

@ -0,0 +1,68 @@
Belling BL0942 Energy Monitor
==================================
.. seo::
:description: Instructions for setting up BL0942 power monitors.
:image: bl0942.png
:keywords: BL0942, Aubess, Mini Smart Switch With Energy Monitor
The ``bl0942`` sensor platform allows you to use BL0942 energy monitors sensors with
ESPHome. These are used in some Tuya-devices (e.g. Aubess Tuya WiFi Mini Smart Switch With Energy Monitor)
The communication with this integration is done over a :ref:`UART bus <uart>`.
You must therefore have a ``uart:`` entry in your configuration with both the TX and RX pins set
to some pins on your board and the baud rate set to 4800 with 1 stop bit.
.. code-block:: yaml
# Example configuration entry
uart:
id: uart_bus
tx_pin: TX
rx_pin: RX
baud_rate: 4800
stop_bits: 1
sensor:
- platform: bl0942
uart_id: uart_bus
voltage:
name: 'BL0942 Voltage'
current:
name: 'BL0942 Current'
power:
name: 'BL0942 Power'
filters:
multiply: -1
energy:
name: 'BL0942 Energy'
frequency:
name: "BL0942 Frequency"
accuracy_decimals: 2
update_interval: 60s
Configuration variables:
------------------------
- **voltage** (*Optional*): The voltage value of the sensor in Volts.
All options from :ref:`Sensor <config-sensor>`.
- **current** (*Optional*): The current value of the sensor in Amperes. All options from
:ref:`Sensor <config-sensor>`.
- **power** (*Optional*): The (active) power value of the sensor in Watts. Note that some power meters will report this in negative values (probably wired backwards), so you may want to use a filter to multiply it by -1. All options from :ref:`Sensor <config-sensor>`.
- **energy** (*Optional*): Use the voltage value of the sensor in kWh.
All options from :ref:`Sensor <config-sensor>`.
- **frequency** (*Optional*): The frequency value of the sensor in Hertz. All options from
:ref:`Sensor <config-sensor>`.
All options from :ref:`Sensor <config-sensor>`.
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the
sensor. Defaults to ``60s``.
- **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:`bl0942/bl0942.h`
- :ghedit:`Edit`

BIN
images/bl0942.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -255,6 +255,7 @@ Electricity
ATM90E32, components/sensor/atm90e32, atm90e32.jpg, Voltage & Current & Power
BL0939, components/sensor/bl0939, bl0939.png, Voltage & Current & Power & Energy
BL0940, components/sensor/bl0940, bl0940.png, Voltage & Current & Power
BL0942, components/sensor/bl0942, bl0942.png, Voltage & Current & Power
CS5460A, components/sensor/cs5460a, cs5460a.png, Voltage & Current & Power
CSE7761, components/sensor/cse7761, cse7761.svg, Voltage & Current & Power
CSE7766, components/sensor/cse7766, cse7766.svg, Voltage & Current & Power