Multifunction optoelectronic sensor for smart applications