I have a wt32-eth01 up and running with a single pzem, but when I connect another one, I am constantly getting these modbus crc errors, with constant different codes.
Modbus CRC Check failed! 6304!=00
17:28:05 [W] [modbus:108]
Modbus CRC Check failed! 1507!=A200
17:28:25 [W] [modbus:108]
Modbus CRC Check failed! 31F0!=200
17:28:25 [W] [modbus:108]
Modbus CRC Check failed! C071!=200
17:28:25 [W] [modbus:108]
Modbus CRC Check failed! C071!=D146
17:29:25 [W] [modbus:108]
Modbus CRC Check failed! 31F0!=00
17:29:25 [W] [modbus:108]
Modbus CRC Check failed! AC8C!=F86C
17:29:45 [W] [modbus:108]
Modbus CRC Check failed! 898A!=10
17:29:45 [W] [modbus:108]
Modbus CRC Check failed! 1030!=BBB9
This is how I have them connected, also with the single one.
I have changed the modbus address of one pzem (Karel) to 0x2, but I don’t know for sure if it worked. If I disconnect one of the pzem, I get readings again, but always with the text of pzem number 1 (Etiënne). Also swapping the rx and tx doesn’t work.
This is my configuration:
esphome:
name: wt32-meters-hal
friendly_name: Meters Hal
platform: esp32
board: esp-wrover-kit
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: !secret api_encryption_key
ota:
password: !secret ota_password
ethernet:
type: LAN8720
mdc_pin: GPIO23
mdio_pin: GPIO18
clk_mode: GPIO0_IN
phy_addr: 1
power_pin: GPIO16
uart:
- id: ubus
tx_pin: GPIO17
rx_pin: GPIO5
baud_rate: 9600
stop_bits: 2
modbus:
id: mod_bus_pzem
uart_id: ubus
binary_sensor:
- platform: status
name: "Status Meters Hal"
sensor:
- platform: pzemac
address: 1
modbus_id: mod_bus_pzem
current:
name: "Etiënne stroom"
voltage:
name: "Etiënne spanning"
energy:
name: "Etiënne verbruik"
filters:
# Multiplication factor from Wh to kWh is 0.001
- multiply: 0.0001
unit_of_measurement: kWh
accuracy_decimals: 2
power:
name: "Etiënne vermogen"
frequency:
name: "Etiënne frequentie"
power_factor:
name: "Etiënne cos phi"
update_interval: 20s
- platform: pzemac
address: 2
modbus_id: mod_bus_pzem
current:
name: "Karel stroom"
voltage:
name: "Karel spanning"
energy:
name: "Karel verbruik"
filters:
# Multiplication factor from Wh to kWh is 0.001
- multiply: 0.0001
unit_of_measurement: kWh
accuracy_decimals: 2
power:
name: "Karel vermogen"
frequency:
name: "Karel frequentie"
power_factor:
name: "Karel cos phi"
update_interval: 25s
web_server:
port: 80
version: 2
ota: True
auth:
username: !secret web_server_username
password: !secret web_server_password