The rising interest in smart connected environments (e.g., smart buildings, cities, factories) and theevolution of sensors, data management/communication technologies have paved the way forinteresting and useful applications that help users in their every day tasks (e.g. increasing comfort,reducing energy consumption). However, various improvements are still required. For instance, howto enhance the representation of such complex, dynamic, and heterogeneous environments.Moreover, how to facilitate the interaction between users and their connected environments, and howto provide tools for environment monitoring and management.In this thesis, we focus on four main challenges: (i) representing a diverse set of components andelements related to the environment and its sensor network; (ii) providing a query language thathandles user/connected environment interactions (e.g., environment definition, data management,event definition); (iii) coping with the dynamicity of the environment and its evolution over time; and(iv) proposing a generic event detection mechanism for improved environment monitoring.To do so, we first present an ontology-based data model that represents hybrid environments/sensornetworks. Thus covering diverse sensors (e.g., static, mobile), environments (e.g., infrastructures,devices), and data (e.g., scalar, multimedia). Then, we introduce a query language that one might usefor various tasks (e.g., defining the connected environment, information retrieval, event definition,data management). Furthermore, to keep up with the environment changes we provide a queryoptimizer that allows the submitted queries to cope with the dynamicity of the environment prior totheir execution. Finally, we propose an event detection core that takes event definitions as input anddetects the targeted events.We group the aforementioned modules in one global framework for event detection in connectedenvironments. Our proposal is generic, extensible, and could be used with different connectedenvironments such as buildings, cities. . .