Fix issue of duplicated history data

Move sensor received data processing from listener to sensor instance. This caused duplicated history data because each websocket client would create a new listener instance.