1. A method of controlling devices connected to a controller, the method comprising: receiving, from a server, a service rule comprising a trigger condition and a device executing action which is an action to be performed by one of the devices according to whether the trigger condition is satisfied; selecting one of the devices connected to the controller based on the received service rule; modifying the received service rule to control the selected device; and controlling the selected device according to the modified service rule.