本帖最后由 trz0332 于 2022-8-16 11:19 编辑
ESPhome终于迎来了一个我最喜欢的更新,可以自己配置wifi密码了。
顺便看了一下更新日志,发现对培正电表进行支持了。于是就在淘宝上花了40块钱买了电表,电表35,加个电流线圈5块钱,感觉是我买过的最便宜的电表了。。
准备把它接入我的esp01里面
首先是接线:
然后是刷固件
然后编译固件
送上配置文件
uart:
rx_pin:
number: GPIO3
tx_pin:
number: GPIO1
baud_rate: 9600
id: mod_uart
modbus:
send_wait_time: 50ms
uart_id: mod_uart
id: mod_bus
sensor:
- platform: pzemac
current:
name: "${device_name}_Current1"
voltage:
name: "${device_name}_Voltage1"
energy:
name: "${device_name}_Energy1"
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
accuracy_decimals: 3
filters:
- multiply: 0.001
power:
name: "${device_name}_Power1"
frequency:
name: "${device_name}_Frequency1"
power_factor:
name: "${device_name}_Factor1"
address: 1
modbus_id: mod_bus
update_interval: 10s
最后是显示效果
|