Smart home which understands user's preference and provides right services at right time is the current trend. In this paper, we aim at developing a system which can achieve this objective by using the Bayesian network to model user's preference. Instead of assuming the structure of Bayesian network is invariant, our system interacts with user appropriately to obtain some useful information and we use the semi-supervised learning with these information to both learn and adjust the Bayesian network for modeling the user's preference in a more accurate manner. We can use preference model to provide adequate service in home environment. A simulation and a real home environment are constructed based on the proposed method, and the experiments also show the usefulness.