feat: Add path tracking timeout and adaptive thresholds (v1.6.0)#150
Open
Lyr3x wants to merge 1 commit into
Open
feat: Add path tracking timeout and adaptive thresholds (v1.6.0)#150Lyr3x wants to merge 1 commit into
Lyr3x wants to merge 1 commit into
Conversation
New Features: - Path tracking timeout: Automatically resets state machine when someone enters halfway and turns back, preventing stuck states. Configurable via `path_tracking_timeout` (default: 3s). Publishes "Timeout" event. - Adaptive thresholds: Continuously adjusts idle baseline to handle environmental drift (temperature, lighting changes). Uses Exponential Moving Average for smooth updates. Configurable via `adaptive_threshold` block with `enabled`, `update_interval`, and `alpha` options. Improvements: - Moved path tracking state from static variables to class members - Added sanity checks for adaptive updates (rejects >20% changes) - Enhanced logging for debugging Documentation: - Updated README with new features, configuration examples, and FAQ - Modernized home_assistant.md with automations and dashboard cards - Added CHANGELOG entry for v1.6.0 Examples: - Updated peopleCounter32.yaml and peopleCounter8266.yaml - Removed broken API service calls (set_max/min_threshold_percentage) - Updated CI configs to test new features
|
Hi @Lyr3x, I've been testing this and it seems quite good so far! :) Also, your yaml is not up-to-date when it comes to api need to be proper formatted for the key:, now using Same for ota, need to use ota: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces two high-priority robustness features to improve people counting reliability:
Changes
New Features
path_tracking_timeout3sadaptive_threshold.enabledtrueadaptive_threshold.update_interval60sadaptive_threshold.alpha0.05Code Improvements
Documentation
home_assistant.mdwith example automations and dashboard cardsTesting from Feature Branch
To test these changes before they're merged, update your ESPHome configuration:
Example Configuration
Test Plan
Testing Path Tracking Timeout
esphome logs <your-device>.yamlPath tracking timeout after XXXX ms - resetting stateentry_exit_eventsensor shows "Timeout"Testing Adaptive Thresholds
Updating adaptive thresholds (zones empty for XXXX ms)Testing Backward Compatibility
Log Messages to Look For
Feedback Requested
Please report any issues or feedback in the comments!