Applying a capacitor between GND and GPIO pin of binary sensor solves the problem. I putted a 1uF electrolytic capacitor or a SMD capacitor and with both works very stabil. Before that I had unreliable responses as well.
This might solve the problem for you with 1 gpio but if you have a lot of GPIOs and a lot going on in HA I can guarantee this wont work. It is a software problem.
I also don’t care any more. I am now using an alternative 100% reliable mqtt-gpio bridge.
guys, can someone help me? i was using a nodemcu 8266, configured for smart doorbell, my doorbell gives when someone presses the doorbell 12 , with the schema below, i reduced to 3.0 v, this was working brilliant (10 kohm and 3.3 kohm)
now tried the same with the gpio , with remote gpio component, seems it works, but only for a short while
if i try the doorbell again after like 10 min, i dont see the binary sensor switching anymore
is it maybe because of the resisror choice? should i need to replace 3.3 with 3.8 , to give me 3.3 v ?
[Can I write SOLVED !? - at least it works for me ]
The problem is evident, as in my case, when binary sensor has to notify the buzz of my intercom, which usually should be pushed for less than a second (it depends on how polite are the people ) so I’ve solved in this way:
I’ve wrote a rest_command (with pergola.fabio support) to switch OFF the binary sensor and created the automation that works after 1 second that binary_sensor is on ON state. In this way:
people need a solution and in my case it is solved… and with your response the only solution is an update of HA so, what are you talking about? in any case my question on “Solved” was ironic but it is evident that you did not get it. I’ve done my goal and people like me who read this post now have a solution because there is this option without any hardware works, that’s why I’ve shared. Farewell
I’m very new to HA, Pi, coding and home automation (like one week old). I’m having the same problem on my very first sensor. I need the Pi GPIO’s to be reliable. Looks like I’ll have to work around the issue before I’ve even got any sensors working!
I thought I had a broken Pi so I clean installed Rasbian with Node-Red. It detects GPIO state changes just fine, so, like others, I conclude it’s a software issue not a hardware fault.
I use the local IP address of the Pi itself, I run HA in Docker so localhost probably would resolve to the container. For info, the Pi4 runs Raspbian (Buster).
Would this work also on a Raspberry Pi running Hassio directly?
I am facing the same problem of unreliable edge detection. My use case is for rain measurement - I have a measurement device with a reed switch that would provide a pulse every 1mm of rainfall. The signal will therefore be very short whenever the internal cup swaps from one side to another.
I would hope for a fix since the rpi_gpio approach was simple enough to fit my needs.