Smart and green buildings: a bottom up approach