Hey guys,
I have set up a simple outdoors bell switch outside my yard.
It is connected to my RPi using a long line of cables, about 10 meters of my old video/doorbell system cables, then ~1m of speaker cable and then around 3 meters of ethernet cable (using just two wires out of 8) - yeah, i know…
Those two wires come to my RPi and one is connected to GPIO 13 and the second one to GND.
Here is my code inside binary_sensors.yaml:
- platform: rpi_gpio
ports:
13: door_outside_bell
pull_mode: UP
invert_logic: true
bouncetime: 30
Now although this whole set up does work, kind of, i am afraid it is not very accurate.
The sensor registers the button pushes randomly, like 1/3 times i press it.
It also sometimes stays on, even though i have left the switch alone.
- I am coming to you for advice, what should i change in order to have more accurate readings?
- Is there some modifications i could do in my code?
- Should i change to a pull down resistor? and connect to 3.3v and GPIO?
- Is this thing caused because of the wiring as i explained it above?
In case its the wiring, i am afraid there is not much i can do, as all these wires are inside walls, so, maybe a solution is to create a second circuit with a 5v power source, that would operate a relay module, which would in its turn close my the circuit connected to the RPi? (or is this an overkill?)
Looking forward to hearing your thoughts.
Regards,
K.