Hi,
instead of the shown switch I would use a relay with changeover and connect the control input to a powerbar socket. When the socket is turned on by pH control eg the blue wire is connecting to...