How to add three channels of pzem 004t v3

Try the following code:

# Enable logging
logger:
  level: NONE
  hardware_uart: UART1

web_server:

# Enable Home Assistant API
api:
  password: $api_password
  reboot_timeout: $api_reboot_timeout

ota:
  password: $ota_password

sensor:                               #传感器
  - platform: pzemac
    current:
      name: "CH_1 Current"
    voltage:
      name: "CH_1 Voltage"
    power:
      name: "CH_1 Power"
    frequency:
      name: "CH_1 Frequency"
    power_factor:
      name: "CH_1 Power Factor"
    update_interval: 5s
    address: 1

  - platform: pzemac
    current:
      name: "CH_2 Current"
    voltage:
      name: "CH_2 Voltage"
    power:
      name: "CH_2 Power"
    frequency:
      name: "CH_2 Frequency"
    power_factor:
      name: "CH_2 Power Factor"
    update_interval: 5s
    address: 2

  - platform: pzemac
    current:
      name: "CH_3 Current"
    voltage:
      name: "CH_3 Voltage"
    power:
      name: "CH_3 Power"
    frequency:
      name: "CH_3 Frequency"
    power_factor:
      name: "CH_3 Power Factor"
    update_interval: 5s
    address: 3   

uart:
 - id: pzem004t1
   rx_pin: 3
   tx_pin: 1
   baud_rate: 9600
   stop_bits: 2

But I can’t get any information

ESP 01s is used

Tasmota was used before

Set module address with moduleaddress 1 / 2 / 3

I only could get this working if I changed stop bits to 1. There will be an error in the logs but it works for me

Modified into

uart:
   rx_pin: 3
   tx_pin: 1
   baud_rate: 9600
   stop_bits: 1

Still no data

Just checked mine and its just the same as yours, are the rx and tx pins definately correct ? Maybe try swapping them round ? I know I had trouble at first

RX and TX should be correct.

esp 01s rx(gpio3) --> 004t TX

esp 01s tx(gpio1) --> 004t RX

The two LEDs will also flash at intervals

I don’t know if it’s because tasmota has set moduleaddress 1 / 2 / 3 before?

No idea on the addresses and tasmota, maybe try with just one connected to see if it works ?

I had to reverse my gpios and it worked. Its mentioned in the docs to try it too.

Also, I use pins D1 and D2 as in the esphome docs