Collaborative smart environments for energy-efficiency and quality of life