本帖最后由 ciasdmxhxjjpd@c 于 2023-2-4 22:51 编辑
先确保 电源线是否接正常。再确认下 rx tx 与 esp 之间交叉接。
如下,gpio16 接 模块的 tx,同理
添加 modbus
参考 https://bbs.iobroker.cn/t/topic/12095
# soft uart
uart:
rx_pin: GPIO16
tx_pin: GPIO17
baud_rate: 9600
modbus:
sensor:
# pzemac-004T
- platform: pzemac
address: 1
current:
name: 'PZEM-004T Current'
voltage:
name: 'PZEM-004T Voltage'
energy:
name: 'PZEM-004T Energy'
filters:
- multiply: 0.001
unit_of_measurement: 'kWh'
accuracy_decimals: 4
power:
name: 'PZEM-004T Power'
frequency:
name: 'PZEM-004T Frequency'
power_factor:
name: 'PZEM-004T Power Factor'
update_interval: 30s
|