Nowadays, the computational devices are everywhere. In malls, offices, streets, cars, and even homes, we can find devices providing and consuming functionality to improve the user satisfaction. These devices include sensors that provide information about the environment state (e.g., temperature, occupancy, light levels), service providers (e.g., Internet TVs, GPS), smartphones (that contain user preferences), and actuators that act on the environment (e.g., closing the blinds, activating the alarm, changing the temperature). Although these devices exhibit communication capabilities, their integration into a larger monitoring system remains a challenging task, partly because of the strong heterogeneity of technologies and protocols. Therefore, in this article, we focus on home environments and propose a middleware solution, called DigiHome, that applies the Service Component Architecture (SCA) component model to integrate data and events generated by heterogeneous devices in this kind of environments. DigiHome exploits the SCA extensibility to incorporate the REpresentational State Transfer (REST) architectural style and, in this way, leverages on the integration of multiscale systems-of-systems (from wireless sensor networks to the Internet). Additionally, the platform applies Complex Event Processing technology that detects application-specific situations. We claim that the modularization of concerns fostered by DigiHome and materialized in a service-oriented architecture, makes it easier to incorporate new services and devices in smart home environments. The benefits of the DigiHome platform are demonstrated on smart home scenarios covering home automation, emergency detection, and energy saving situations. Copyright © 2011 John Wiley & Sons, Ltd.