made some required changes for using this plugin with pilight 3.0

I made some changes to the code so that it works with the new pilight 3.0. With these changes it worked for me but it's better that someone else is testing and reviewing these changes, too. I orientated myself by the perl client example and hopefully got it all right.