A control system for controlling one or more of a plurality of devices associated with said control system and for improving the execution of automation rules by replacing automated behavior of an external client of the control system by same behavior performed by said control system, said one or more devices being controlled in response to events determined from input signals received from at least one of said plurality of devices, said control system comprising: at least one input interface; at least one output interface; and at least one processor configured to: - use said at least one input interface to receive input signals from said at least one device, - determine events from said input signals, - use said at least one output interface to transmit said events to a further system (25,26), comprising said external client, which is subscribed to said events, - use said at least one input interface to receive control commands from said further system (25,26) destined for said one or more devices, and - use said at least one output interface to transmit output signals representing said received control commands to said one or more devices, wherein said at least one processor is further configured to: - determine a relationship between said events transmitted to said further system and said control commands received from said further system, - establish a new rule based on said determined relationship, said new rule for causing said control system same to perform said same behavior as the automated behavior of said external client for controlling said one or more devices based on events, - use said at least one input interface to receive a new input signal from said at least one device, - determine a new event from said new input signal, and - use said at least one output interface to control said one or more devices according to said new rule in dependence on said new event. at least one input interface; at least one output interface; and at least one processor configured to: - use said at least one input interface to receive input signals from said at least one device, - determine events from said input signals, - use said at least one output interface to transmit said events to a further system (25,26), comprising said external client, which is subscribed to said events, - use said at least one input interface to receive control commands from said further system (25,26) destined for said one or more devices, and - use said at least one output interface to transmit output signals representing said received control commands to said one or more devices, - use said at least one input interface to receive input signals from said at least one device, - determine events from said input signals, - use said at least one output interface to transmit said events to a further system (25,26), comprising said external client, which is subscribed to said events, - use said at least one input interface to receive control commands from said further system (25,26) destined for said one or more devices, and - use said at least one output interface to transmit output signals representing said received control commands to said one or more devices, wherein said at least one processor is further configured to: - determine a relationship between said events transmitted to said further system and said control commands received from said further system, - establish a new rule based on said determined relationship, said new rule for causing said control system same to perform said same behavior as the automated behavior of said external client for controlling said one or more devices based on events, - use said at least one input interface to receive a new input signal from said at least one device, - determine a new event from said new input signal, and - use said at least one output interface to control said one or more devices according to said new rule in dependence on said new event. - determine a relationship between said events transmitted to said further system and said control commands received from said further system, - establish a new rule based on said determined relationship, said new rule for causing said control system same to perform said same behavior as the automated behavior of said external client for controlling said one or more devices based on events, - use said at least one input interface to receive a new input signal from said at least one device, - determine a new event from said new input signal, and - use said at least one output interface to control said one or more devices according to said new rule in dependence on said new event.