I have just done the bare minimum to get it working. Hopefully it can be useful for some of you.
Here you have some basic documentation and the code.