This work discuss the compatibility an integration between systems and devices for home automation, proposing ways to improve it. This integration tends to become a complex task due to the wide variety of integration standards and technologies adopted in home automation. This paper proposes an extension of the standard Universal Plug and Play (UPnP) and the use of a modular architecture with two layers in order to adapt it to the integration of home automation subsystems. This extended standard is then used in the upper layer for the control and integration of the subsystems. In the bottom layer, each subsystem uses the most appropriate communication technology to control their devices, it has an UPnP interface to communicate with other subsystems and allow user control. Thus subsystems become modules of the home automation system. This proposal allows the user to easily purchase and replace subsystems from different manufacturers, in order to integrate them transparently, resulting in a flexible home automation system and independent of manufacturer. To test the proposed extension, a use case of an illumination subsystem was created and software simulations were carried out. The simulation results were presented and analyzed, verifying the compliance with the system requirements and whether the desired characteristics have been achieved, such as the subsystem plug and play feature, the modularity and flexibility enhancement of the system, to facilitate the purchase and maintenance of the home automation system, generating the potential to foster greater adoption of home automation systems. However, the proposed extension also results in increased complexity of the UPnP client that uses it to interact with the system, which can hinder the adoption of home automation systems in the future. Finally, future suggestions and perspectives were presented.