A computer-implemented method for creating and managing a controller based remote solution, the method comprising: receiving , at a code virtualization server, CVS, from a graphical user interface, GUI, on a user device remote to the CVS, an input of a solution designed on the GUI, the solution comprising at least one controller communicably coupled with and operable to control at least one of a sensor and an actuator, wherein the at least one controller is remote to the CVS and the user device, a condition at the sensor, an action for execution by the at least one controller, the action for operating the actuator, wherein the action is executed upon the condition being met, at least one parameter for the solution, and a function for being called by the at least one controller for being executed remotely to the at least one controller; automatically generating on the CVS, based on the input solution, a program for execution on the at least one controller, wherein the program comprises code to check if the condition is met, and to execute the action when the condition is met; embedding, in the automatically generated controller program, AGCP, a remote call from the at least one controller to the CVS for executing the function on the CVS; sending the AGCP from the CVS to a storage on the user device, or sending the AGCP from the CVS to the at least one controller, for installation on the at least one controller; receiving, at the CVS from the at least one controller, the remote call for executing the function; and executing the function on the CVS, wherein executing the function further comprises provisioning a remote service, wherein the remote service is other than a service provided by the at least one controller or the CVS. receiving , at a code virtualization server, CVS, from a graphical user interface, GUI, on a user device remote to the CVS, an input of a solution designed on the GUI, the solution comprising at least one controller communicably coupled with and operable to control at least one of a sensor and an actuator, wherein the at least one controller is remote to the CVS and the user device, a condition at the sensor, an action for execution by the at least one controller, the action for operating the actuator, wherein the action is executed upon the condition being met, at least one parameter for the solution, and a function for being called by the at least one controller for being executed remotely to the at least one controller; at least one controller communicably coupled with and operable to control at least one of a sensor and an actuator, wherein the at least one controller is remote to the CVS and the user device, a condition at the sensor, an action for execution by the at least one controller, the action for operating the actuator, wherein the action is executed upon the condition being met, at least one parameter for the solution, and a function for being called by the at least one controller for being executed remotely to the at least one controller; automatically generating on the CVS, based on the input solution, a program for execution on the at least one controller, wherein the program comprises code to check if the condition is met, and to execute the action when the condition is met; embedding, in the automatically generated controller program, AGCP, a remote call from the at least one controller to the CVS for executing the function on the CVS; sending the AGCP from the CVS to a storage on the user device, or sending the AGCP from the CVS to the at least one controller, for installation on the at least one controller; receiving, at the CVS from the at least one controller, the remote call for executing the function; and executing the function on the CVS, wherein executing the function further comprises provisioning a remote service, wherein the remote service is other than a service provided by the at least one controller or the CVS. <EOS>