Sounds like you need a pull up or down resister.
This should fix your sensitive sensor.
Check out my opening post.
Sounds like you need a pull up or down resister.
This should fix your sensitive sensor.
Check out my opening post.
Yeah, I am using your code, but there is a limitation of esp32 of 13microseconds on the pulse_counter
Did a slight code modifications to get around sensitivity issue and also scrubbed the automation part to increment the counter:
binary_sensor:
- platform: gpio
pin:
number: GPIO22
mode: INPUT_PULLUP
inverted: True
filters:
- delayed_on: 40ms
name: "utilities_water_sensor"
id: utilities_water_sensor
on_press:
then:
- homeassistant.service:
service: counter.increment
data:
entity_id: counter.utilities_water_meter
sensor:
- platform: pulse_counter
pin: 22
name: "utilities_water_pulsecounter"
unit_of_measurement: 'l/min'
count_mode:
rising_edge: DISABLE
falling_edge: INCREMENT
but otherwise it works great! Emailed the company that I bought from and told them about the nylon screw - they will post me one that they forgot to attach =)
unfortunately, for some reason, it broke this evening =(
Started to report pulses continuously without me changing anything.
Now have to work out what is the cause
ended up going 8266 route - ESP32 was just too sensitive. So far rock solid
The pull up resistor is part of the physical circuit. This pulls the sensing wire up or down. Without it you can get situations where the sensor false triggers.
The code can probably be updated to take advantage of the improvements in esphome since that was written.
Have you some photographs of this installation, would love to see how it was done? If I understand correctly youâve purchased a âCybleTMâ sensor and are getting pulses from the brown and white wires?
more information on the how to do it with Cyble sensor.
My gas meter is compatible with these. Prices seem to be a bit over $100 these days but iâve been unsuccessful getting a cheap reed sensor DIY functioning and keen to get GAS into HA.
@swa72 I have a G6 RF1 c gas meter. After first trying - unsuccessfully - with a Reed contact and an ESP8266, I found this thread and your procedure to use a cyble sensor. Thank you
I followed your procedure last night and it seemed to work: the device and entities showed up in HA and everything was looking good. However, the sensor soon started counting up despite no gas being consumed. Something is clearly not rightâŚ
One point I wondered about was the pins to which I connected the sensor on the ESP32.
Step 3 on your GitHub page says to connect one (either one, right?) of the two Cyble wires to GPIO21 and the other to GND (any GND?; there seem to be three). Pin 21 matches what is defined for the pulse_counter section of the gas4.yaml file.
In the gas4.yaml file, it mentions GPIO12 under substitutions. Is this a conflict with pin 21 or is that how itâs supposed to be?
Any ideas about what I could do to debug?
Hi Ian,
you basically hook up one of the cables to GND (any will do) and the other one to a pin of your choice. I noticed that pulse_pin
under substitutions
is rubbish as I donât use it in the remainder of the code ;-).
In the - platform: pulse_counter
section I use pin 21.
I basically re-used most of the stuff from another user (Gaszähler mit ESP8266 und Home Assistant auslesen - Smarthome Doku albeit in German), who also uses mode: INPUT_PULLUP
in the definition of the pin. Maybe your sensor fires too often and should be limited to INPUT_PULLUP
? Thatâs a wild guess from my side âŚ
I thought Iâd give an update on my endeavours.
The first was to use INPUT_PULLUP
, as you suggested and is described in Gaszähler mit ESP8266 und Home Assistant auslesen - Smarthome Doku. Although that seemed to produce more satisfactory results initially, the readings were soon all over the place again.
So I took a look at GitHub - sameeraman/homeassistant_watermeter_sensor: ESPHome Water Meter Sensor for Home assistant. I thought Iâd start with the hardware change. I used a resistor as shown in this project. To my surprise, that did the trick. Since then, Iâve had what I regard as accurate and reliable results. The deviation compared with the gas meter in a 24-hour period has been no more than 2%. Iâll take that.
Just ordered my Cyble Sensor 2w K1 from Stratawater - Iâm in Adelaide too.
Looking forward to installation!