This project was mostly a hardware and enclosure design project - the firmware is pretty simple. The challenge was to safely cram a lot of circuitry into a very small space, and create a 3D printable enclosure that would fit inside an in-wall electrical box for a standard light switch. Note that in-wall boxes sometimes have slightly different dimensions - the type you put into sheet-rock after the fact may be just barely too small for this design. I made sure to also use the extra deep boxes so there is extra room for the enclosure and wiring/wire nuts.
This box is a DIY project and is obviously not UL tested. Use it or any aspect of this project at your own risk.
This box is a DIY project and is obviously not UL tested. Use it or any aspect of this project at your own risk.