I'd basically get something like this [1] and then put it in the middle of a patch cable.
[1] https://www.amazon.com/Aeotec-Security-controller-electricit...