Skip to content

TechRider5/esp32-garage-controller_firmware

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# ESP32 Garage Controller Firmware ESP32 firmware for controlling garage doors via Firebase Realtime Database with WiFi status LED indicators. ## Features - **WiFi Status LED**: Slow blink while connecting, solid when connected - **Door Control**: Two garage door triggers (active LOW pulses) - **Firebase Integration**: Real-time commands via Firebase RTDB - **Secure Authentication**: Custom token exchange with Next.js API - **WiFi Manager**: Easy WiFi setup via captive portal ## Hardware Setup - **LED Pin 2**: Onboard LED (WiFi status indicator) - **Door 1 Pin 18**: Garage door trigger 1 (active LOW) - **Door 2 Pin 33**: Garage door trigger 2 (active LOW) ## Configuration 1. Copy `src/secrets.example.h` to `src/secrets.h` 2. Fill in your values: - `TOKEN_SERVER_URL`: Your Vercel domain + `/api/iot-token` - `IOT_API_KEY`: Same as in Vercel environment variables - `WEB_API_KEY`: Your Firebase Web API key - `DEVICE_ID`: Unique identifier for this device ## Building & Uploading ### Using PlatformIO CLI ```bash # Build pio run -e esp32dev # Upload pio run -e esp32dev -t upload # Monitor serial output pio device monitor --baud 115200 ``` ### Using VS Code 1. Install PlatformIO IDE extension 2. Open this folder in VS Code 3. Use PlatformIO toolbar buttons (Build, Upload, Monitor) ## WiFi Setup On first boot or if WiFi credentials are lost: 1. ESP32 creates WiFi AP: `ESP32-Setup` 2. Password: `esp32pass` 3. Connect and enter your WiFi credentials 4. Device will restart and connect to your network ## LED Status - **Slow Blink**: Connecting to WiFi or Firebase - **Solid ON**: Connected and ready - **OFF**: WiFi disconnected ## Firebase Commands The device listens for these commands in Firebase RTDB: - `doorCommand`: `"door1"` or `"door2"` to trigger doors - Commands are automatically cleared after execution ## Troubleshooting - **LED keeps blinking**: Check WiFi credentials or Firebase configuration - **No door response**: Verify Firebase RTDB rules allow writes - **Serial output**: Monitor at 115200 baud for detailed logs # esp32-garage-controller_firmware

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published