I have a raspberry pi 3b+ and a haunted house.
My raspberry pi sits in the living room tv cabinet (with adequate ventilation) as a server. I had a large button lying around, so i put it inside a small lego box & hooked it up to the pi as shown here: The button worked great! I had it call a webhook from my hubitat to turn on some lights in the room. Then, one day, I changed the speed of my ceiling fan from high to medium. And suddenly, the lights came on. I looked in the hubitat logs, and the webhook had been called. Every single time i change the ceiling fan (7 ft away line of sight) speed from high to medium (and ONLY when it goes from high to medium), the webhook is called, like clockwork. If you are wondering, the python was detecting gpio.rising via callback. I changed it to falling with no luck. Then, i though the pull down resistor wasnt strong enough (the wires were 3 feet long in a C-shape), so i added a 10k external pull down resistor: Still, the fan still triggered the button. So i changed the resistor with an unnecessarily strong 1k resistor, yet nothing happened. Finally, in a last ditch attempt, i tried keeping the line pulled up and having the button ground it (i got a bit lazy - hence the unnecessary resistors i didnt remove: I thought to myself, "surely a line pulled high cant be affected by emf." Yet, the issue persisted with no change. In this mode, i set it to detect falling. Finally, as a last ditch attempt, i tried switching out the power brick (which sits on a surge protector). And - you guessed it - nothing happened. My button is still fully functional - yet is TOO functional, somehow wirelesly communicating via emf, interference, or arcs, vausing the button to trigger.
Here are some little details that might help:
- The pi & fan are on different breakers
- We do NOT have arc fault circuit breakers (i live in USA)
- The rpi has a fully functional DHT11 sensor connected to other gpio pins.
- To connect to the button, i am using solid core 24 awg wire.
- i have 3 buttons that run through the wall to an esp8266 in the basement. The wires (inside a wall) also have a close proximity to the fan, yet never once have they gotten activated due to the fan
- I have zigbee bulbs in the fan's light sockets
- The button i am using is the button found in the google aiy kit.
- My bouncetime argument is 900 ms
Thanks in advance for all you help trying to remove this electrical ghost from my house - its downright creepy that the fan is linked like clockwork to the button. It also means i have to disable the button, which family has gotten used to