Update sketch.ino

Updated to latest version from thead at http://forum.fhem.de/index.php/topic,17196.480.html.
Serval modification where made since last commit.

This shoud be a new starting point for future changes.