Room-by-Room Device Grouping for Put-and-Play IoT System