Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- esphome:
- name: sensore-pzem004t
- platform: ESP8266
- board: nodemcuv2
- # Enable logging
- logger:
- baud_rate: 0
- # Enable Home Assistant API
- api:
- ota:
- password: "dfb05d7b978556e896ace8ba2810321b"
- wifi:
- ssid: "FRITZ!Box 7530 YX 2.4G"
- password: "XXXXXXXXXXXXXXXXXXXX"
- # Enable fallback hotspot (captive portal) in case wifi connection fails
- ap:
- ssid: "Sensore-Pzem004T"
- password: "XXXXXXXXXXXXXX"
- captive_portal:
- uart:
- rx_pin: 3 #GPIO03
- tx_pin: 1 #GPIO01
- baud_rate: 9600
- modbus:
- sensor:
- - platform: pzemac
- current:
- name: "PZEM-004T V3 Current"
- unit_of_measurement: "A"
- id: Current
- internal: true
- accuracy_decimals: 3
- force_update: True
- voltage:
- name: "PZEM-004T V3 Voltage"
- unit_of_measurement: "V"
- id: Voltage
- internal: true
- accuracy_decimals: 1
- force_update: True
- energy:
- name: "PZEM-004T V3 Energy"
- unit_of_measurement: "Wh"
- id: Energy
- internal: true
- accuracy_decimals: 2
- force_update: True
- # state_class: "measurement"
- power:
- name: "PZEM-004T V3 Power"
- unit_of_measurement: "W"
- id: Power
- internal: true
- accuracy_decimals: 2
- force_update: True
- # state_class: "measurement"
- frequency:
- name: "PZEM-004T V3 Frequency"
- unit_of_measurement: "Hz"
- id: Frequency
- internal: true
- accuracy_decimals: 1
- force_update: True
- power_factor:
- name: "PZEM-004T V3 Power Factor"
- unit_of_measurement: "cos𝝋"
- id: CosPhi
- internal: true
- accuracy_decimals: 2
- force_update: True
- # filters:
- # - lambda: return acos(Power/ (Voltage * Current )); # phi
- # - lambda: return sqrt((Power * Power) - (Voltage * Current )); # Reactive Energy u.m. VAreactive
- update_interval: 60s
- # - platform: total_daily_energy
- # name: "PZEM-016 Daily Energy"
- # power_id: Power
- # filters:
- # Multiplication factor from W to kW is 0.001
- # - multiply: 0.001
- # unit_of_measurement: kWh
- # icon: mdi:counter
- # accuracy_decimals: 1
- #time:
- # - platform: sntp
- # timezone: Europe/Rome
- # id: my_time
- # update_interval:
- ## on_time:
- # seconds: 59
- # minutes: 59
- # hours: 23
- ## then:
- ## -
Advertisement
Add Comment
Please, Sign In to add comment