Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
b1a8218
chore: esp core upgraded
stritti May 1, 2025
1fc7671
chore: lib update
stritti May 1, 2025
abb8caf
platformio.ini aktualisieren
stritti May 1, 2025
f283bf2
platformio.ini aktualisieren
stritti May 1, 2025
58758a5
Create *.instructions.md
stritti Feb 16, 2026
3b38ee3
fix: master Branch renamed to main
stritti Feb 16, 2026
c38f09d
Add regular dependency checks (Dependabot + PlatformIO scheduled work…
Copilot Apr 6, 2026
dfc5ed5
Bump actions/checkout from 1 to 6 (#39)
dependabot[bot] Apr 26, 2026
1c074bb
Bump github/codeql-action from 1 to 4 (#41)
dependabot[bot] Apr 26, 2026
7a2c2d6
Fix failing GitHub Actions (#42)
stritti Apr 27, 2026
e8fc31a
chore: Add Dependabot configuration (#43)
stritti Apr 27, 2026
b010f19
Bump actions/github-script from 7 to 9 (#45)
dependabot[bot] Apr 27, 2026
db5dc42
Bump peter-evans/repository-dispatch from 1.1.1 to 4.0.1 (#37)
dependabot[bot] Apr 28, 2026
da1d9b9
Bump actions/setup-python from 1 to 6 (#38)
dependabot[bot] Apr 28, 2026
b5ed977
Bump actions/checkout from 4 to 6 (#44)
dependabot[bot] Apr 28, 2026
1a9bd17
fix: improve English grammar and word choice in documentation (#47)
stritti Apr 28, 2026
ea7df60
feat: consolidate CI/CD pipelines with semantic versioning and automa…
stritti Apr 28, 2026
f04450c
feat: add web-installer and release workflow for zero-touch firmware …
stritti Apr 30, 2026
5f670af
Merge branch 'main' into feat/consolidate-ci-cd-pipeline
stritti Apr 30, 2026
2428372
fix: address PR review comments
stritti Apr 30, 2026
a428322
fix: address additional PR review comments
stritti Apr 30, 2026
80d3345
fix: resolve ESPAsyncWebServer duplicate symbol linker error
stritti Apr 30, 2026
01d8d34
fix: pin ESPAsyncWebServer version for esp32dev compatibility
stritti Apr 30, 2026
bc76693
fix: use me-no-dev ESPAsyncWebServer packages for esp32dev
stritti Apr 30, 2026
2df1f1e
fix: merge duplicate build_flags in esp32dev section
stritti Apr 30, 2026
104a4eb
fix: remove explicit ESPAsync deps - use Homie's built-in versions
stritti Apr 30, 2026
ba7bf34
fix: force single AsyncTCP version to avoid duplicate symbols
stritti Apr 30, 2026
986ec2e
fix: address PR feedback - AsyncTCP ESP32-only, feat! semver, PAT rel…
Copilot May 1, 2026
641acc1
fix: apply common build_flags to nodemcuv2 and scope CI permissions p…
Copilot May 1, 2026
2688b1e
fix: add fetch-depth: 0 to lint job for super-linter base branch diff
stritti May 1, 2026
b2c0a77
fix: disable noisy super-linter checks that lack project config
stritti May 1, 2026
9519de1
fix: also disable editorconfig and github-actions linters
stritti May 1, 2026
1ba3a92
feat: Consolidate CI/CD pipelines with semantic versioning and automa…
stritti May 1, 2026
38f5bbc
fix: use JSONC validation for .vscode JSON files with comments
stritti May 1, 2026
b04e7ea
Merge remote-tracking branch 'origin/main'
stritti May 1, 2026
1ce7c4c
Bump github/codeql-action from 3 to 4 (#49)
dependabot[bot] May 2, 2026
421a6d8
Bump actions/download-artifact from 4 to 8 (#50)
dependabot[bot] May 2, 2026
4ac4c20
Bump actions/setup-python from 5 to 6 (#51)
dependabot[bot] May 2, 2026
d3d2a24
Bump peter-evans/repository-dispatch from 3 to 4 (#52)
dependabot[bot] May 2, 2026
79b5348
Bump super-linter/super-linter from 7 to 8 (#53)
dependabot[bot] May 2, 2026
b99fa20
docs: add architecture improvement plan with task checklist
mistral-vibe May 4, 2026
d7518cb
fix: resolve memory leaks in OperationModeNode
mistral-vibe May 4, 2026
3b2beac
fix: add null checks in OperationModeNode::getRule()
mistral-vibe May 4, 2026
ed6317f
refactor: extract platform-specific pin definitions
mistral-vibe May 4, 2026
f2b0b43
test: add basic unit test infrastructure
mistral-vibe May 4, 2026
990cbab
ci: add unit test job to GitHub Actions workflow
mistral-vibe May 4, 2026
102f584
ci: run workflow on feature branches for testing
mistral-vibe May 4, 2026
a122d2e
refactor: drop ESP8266 support, focus on ESP32 only
mistral-vibe May 4, 2026
24d28ce
fix: remove all ESP8266 conditionals for ESP32-only support
mistral-vibe May 4, 2026
efff1b0
fix: update test configuration to exclude hardware-dependent files
mistral-vibe May 4, 2026
c815e30
fix: use local Preferences instance instead of member variable
mistral-vibe May 4, 2026
f58ea33
fix: remove Preferences usage to avoid ESP32 build issues
mistral-vibe May 4, 2026
30819a4
fix: use stable library versions for ESP32 compatibility
mistral-vibe May 4, 2026
2f860a7
fix: remove trailing whitespace from source and test files
mistral-vibe May 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
126 changes: 126 additions & 0 deletions .github/instructions/*.instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# AGENTS.md
Zweck: Regeln und Standards für einen Coding-Agent, der PlatformIO-basierten IoT-Firmware für ESP8266/ESP32 entwickelt, refaktoriert, analysiert und stabilisiert. Fokus: Architektur, Linting, Speicher- und Ressourcenmanagement, Sicherheit, 24/7-Betrieb, Wartbarkeit, Tests, Releases und OTA.

## 1. Arbeitsweise
Der Agent:
- liefert minimal-invasive Änderungen mit Begründung, Impact-Analyse (RAM/Flash/CPU), Risiken, Rollback-Hinweisen.
- verhindert blockierende Patterns im Laufzeit-Code (long `delay()`, busy waits, blockierende Netzwerk-Calls im Main-Loop).
- vermeidet unsichere dynamische Allokationen in Hot-Paths und ungeprüfte Heap-Nutzung.
- folgt einem CI-regelbasierten Prozess (Build + Tests + Lint).

## 2. Zielplattformen & Framework
- Plattform: ESP8266, ESP32 (inkl. Varianten wie S3, C3); Frameworks: Arduino oder ESP-IDF.
- PlatformIO: Single-Source für Build-Konfiguration (`platformio.ini`), Projekt-Environments, Lib-Pins.

## 3. Architektur
Proj-Struktur:
Empfohlene Schichten (auch wenn das Repo aktuell anders aussieht, Ziel ist schrittweise Annäherung):
- `src/app/` Anwendungslogik (Use-Cases, State Machines)
- `src/drivers/` Hardware-Treiber (GPIO, I2C, SPI, ADC), keine Business-Logik
- `src/services/` Netzwerk, MQTT/HTTP, Time, Storage, OTA, Telemetry
- `src/platform/` Board-spezifische Adapter, `#ifdef` nur hier, nicht in App/Services
- `include/` Öffentliche Header, klare Interfaces
- `test/` Unit-/Component-Tests (PlatformIO Unity)

Architekturregeln:
- App kennt Services über Interfaces, keine direkten Implementierungen.
- Drivers ohne Abhängigkeiten zu Services/App-State.
- Scheduler/Timer/State Machines zentral geplant, nicht verteilt über `loop()`.
- Fehler-Resilienz und Fallback-Strategien eingebaut.

## 4. Coding-Standards
- Sprache: C++17 (wenn möglich), keine unkontrollierten Exceptions auf eingebetteten Targets.
- Header: `include-what-you-use`, kein globales `using namespace`.
- Konstanten: `constexpr`, `enum class`.
- Ownership: RAII oder klar definierte Allokations-/Deallokationsverantwortung.
- Schnittstellen: prefer Span-artige Übergaben, keine impliziten Kopien.
- Fehlerbehandlung immer explizit, kein stilles Ignorieren.
- Logging: niemals in ISR, niedrige Frequenz in Loop-Hot-Paths.

## 5. Linting & Format
- Format: `clang-format` repo-weit einheitlich.
- Lint: `clang-tidy` wo möglich, sonst `cppcheck`.
- Statische Checks: Warnungen auf Maximum, keine neuen Warnungen akzeptieren.
- CI: Build (`pio run`), Tests (`pio test`), Lint/Format-Checks grün.

## 6. Build-Konfiguration
- `platformio.ini`: zentrale Flags, Versions-Defines (`FW_NAME`, `FW_VERSION`).
- Build-Artefakte: Debug vs Release:
- Debug: intensiver Logging, Heap/Stack Checks.
- Release: optimiert, gedämpftes Logging, Sicherheits-Features aktiv.
- Build-Flags: `-D LOG_LEVEL`, `-D NDEBUG` steuerbar über Environments.

## 7. Speicher & Ressourcen
- Kein unbounded dynamic Heap/Fragmentierung:
- Statische Puffer wo möglich, wiederverwendbare Ring-Buffers.
- Vermeide String-Objekte (`String`) in Loops.
- JSON: `StaticJsonDocument` mit statischem Speicher vorab dimensionieren.
- Heap/Stack-Metriken überwachen (`ESP.getFreeHeap()`, `heap_caps_get_free_size`, Task-Stack-High-Watermarks).
- PSRAM gezielt nutzen, nicht blind, mit Metriken.
- Memory-Pools statt häufige Allokationen.

## 8. RTOS & Nebenläufigkeit
ESP8266:
- Single-Core, kooperatives Scheduling.
- Nicht blockierende Calls, Loop kurz halten.

ESP32:
- FreeRTOS Tasks mit klarer Verantwortlichkeit.
- Kommunikation über Queues/Semaphores; keine globals ohne Schutz.
- Prioritäten bewusst setzen, Priority Inheritance bei Mutex.
- Task-Stack dimensionieren und überwachen.

## 9. Sicherheit
ESP32 Hardware-Security:
- **Secure Boot**: Boot-Image-Verifikation vor Start, Schlüssel offline erzeugen, eFuse planen. :contentReference[oaicite:0]{index=0}
- **Flash Encryption**: Schutz des Flash-Inhalts (Firmware, Credentials, Zertifikate), Release-Mode vor Produktion. :contentReference[oaicite:1]{index=1}
- Debug Interfaces (JTAG/UART) im Produktions-Build deaktivieren. :contentReference[oaicite:2]{index=2}
- TLS für Netzverbindungen (MQTTS/HTTPS) mit CA/Key-Validation.
- Secrets nicht im Repo.

## 10. OTA & Updates
- OTA mit mindestens zwei Partitions-Slots, Anti-Rollback/Checksum/Validity. :contentReference[oaicite:3]{index=3}
- Sicherer OTA: HTTPS, Signaturen, Rollback-Mechanismus.
- Update-Failure Detection (Task Init + Health-Checks vor Markieren aktiv).

## 11. 24/7-Robustheit
- Watchdogs aktiv (Loop/Tasks).
- Netzwerk-Resilienz: Reconnect-Backoff + Jitter, Offline-Betrieb möglich.
- Time via NTP mit Fallback.
- Persistenz: Flash-Writes minimieren, Bundling, Debounce.
- Health-Metrics sammeln: Uptime, Heap/Stack, Reset-Reason, Wifi/MQTT Status.

## 12. Logging & Telemetrie
- Strukturierte Logs (KV-Form).
- Rate Limits für wiederkehrende Events.
- Health Endpoints oder Telemetrie-Reports.

## 13. Konfiguration & Secrets
- Defaults in `config_defaults.h`.
- Runtime-Konfiguration über Filesystem (LittleFS/NVS) validieren.
- Keine hartkodierten Secrets.

## 14. Tests
- Unit-Tests für Parser, Protocol/State, Backoff, Scheduler.
- Native Tests (`platform = native`) bevorzugt für CI.
- Komponententests mit Mocks/Simulations.

## 15. Dependencies
- Minimiert, begründet, Version-Pinned.
- Lizenz-Checks; Updates mit CI-Absicherung.

## 16. Release & CI
- Release: Sicherheitsfeatures, Monitoring, Debug ausschalten.
- CI: Lint, Build, Tests, Heap/Stack Reports, Memory-Analyse.

## 17. Anti-Patterns (verboten)
- Unlimitierte `delay()`, Busy-Wait, blockierende Netzwerk-Calls im Loop.
- Häufige Heap-Allokationen in Hot-Paths.
- String-Objekte in Zyklus-Code.
- Globale state ohne Synchronisation.

## 18. Änderungen aus der Praxis
- Sicherheit: Secure Boot + Flash Encryption aktivieren, Debug-Schnittstellen deaktivieren. :contentReference[oaicite:4]{index=4}
- OTA: Partition-basierte Updates mit Anti-Rollback/Checksum. :contentReference[oaicite:5]{index=5}
- Speicher: Heap/Stack Überwachung & Static Buffer. :contentReference[oaicite:6]{index=6}

Loading
Loading