Skip to content
Merged
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
9d597b8
Initial plan
Copilot Jan 14, 2026
dad51c1
Add MQTT protocol configuration, optimize memory usage, update libraries
Copilot Jan 14, 2026
8525c5d
Add documentation for optimizations and MQTT configuration
Copilot Jan 14, 2026
f2e8b5f
Fix critical bug in LoggerNode::logf - enable vsnprintf
Copilot Jan 14, 2026
a6d5b41
Update documentation to include critical bugfix details
Copilot Jan 14, 2026
0ac851a
Address code review feedback - add buffer validation and error handling
Copilot Jan 14, 2026
647d433
Add comprehensive German summary document
Copilot Jan 14, 2026
f0d559e
Add comprehensive English summary document - all requirements completed
Copilot Jan 14, 2026
52558eb
Add state persistence and system health monitoring with auto-reboot
Copilot Jan 14, 2026
a442c88
Add documentation for state persistence and system monitoring
Copilot Jan 14, 2026
2074c75
Fix build pipeline: move static initialization to cpp file and update…
Copilot Jan 14, 2026
c2a14ed
Add build fix documentation and update CHANGELOG
Copilot Jan 14, 2026
c6e1cd1
Apply clang-format to all modified C++ files
Copilot Jan 14, 2026
3ef86a1
Fix super-linter issues: copyright, line length, markdown formatting
Copilot Jan 14, 2026
0f1a148
Fix build: update ESP Async WebServer library reference
Copilot Jan 15, 2026
ad2a5fa
Fix editorconfig linting: normalize indentation in platformio.ini
Copilot Jan 15, 2026
8e90a19
Fix editorconfig: change tabs to spaces in platformio.ini
Copilot Jan 15, 2026
ddac7fe
Fix Utils namespace compilation error and build issues (#19)
Copilot Jan 15, 2026
6601521
Fix clang-format violations in Rule.hpp and Utils.hpp
Copilot Jan 15, 2026
3615a12
Add copyright headers to all new files
Copilot Jan 15, 2026
334be7c
Update README.md with v3.1.0 features and improvements
Copilot Jan 15, 2026
f6bbdf1
Fix cpplint issues in C++ files: add copyright headers, fix includes …
Copilot Jan 15, 2026
7d15327
Fix all markdownlint and yamllint issues in documentation and workflo…
Copilot Jan 15, 2026
c079199
Apply clang-format to fix formatting violations after cpplint fixes
Copilot Jan 15, 2026
8a4be0c
Fix include paths: remove incorrect src/ prefix from all includes
Copilot Jan 16, 2026
d92de73
Fix clang-format violation in LoggerNode.cpp
Copilot Jan 17, 2026
0208772
Fix cpplint line length violations in LoggerNode.cpp
Copilot Jan 18, 2026
720ca2e
Fix ArduinoJson version compatibility with Homie library (7.3.0 → 6.2…
Copilot Jan 18, 2026
6e322a7
Add Over-The-Air (OTA) update support with comprehensive documentation
Copilot Jan 22, 2026
fb007ff
Fix terminology linter errors: WiFi → Wi-Fi in OTA documentation
Copilot Jan 25, 2026
a96d9af
Fix editorconfig indentation errors in OTA documentation (use 2-space…
Copilot Jan 25, 2026
8e5c39d
Fix markdownlint unordered list indentation errors in OTA documentation
Copilot Jan 25, 2026
0cc5c7d
Optimize NTP synchronization: set interval to 1 hour (3600s) for 24/7…
Copilot Jan 25, 2026
8162708
Fix Homie library compatibility: downgrade ArduinoJson from 6.21.5 to…
Copilot Jan 25, 2026
e42ad2e
Fix ESPAsyncWebServer compatibility: upgrade ArduinoJson to 6.18.5
Copilot Jan 25, 2026
9a66877
Fix Homie library linker errors: downgrade ArduinoJson to 6.17.0
Copilot Jan 25, 2026
0f5f0a9
Fix ArduinoJson version: revert to original 6.18.0
Copilot Jan 25, 2026
e67a134
Fix editorconfig indentation in platformio.ini: convert tabs to 2 spa…
Copilot Jan 25, 2026
0d83897
Fix undefined behavior: add virtual destructor to abstract Rule class
Copilot Jan 25, 2026
edbcb17
Fix cpplint violations in Rule.hpp: indent access specifiers and spli…
Copilot Jan 26, 2026
514e330
Fix clang-format violations in Rule.hpp: apply project formatting sta…
Copilot Jan 26, 2026
ac53573
Suppress library warnings in build: add -Wno-deprecated-declarations …
Copilot Jan 27, 2026
a7e9e88
Optimize super-linter configuration for PlatformIO project
Copilot Jan 27, 2026
8b72972
Fix super-linter config: remove VALIDATE=false settings
Copilot Jan 27, 2026
4c9f0c4
Fix linter workflow: remove all VALIDATE=false settings
Copilot Jan 27, 2026
b62e5e7
Fix YAML linting errors: remove trailing spaces from linter.yml
Copilot Jan 29, 2026
719b69d
Merge main-v3: Add NTP server config, timezone support, and offline o…
Copilot Feb 15, 2026
fb2be75
Implement native Home Assistant MQTT Discovery
Copilot Feb 15, 2026
5f49518
Merge branch 'main-v3' into copilot/optimize-code-mqtt-interface
stritti Feb 16, 2026
6cde7f4
feat: Implementiere MQTT-Interface für Home Assistant Integration
stritti Feb 16, 2026
df39ba4
Fix ArduinoJson compilation errors: use StaticJsonDocument
Copilot Feb 16, 2026
52dd3c3
Fix compilation errors: remove duplicate lines and fix typos
Copilot Feb 16, 2026
f063da6
Fix remaining compilation errors: remove duplicate setup() declaration
Copilot Feb 16, 2026
1837add
Fix HomieSetting template type errors: change int32_t to long
Copilot Feb 16, 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
44 changes: 44 additions & 0 deletions .github/linters/.markdown-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Markdown Lint Configuration
# https://github.com/DavidAnson/markdownlint

---
# Default state for all rules
default: true

# MD004/ul-style - Unordered list style
MD004:
style: dash

# MD007/ul-indent - Unordered list indentation
MD007:
indent: 2
start_indented: false

# MD013/line-length - Line length
MD013:
line_length: 120
code_blocks: false
tables: false
headings: true

# MD024/no-duplicate-heading - Multiple headings with the same content
MD024:
siblings_only: true

# MD033/no-inline-html - Inline HTML
MD033:
allowed_elements:
- br
- details
- summary
- img
- kbd
- sub
- sup

# MD041/first-line-heading - First line in file should be a top level heading
MD041: false

# MD046/code-block-style - Code block style
MD046:
style: fenced
51 changes: 51 additions & 0 deletions .github/linters/.super-linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Super-Linter Configuration for PlatformIO Project
# https://github.com/github/super-linter

---
# Exclude patterns for all linters
FILTER_REGEX_EXCLUDE: |
.*/(\.pio|\.vscode|\.platformio|build|\.git|node_modules)/.*
.*/lib/.*
.*/data/.*
.*\.min\.(js|css)
.*/test/.*

# C/C++ Configuration
# Only validate source code, not library dependencies
CPP_FILTER_REGEX_INCLUDE: |
src/.*\.(cpp|hpp|h)

# Enable only the linters we need for this project
# All other linters are disabled by default when using selective validation
VALIDATE_GITLEAKS: true # Secret scanning

# Markdown linting - more lenient for documentation
MARKDOWN_CONFIG_FILE: .markdown-lint.yml

# YAML linting
YAML_CONFIG_FILE: .yaml-lint.yml
YAML_ERROR_ON_WARNING: false

# C/C++ specific settings
CPP_FILE_EXTENSIONS: "cpp,hpp,h"
CLANG_FORMAT_CONFIG_FILE: .clang-format

# Enable specific linters needed for this PlatformIO project
VALIDATE_EDITORCONFIG: true
VALIDATE_GITHUB_ACTIONS: true
VALIDATE_BASH: true
VALIDATE_SHELL_SHFMT: true
VALIDATE_JSON: true
VALIDATE_CLANG_FORMAT: true
VALIDATE_CPP: true
VALIDATE_MARKDOWN: true
VALIDATE_YAML: true

# Treat warnings as errors (set to false for more lenient linting)
WARNINGS_AS_ERRORS: false

# Only lint changed files in PR mode
VALIDATE_ALL_CODEBASE: false

# Logging
LOG_LEVEL: NOTICE
25 changes: 25 additions & 0 deletions .github/linters/.yaml-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# YAML Lint Configuration
# https://yamllint.readthedocs.io/

---
extends: default

rules:
line-length:
max: 120
level: warning

indentation:
spaces: 2
indent-sequences: true

truthy:
allowed-values: ['true', 'false', 'yes', 'no']
check-keys: false

comments:
min-spaces-from-content: 1

document-start: disable

new-line-at-end-of-file: enable
89 changes: 89 additions & 0 deletions .github/linters/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Super-Linter Configuration

This directory contains configuration files for the [GitHub Super-Linter](https://github.com/github/super-linter) action.

## Configuration Files

### `.super-linter.yml`
Main configuration file for Super-Linter. Optimized for PlatformIO embedded projects:

- **Excludes**: Build artifacts (`.pio`, `.platformio`, `build`), libraries (`lib/`), and test files
- **C/C++ Linting**: Only validates source code in `src/` directory
- **Enabled Linters**:
- C/C++ (clang-format, cpplint)
- Markdown
- YAML
- JSON
- GitHub Actions
- EditorConfig
- GitLeaks (secret scanning)
- Bash/Shell scripts
- **Disabled Linters**: Languages not used in this project (Go, Python, Ruby, etc.)

### `.markdown-lint.yml`
Markdown linting rules:
- Line length: 120 characters
- List indentation: 2 spaces
- Allows inline HTML for documentation
- Consistent list style (dash)

### `.yaml-lint.yml`
YAML linting rules:
- Line length: 120 characters (warning level)
- Indentation: 2 spaces
- Lenient truthy checking
- Document start marker optional

## Usage

The linter runs automatically on all pushes (except to `master` branch) via the GitHub Actions workflow at `.github/workflows/linter.yml`.

### Running Locally

To run the linter locally:

```bash
# Using Docker (recommended)
docker run --rm -e RUN_LOCAL=true -e USE_FIND_ALGORITHM=true \
-v $(pwd):/tmp/lint github/super-linter:latest

# Or using the GitHub CLI
gh api repos/:owner/:repo/actions/workflows/linter.yml/dispatches \
-f ref=your-branch-name
```

## Customization

### Excluding Files

To exclude specific files or patterns, edit `FILTER_REGEX_EXCLUDE` in `.super-linter.yml`.

### Adjusting Rules

- **C/C++**: Edit `.clang-format` in the project root
- **Markdown**: Edit `.markdown-lint.yml` in this directory
- **YAML**: Edit `.yaml-lint.yml` in this directory
- **EditorConfig**: Edit `.editorconfig` in the project root

## Troubleshooting

### Linter Failing on Library Code

The configuration excludes `lib/` and `.pio/` directories. If linter still processes library code, check:
1. The `FILTER_REGEX_EXCLUDE` pattern in `.super-linter.yml`
2. The workflow's `fetch-depth` setting (should be 0 for full history)

### Too Many Warnings

Set `WARNINGS_AS_ERRORS: false` in the workflow file or `.super-linter.yml` to prevent warnings from failing the build.

### Specific Linter Issues

Disable individual linters by setting `VALIDATE_<LANGUAGE>: false` in `.github/workflows/linter.yml`.

## References

- [Super-Linter Documentation](https://github.com/github/super-linter)
- [Markdownlint Rules](https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md)
- [YAML Lint Rules](https://yamllint.readthedocs.io/en/stable/rules.html)
- [EditorConfig](https://editorconfig.org/)
86 changes: 58 additions & 28 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,24 @@ jobs:
fail-fast: false
matrix:
# Override automatic language detection by changing the below list
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
# Supported options are:
# ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
language: ['cpp']
# Learn more...
# Learn more:
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
- name: Checkout repository
uses: actions/checkout@v3
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand All @@ -50,30 +51,59 @@ jobs:
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a
# config file.
# By default, queries listed here will override any specified in a
# config file.
# Prefix the list here with "+" to use these queries and those in
# the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
#- name: Autobuild
# uses: github/codeql-action/autobuild@v1
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build
# manually (see below)
# - name: Autobuild
# uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
# ✏️ If the Autobuild fails above, remove it and uncomment the
# following three lines and modify them (or add more) to build your code
# if your project uses a compiled language

#- run: |
# make bootstrap
# make release
- name: Set up Python
uses: actions/setup-python@v1
- name: Install dependencies
run: |
# - run: |
# make bootstrap
# make release
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Cache PlatformIO
uses: actions/cache@v3
with:
path: |
~/.platformio
.pio
key: ${{ runner.os }}-pio-${{ hashFiles('**/platformio.ini') }}
restore-keys: |
${{ runner.os }}-pio-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install platformio
- name: Run PlatformIO
run: platformio run

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Run PlatformIO
run: platformio run

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
32 changes: 32 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,38 @@ jobs:
VALIDATE_ALL_CODEBASE: false
VALIDATE_ANSIBLE: false

DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# PlatformIO Project Optimizations
# Exclude build artifacts and dependencies
FILTER_REGEX_EXCLUDE: .*/(\.pio|\.vscode|\.platformio|build|lib)/.*

# Enable only relevant linters for PlatformIO project
# When using selective validation, all other linters are disabled automatically
VALIDATE_CPP: true
VALIDATE_CLANG_FORMAT: true
VALIDATE_MARKDOWN: true
VALIDATE_YAML: true
VALIDATE_JSON: true
VALIDATE_GITHUB_ACTIONS: true
VALIDATE_EDITORCONFIG: true
VALIDATE_GITLEAKS: true
VALIDATE_BASH: true

# C/C++ specific settings
CPP_FILE_EXTENSIONS: "cpp,hpp,h"

# Linter configurations
MARKDOWN_CONFIG_FILE: .markdown-lint.yml
YAML_CONFIG_FILE: .yaml-lint.yml

# Don't treat warnings as errors
WARNINGS_AS_ERRORS: false

# Logging
LOG_LEVEL: NOTICE

- name: Arduino Lint
uses: arduino/arduino-lint-action@v1.0.0

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,4 @@ dkms.conf
# End of https://www.gitignore.io/api/c,git,c++,platformio,visualstudiocode
data/homie/config.json
.vscode/settings.json
_codeql_detected_source_root
Loading