The Internet of Things supports various industrial applications. The cooperation and coordination of smart things are a promising strategy for satisfying requirements that are beyond the capacity of a single smart thing. One of the major challenges for todays software engineering is the management of large and complex computing systems characterized by a high degree of physical distribution. Examples of such systems arise in many application domains. The number of connected devices grows from billions to hundreds of billions, so a maximum of automatisms must be integrated in IoT architectures in order to control and manage them. Software architects migrate to service oriented architecture and applications are now being constructed as service compositions. Since each IoT device includes one or more microservices, the increasing number of devices around the user makes them difficult to assemble in order to achieve a common goal. In this paper, we propose a self-assembling solution based on self-controlled service components taking into account non-functional requirements concerning the offered quality of services and the structuration of the resulting assembly. Its aim is to build and maintain an assembly of services (taking into account arrival of new peers or failure of existing ones) that, besides functional requirements, also fulfils global quality-of-service and structural requirements.