Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- esphome:
- name: pzem-017-in
- esp8266:
- board: d1_mini
- # Enable logging
- logger:
- level: VERY_VERBOSE #DEBUG
- baud_rate: 0
- # Enable Home Assistant API
- api:
- encryption:
- key: "D11WCCuskLP9LhGz13uqSJpJCp2drZVMqcxKzMhzDk8="
- ota:
- password: "f81d2e1da3bfcbbf73c0101d92bf0a3f"
- wifi:
- ssid: !secret wifi_ssid
- password: !secret wifi_password
- # Enable fallback hotspot (captive portal) in case wifi connection fails
- ap:
- ssid: "Pzem-017-In Fallback Hotspot"
- password: "AWNiduAKo3Cp"
- captive_portal:
- uart:
- tx_pin: 1 #D6 #D2 aka GPIO4 oppure TX aka GPIO1
- rx_pin: 3 #D5 #D3 aka GPIO0 oppure RX aka GPIO3
- baud_rate: 9600
- data_bits: 8
- stop_bits: 1 #esp32 2bits, ESP8266 1bit
- parity: none
- debug:
- direction: BOTH
- dummy_receiver: false
- after:
- delimiter: "\n"
- sequence:
- - lambda: UARTDebug::log_string(direction, bytes);
- modbus:
- flow_control_pin: D1
- sensor:
- - platform: pzemdc
- current:
- name: "PZEM-003 IN Current"
- unit_of_measurement: "A"
- id: Current
- internal: false
- accuracy_decimals: 3
- force_update: True
- voltage:
- name: "PZEM-003 IN Voltage"
- unit_of_measurement: "V"
- id: Voltage
- internal: false
- accuracy_decimals: 1
- force_update: True
- power:
- name: "PZEM-003 IN Power"
- unit_of_measurement: "W" # "watt"
- id: Power
- internal: false
- accuracy_decimals: 2
- force_update: True
- update_interval: 10s
Add Comment
Please, Sign In to add comment