In this paper, a novel approach is presented to identify the smart home residents. The different behavioral patterns of smart home’s inhabitants are exploited to distinguish the residents. The variation of a specific individual behavior in smart homes is a significant challenge. We introduce different features that are useful to handle this problem. Moreover, we introduce an innovative strategy which considers the Bag of Sensor Events and Bayesian networks. In the Bag of Sensor Events approach, the frequency of each sensor event occurrence is considered, regardless of the order of sensor events. The efficiency of the Bag of sensor Events approach is compared to the Sequence of Sensor Events. Our experiments confirm that the Bag of Sensor Events approach outperformed the previous approaches. When the smart homes residents are people who repeat their daily activities frequently, applying the Bag of Sensor Events on Activity Based Window Frame features, which considers the performed daily activities, would identify them more accurately. In contrast, in cases where residents perform their activities in different ways, considering the Time Based Window Frame leads to higher accuracy in distinguishing residents. In this approach, the features are created by considering the constant time intervals. The F-measure of our proposed approach on the Twor2009, Tulum2009, and Tulum2010 datasets is 96%, 100%, and 99%, respectively, which improves the results of the previous researches which consider behavioral patterns to identify smart home residents. © 2019, Springer-Verlag London Ltd., part of Springer Nature.