An electronic device comprising: a first communication unit and a second communication unit; a processor; and a memory, wherein the memory includes instructions causing the processor to: receive first identification information for a door and first opening/closing state information of the door from a server through the first communication unit, receive second identification information for the door and second opening/closing state information of the door from the door through the second communication unit, compare the first identification information and the first opening/closing state information with the second identification information and the second opening/closing state information, generate first door state information including information on the electronic device involved in a change in an opening/closing state of the door when the first identification information and the second identification information are same, and the first opening/closing state information and the second opening/closing state information are same, and control the first communication unit to transmit the first door state information to the server. a first communication unit and a second communication unit; a processor; and a memory, wherein the memory includes instructions causing the processor to: receive first identification information for a door and first opening/closing state information of the door from a server through the first communication unit, receive second identification information for the door and second opening/closing state information of the door from the door through the second communication unit, compare the first identification information and the first opening/closing state information with the second identification information and the second opening/closing state information, generate first door state information including information on the electronic device involved in a change in an opening/closing state of the door when the first identification information and the second identification information are same, and the first opening/closing state information and the second opening/closing state information are same, and control the first communication unit to transmit the first door state information to the server. receive first identification information for a door and first opening/closing state information of the door from a server through the first communication unit, receive second identification information for the door and second opening/closing state information of the door from the door through the second communication unit, compare the first identification information and the first opening/closing state information with the second identification information and the second opening/closing state information, generate first door state information including information on the electronic device involved in a change in an opening/closing state of the door when the first identification information and the second identification information are same, and the first opening/closing state information and the second opening/closing state information are same, and control the first communication unit to transmit the first door state information to the server.