Zum Inhalt

INVERTER-ESP Quick Start Guide

Get started with INVERTER-ESP in 5 minutes.


🎯 What is INVERTER-ESP?

Solar inverter monitoring system with: - ESP32-S3 microcontroller - E-Paper 2.9" display (296Γ—128 pixels) - WiFi connectivity for cloud data upload - SolarLog API integration for data storage - 3 physical buttons for navigation


πŸ“‹ Before You Start

⚠️ CRITICAL: Research Required

You MUST complete these research tasks before coding:

  1. SolarLog API: Visit https://solarlog-api.karma.organic/docs
  2. Get API key
  3. Document authentication method
  4. Test with curl

  5. Solar Inverter: Identify your inverter model

  6. Brand/Model: ____
  7. Protocol: HTTP / Modbus / MQTT / Other?
  8. How to connect: IP address / Serial / Cloud?

  9. Hardware Verification: Check Elecrow wiki

  10. Verify E-Paper SPI pins
  11. Verify button GPIO pins
  12. Test with example sketch

See AGENT_HANDOVER.md for detailed research tasks.


πŸš€ Option 1: Simulator (Desktop Development)

Best for UI development without hardware.

Prerequisites

# macOS
brew install swift sdl2

# Linux
sudo apt install swift libsdl2-dev

Steps

# 1. Navigate to project
cd /path/to/INVERTER-ESP

# 2. Copy LVGL infrastructure from DeINER
cp -r ../SwiftLVGL-Platform/Sources/CLVGL simulator/Sources/
cp -r ../SwiftLVGL-Platform/Sources/SwiftLVGL simulator/Sources/

# 3. Create Package.swift (adapt from DeINER)
# See AGENT_HANDOVER.md for details

# 4. Build
cd simulator
swift build

# 5. Run
swift run INVERTER-Simulator

Expected: SDL2 window opens showing 296Γ—128 E-Paper simulation.


πŸ”§ Option 2: ESP32 Firmware (Hardware)

Best for final deployment and testing.

Prerequisites

# Install PlatformIO
pip install platformio

# Or use VS Code extension: PlatformIO IDE

Steps

# 1. Navigate to firmware
cd /path/to/INVERTER-ESP/firmware

# 2. Edit config (WiFi, API key)
nano src/config.h

# 3. Connect ESP32 via USB-C

# 4. Build
pio run

# 5. Flash
pio run --target upload

# 6. Monitor
pio device monitor

Expected: Serial output shows WiFi connected, API upload success, display updated.


πŸ“š Documentation

File Purpose
README.md Project overview
HARDWARE.md Hardware specs & pinout
API_INTEGRATION.md SolarLog API documentation
DEPLOYMENT.md ESP32 flash & deployment guide
ARCHITECTURE.md System design & data flow
AGENT_HANDOVER.md Current status & next steps
TODO.md Complete task checklist

πŸ› Common Issues

Simulator won't build

  • βœ… Install SDL2: brew install sdl2
  • βœ… Copy CLVGL and SwiftLVGL from DeINER
  • βœ… Check Package.swift configuration

ESP32 won't flash

  • βœ… Check USB cable (data-capable, not charge-only)
  • βœ… Install USB-UART drivers (CH340 or CP2102)
  • βœ… Hold Boot button (GPIO0) while connecting

Display not working

  • βœ… Verify E-Paper SPI pins (see HARDWARE.md)
  • βœ… Test with Elecrow example sketch
  • βœ… Check BUSY pin (GPIO7) is not stuck HIGH

WiFi won't connect

  • βœ… Verify SSID/password in config.h
  • βœ… Check router supports 2.4GHz (no 5GHz on ESP32)
  • βœ… Move ESP32 closer to router

API upload fails (401)

  • βœ… Verify API key is correct
  • βœ… Check API endpoint URL
  • βœ… Test with curl first

πŸ“ž Need Help?

  1. Read Documentation: Check AGENT_HANDOVER.md for detailed info
  2. Check TODO: See TODO.md for task breakdown
  3. Hardware Issues: Check HARDWARE.md
  4. API Issues: Check API_INTEGRATION.md
  5. CrowPanel Wiki: https://www.elecrow.com/wiki/CrowPanel_ESP32_E-paper_2.9-inch_HMI_Display.html

🎯 Next Steps

Choose your path:

  1. Read AGENT_HANDOVER.md
  2. Complete Research Phase (API, Inverter, Hardware)
  3. Copy CLVGL/SwiftLVGL from DeINER
  4. Create Package.swift
  5. Implement Dashboard screen
  6. Test in SDL2 window

Path B: Start with ESP32 Firmware

  1. Read DEPLOYMENT.md
  2. Create platformio.ini
  3. Create config.h (WiFi, API key)
  4. Port UI screens from simulator
  5. Test on hardware

Estimated Timeline: - Research Phase: 1-2 days ⚠️ CRITICAL - Simulator Development: 7-10 days - ESP32 Firmware: 10-14 days - Testing & Deployment: 5-7 days - Total: 3-4 weeks


Last Updated: 2025-10-23
Status: 🚧 Ready to Start
First Task: Research Phase (see TODO.md)