The growth of the Internet of Things (IoT) to be implemented for smart homes still increases. In the smart home area, the IoT has a task to control every electricity automatically. Not only that, the IoT gives the convenience for users to control manually all the electricity in their homes remotely. One of the important things that makes the IoT concept very needed in smart homes can be used to monitor the environment through sensors. The sensor can also be utilized for security systems, especially to monitor the presence of intruders. In the previous research, several ways to provide more protection in the room are by changing the door lock from mechanical conventional to automatic. A Keypad module for typing passwords and biometric recognition was also proposed to secure the door. The room's monitoring system based-on camera for object detection was also proposed. By using the camera to detect an intruder, it needs huge computational resources. The detection times were also considered. To provide the fastest and low-cost model to detect the presence of intruders this study proposes a security monitoring system based on IoT composed of edge devices based on ESP8266 that are equipped with an ultrasonic sensor of HC-SR04 as an input sensor, and for the user Interface the based-on Java application is included. The ultrasonic sensor is used to measure a distance. When the intruder is assumed to pass through the front of the ultrasonic sensor, the edge device will read the change in distance and send the warning signal to the monitoring system based on Java. With a satisfactory result, this model can detect the presence of intruders with a speed of only 274.798 milliseconds.