Tutorial for reading water meter pulses with cable reed contact using ESP8266 and ESPHome.
Home Assistant: YTB
ESPHome: YTB
Soldering: YTB
Water meter: ENBRA DE-13-MI001-PTB002 with 2-wired reed sensor. ( 1l = 1 pulse )
and
ESP8266 AC 1ch relay: Ali
USB/TTL programmer (set): Ali
or
WemosD1 mini: Ali
AC/DC Power supply: Ali
esphome:
name: home-water-pulse-meter
esp8266:
board: esp01_1m
logger:
api:
captive_portal:
ota:
password: "4ddc5ac48879ecc7d06a3c031e497e8d"
wifi:
networks:
- ssid: !secret wifi_ssid
password: !secret wifi_password
time:
- platform: sntp
id: my_time
sensor:
- platform: pulse_meter
pin:
number: GPIO5
mode: INPUT_PULLUP
unit_of_measurement: 'pulse'
name: 'water_pulse_meter'
icon: 'mdi:water'
internal_filter: 100ms # shut down and monitor the log if there are problems
filters:
- multiply: 0.5 # shut down and monitor the log if there are problems
total:
name: 'water_pulse_meter_total'
icon: 'mdi:water'
unit_of_measurement: 'l'
id: total
filters:
- multiply: 0.5 # shut down and monitor the log if there are problems
- platform: total_daily_energy
name: "water_pulse_meter_daily"
power_id: total
unit_of_measurement: l
In case of a problem with reading data from the sensor, disable filters/multiply and internal_filter in the program and check the log.