This project implements a home automation system using an ESP32 Dev Module. Follow the instructions below to set up and run the project.
- ESP32 Dev Module
- USB Cable for programming
- Your home automation peripherals (relays,four male to female connecting wires)
-
Install Visual Studio Code
- Download and install VSCode from https://code.visualstudio.com/
-
Install PlatformIO Extension
- Open VSCode
- Go to Extensions (Ctrl+Shift+X)
- Search for "PlatformIO IDE"
- Click Install
-
Clone/Setup the Project
- Clone this repository or download the code
- Open VSCode
- Click "Open Folder" and select the project directory
-
Configure the Project
- Open
platformio.ini
to verify the configuration - Update the WiFi credentials in the code (change your wifi ssid and password)
- The default board configuration should be:
[env:esp32dev] platform = espressif32 board = esp32dev framework = arduino
- Open
-
Install Dependencies
- PlatformIO will automatically install required dependencies
- Wait for the process to complete (check the PlatformIO status bar)
-
Connect ESP32
- Connect your ESP32 to your computer via USB
- Windows should automatically install drivers
- If not, install CP210x USB driver manually
-
Select COM Port
- Device Manager will show the COM port
- Note this port number for troubleshooting
-
Upload Code
- Click the PlatformIO Upload button (→) or
- Use Ctrl+Alt+U to upload(or choose upload framework image from the platformio menu)
- After uploading, open Serial Monitor in VSCode
- The ESP32 will print its IP address (e.g.,
192.168.178.81
) - Open your web browser and enter this IP address
- The web interface will be accessible on your local network
-
If upload fails:
- Check USB connection
- Verify COM port
- Hold BOOT button while uploading
- Press EN (reset) button after upload
-
If web interface is not accessible:
- Verify WiFi credentials
- Check ESP32's IP address in Serial Monitor
- Ensure you're on the same network
For issues and questions, please open an issue in the repository.