iot for smart buildings to reduce energy consumption