Home energy management system based on task classification and the residents requirements