Skip to content

Instantly share code, notes, and snippets.

@mballoni
Created November 25, 2025 13:04
Show Gist options
  • Select an option

  • Save mballoni/dacd75b69cd2bac8c0e585d32d88c8d9 to your computer and use it in GitHub Desktop.

Select an option

Save mballoni/dacd75b69cd2bac8c0e585d32d88c8d9 to your computer and use it in GitHub Desktop.
ESPHOME pzem004 v3 + ESP32 C3 Super mini
esphome:
name: piscina-monitor
friendly_name: "Monitor Piscina"
esp32:
board: esp32-c3-devkitm-1
variant: ESP32C3
framework:
type: esp-idf
logger:
level: DEBUG
api:
ota:
- platform: esphome
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
power_save_mode: none
enable_on_boot: True
fast_connect: True
output_power: 8.5
# Bluetooth Proxy
esp32_ble_tracker:
scan_parameters:
active: true
bluetooth_proxy:
active: true
# 1. Configuração da Porta Serial (UART)
uart:
- id: pzem_uart
tx_pin: GPIO1
rx_pin: GPIO2
baud_rate: 9600
# 2. Declaração Obrigatória do Modbus (PZEM V3 usa Modbus)
modbus:
- id: modbus_pzem
uart_id: pzem_uart # LIGA O MODBUS À NOVA PORTA
setup_priority: -5
send_wait_time: 250 ms
# 3. Sensores
sensor:
- platform: pzemac
modbus_id: modbus_pzem
update_interval: 10s
current:
name: "PZEM-004T V3 Current"
voltage:
name: "PZEM-004T V3 Voltage"
energy:
name: "PZEM-004T V3 Energy"
power:
name: "PZEM-004T V3 Power"
frequency:
name: "PZEM-004T V3 Frequency"
power_factor:
name: "PZEM-004T V3 Power Factor"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment