The growth and popularization of wireless connectivity and mobile devices have allowed the development of smart spaces that were previously only envisaged in the approach proposed by Mark Weiser. These environments are composed of many computational resources, such as devices and applications, along with user, who must be able to associate with and use these features. However, programming these environments is a challenging task, since smart spaces have a dynamic nature and heterogeneous resources, in addition to the requirement that interactions between users and resources are performed in a coordinated way. We present a new approach for smart spaces programming using Models@RunTime. To this end, we propose a high-level modeling language, called 2SML, through which the user can model the smart space with all elements that can be part of it. Models created by the users are interpreted and e↵ected in the physical space by a model execution engine, called 2SVM, whose development is part of this work.