Smart buildings and grids in the renovation of the built environment