The red wire is connected to +12V and the black wire to GND. During use, if electrodes are connected by water (e.g. by a water flood), the blue wire is connected to GND and the yellow wire is disconnected from GND. If the connection stops (no water), the blue wire is disconnected from GND and the yellow wire connect to GND.