I have 3D printed 2 compact enclosures.

For the sensor and emitter I used an Arduino Pro Mini running in deep sleep to save the AAA batteries. 

Running time is about 1 set of batteries/week.

For the receiver, I have used an arduino Nano, a relay and a DC-DC converter.

I am also using this receiver to control my garage door. Ths DC-DC converter allows a power supply of 12V .. 24V.

The Arduinos software are quite simple. The RC-switch library is really simple to use.