This is an ESP32 PlatformIO project for an automated swing gate controller (Sommer Twist 350).
Only the ESP32 firmware is in scope. Ignore the librepcb/, home-assistant/, and enclosure/ directories.
Detailed requirements, design, and implementation tasks are in:
.kiro/specs/esp32-swing-gate-controller/requirements.md— functional requirements.kiro/specs/esp32-swing-gate-controller/design.md— architecture, classes, state machine, wiring.kiro/specs/esp32-swing-gate-controller/tasks.md— implementation plan with checkboxes
All firmware source files are in src/:
esp32-swing-gate.ino.cpp— main sketch (setup/loop)gate.cpp/gate.h— gate state machine and relay controlledmanager.cpp/ledmanager.h— LED status indicatorsmqttmanager.cpp/mqttmanager.h— MQTT over Ethernet (PubSubClient + W5500)config.h— compile-time configuration (MQTT, OTA) via build flags
platformio.ini— PlatformIO project config with two environments:esp32andesp32_wokwiprivate_config.ini— local build flags (gitignored), copy fromprivate_config.template.iniprivate_config.template.ini— template forprivate_config.ini
The esp32 environment requires private_config.ini for build flags (OTA_USERNAME, OTA_PASSWORD, MQTT settings).
The esp32_wokwi environment has its own hardcoded build flags for simulation.
- Activate the Python virtual environment:
source .venv/bin/activate - Build all environments:
pio run - Build a specific environment:
pio run -e esp32orpio run -e esp32_wokwi
- Platform: ESP32 (espressif32 via pioarduino)
- Framework: Arduino
- Python: 3.13 (see
.python-version), venv in.venv/ - Board: esp32dev
- Serial baud rate: 115200