Conversation
Update version references across all files: - src/version.py - .github/workflows/docker_develop.yml - docs version badges (6 files)
- Add expert-level config fields external_evopt_max_grid_import/export_w - Implement smart defaults: grid limits default to inverter limits when 0 - Update OptimizationInterface to receive and apply inverter limits - Pass inverter limits from eos_connect to optimization backends - Add comprehensive test coverage (8 new grid limit tests) - Document smart defaults in user-guide and advanced sections - Update README with grid limits feature mention - Maintain full backward compatibility with existing configurations Fixes: #268
Files changed: M src/version.py
Root cause of #267: HA sensor history gaps cause LoadInterface to skip datapoints, resulting in incomplete 47-value arrays instead of 48. EOS Server validates array length and rejects with 422. Solution: Forward-fill (LOCF) automatically recovers from gaps. LoadInterface now guarantees 48 complete values.
Files changed: M src/version.py
… in LoadInterface
Files changed: M src/version.py
Add schema-level validation to prevent configuration errors: - price.fixed_24h_array must be exactly 24 comma-separated numeric values - Only validated when price.source="fixed_24h" - Clear error messages on save if validation fails - Prevents mismatched array lengths from reaching optimization Fixes: #267
pv_forecast_source.source: timeseries was accepted by config validation
and configurable in the UI (data_url, data_path, data_token), but
PvInterface.__get_pv_forecast() had no case for it, silently falling
back to the synthetic default triangle forecast instead of fetching
data_url.
Adds __get_pv_forecast_timeseries(), reusing the same standardized
[{start, end, value}] format PriceInterface's timeseries source already
uses, with a PV-appropriate twist: 15-min-to-hourly conversion sums
(not averages, since values are energy-per-slot rather than a rate),
and incomplete data pads with 0 instead of the last known value.
Fetched once globally (not per pv_forecast.N array entry) and aligned
by absolute "start" timestamp to a midnight-anchored slot grid - both
match __get_pv_forecast_evcc_api's existing behaviour, and are required
because get_ems_data() in eos_connect.py indexes pv_forcast_array by
slots-since-midnight-today, not by position.
Tested against a self-hosted forecast service returning real
15-minute-resolution PV data; verified end to end against the running
optimizer (matching totals between the service and EOS_connect's own
computed values).
Previously, EVCC data < 192 entries always triggered fallback chain, even for complete single-day data (96 entries). Now only valid complete days (96/192 for 15-min, 24/48 for hourly) use cyclic padding; invalid counts use fallback. Also reorganized 125 price tests into 3-level hierarchy under tests/interfaces/price/.
Files changed: M src/version.py
- Extract ISO8601 timestamps from EVCC feed-in rate objects - Detect resolution (15-min, 30-min, hourly) from time deltas - Filter rates to requested 48-hour window using start_time parameter - Convert 15-min to hourly using timestamp-aware slot-based averaging - Always return exactly tgt_duration slots (prevent 588-value arrays) - Add helper methods: _detect_resolution_from_timeseries(), __convert_15min_to_hourly_feedin_timeseries() Fixes: #267 (Part 2 - feedin resolution conversion) Related: #267 (Part 1 - grid price validation)
Files changed: M src/version.py
Enhance timeseries PV forecast handling to be truly robust: Robustness improvement: - Timestamps now aligned to resolution boundaries before slot lookup - Handles data starting at midnight, "now", or any arbitrary time - Maintains midnight-indexed output for optimizer compatibility - Fixes silent data loss when HA templates generated "now"-aligned slots Original implementation: - HTTP fetch with Bearer token auth, 3-retry mechanism - Auto-detect 15min vs hourly resolution - 15-to-60min conversion via energy summing - Validation at startup (data_url checks, URL format) - Context-aware error messages with recovery status - Diagnostic logging (entry counts, value ranges, failure hints) Test coverage: - 15 parsing tests (format, resolution, alignment) - 8 validation tests (config scenarios, URL validation) - 45 existing PV tests (no regressions) - Full 988-test suite passing Fixes: #270 Related: #271
Files changed: M src/version.py
Files changed: M src/version.py
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.
This pull request introduces several important updates to documentation, configuration schema, and user instructions for EOS Connect, focusing on improved optimizer grid limit handling, enhanced data quality management, and clearer guidelines for contributors and users. The changes also include version bumps and improved documentation for both advanced and user-level features.
Key changes include:
Optimizer and Grid Limit Features
eos.external_evopt_max_grid_import_wandeos.external_evopt_max_grid_export_wfor external EVopt optimizer grid import/export limits, including validation, help text, and documentation links. These enable smart defaults and explicit override of grid constraints for optimization.Data Quality and User Guidance
Documentation and Versioning
v0.3.36across documentation and workflow files. [1] [2] [3] [4] [5]Configuration Schema Improvements
These changes collectively enhance the reliability, usability, and maintainability of EOS Connect for both end users and contributors.