This research aims to design and implement an automation system for controlling electrical devices and door locking based on an ESP32 microcontroller with support for Bluetooth Low Energy (BLE) technology. The system was realized in prototype form using the iTag device as a communication medium between the user and the ESP32. The main aim of this system is to increase energy efficiency and room security through automatic control of electrical devices and a door locking mechanism when the room is not in use. Registered iTag devices will be connected to the ESP32 through the BLE pairing process, enabling detection of the user's presence within a 3 meter radius. When a user is detected, the system automatically activates the electrical device and unlocks the door; instead, the device will be disabled and the door locked when the user leaves the area. System testing was carried out to evaluate the BLE signal range and system response to various environmental conditions. Test results show that the system is able to detect iTag devices up to a maximum distance of 12 meters without physical obstacles and 9 meters with wall obstacles.