ESP-LC
VLight is a universal, production-grade distributed smart lighting system for the entire Espressif ESP32 microcontroller family (esp32, esp32s2, esp32s3, esp32c3, esp32c6).
Get ESP-LC
Build 6 · 20 Oct 2026 · Newest test build, not an official version
💡 VLight — Universal ESP32 Smart Lighting Ecosystem
VLight is a universal, production-grade distributed smart lighting system for the entire Espressif ESP32 microcontroller family (esp32, esp32s2, esp32s3, esp32c3, esp32c6).
Instead of requiring developers and users to set up complex embedded toolchains, compile C/C++ or transpile code for every unique strip setup, VLight provides ready-to-flash premade universal firmware builds for all ESP32 variants. Once flashed, the chip dynamically initializes as a lighting node, pairs to the server with a single press of the physical BOOT button, and allows full hardware customization—including LED data GPIO pin, pixel count, name, and room assignment—directly over-the-air from the VLight Android App.
For power users and embedded engineers, the complete V-Language Embedded SDK is preserved for building custom firmware logic.
🏛️ Ecosystem Architecture
┌────────────────────────────────────────┐
│ VLight Android Application │
│ (Kotlin + Jetpack Compose M3) │
│ │
│ • Dynamic GPIO Data Pin Selection │
│ • LED Strip Pixel Count Configuration │
│ • Real-Time Color, Brightness & Scenes│
└───────────────────▲────────────────────┘
│ REST API / WebSocket (:8080)
▼
┌─────────────────────────────────────────────────────────────────────────────┐
│ VLight Linux Server Daemon │
│ │
│ ┌───────────────────────┐ ┌───────────────────────┐ ┌───────────────────┐ │
│ │ Discovery Engine │ │ Security & Pairing │ │ Orchestrator │ │
│ │ (UDP Broadcast :9123)│ │ (BOOT Button Enroll) │ │ (Groups & Scenes) │ │
│ └───────────────────────┘ └───────────────────────┘ └───────────────────┘ │
│ ┌───────────────────────────────────────────────────────────────────────┐ │
│ │ VEB REST & WebSocket API • SQLite WAL Persistence & Rich Logging │ │
│ └───────────────────────────────────────────────────────────────────────┘ │
└───────────────────────────────────────▲─────────────────────────────────────┘
│ UDP Beacon & Config Sync (:9123)
▼
┌─────────────────────────────────────────────────────────────────────────────┐
│ Universal ESP32 Lighting Node (Premade Firmware) │
│ │
│ • Universal Flash Image: Ready-to-flash (ESP32, S2, S3, C3, C6) │
│ • Physical BOOT Button: One-press instant server enrollment │
│ • NVS Flash Persistence: Stores GPIO pin & LED count over-the-air │
│ • WS2812B Hardware Driver: Dynamic RMT peripheral re-init on pin change │
│ • Advanced Path: Full V-Language SDK for custom logic & emulation │
└─────────────────────────────────────────────────────────────────────────────┘
⚡ Premade Firmware Matrix
Prebuilt, unified flash images are provided under firmware/bin/<chip>/ and built automatically on every commit via OneDev CI:
| Chip Target | Architecture | Cores / Clock | Default Pin | BOOT Button | Flash Image | Flashing Offset |
|---|---|---|---|---|---|---|
| ESP32 | Xtensa LX6 | Dual @ 240MHz | GPIO 18 | GPIO 0 | firmware/bin/esp32/merged.bin |
0x0000 |
| ESP32-S2 | Xtensa LX7 | Single @ 240MHz | GPIO 18 | GPIO 0 | firmware/bin/esp32s2/merged.bin |
0x0000 |
| ESP32-S3 | Xtensa LX7 | Dual @ 240MHz | GPIO 18 | GPIO 0 | firmware/bin/esp32s3/merged.bin |
0x0000 |
| ESP32-C3 | RISC-V RV32IMC | Single @ 160MHz | GPIO 18 | GPIO 0 | firmware/bin/esp32c3/merged.bin |
0x0000 |
| ESP32-C6 | RISC-V RV32IMAC | Single @ 160MHz | GPIO 18 | GPIO 9 | firmware/bin/esp32c6/merged.bin |
0x0000 |
| Server | Linux x86_64 | Standalone Daemon | Port 8080 | UDP 9123 | firmware/bin/server/vlight-server |
— |
| Flasher / CLI | All Platforms | Flashing Binary & CLI | — | Auto-Detect | firmware/bin/flasher/vlight |
— |
🚀 3-Step Quick Start
1. Flash Premade Firmware to Your ESP32
Connect your ESP32 board via USB. Compatible with PlatformIO Core (pio) and esptool:
# Flash connected chip in 1 command (auto-detects serial port & uses pio or esptool):
./vlight flash esp32
# Or when using the downloaded artifact:
./firmware/bin/flasher/vlight flash esp32s3
2. Pair with Server via Physical BOOT Button
- Start the server coordinator daemon:
./vlight-server serve --port 8080 - Press the BOOT button on your ESP32 board.
- The server logs the enrollment in real time:
2026-10-20 21:08:15 [PAIRING] Physical BOOT button pressed on node "VLight Node" (ESP32S3)! Enrolling into cluster... 2026-10-20 21:08:15 [PAIRING] Node node_a7b8 authorized with HMAC token. Active session established.
3. Configure Hardware via Android App
- Open the VLight Android App.
- Select your newly paired node from the dashboard.
- In Hardware & Strip Setup, set your desired:
- GPIO Data Pin (e.g.,
18,21,4) - LED Pixel Count (e.g.,
60,144,300) - Node Name & Room
- GPIO Data Pin (e.g.,
- Tap Save Configuration to Chip (NVS). The server persists the settings to SQLite and the ESP32 reconfigures its hardware driver over-the-air!
📚 In-Depth Documentation Index
All detailed technical specifications, firmware authoring tutorials, protocol RFCs, and troubleshooting guides are located in the .docs/ directory:
| Document | Description |
|---|---|
| 📖 Universal Firmware & Flashing Guide | Full guide on premade firmware, 1-command flashing, BOOT button pairing, Android app pin/count configuration, and custom firmware development in V. |
| 🏗️ System Architecture | Comprehensive audit of system subsystems, data flows, thread models, and database schema. |
| 🔌 Embedded V SDK Reference | API documentation for vlight, vlight.led, and vlight.effects modules. |
| 🔐 Network & Security Protocol | Specification of UDP discovery beacons, physical BOOT button pairing, and encrypted command tokens. |
| ⚡ Supported Hardware Targets | Detailed capability matrix, pinout assignments, and strapping pin safety guards across the ESP32 family. |
| 🤝 Node Provisioning & Pairing | Step-by-step physical pairing and cluster enrollment runbook. |
| 🛠️ Troubleshooting Runbook | Diagnostic matrix, recovery procedures, and common failure resolutions. |
🛠️ Developer Commands
For advanced developers customizing firmware or running headless tests:
# Verify system toolchains (V, GCC, PlatformIO, esptool, esp-emu)
./vlight doctor
# Build premade binaries for all chips
./vlight build-premade --target all
# Emulate firmware locally in esp-emulator (no physical hardware required)
./vlight emulate --target esp32c3 --exit-on "Returned from app_main()"
# Run automated firmware emulator test suite
./vlight test-firmware
# Run server cluster test suite
v -path "server:@vlib" run tests/test_e2e_cluster.v
📂 Repository Layout
ESP-LC/
├── README.md # High-level system portal & quick reference
├── LICENSE # MIT License
├── .docs/ # In-depth technical documentation & manuals (Strictly in .docs/)
│ ├── docs.json # Documentation navigation manifest
│ ├── firmware-guide.md # Complete in-depth guide to premade firmware & custom development
│ ├── architecture.md # Detailed system design & audit
│ ├── sdk-guide.md # Embedded V SDK reference
│ ├── protocol.md # Network & security specification
│ ├── supported-targets.md # Target capability & pin matrix
│ ├── provisioning.md # Physical pairing & security
│ └── troubleshooting.md # Debugging & recovery runbook
├── firmware/
│ ├── bin/ # Universal ready-to-flash premade distribution artifacts
│ │ ├── esp32/ # Premade ESP32 firmware (bootloader, partitions, merged.bin)
│ │ ├── esp32s2/ # Premade ESP32-S2 firmware
│ │ ├── esp32s3/ # Premade ESP32-S3 firmware
│ │ ├── esp32c3/ # Premade ESP32-C3 firmware
│ │ ├── esp32c6/ # Premade ESP32-C6 firmware
│ │ ├── server/ # Production Linux Server binary (vlight-server)
│ │ └── flasher/ # Standalone flashing binary (vlight)
│ ├── generic/ # Universal generic node firmware source (V + NVS + BOOT pairing)
│ └── examples/ # Standalone example firmware projects (ws2812b, minimal)
├── sdk/ # VLight Embedded SDK modules (led, effects, vlight)
├── tools/
│ └── vlight-cli/ # `vlight` CLI toolchain source
├── server/ # VLight Linux server daemon source (VEB + SQLite + Discovery)
├── android/ # Native Android application (Kotlin + Compose)
├── .onedev-buildspec.yml # CI/CD workflow building Android APK & universal firmware binaries
└── tests/ # Unit, cluster, and emulator test suites