SmartThings community did it first. Lots of people doing variations on this one, and it works reliably. It just costs more.