Water meter

Hello! How can you monitor the water that arrives in your house? What if a leack happend?

With a water meter you can count live how much water is being used and fastly detect leackage!!

Hardware

  • yf-DN40 Water meter (aliexpress link)

Esphome configuration

The configuration was really simple, I followed a github repo to get the esphome configuration that I nedded

I used a spare esp8266 nodemcu that I have running on my desk

substitutions:
  device_name: water-meter

esphome:
  name: ${device_name}
  platform: ESP8266
  board: nodemcuv2

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  domain: !secret wifi_domain

  ap:
    ssid: ${device_name} Hotspot
    password: !secret hotspot_password

logger:
api:
ota:
web_server:

sensor:
  - platform: pulse_counter
    pin: D5
    unit_of_measurement: 'L/min'
    accuracy_decimals: 1
    update_interval: 1s
    name: 'Water Meter House'
    filters:
    - lambda: return (x / 27.0);  
    
    total:
      unit_of_measurement: 'L'
      name: 'Water Meter Total'
      accuracy_decimals: 1
      filters:
      - lambda: return (x / 27.0);

The /27 part is magic. I’ll calibrate that when the meter is in place ;)

For any question come in the telegram channel