I that case you probably send a voltage through one of the cable and it returns in the other if there is a connection.
But that is only my assumption.
In that case you need to send between 4 and 250 volts DC according to the specifications and put a voltage divider on the receiving end to make sure the ESP-based device does not fry.
So the answer to the question is an ESP, that is my suggestion.