ScymnusRIP

sensore-pzem004t

Nov 21st, 2021 (edited)
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 2.39 KB | None | 0 0
  1. esphome:
  2.   name: sensore-pzem004t
  3.   platform: ESP8266
  4.   board: esp12e
  5.  
  6. # Enable logging
  7. logger:
  8.   baud_rate: 0
  9.  
  10. # Enable Home Assistant API
  11. api:
  12. ota:
  13.   password: "dfb05d7b978556e896ace8ba2810321b"
  14.  
  15. wifi:
  16.   ssid: "FRITZ!Box 7530 YX 2.4G"
  17.   password: "25162964755408347082"
  18.  
  19.   # Enable fallback hotspot (captive portal) in case wifi connection fails
  20.   ap:
  21.     ssid: "Sensore-Pzem004T"
  22.     password: "RmKpc5DpwmXT"
  23.  
  24. captive_portal:
  25. uart:
  26.   rx_pin: 3 #GPIO03
  27.   tx_pin: 1 #GPIO01
  28.   baud_rate: 9600
  29.  
  30. modbus:
  31. sensor:
  32.   - platform: pzemac
  33.     current:
  34.       name: "PZEM-004T V3 Current"
  35.       unit_of_measurement: "A"
  36.       id: Current
  37.       internal: true
  38.       accuracy_decimals: 3
  39.       force_update: True
  40.     voltage:
  41.       name: "PZEM-004T V3 Voltage"
  42.       unit_of_measurement: "V"
  43.       id: Voltage
  44.       internal: true
  45.       accuracy_decimals: 1
  46.       force_update: True  
  47.     energy:
  48.       name: "PZEM-004T V3 Energy"
  49.       unit_of_measurement: "Wh"   # "watt*hour"
  50.       id: Energy
  51.       internal: true
  52.       accuracy_decimals: 2
  53.       force_update: True
  54. #      state_class: "measurement"
  55.     power:
  56.       name: "PZEM-004T V3 Power"
  57.       unit_of_measurement: "W"  # "watt"
  58.       id: Power
  59.       internal: true
  60.       accuracy_decimals: 2
  61.       force_update: True
  62. #      state_class: "measurement"
  63.     frequency:
  64.       name: "PZEM-004T V3 Frequency"
  65.       unit_of_measurement: "Hz"
  66.       id: Frequency
  67.       internal: true
  68.       accuracy_decimals: 1
  69.       force_update: True  
  70.     power_factor:
  71.       name: "PZEM-004T V3 Power Factor"
  72.       unit_of_measurement: "cos𝝋"
  73.       id: CosPhi
  74.       internal: true
  75.       accuracy_decimals: 2
  76.       force_update: True  
  77. #      filters:
  78. #       - lambda: return acos(Power/ (Voltage * Current ));  # phi
  79. #       - lambda: return sqrt((Power * Power) - (Voltage * Current ));    # Reactive Energy u.m. VAreactive
  80.     update_interval: 60s
  81.    
  82. #  - platform: total_daily_energy
  83. #    name: "PZEM-016 Daily Energy"
  84. #    power_id: Power
  85. #    filters:
  86.         # Multiplication factor from W to kW is 0.001
  87. #      - multiply: 0.001
  88. #    unit_of_measurement: kWh
  89. #    icon: mdi:counter
  90. #    accuracy_decimals: 1  
  91.  
  92. #time:
  93. #  - platform: sntp
  94. #    timezone: Europe/Rome
  95. #    id: my_time  
  96. #    update_interval:
  97. ##    on_time:
  98. #      seconds: 59
  99. #      minutes: 59
  100. #      hours: 23
  101. ##       then:
  102. ##        -
  103.  
Add Comment
Please, Sign In to add comment