The security and comfort of homes are fundamental needs that have become increasingly urgent with the advancement of technology. According to fire data released by the Pekalongan City Government in 2023, there were 101 reported cases of fires in Pekalongan, a threefold increase from 38 incidents in 2022. This study aims to design and implement a smart home system for detecting potential fires based on the Internet of Things (IoT) using NodeMCU ESP8266, ThingSpeak, and sensors including MQ2, flame sensors, and DHT11. The development method employs a prototyping model, supported by interviews with firefighters to identify relevant fire variables and ensure the system design meets user needs through hardware experimentation. Testing results indicate that the flame sensor can detect flames of 1.5 cm in length at a distance of up to 15 cm, with an average response time of 7.22 seconds to send notifications to WhatsApp. It can also detect flames of 3 cm in length at a distance of up to 50 cm, with an average response time of 8.79 seconds. The MQ2 sensor successfully detects gas concentrations above a value of 35, sending notifications to WhatsApp with an average response time of 8.89 seconds. Sensor data is visualized in real-time through ThingSpeak. Based on usability testing results, 68% of respondents expressed agreement, 24% were neutral, and 8% disagreed. The conclusion of this study is that the system can serve as an innovative alternative to create a safer and more efficient home environment. This research is expected to contribute to the development of smart home technology in Indonesia