Added first version from ansgr (http://www.rwe-smarthome-forum.de/thread-php-library?pid=8585#pid8585)
Updated version to donenik (http://www.rwe-smarthome-forum.de/thread-php-library?pid=11942#pid11942)
Reformated code and added comments to all functions and variables