Smart buildings can team up to be more energy efficient while keeping the people inside comfortable.