The development of Internet of Things (IoT) technology has enabled the creation of a smarter, more efficient, and integrated home security system. This research was conducted to design and build an IoT-based smarthome security system using an ESP32 microcontroller, with the aim of improving home security through automatic access control and fire detection. The benefit of this research is to provide a home security solution that can be monitored and controlled in real-time through the Blynk application, while increasing the response to potential hazards. The research method includes hardware design consisting of RFID module for door authentication, flame sensor for fire detection, DHT22 sensor for temperature measurement, and actuators such as solenoid door lock, servo motor, fan, motor pump, buzzer, and LED indicator. The system was tested in various ways, including RFID tag reading, flame detection, temperature response, and remote control using Blynk. The test results show that the system is able to read RFID tags with a distance of ±5 cm and a response time of <1 second, detect flames up to a distance of ±80 cm, and display sensor data in real-time on Blynk with an overall success rate of more than 95%. The system built can function properly as designed and is able to provide effective home security, both locally and remotely. Users can access information on home conditions and control devices directly anytime and anywhere. With stable performance and high success rate in various tests, this system can be an effective and practical solution to improve home security based on IoT technology