Efficient heating and air conditioning systems based on renewable energy