Abstract:
The present disclosure relates to a sensor network, machine type communication (MTC), machine-to-machine (M2M) communication, and technology for internet of things (IoT). The present disclosure may be applied to intelligent services based on the above technologies, such as smart home, smart building, smart city, smart car, connected car, health care, digital education, smart retail, security and safety services. A method of an electronic device for pairing with a lighting device is provided. The method includes acquiring an image photographing the lighting device, acquiring identification data of the lighting device from the image, and pairing with the lighting device by transmitting the identification data to the lighting device. Further, a method of a lighting device for pairing with an electronic device is provided. The method includes outputting light based on first identification data, receiving second identification data, determining whether to pair with the electronic device, and pairing with the electronic device.