1. A method for controlling at least one device in at least one building, the method comprising: selectively transferring, by a control system comprising a server and a gateway, via a control command, at least one application from being activated at the server to being activated at the gateway or from being activated at the gateway to being activated at the server based on at least one transfer rule, wherein the at least one application is preinstalled both on the server and on the gateway; and controlling, by the control system, the at least one device via the at least one application.