diff --git a/README.md b/README.md index 3f5fb4e..ed04fe3 100644 --- a/README.md +++ b/README.md @@ -2,17 +2,17 @@ > **S**Procket **OR**chestration **E**ngine -SPORE is a basic cluster orchestration engine for ESP8266 microcontrollers that provides automatic node discovery, health monitoring, and over-the-air updates in a distributed network environment. +SPORE is a cluster engine for ESP8266 microcontrollers that provides automatic node discovery, health monitoring, and over-the-air updates in a distributed network environment. ## Features -- **WiFi Management**: Automatic WiFi STA/AP configuration with hostname generation +- **WiFi Management**: Automatic WiFi STA/AP configuration with MAC-based hostname generation - **Auto Discovery**: UDP-based node discovery with automatic cluster membership - **Service Registry**: Dynamic API endpoint discovery and registration - **Health Monitoring**: Real-time node status tracking with resource monitoring - **Event System**: Local and cluster-wide event publishing/subscription - **Over-The-Air Updates**: Seamless firmware updates across the cluster -- **RESTful API**: HTTP-based cluster management and monitoring +- **REST API**: HTTP-based cluster management and monitoring ## Supported Hardware @@ -95,7 +95,7 @@ The system runs several background tasks at different intervals: "ip": "192.168.1.100", "lastSeen": 1234567890, "latency": 5, - "status": "ACTIVE", + "status": "active", "resources": { "freeHeap": 12345, "chipId": 12345678, @@ -123,10 +123,6 @@ Create a `.env` file in your project root: ```bash # API node IP for cluster management export API_NODE=192.168.1.100 - -# WiFi credentials (optional, can be configured in code) -export WIFI_SSID=your_network -export WIFI_PASSWORD=your_password ``` ### PlatformIO Configuration @@ -138,6 +134,13 @@ The project uses PlatformIO with the following configuration: - **Upload Speed**: 115200 baud - **Flash Mode**: DOUT (required for ESP-01S) +### Dependencies + +The project requires the following libraries: +- `esp32async/ESPAsyncWebServer@^3.8.0` - HTTP API server +- `bblanchon/ArduinoJson@^7.4.2` - JSON processing +- `arkhipenko/TaskScheduler@^3.8.5` - Cooperative multitasking + ## Development ### Prerequisites @@ -218,12 +221,26 @@ Each node tracks: - Flash chip size - API endpoint registry +### WiFi Fallback + +The system includes automatic WiFi fallback: +1. Attempts to connect to configured WiFi network +2. If connection fails, creates an access point +3. Hostname is automatically generated from MAC address + +## Current Limitations + +- WiFi credentials are hardcoded in `Config.cpp` (should be configurable) +- Limited error handling for network failures +- No persistent storage for configuration +- Basic health monitoring without advanced metrics + ## Troubleshooting ### Common Issues 1. **Discovery Failures**: Check UDP port 4210 is not blocked -2. **WiFi Connection**: Verify SSID/password in NetworkManager +2. **WiFi Connection**: Verify SSID/password in Config.cpp 3. **OTA Updates**: Ensure sufficient flash space (1MB minimum) 4. **Cluster Split**: Check network connectivity between nodes diff --git a/src/NodeContext..cpp b/src/NodeContext.cpp similarity index 100% rename from src/NodeContext..cpp rename to src/NodeContext.cpp