I've been looking into the same problem for a while, and came to exact same solution a few weeks ago, coincidently.
I haven't actually got round to completing all the code for it, but have tested each section. I was delighted when I spotted your article this morning, but was hoping you would have also shared your code... No git repository?
I'm sure I can make the whole system myself, but I'm always happy to use others work if it exists.
If you do have a working version of this process, please do share it!