The proliferation of smart devices in recent years has led to novel smart home applications that upgrade traditional home appliances to intelligent units and automatically adapt their services without human assistance. In a smart home system, a central gateway is required to coordinate the functions of various smart home devices and allow bidirectional communications. However, the gateway may cause leakage of sensitive information unless proper privacy protections are applied. In this work, we first introduce a smart home model based on fog computing and secured by differential privacy. Then, we apply a personalized differential privacy scheme to provide privacy protection. Furthermore, we consider a collusion attack and propose our differential privacy model called APDP based on a modified Laplace mechanism and a Markov process to strengthen privacy protection, thus resisting the attack. Lastly, we perform extensive experiments based on the real-world datasets to evaluate the proposed APDP model.