I've run into an issue using my RP 2 as a remote switch via the GPIO pins. Basically it comes down to the fact that the AC outlets in the building (its old) do not have an earth ground. They seem to ground to whatever the framework the outlet is connected to, in this case wood. The Pi relies on the ground from the monitor, I know that, but since neither has a proper earth ground, the GPIO seems to spike when other electronics in the room are turned on or off, causing the GPIO pin to toggle from low to high, causing unwanted actions in my remote switch system.
Hopefully this makes sense.
Is there a way this can be resolved without having the wiring in the building updated (this isn't an option)? I know its an issue with the floating ground that is being generated in the system, but I cannot come up with a solution. I thought about a decent sized capacitor between the buildings "ground" and the monitor to stabilize the voltage through the spike, but no luck.
Any help or ideas would be appreciated.