Software solutions for Energy Efficient Smart Environments