PZEM-6L24 on esphome

Well, thank you. Your help is like giving a bucket full of water to someone who has just been flooded.

Do you use your script with esp32 and esphome?

You are going to have to learn to swim

I took the effort to do the search, find your cause and point it out to you. Unless you were using AI to guide you (something that often brings grief), you probably would have seen it also as you quoted the url…

Using integrations with missing bits is always going to cause missing file errors. Don’t hold us responsible - it is there in black and white - the needed file just isn’t there.

Find the missing file (the clue for where to start is in your ESPHome yaml code), try it out and see how you go. We all learned to do this as well at some stage to get a project over the line and working. Navigating GitHub and trusting complete strangers code of varying skills is also a learning process.

The documentation for each process is clear. Using AI or YouBoob for clues often backfires as your level of understanding is not improved. Go to GitHub to read their documentation, ESPHome to read their documentation, HomeAssistant to read their documentations, etc. You may be surprised it is up to date, relevant, and expands your knowledge considerably.

Over to you.

Go trolling somewhere else. I’ve looked through your posts, and they don’t add much.

For anyone who wants to use p2baron, below is my working yaml, which I obtained thanks in part to the help of AI. Don’t forget to have esphome builder 2025.11+ and the files in the esphome/components/pzem6l24_plus/ directory.

esphome:
  name: pzem-6l24
  friendly_name: PZEM-6L24
  platformio_options:
    lib_deps:
      - https://github.com/lucashudson-eng/PZEMPlus/archive/refs/tags/v0.7.3.zip
      - https://github.com/plerup/espsoftwareserial.git
    build_flags:
      - -DPZEM_6L24

external_components:
  - source:
      type: local
      path: components


esp32:
  board: esp32-c3-devkitm-1
  framework:
    type: arduino

....

uart:
  tx_pin: 4
  rx_pin: 5
  #rx_buffer_size: 512
  baud_rate: 9600
  # parity: NONE
  # data_bits: 8
  # s top_bits: 1
  id: uart_bus

sensor:
  - platform: pzem6l24_plus
    id: pzem1
    address: 1
    rx_pin: 5
    tx_pin: 4
    de_re_pin: -1
    update_interval: 5s

    voltage_a:
      name: "Voltage Phase A"
    voltage_b:
      name: "Voltage Phase B"
    voltage_c:
      name: "Voltage Phase C"

    current_a:
      name: "Current A"
    current_b:
      name: "Current B"
    current_c:
      name: "Current C"      

    total_active_power:
      name: "Total Power"

    total_active_energy:
      name: "Total Energy"

For me, the total energy and total power entities are yellow flagged. I need to take a closer look to see if they actually show the correct values.

@p2baron is it possible to you will add read power on A, B, C phases? And thank you for your work! Great job!

1 Like

Oh my! Just politely telling you to RTFM and avoid the garden path AI has led you down. A little more attention to subtle warnings and hints may also cause you far less stress I suspect. Peace on Earth and goodwill to all.

1 Like

It was the AI ​​that helped, unlike your comments, which have a lot of text and little content. Best regards, over and out.

You got the softwareserial error because Lucas recently added softserial support to this his library. It is better to pin it to a specific version of his library.

I have updated the component on my github.
More functions are linked included the per-phase power measurements. I’ve also updated the example so that it links to a specific version of the original pzem library.

1 Like

In case you are still interested I’ve managed to get this meter working with Modbus integration in HA and a wireless Modbus gateway. Details described here: