First working version.

I've manually tested this with my lights setup. Should be able to demo it next week.