The UPnP architecture defines the communication protocol for networked control point and devices. Exploiting UPnP technologies, home users can easily control intelligent devices through control points. However, these devices lack a composition mechanism to complete a novel application or value-added service. In this paper, we propose a dynamic service composition system to coordinate primitive UPnP services. Action patterns probing (APP) algorithm is introduced to predict the action and the data flow with satisfactory accuracy. Initially, we define data type ontology for UPnP devices to describe their service interfaces. Then service graph construction is used to describe which services can be composed together. After analyzing user’s action patterns, we can find the devices which can be composed and worked together in common use. These devices can be composed dynamically by user’s habits and can be automated by our mechanism.