Water flow meter - pulse meter included - esphome

Thanks. I was really asking whether you knew the actual power draw. (I’m hoping to attach this to a standpipe in a field, but not sure whether it’ll be feasible as WiFi is clearly more power-hungry than zwave or ZigBee, and will require a fairly large solar panel and power storage for nighttime, I suspect.)

Hi. this is what i am looking for.
I need some help. I have a watermeter installed by my landlord, it uses a simple reed switch and send out pulses with +22v to the system they use. I want to tap into this pulse and send it to HA.
According o the specification on the watermeter it is sending out one puls every 10L.
How can i change this code to work with 10L per pulse that my meter will give out?
Thank you.

Hi @Peppe66

This is what I’ve done with a Shelly Uni instead of the Plus Addon.
Maybe it help’s you.
https://community.home-assistant.io/t/water-meter-with-shelly-uni/567365

With the Addon it could work too but if you use an inducive sensor you need another power source for the higher voltages of the sensor. The Addon only provides 3.3V.

d.k

The code at the beginning of the threat is giving 1L every 87 pulses
The following code should be fine for 10L every pulse

sensor:
  - platform: pulse_meter
    pin: GPIO12
    name: "Instant water consumption"
    unit_of_measurement: "L/min"
    icon: "${ha_icon}"
    timeout: 1s
    accuracy_decimals: 3
    filters:
      - lambda: return (x / 0.1);
    total:
      name: "Total water consumption"
      unit_of_measurement: "m³"
      device_class: water
      state_class: total_increasing
      accuracy_decimals: 3
      icon: "${ha_icon}"
      filters:
        - lambda: return (x / 100.0);

Please check and let me know

Hi, i think this works. just have to figuring out some other problems i have. as i dont really have a GND connecton to my landlords system so it is a Little hit and miss atm.
Thanks for the help.

HI everybody,

I have a question.

Background: I’ve successfully got my flow meter providing data when the internal impeller is spinning, i assume its correct (i’m just blowing though it currently as its on a bench). I also have it reading zero when it’s not spinning. I used the internal pull up resistor function, i’m using an ESP32Thing.

My question is: My flow meter has the following specifications: 1Hz – 0.98 LPM Square wave. I am happy with litres per minute. Is there any additional filtering I need to do? How often should I update?

sensor:
  - platform: pulse_counter
    name: "Flow rate"
    pin:
      number: GPIO23
      mode: INPUT_PULLUP
      inverted: true
    update_interval: 60s
    filters:
    unit_of_measurement: "L/min"

hello, I have problem that I have to use a battery for that sensor, any experience?

I have a similar problem as the mete is outside without any electricity to easily connect to.
Wifi/esp has mixed feedback on powerusage and I did not want to install a large(r) battery pack as all of this is accessible from the road by anyone.
So, I ordered a zigbee module c2530 which one can program and tested that with a pulse sensor I already had…now I ordered the one for the water meter, will keep you posted
Not sure if this helps your case though

@vingerha please keep me updated…

Ping me on the side in a 4-6 weeks (the time my Ali order seems to take)

but it is possible to program CC2530 with esphome?
there is not a version zigbee of esp?

did you just order or you have to do it? in case can you take another one? because I have no programmer, that’s the reason I ask if there was someone usb that I can program with esphome

like this one? ESP32-C6

HI, esphome is wifi and (see earlier comment) I was/am not confident that a simple battery would hold up long enough. Adding costly lithium stuff for outside open to all is too much of a risk so I aim to turn zigbee with low battery use. The c2530 one can program to have the pins measure the pulse sensor (not explaining details but happy to share just ask). When connected via Z2M it shows me the pulses with which I can do whatever I like…The target is to have low energy use with a simple AAA battery powered c2530…qed

look on this:
https://it.aliexpress.com/item/1005005087127863.html?pdp_npi=2%40dis!EUR!9%2C50€!9%2C50€!!!!!%40211b600b16848622620832712e3f6a!12000031593805410!btf&_t=pvid%3Abf8625e2-6b3c-4773-bf58-03160f76c1f5&afTraceInfo=1005005087127863__pc__pcBridgePPC__xxxxxx__1684862262&spm=a2g0o.ppclist.product.mainProduct&gatewayAdapt=glo2ita

I have a couple of zigbee sensors for my garage and main gate.
Both are with battery (2032) and the battery life is very poor as related to the number of openings closings
I’m not sure a battery solution can be reliable for a weather meter unless you are single or away from home most of the time

I too have 12 zigbee sensors and most last >1 year, the odd one is poor but then…cheap.
For measuring water well enough, this is not at all critical and any power/connection failure can easily be adjusted manually by aligning meter/ticks.
@platini76 yes, I know these things and have a few too but they consume a lot, hence no esp/wifi for now…If zigbee does not work then I will have no option to go back to (current) manual readings
EDIT: “know these things” meaning that I have a few ESP different cards 32/8266 and all require to be plugged in

if I buy the zigbee sensor that I link. can you help me with the code to set up it?

the sensor I link is zigbee… not wifi.

I can try but right now, I cannot guarantee it works and I would wait until my sensor arrives and tested it myself…unless you just want to play around too (as I did)
There are quite a few sensors out there and it may very well be that some require more power than others, as most posts on this topic use esp and connected to the net, they donot directrly care … but I do with the battery, hence my comment to wait

The path I took using this one
Zigbee Configurable Firmware Features – Zigbee Hobbyist. Rock Pi 4 SBC (ptvo.info)
Not all code is ‘free’ but the one I used is free.
The only odd piece of software comes from TexasI and you need to fill a form with all sorts of conditions, exclaimers, etc … the US-style (not using for military purposes, etc.etc.)

My own Buy-list:

c2530 (yes it is old but cheap ad works)
Carte De Développement Zigbee Cc2530 Uart, Module Sans Fil, Port Série, 2.4ghz - Circuits Intégrés - AliExpress

a ccbugger to program the thing
ÉLiban ateur de débogueur CC ZIGBEE, prise en charge de la mise à niveau en ligne, coque d’origine, qualité d’origine, 2540, 2541, 2530, analyse de protocole | AliExpress

dupont cables to connect the lot

the sensor …
Commutateur de proximité de capteur d’effet Hall NJK 5002C de TZT NPN 3 fils normalement ouverts + Magne pour ardu37 | AliExpress

And (a bit of swearing) … I just noted that I forgot to order a battery case :roll_eyes:

I bought the one with 4 and the idea is that it could contain the 2530 too. For me it does not have to be waterproof, so ‘cheap’ too

Support de batterie AA à fente 1/2/3/4, boîtier de batterie AA 1.5V/3V/4.5V/6V avec interrupteur marche/arrêt à fils et couvercle arrière de boîtier de capuchon à vis | AliExpress

Also, do think about the network, I do have zigbee range where my meter is.

I read all your shopping list… but the question is…
using this sensor… that is zigbee and also usb… can avoid debugger and works at the same mode?

https://it.aliexpress.com/item/1005005087127863.html