Ambient intelligence (Aml) worlds consist of heterogeneous collections of interconnected devices that integrate smoothly in the environment to offer services to their users. These devices can be added, change or fail, modifying the system topology. Also, other circumstances may change, affecting users' activities, e.g., time, location, or the presence of other users. These changes modify the information the system has available to satisfy users' needs, i.e., the context. Aml systems need to adapt to these evolving conditions in order to be able to provide their services, but being as unobtrusive as possible for their users. There are also performance requirements that the system must fulfill to provide responses to environment stimuli in real time. Opportunistic control mechanisms address these issues by monitoring the context, and suspending or resolving goals when the appropriate conditions are met. This paper presents FAERIE, a software framework that supports the development of Aml applications with facilities for context management that rely on opportunistic control. The development of FAERIE systems uses a 3D simulator tool for testing and validation called UbikSim. A case study on an artistic installation illustrates the use of this infrastructure. (C) 2013 Elsevier Ltd. All rights reserved.