ScymnusRIP

PZEM-017

Jun 21st, 2022 (edited)
776
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.52 KB | None | 0 0
  1. esphome:
  2.   name: pzem-017-in
  3.  
  4. esp8266:
  5.   board: d1_mini
  6.  
  7. # Enable logging
  8. logger:
  9.     level: VERY_VERBOSE #DEBUG
  10.     baud_rate: 0
  11.  
  12. # Enable Home Assistant API
  13. api:
  14.   encryption:
  15.     key: "D11WCCuskLP9LhGz13uqSJpJCp2drZVMqcxKzMhzDk8="
  16.  
  17. ota:
  18.   password: "f81d2e1da3bfcbbf73c0101d92bf0a3f"
  19.  
  20. wifi:
  21.   ssid: !secret wifi_ssid
  22.   password: !secret wifi_password
  23.  
  24.   # Enable fallback hotspot (captive portal) in case wifi connection fails
  25.   ap:
  26.     ssid: "Pzem-017-In Fallback Hotspot"
  27.     password: "AWNiduAKo3Cp"
  28.  
  29. captive_portal:
  30. uart:
  31.   tx_pin: 1 #D6 #D2 aka GPIO4 oppure TX aka GPIO1
  32.   rx_pin: 3 #D5 #D3 aka GPIO0 oppure RX aka GPIO3
  33.   baud_rate: 9600
  34.   data_bits: 8
  35.   stop_bits: 1  #esp32 2bits, ESP8266 1bit
  36.   parity: none
  37.   debug:
  38.     direction: BOTH
  39.     dummy_receiver: false
  40.     after:
  41.       delimiter: "\n"
  42.     sequence:
  43.       - lambda: UARTDebug::log_string(direction, bytes);
  44. modbus:
  45.   flow_control_pin: D1
  46.  
  47. sensor:
  48.   - platform: pzemdc
  49.     current:
  50.       name: "PZEM-003 IN Current"
  51.       unit_of_measurement: "A"
  52.       id: Current
  53.       internal: false
  54.       accuracy_decimals: 3
  55.       force_update: True
  56.     voltage:
  57.       name: "PZEM-003 IN Voltage"
  58.       unit_of_measurement: "V"
  59.       id: Voltage
  60.       internal: false
  61.       accuracy_decimals: 1
  62.       force_update: True
  63.     power:
  64.       name: "PZEM-003 IN Power"
  65.       unit_of_measurement: "W"  # "watt"
  66.       id: Power
  67.       internal: false
  68.       accuracy_decimals: 2
  69.       force_update: True
  70.     update_interval: 10s    
Add Comment
Please, Sign In to add comment