Here it is, finally done. It works like a charm. If you can’t make out the wiring, I’ll post instructions later on how it’s wired.

Crappy video showing how it works.