I have a standard float switch in a remote water reservoir connected to a normal electric cable (100m+ long). I want to check with a raspberry pi if the float switch is on (i.e. water level is low) or off (i.e. water level is okay) and based on that control a relay switch. Is there an easy way to detect if the switch is on or off with a raspberry pi? I presume I cannot simply connect it to the GPIO pins as it is a float switch that is meant to automatically disconnect a mains circuit?