Add modular configuration system with multi-board support#16
Add modular configuration system with multi-board support#16josefelixh wants to merge 4 commits into
Conversation
Introduces a flexible, modular ESPHome configuration architecture that supports multiple ESP board types and optional features. ## New Files ### Core Configuration - neato-esp-modular.yaml: Main modular configuration file with easy board selection and optional feature toggles - secrets.yaml.example: Template for user secrets with clear examples ### Board Support - boards/esp32c3.yaml: ESP32-C3 configuration (recommended, ESP-IDF) - boards/esp32.yaml: Standard ESP32 configuration (ESP-IDF) - boards/esp8266.yaml: ESP8266 configuration (Arduino framework) ### Optional Features - features/captive-portal.yaml: WiFi fallback AP with captive portal - features/syslog.yaml: Remote syslog server logging support - features/debug-tools.yaml: UART command testing and debugging tools ### Helper Scripts - esphome.sh: Cross-platform bash script with Docker/native ESPHome support and automatic USB port detection (macOS/Linux/Windows Git Bash) - esphome.ps1: Native PowerShell script for Windows users ### Documentation - CONFIGURATION_GUIDE.md: Comprehensive setup and troubleshooting guide ## Key Features - **Multi-board support**: Switch between ESP32-C3, ESP32, and ESP8266 by commenting/uncommenting one line - **Optional features**: Enable/disable captive portal, syslog, and debug tools independently - **Cross-platform tooling**: Helper scripts work on macOS, Linux, and Windows (both Git Bash and PowerShell) - **Auto USB detection**: Scripts automatically detect USB serial ports for first-time firmware uploads - **Docker and native**: Scripts support both Docker and native ESPHome installations with automatic detection - **Configurable WiFi domain**: mDNS domain configurable via substitution (defaults to .lan) ## Benefits - Easier board migration without manual GPIO/framework changes - Modular feature management reduces configuration clutter - Better developer experience with USB auto-detection and unified CLI - Maintains all existing Neato robot functionality - Validated with all features enabled simultaneously 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add features/web-server.yaml for HTTP web interface - Web server allows monitoring and controlling device via browser - Accessible via http://[device-name].local or IP address - Feature is disabled by default (commented out in packages) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add diagnostics feature (WiFi signal & uptime sensors) - Add prometheus feature (metrics endpoint for monitoring) - Add hardware monitoring feature (ESP32 memory & performance sensors) - Update main config to include new optional features All features are optional and disabled by default. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
Splitting up the yaml to separate modules is a nice idea. Could we also put the neato specific config in to its own file? Then we could reference it in our local esphome config with something like this: |
|
Looks very nice and would had helped me a lot. There is no mention of Homeassistants ESPHome builder as option for compiling in the readme. |
|
sorry for never writing about it here but just in the discord, I want to implement this but want to do in in some specific ways, both splitting up the handling of uart system to cpp files but also the config files to a modular system similar to this one here, but at the same time the end user needs to be able to only input data in one file and it should compile for them. Of course if they want they can get each module as they want/please but a base should work on that simple principle. This is however not my prio task for now, I played a bit with a module config a while ago but was not able to find something that I liked, will revisit this after a ros release. |
Summary
This PR introduces a flexible, modular ESPHome configuration architecture that makes it easy to switch between different ESP board types and enable/disable optional features without manually editing GPIO pins or framework settings.
Motivation
The current single-file configuration works well but has some limitations:
This modular system addresses these pain points while maintaining full compatibility with all existing Neato robot functionality.
What's New
📦 Modular Configuration Files
neato-esp-modular.yaml: Main configuration with simple board/feature selection via commentsboards/): ESP32-C3 (recommended), ESP32, and ESP8266 with correct GPIO/framework settingsfeatures/): Captive portal, syslog remote logging, and debug toolssecrets.yaml.example: Clear template with examples for all configuration options🛠️ Cross-Platform Helper Scripts
esphome.sh: Bash script for macOS/Linux/Windows (Git Bash) with automatic USB port detectionesphome.ps1: Native PowerShell script for Windows users📚 Documentation
CONFIGURATION_GUIDE.md: Comprehensive setup guide with troubleshooting sectionKey Features
✅ Easy board switching - Change boards by commenting/uncommenting one line
✅ Modular features - Enable captive portal, syslog, or debug tools independently
✅ Auto USB detection - Scripts automatically find serial ports for first-time uploads
✅ Cross-platform - Works on macOS, Linux, and Windows (Git Bash + PowerShell)
✅ Docker + Native - Supports both Docker and pip-installed ESPHome
✅ Configurable WiFi domain - Set custom mDNS domain via substitution (defaults to
.lan)✅ Fully validated - All features tested together, maintains existing functionality
Example Usage
Switching Boards
Enabling Features
Using Helper Scripts
Testing
Future Enhancements
Potential additions (not included in this PR):
🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com