The Role of IoT in Smart Buildings