made some required changes for using this plugin with pilight 3.0