Initial commit: Olimex ESP32-C6-EVB HA integration + Arduino sketch
This commit is contained in:
107
custom_components/olimex_esp32_c6/README.md
Normal file
107
custom_components/olimex_esp32_c6/README.md
Normal file
@@ -0,0 +1,107 @@
|
||||
# Olimex ESP32-C6-EVB Home Assistant Integration
|
||||
|
||||
This is a custom integration for the **Olimex ESP32-C6-EVB** board featuring the **Espressif ESP32-C6 WROOM-1** chip.
|
||||
|
||||
## Board Specifications
|
||||
|
||||
- **Manufacturer**: Olimex
|
||||
- **Model**: ESP32-C6-EVB
|
||||
- **Chip**: ESP32-C6 WROOM-1
|
||||
- **Features**:
|
||||
- Wi-Fi 6 (802.11ax)
|
||||
- Bluetooth 5.3 (LE)
|
||||
- RISC-V 32-bit single-core processor
|
||||
- Multiple I/O pins
|
||||
- Relays and GPIO control
|
||||
|
||||
## Installation
|
||||
|
||||
1. Copy the `olimex_esp32_c6` folder to your `custom_components` directory
|
||||
2. Restart Home Assistant
|
||||
3. Add the integration through the UI: Configuration → Integrations → Add Integration → "Olimex ESP32-C6-EVB"
|
||||
|
||||
## Configuration
|
||||
|
||||
Enter the IP address and port (default 80) of your ESP32-C6-EVB board.
|
||||
|
||||
## ESP32 Firmware Development
|
||||
|
||||
### Required API Endpoints
|
||||
|
||||
Your ESP32 firmware should implement these HTTP endpoints:
|
||||
|
||||
#### Status Endpoint
|
||||
```
|
||||
GET http://<IP>:<PORT>/api/status
|
||||
Response: {
|
||||
"temperature": 25.5,
|
||||
"wifi_rssi": -45
|
||||
}
|
||||
```
|
||||
|
||||
#### Relay Control
|
||||
```
|
||||
POST http://<IP>:<PORT>/api/relay/<relay_id>/on
|
||||
POST http://<IP>:<PORT>/api/relay/<relay_id>/off
|
||||
GET http://<IP>:<PORT>/api/relay/<relay_id>/status
|
||||
Response: {"state": true}
|
||||
```
|
||||
|
||||
#### LED Control
|
||||
```
|
||||
POST http://<IP>:<PORT>/api/led/<led_id>/on
|
||||
POST http://<IP>:<PORT>/api/led/<led_id>/off
|
||||
```
|
||||
|
||||
### Development Tools
|
||||
|
||||
- **ESP-IDF**: Espressif's official IoT Development Framework
|
||||
- **Arduino IDE**: With ESP32 board support
|
||||
- **PlatformIO**: Advanced IDE for embedded development
|
||||
|
||||
### Example Arduino Sketch Structure
|
||||
|
||||
```cpp
|
||||
#include <WiFi.h>
|
||||
#include <WebServer.h>
|
||||
|
||||
WebServer server(80);
|
||||
|
||||
void handleStatus() {
|
||||
String json = "{\"temperature\": 25.5, \"wifi_rssi\": " + String(WiFi.RSSI()) + "}";
|
||||
server.send(200, "application/json", json);
|
||||
}
|
||||
|
||||
void setup() {
|
||||
WiFi.begin("SSID", "PASSWORD");
|
||||
server.on("/api/status", handleStatus);
|
||||
server.begin();
|
||||
}
|
||||
|
||||
void loop() {
|
||||
server.handleClient();
|
||||
}
|
||||
```
|
||||
|
||||
## Features
|
||||
|
||||
- Temperature monitoring
|
||||
- WiFi signal strength
|
||||
- Relay control
|
||||
- LED control
|
||||
- Extensible for GPIO, ADC, and other peripherals
|
||||
|
||||
## TODO
|
||||
|
||||
- [ ] Implement actual ESP32 firmware with REST API
|
||||
- [ ] Add support for more sensors
|
||||
- [ ] Add button entities for GPIO inputs
|
||||
- [ ] Implement OTA updates
|
||||
- [ ] Add MQTT support as alternative to HTTP
|
||||
- [ ] Add ESPHome configuration option
|
||||
|
||||
## Resources
|
||||
|
||||
- [Olimex ESP32-C6-EVB Documentation](https://www.olimex.com/Products/IoT/ESP32-C6/ESP32-C6-EVB/)
|
||||
- [ESP32-C6 Technical Reference](https://www.espressif.com/en/products/socs/esp32-c6)
|
||||
- [Home Assistant Custom Integration Documentation](https://developers.home-assistant.io/)
|
||||
Reference in New Issue
Block a user