35 Years ago one of my friend made a system using utra-sonic sensors , panel and push button to tell people which of the bank clerk is free and he had problem with push button. Sometimes the push button triggers by itself for no reason.
Then I solved the problem using opto isolator.
1 - Be aware that very long wires act like an antenna and any signal from radio, lightning and big emf devices will be inserted into the wires.
2- Use capacitor, resistor and a small ferrite to kill high frequency. You should think also about protecting your GPIO inputs with protection diode or transorb. I lost 2 TVs, one router , one modem and a couple of network devices by just one lightning!
3- Optocoupler is a very convenient way to isolate devices . It protect against ground loop, back emf, and lightning.
4- You could use shield cable. The shield itself create a capacitive load and a faraday cage. but it doesn't protect against electrical discharge.
After saying that a simple debounce algorithm will take care of the false push button. But good practice tell me that you should protect your system. It's not fun to wakeup after a storm and found out that your raspberry Pi is dead.
Are your device ready for the next big solar storm
https://en.wikipedia.org/wiki/March_198 ... etic_storm