This case was designed to go along with my Octoprint and Plugin for PSU Control (https://github.com/kantlivelong/OctoPrint-PSUControl) to switch the active line on a 240VAC power cord safely.
Other cases were too open and didnt provide a tight cable grip.
It uses the skinny single board (usually blue) relays from china. Usually having a green and red LED and having the contacts terminal very close to the end of the board.
Use M3 6mm screws along with the brass melt in nuts.
I take no responsibility if you do this yourself without a qualified electrician. 240V/120V AC KILLS. Dont be dumb!
I shouldnt need to say this, but do these next steps with an unplugged power cable!
Choose a thick power cord if possible, it will help to keep the cable snug
Carefully cut the outer insulation. I found bending the cable tightly and then using a razor to gently cut the outer only.
Grip and slide your hands away from the cut to make the insulation slide down to expose the internal wires.
In Australia, the brown wire is the 240V active that needs to be switched in the relay. (In USA, it is the black wire. Choosing any wire except the active/phase wire is dangerous.
Cut and strip approx 5mm on both sides of the cut, and tin with a soldering iron if you wish.
Place two small zip ties around the ends of the outer insulation, but dont fully tighten yet
Screw/terminate the wires into the relay. Choosing which two will depend on if you want NO or NC. I choose NO (Normally Open).
Bend the Earth and Neutral wires into a U shape to squeeze in below the terminated wire. It's really up to you how you fit it in. It woirked best for me this way.
Once the relay is sitting on it's shelves, push the cord down inside, with the zip ties on the inside. If you need to reduce the exposed wires, slide a tight gripped hand down the cord to push the insulation back down.
Tighten zip ties and screw on the lid.
You might also find it easier putting in the dupont cable in before the lid.