this paper describes the challenges associated with autonomous home automation systems, which can be inflexible and anxiety-provoking for users who want control over their smart home devices. To address this, the paper proposes a personalized recommender system that considers the user's current state and contextual preferences to suggest relevant automation services for smart home devices. The system uses an unsupervised algorithm to extract behavior rules from past interactions and supervised algorithms to make recommendations based on those rules. Evaluations show that the system is accurate in its recommendations, with an average accuracy of 86.99%, a recall of 76.06%, and a precision of 82.67%.