Hi there,
i’m trying to build a pulse meter with esp32 and esphome for my water meter. I already have a solution using a shelly device connected to the pulse sensor wires through the digital input and is working kind of fine.
Some times it freeze so i wanted to replace with an ESP. But i’m having issues on multiple pulses counted. Here’s what i tried:
the pulse_meter was kind of countig each pulse 4 times while the pulse counter seemed to work just fine until the water usage become higher and it is counting somehow 2 times the real water usage:
ok, so i should try some value and keep what matches the best?
I really haven’t set up anything for the shelly and i was surprised it worked well from the first time.
Yes, I can’t suggest any specific value if I don’t know the pulse width, but since you say it “stays up for some time” you probably can set some milliseconds instead of microseconds. Try 50ms
What Shelly and method you are using?
Many thanks!!!
I’m trying again with the pulse_meter type as it seems to be the replacement to pulse_counter (which is also marked as deprecated while compiling).
I just have one more issue right now, when the esp reboots itself the counter resets to zero. I have it connected via MQTT as home assistant is not on the same local network. How could i keep the counter?
* **restore** (*Optional*, boolean): Whether to store the intermediate result on the device so that the value can be restored upon power cycle or reboot. Warning: this option can wear out your flash. Defaults to false.