本帖最后由 Tao173 于 2021-9-21 22:49 编辑
[经验分享] 新版本Tasmota是可以接三路PZEM
我的代码如下:我是三个培正模块用485与一个ESP8266实现市电输入,光伏系统及实用能耗检测
esphome:
name: oled
platform: ESP8266
board: nodemcuv2
wifi:
ssid: "XXX"
password: "XXXX"
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
password: "admin"
uart:
id: uart_bus
rx_pin: D6
tx_pin: D5
baud_rate: 9600
stop_bits: 1
time:
- platform: homeassistant
timezone: Asia/Shanghai
id: time1
sensor:
- platform: pzemac
current:
name: "IN_current"
id: IN_current
voltage:
name: "IN_voltage"
id: IN_voltage
energy:
name: "IN_energy"
filters:
- lambda: return x /1000;
unit_of_measurement: "kWh"
power:
name: "IN_power"
id: IN_power
frequency:
name: "IN_Fr"
id: IN_Fr
power_factor:
name: "IN_PF"
id: IN_PF
update_interval: 30s
address: 1
- platform: pzemac
current:
name: "AU_current"
id: AU_current
voltage:
name: "AU_voltage"
energy:
name: "AU_energy"
filters:
- lambda: return x /1000;
unit_of_measurement: "kWh"
power:
name: "AU_power"
id: AU_power
frequency:
name: "AU_Fr"
power_factor:
name: "AU_PF"
id: AU_PF
update_interval: 30s
address: 2
- platform: pzemac
current:
name: "GF_current"
id: GF_current
voltage:
name: "GF_voltage"
energy:
name: "GF_energy"
id: GF_energy
filters:
- lambda: return x /1000;
unit_of_measurement: "kWh"
power:
name: "GF_Power"
id: GF_Power
frequency:
name: "GF_Fr"
power_factor:
name: "GF_PF"
id: GF_PF
update_interval: 30s
address: 3
|