Here the code. In the meantime i put it on github. So much more convenient.
This is what you are most likely interested in:
If you are interested in current a Velux shutters draws have a look into this. All measurements in seconds and mA.