Abstract: Smart Environments (SE) aim to satisfy the experience of individuals by the provision of systems, services and devices. Although many approaches may be followed in order to build a SE, a service-based design is the most promising one nowadays. In these architectures, both physical devices and even humans may provide low-level services based on their capabilities. These low-level services are composed and connected in order to create high-level services, employed by managers to describe the behavior of the SE. This composition process traditionally requires the human intervention, so changes in services are not automatic. However SE should operate at real-time, thus the collection of available services must be always updated. In the state of the art this challenge has been only partially covered, and proposed solutions are still heavy and manual. Therefore, in this work we propose a new fast semi-automatic self-configuration (and automatic self-adaptation) technology for service-oriented SE. The proposed technology is based on the definition of templates at different levels which are related by means of semantic information. Moreover, simple binary mathematical operations are included in order to reduce the convergence time and improve the scalability. A first reduced extension for hybrid approaches (including both humans and physical devices) is also provided. Finally, an experimental validation is conducted in order to evaluate the convergence time of the proposed solution in different scenarios, and demonstrate it is scalable towards future deployments involving thousands of devices and (possibly) humans.