@electrik Thanks electrik.
It is absolutely right, I removed the line for declaring the function and all is working as expected.
Actually the other problem which made me nut was that I was seeing the device restarts continuously so I thought not declaring the request function is causing that.
That has fixed as well. The issue was that I had enabled the REPEATER option, however, I didn't add any WIFI library or correct setting for that so the system was crashing and was resetting .
Now that I disabled that REPEATER option and also did not declaring the request function, all is working fine again.
@mfalkvidd: I am not sure but believe me it was there and it was compiling just fine before.
Perhaps used to we had to declare it, and now as "electrik" explained, it already declares in MySensor call.
Thank you both anyway.
I think I get it working now.
Cheers,