$ show openclaw/esp-openclaw-node
This repository provides an ESP-IDF component framework (esp-openclaw-node, esp-openclaw-talk, esp-openclaw-room-node) for building IoT devices that connect to the OpenClaw gateway via WebSocket. It implements device identity (Ed25519), session persistence, command dispatch, and WebRTC audio (Talk). The room-node component adds a full voice-interactive display client with LVGL-based animated face, Canvas (image/A2UI rendering), camera snapshot, file access, and real-time diagnostics. The codebase includes multiple board-specific examples (M5Stack Tab5, Waveshare AMOLED, ESP-BOX-3, M5Stack Dial) that demonstrate reuse of the core components. Strong engineering practices are evident: extensive host-based unit tests (with fake SDK headers), CI pipelines that verify cryptographic signatures and component patches, firmware packaging with provenance manifests, and a component registry release process for versioned distribution. The architecture cleanly separates concerns via board adapter abstractions and config structs, making the core components reusable across different ESP32 hardware.
The LLM identified 4 files worth highlighting for reuse:
Core node implementation managing WebSocket transport, identity, session persistence, and command registry. Demonstrates decoupled event-driven design with a work-message queue, weak symbol hooks for testability, and clear state management. Reusable as a generic WebSocket-based gateway client for any ESP32 project.
WebRTC Talk signaling adapter with prepared-call lifecycle, generation-based fencing to discard stale callbacks, and safe teardown. Implements provider-neutral API (signaling_impl) that can be swapped for different backends. Reusable for any ESP32 project requiring WebRTC voice calls with robust concurrency handling.
Canvas component that manages LVGL-based rendering of A2UI data, images, and snapshot/restore for rollback. Handles safe pad/display locking, coordinate mappings, and periodic refreshes. Reusable as an embedded UI rendering layer for any LVGL-based project with dynamic content from remote commands.
Board adapter that implements esp_openclaw_room_node_config_t with function pointers for display, audio, camera, storage, and sensors. This pattern isolates hardware specifics from the generic room-node logic, enabling support for new boards by only implementing a thin port. Demonstrates clean separation of concerns.