tom_l
July 30, 2020, 4:54pm
21
Fuenkli:
pull_mode: UP
So you did use a pull-up resistor (the pi’s internal one), that’s good.
I have no idea why it is behaving this way. Possibly related to this old but ongoing issue:
opened 07:45AM - 10 Nov 17 UTC
closed 10:22AM - 04 Apr 21 UTC
integration: rpi_gpio
Make sure you are running the latest version of Home Assistant before reporting … an issue.
**Home Assistant release (`hass --version`):**
0.57.2
**Python release (`python3 --version`):**
Python 3.5.3
**Component/platform:**
Binary Sensor GPIO on Raspberry Pi ( binary_sensor rpi_gpio)
**Description of problem:**
The sensor does not trigger with very short connections. This sadly is the default case for the "Doorbell" Scenario.
A self-made python script works as expected. Within hass, the first activation is always ignored. Afterwards, approximately 1/3 are not registered.
An automation is not needed to reproduce.
**Expected:**
Even a short hit on a button should trigger the binary sensor 100% of the time - hass.io should behave identically to manually implemented python scripts in that regard.
**Problem-relevant `configuration.yaml` entries and steps to reproduce:**
```yaml
- platform: rpi_gpio
ports:
18: hass_doorbell
```
Python that is working fine with the same hardware-setup can be found here:
https://github.com/bahmrockk/homeassistantConfig/blob/master/doorbell.py
1. Connect a button to the GPIO (e.g. http://www.instructables.com/id/Raspberry-Pi-IoT-Doorbell/ )
2. Press that button
3. Observe that it does not register 100% within the hass.io frontend (sometimes even only on release)
**Additional info:**
I have tried a lot of different configurations, playing around with bouncetimes, inverted logic, etc etc. I'm now at a 80% confidence level that this is indeed a bug and not me being stupid :)
thanks for the info. I read in an other post that HA is loosing the sensor state if it is restarted and that you have to use a boolean something something to fix it. But this waaaaay over my head to understand. In the meantime i will just use it as it is and not restart HA. Many thanks for helping me. I don’t know where in the world you are, but if you ever visit Cape Town South Africa i will invite you for a beer
1 Like