An electronic device, comprising: - a communication module configured to communicate with a communication relay; - a memory configured to: - store registration information of at least one registered Internet of things, IoT, device, wherein the at least one registered IoT device and the electronic device use a same specified protocol; and - store scenario information associated with operating an operation state of the at least one registered IoT device according to information associated with an external electronic device, wherein the external electronic device uses a different protocol from the specified protocol; and - a processor operably connected with the communication module and the memory, wherein the processor is configured to: - obtain identification information of a the external electronic device via the communication module, wherein the external electronic device is not registered to the electronic device, and associate the obtained identification information of the external electronic device with the scenario information corresponding to the external electronic device, the associated information is stored in the memory, before the external electronic device accesses the communication relay; - provide profile information for accessing the communication relay to the external electronic device after obtaining the identification information of the external electronic device; - receive the information associated with the external electronic device via the communication relay when the external electronic device accesses the communication relay using the profile information; - select the scenario information corresponding to the information associated with the external electronic device; and - transmit a control command corresponding to the selected scenario information to at least one registered IoT device corresponding to the selected scenario information. - a communication module configured to communicate with a communication relay; - a memory configured to: - store registration information of at least one registered Internet of things, IoT, device, wherein the at least one registered IoT device and the electronic device use a same specified protocol; and - store scenario information associated with operating an operation state of the at least one registered IoT device according to information associated with an external electronic device, wherein the external electronic device uses a different protocol from the specified protocol; and - store registration information of at least one registered Internet of things, IoT, device, wherein the at least one registered IoT device and the electronic device use a same specified protocol; and - store scenario information associated with operating an operation state of the at least one registered IoT device according to information associated with an external electronic device, wherein the external electronic device uses a different protocol from the specified protocol; and - a processor operably connected with the communication module and the memory, wherein the processor is configured to: - obtain identification information of a the external electronic device via the communication module, wherein the external electronic device is not registered to the electronic device, and associate the obtained identification information of the external electronic device with the scenario information corresponding to the external electronic device, the associated information is stored in the memory, before the external electronic device accesses the communication relay; - provide profile information for accessing the communication relay to the external electronic device after obtaining the identification information of the external electronic device; - receive the information associated with the external electronic device via the communication relay when the external electronic device accesses the communication relay using the profile information; - select the scenario information corresponding to the information associated with the external electronic device; and - transmit a control command corresponding to the selected scenario information to at least one registered IoT device corresponding to the selected scenario information. - obtain identification information of a the external electronic device via the communication module, wherein the external electronic device is not registered to the electronic device, and associate the obtained identification information of the external electronic device with the scenario information corresponding to the external electronic device, the associated information is stored in the memory, before the external electronic device accesses the communication relay; - provide profile information for accessing the communication relay to the external electronic device after obtaining the identification information of the external electronic device; - receive the information associated with the external electronic device via the communication relay when the external electronic device accesses the communication relay using the profile information; - select the scenario information corresponding to the information associated with the external electronic device; and - transmit a control command corresponding to the selected scenario information to at least one registered IoT device corresponding to the selected scenario information.