My setup is like so:
A Raspberry Pi B+ acting as an airplay audio receiver using shairport. The Pi connects to a 100V line Amp which feeds the audio out to several installed ceiling speakers around the home setup as four zones. Before the sound goes to the speakers the common line goes to a relay which is attached to the Pi. In each zone (Kitchen, Bedroom, Bathroom, Hallway) there is a momentary switch wired in to the wall, one side of the switch is wired to the GND pin on the Pi, the other side runs to a GPIO pin set as an input pull up resistor. The idea is to turn on a speaker zone you press the momentary switch in that room which connects the two sides and triggers the pull up resistor which as part of a python script sets another GPIO setup as an output to HIGH which connects to a relay which closes the relay and allows the audio circuit to complete at which point the music starts playing in that particular zone.
This system worked perfectly in extensive testing so I installed it in my home. Now I'm finding a weird thing is happening; the speaker zones are turning themselves on an d occasionally off also! As far as my testing has shown the zones only turn themselves on when music is being played through the Pi as though in response to the music in some way. If I disconnect the momentary switch this issue does not occur at all. If I use the same kind of switch with short cables, a few inches say, like breadboard jumpers this issue does not occur. When I have the installed momentary switches installed the issue occurs, the length of cable to the switches is several metres as it runs through my ceiling.
Any thoughts on why this might be occurring would be appreciated.
If it helps I can supply the Python code I'm using for this system though I don't think it will help as the issue kinda seems to be physical.