Smart-building technology