2019-10-20 19:23:59 +02:00
|
|
|
Peacefair PZEM-00X DC Energy Monitor
|
|
|
|
====================================
|
|
|
|
|
|
|
|
.. seo::
|
|
|
|
:description: Instructions for setting up DC PZEM power monitors.
|
2022-01-31 08:05:20 +01:00
|
|
|
:image: pzem-dc.jpg
|
2019-10-20 19:23:59 +02:00
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
2021-08-29 13:10:40 +02:00
|
|
|
This page is incomplete and could use some work. If you want to contribute, please read the
|
2019-10-20 19:23:59 +02:00
|
|
|
:doc:`contributing guide </guides/contributing>`. This page is missing:
|
|
|
|
|
|
|
|
- Images/screenshots/example configs of this device being used in action.
|
|
|
|
|
|
|
|
The ``pzemdc`` sensor platform allows you to use various DC Peacefair PZEM energy monitors
|
|
|
|
with ESPHome. The supported models are: PZEM-003, PZEM-014, PZEM-016 and PZEM-017.
|
|
|
|
|
|
|
|
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 9600.
|
|
|
|
|
2021-08-10 04:22:08 +02:00
|
|
|
.. figure:: images/pzem-dc.png
|
|
|
|
:align: center
|
|
|
|
:width: 80.0%
|
|
|
|
|
|
|
|
PZEM-0xx Energy Monitor.
|
|
|
|
|
2019-10-20 19:23:59 +02:00
|
|
|
.. code-block:: yaml
|
|
|
|
|
|
|
|
# Example configuration entry
|
|
|
|
uart:
|
2019-10-31 20:32:06 +01:00
|
|
|
tx_pin: D1
|
2019-10-20 19:23:59 +02:00
|
|
|
rx_pin: D2
|
|
|
|
baud_rate: 9600
|
2019-11-02 19:10:08 +01:00
|
|
|
stop_bits: 2
|
2019-10-20 19:23:59 +02:00
|
|
|
|
|
|
|
sensor:
|
|
|
|
- platform: pzemdc
|
|
|
|
current:
|
|
|
|
name: "PZEM-003 Current"
|
|
|
|
voltage:
|
|
|
|
name: "PZEM-003 Voltage"
|
|
|
|
power:
|
|
|
|
name: "PZEM-003 Power"
|
2023-02-23 18:38:48 +01:00
|
|
|
energy:
|
|
|
|
name: "PZEM-003 Energy"
|
2019-10-20 19:23:59 +02:00
|
|
|
update_interval: 60s
|
|
|
|
|
|
|
|
Configuration variables:
|
|
|
|
------------------------
|
|
|
|
|
|
|
|
- **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>`.
|
|
|
|
- **voltage** (*Optional*): Use the voltage value of the sensor in volts.
|
|
|
|
All options from :ref:`Sensor <config-sensor>`.
|
2023-02-23 18:38:48 +01:00
|
|
|
- **energy** (*Optional*): Use the energy value of the sensor in kWh.
|
|
|
|
All options from :ref:`Sensor <config-sensor>`.
|
2019-10-20 19:23:59 +02:00
|
|
|
- **update_interval** (*Optional*, :ref:`config-time`): The interval to check the
|
|
|
|
sensor. Defaults to ``60s``.
|
|
|
|
- **address** (*Optional*, int): The address of the sensor if multiple sensors are attached to
|
|
|
|
the same UART bus. You will need to set the address of each device manually. Defaults to ``1``.
|
|
|
|
|
2023-03-08 20:56:36 +01:00
|
|
|
.. _pzemdc-reset_energy_action:
|
|
|
|
|
|
|
|
``pzemdc.reset_energy`` Action
|
|
|
|
******************************
|
|
|
|
|
|
|
|
This action resets the total energy value of the pzemdc device with the given ID when executed.
|
|
|
|
|
|
|
|
.. code-block:: yaml
|
|
|
|
|
|
|
|
on_...:
|
|
|
|
then:
|
|
|
|
- pzemdc.reset_energy: pzemdc_1
|
|
|
|
|
|
|
|
|
2019-10-20 19:23:59 +02:00
|
|
|
See Also
|
|
|
|
--------
|
|
|
|
|
|
|
|
- :ref:`sensor-filters`
|
|
|
|
- :doc:`pzem004t`
|
|
|
|
- :doc:`pzemac`
|
|
|
|
- :apiref:`pzemdc/pzemdc.h`
|
|
|
|
- :ghedit:`Edit`
|