The recent trend of ubiquitous access to embedded physical devices over the Internet as well as increasing penetration of wireless protocols such as ZigBee has raised attention to smart homes. These systems consist of sensors, devices and smart appliances that can be monitored and controlled remotely by human users and cloud services. However, the lack of a de facto communication standard for smart homes creates a barrier against the interoperability of devices from different vendors. We address this challenge by proposing a holistic, extensible software architecture that seamlessly integrates heterogeneous protocol- and vendor-specific devices and services, while making these services securely available over the Internet. Our architecture is developed on top of the OSGi framework and incorporates a semantic model of a smart home system. As a result, we achieve semantic interoperability – the ability to integrate new applications and drivers into the deployed system during runtime. Furthermore, we integrate a new access control model for specific smart home scenarios. As a proof of our concept, we demonstrate the seamless semantic discovery of home devices at runtime by integrating several protocols including X10, Insteon, ZigBee and UPnP into a real test. Using smart phones and cloud services together with our home gateway implementation, we further demonstrate the ease of integration of new applications and drivers.