There have been many researches to detect and recover from faults on smart home environment, because these faults should lower its reliability. while, most of these researches have addressed functional defects of devices or software malfunction, few attempts have been made to deal with faults which may occur due to the inter relationships among devices. In this paper, we define the relationships among devices as rules, and propose a method for generating fault diagnosis knowledge which defines the symptoms and causes of faults. We classify the contexts of devices into two sets, depending on whether it satisfies the rules or not. when this method is applied to smart home environment, it is feasible not only to detect faults that may occur due to the relationships among devices but to identify their causes at real time.