All notable changes to this project will be documented in this file. See standard-version for commit guidelines.
0.3.42 (2025-06-05)
- update token usage in workflows to use PAT_TOKEN for GitHub actions (5b37696)
0.3.41 (2025-06-05)
- update BACKFILL_GUIDE and MQTT discovery to ensure correct entity IDs for sensors (e9f451e)
0.3.40 (2025-06-05)
- update Home Assistant database path in configuration and documentation (32f4f79)
0.3.39 (2025-06-04)
- ha-backfill: implementation of the ha-backfill into the addon (f922d51)
0.3.38 (2025-06-04)
- tests: add comprehensive tests for 15-minute resolution data retrieval and processing (b2c53da)
0.3.37 (2025-06-04)
- api: update mock data generation to support 15-minute intervals and adjust API call parameters (b76eb48)
0.3.36 (2025-06-04)
- api: enhance data processing to support multiple response formats (7cc7733)
0.3.35 (2025-06-04)
- api: remove redundant return statement in data conversion (f4d7893)
0.3.34 (2025-06-04)
- api: enhance data handling and logging in Smartmeter client (798405f)
0.3.33 (2025-06-04)
- oauth: enhance testing documentation and logging for OAuth integration (36270ac)
0.3.32 (2025-06-04)
- oauth: added OAuth functionality (a54b04f)
0.3.31 (2025-06-04)
- api: improve error handling, add conf timeout, implement exponential backoff for retries (7fce834)
0.3.30 (2025-06-04)
- config: add use_secrets option to WNSMConfig and update environment mappings (2be3d82)
0.3.29 (2025-06-04)
- mqtt: implement message retention in MQTT publishing and add tests (5db379e)
0.3.28 (2025-06-04)
- perameter call: the parameter call zaehlpunkt has been corrected (e9a061f)
0.3.27 (2025-06-03)
- dockerfile: corrected typo in dockerfile (c991b40)
0.3.26 (2025-06-02)
- mqtt): fix(mqtt: import MQTT client for improved message publishing (c43f41a)
0.3.25 (2025-06-02)
- mqtt: add retry logic and enhanced error handling for MQTT message publishing (3cdf2ba)
0.3.24 (2025-06-02)
- ci): fix(datetime: replace timevalue with timedelta for date calculation (c8856d1)
0.3.23 (2025-06-02)
- datetime: replace timevalue with timedelta for date calculations (422d8de)
0.3.22 (2025-06-02)
- mqtt: changed the sensor configuration (6e6061b)
0.3.21 (2025-06-02)
- mqtt: add robust template handling with default values for missing fields (5ba876e)
0.3.20 (2025-06-02)
0.3.19 (2025-06-01)
- ci: add Docker container building and publishing to release workflow (0a16d5c)
- enhance debugging and add configuration diagnostic script (91240bf)
- Implement fix for 15-minute delta values issue in Wiener Netze Smart Meter add-on (c7e0c8f)
- Implement Home Assistant secrets support for secure credential management (f31320f)
- Implement Home Assistant secrets.yaml support for secure credential management (c33283b)
- statistics: implement HA REST API for historical statistics and timestamped MQTT fallback (4a9349b)
- update add-on icon (94d43a7)
- api: fix bewegungsdaten method signature compatibility with vienna-smartmeter library (8a41597)
- ci: add write permissions for GitHub Actions to push releases (bf6b73f)
- ci: convert repository owner to lowercase for Docker registry compatibility (aab889d)
- Correct 15-minute delta values aggregation and update package name (269367b)
- docker: add build dependencies for lxml compilation on ARM platforms (82f93c6)
- docker: limit build to stable platforms (amd64, arm64) due to lxml compilation issues (c31b03e)
- imports: fix module import errors by using relative imports and adding missing init.py (a94d9a0)
- mqtt: fix state class to measurement and remove unused REST API function (9751c0b)
- mqtt: implement proper energy sensor with total state class and running totals (8ad1862)
0.3.18 (2025-06-01)
- ci: add Docker container building and publishing to release workflow (0a16d5c)
- enhance debugging and add configuration diagnostic script (91240bf)
- Implement fix for 15-minute delta values issue in Wiener Netze Smart Meter add-on (c7e0c8f)
- Implement Home Assistant secrets support for secure credential management (f31320f)
- Implement Home Assistant secrets.yaml support for secure credential management (c33283b)
- statistics: implement HA REST API for historical statistics and timestamped MQTT fallback (4a9349b)
- update add-on icon (94d43a7)
- api: fix bewegungsdaten method signature compatibility with vienna-smartmeter library (8a41597)
- ci: add write permissions for GitHub Actions to push releases (bf6b73f)
- ci: convert repository owner to lowercase for Docker registry compatibility (aab889d)
- Correct 15-minute delta values aggregation and update package name (269367b)
- docker: add build dependencies for lxml compilation on ARM platforms (82f93c6)
- docker: limit build to stable platforms (amd64, arm64) due to lxml compilation issues (c31b03e)
- imports: fix module import errors by using relative imports and adding missing init.py (a94d9a0)
- mqtt: fix state class to measurement and remove unused REST API function (9751c0b)
- mqtt: implement proper energy sensor with total state class and running totals (8ad1862)
0.3.17 (2025-06-01)
- ci: add Docker container building and publishing to release workflow (0a16d5c)
- enhance debugging and add configuration diagnostic script (91240bf)
- Implement fix for 15-minute delta values issue in Wiener Netze Smart Meter add-on (c7e0c8f)
- Implement Home Assistant secrets support for secure credential management (f31320f)
- Implement Home Assistant secrets.yaml support for secure credential management (c33283b)
- statistics: implement HA REST API for historical statistics and timestamped MQTT fallback (4a9349b)
- update add-on icon (94d43a7)
- api: fix bewegungsdaten method signature compatibility with vienna-smartmeter library (8a41597)
- ci: add write permissions for GitHub Actions to push releases (bf6b73f)
- ci: convert repository owner to lowercase for Docker registry compatibility (aab889d)
- Correct 15-minute delta values aggregation and update package name (269367b)
- docker: add build dependencies for lxml compilation on ARM platforms (82f93c6)
- docker: limit build to stable platforms (amd64, arm64) due to lxml compilation issues (c31b03e)
- imports: fix module import errors by using relative imports and adding missing init.py (a94d9a0)
- mqtt: fix state class to measurement and remove unused REST API function (9751c0b)
0.3.16 (2025-06-01)
- ci: add Docker container building and publishing to release workflow (0a16d5c)
- enhance debugging and add configuration diagnostic script (91240bf)
- Implement fix for 15-minute delta values issue in Wiener Netze Smart Meter add-on (c7e0c8f)
- Implement Home Assistant secrets support for secure credential management (f31320f)
- Implement Home Assistant secrets.yaml support for secure credential management (c33283b)
- statistics: implement HA REST API for historical statistics and timestamped MQTT fallback (4a9349b)
- update add-on icon (94d43a7)
- api: fix bewegungsdaten method signature compatibility with vienna-smartmeter library (8a41597)
- ci: add write permissions for GitHub Actions to push releases (bf6b73f)
- ci: convert repository owner to lowercase for Docker registry compatibility (aab889d)
- Correct 15-minute delta values aggregation and update package name (269367b)
- docker: add build dependencies for lxml compilation on ARM platforms (82f93c6)
- docker: limit build to stable platforms (amd64, arm64) due to lxml compilation issues (c31b03e)
- imports: fix module import errors by using relative imports and adding missing init.py (a94d9a0)
0.3.15 (2025-06-01)
- ci: add Docker container building and publishing to release workflow (0a16d5c)
- enhance debugging and add configuration diagnostic script (91240bf)
- Implement fix for 15-minute delta values issue in Wiener Netze Smart Meter add-on (c7e0c8f)
- Implement Home Assistant secrets support for secure credential management (f31320f)
- Implement Home Assistant secrets.yaml support for secure credential management (c33283b)
- update add-on icon (94d43a7)
- api: fix bewegungsdaten method signature compatibility with vienna-smartmeter library (8a41597)
- ci: add write permissions for GitHub Actions to push releases (bf6b73f)
- ci: convert repository owner to lowercase for Docker registry compatibility (aab889d)
- Correct 15-minute delta values aggregation and update package name (269367b)
- docker: add build dependencies for lxml compilation on ARM platforms (82f93c6)
- docker: limit build to stable platforms (amd64, arm64) due to lxml compilation issues (c31b03e)
- imports: fix module import errors by using relative imports and adding missing init.py (a94d9a0)
0.3.14 (2025-06-01)
- ci: add Docker container building and publishing to release workflow (0a16d5c)
- enhance debugging and add configuration diagnostic script (91240bf)
- Implement fix for 15-minute delta values issue in Wiener Netze Smart Meter add-on (c7e0c8f)
- Implement Home Assistant secrets support for secure credential management (f31320f)
- Implement Home Assistant secrets.yaml support for secure credential management (c33283b)
- update add-on icon (94d43a7)
- api: fix bewegungsdaten method signature compatibility with vienna-smartmeter library (8a41597)
- ci: add write permissions for GitHub Actions to push releases (bf6b73f)
- ci: convert repository owner to lowercase for Docker registry compatibility (aab889d)
- Correct 15-minute delta values aggregation and update package name (269367b)
- docker: add build dependencies for lxml compilation on ARM platforms (82f93c6)
- docker: limit build to stable platforms (amd64, arm64) due to lxml compilation issues (c31b03e)
- imports: fix module import errors by using relative imports and adding missing init.py (a94d9a0)
0.3.13 (2025-06-01)
- ci: add Docker container building and publishing to release workflow (0a16d5c)
- enhance debugging and add configuration diagnostic script (91240bf)
- Implement fix for 15-minute delta values issue in Wiener Netze Smart Meter add-on (c7e0c8f)
- Implement Home Assistant secrets support for secure credential management (f31320f)
- Implement Home Assistant secrets.yaml support for secure credential management (c33283b)
- update add-on icon (94d43a7)
- ci: add write permissions for GitHub Actions to push releases (bf6b73f)
- ci: convert repository owner to lowercase for Docker registry compatibility (aab889d)
- Correct 15-minute delta values aggregation and update package name (269367b)
- docker: add build dependencies for lxml compilation on ARM platforms (82f93c6)
- docker: limit build to stable platforms (amd64, arm64) due to lxml compilation issues (c31b03e)
- imports: fix module import errors by using relative imports and adding missing init.py (a94d9a0)
0.3.12 (2025-06-01)
- ci: add Docker container building and publishing to release workflow (0a16d5c)
- enhance debugging and add configuration diagnostic script (91240bf)
- Implement fix for 15-minute delta values issue in Wiener Netze Smart Meter add-on (c7e0c8f)
- Implement Home Assistant secrets support for secure credential management (f31320f)
- Implement Home Assistant secrets.yaml support for secure credential management (c33283b)
- update add-on icon (94d43a7)
- ci: add write permissions for GitHub Actions to push releases (bf6b73f)
- ci: convert repository owner to lowercase for Docker registry compatibility (aab889d)
- Correct 15-minute delta values aggregation and update package name (269367b)
- docker: add build dependencies for lxml compilation on ARM platforms (82f93c6)
- docker: limit build to stable platforms (amd64, arm64) due to lxml compilation issues (c31b03e)
0.3.11 (2025-06-01)
- enhance debugging and add configuration diagnostic script (91240bf)
- Implement fix for 15-minute delta values issue in Wiener Netze Smart Meter add-on (c7e0c8f)
- Implement Home Assistant secrets support for secure credential management (f31320f)
- Implement Home Assistant secrets.yaml support for secure credential management (c33283b)
- update add-on icon (94d43a7)
- ci: add write permissions for GitHub Actions to push releases (bf6b73f)
- Correct 15-minute delta values aggregation and update package name (269367b)
-
MQTT Data Publishing: Resolved "Skipping data point with missing fields" errors
- Fixed data format mismatch between API response processing and MQTT publishing
- Updated
process_bewegungsdaten_response()to return data withdeltafields required by MQTT publisher - All processed data points now include the correct
delta,start, andtimestampfields
-
API Endpoint Usage: Improved Wiener Netze Smart Meter API integration
- Enhanced
bewegungsdaten()method to properly request 15-minute interval data usingvaluetype=QUARTER_HOUR - Added fallback handling for different API parameter formats and library versions
- Better error handling for API calls with improved parameter name detection
- Enhanced
-
Data Granularity: Enhanced 15-minute interval processing
- Changed daily data conversion from 24 hourly intervals to 96 15-minute intervals for better precision
- Improved even distribution of daily consumption values across 15-minute periods
- Each 15-minute interval now correctly represents 1/96th of the daily consumption
- Data Processing Pipeline: Streamlined data flow from API to MQTT
- Removed unnecessary
sumandstatefields from processed data - Standardized on
deltafield for all 15-minute consumption values - Updated mock data generation to use the correct format
- Removed unnecessary
- Files Modified:
wnsm_sync/sync_bewegungsdaten_to_ha.py: Updated data processing and MQTT publishing logicwnsm_sync/api/client.py: Enhanced API parameter handling
- API Compatibility: Works with both 15-minute API responses and daily data fallback
- MQTT Format: All published messages now use consistent
{"delta": value, "timestamp": "..."}format
- Update version to 0.3.9
- Enhanced Debugging: Improved configuration loading diagnostics
- Added detailed logging for add-on configuration values
- Better secrets loading status reporting
- Configuration diagnostic script (
diagnose_config.py)
- Icon: Updated add-on icon for better visual identification
- Secrets Loading: Enhanced error reporting for secrets configuration issues
- Update version to 0.3.7
- Update version to 0.3.6
- Home Assistant Secrets Support: Complete implementation of secrets.yaml integration
- Added
USE_SECRETSconfiguration option for explicit secrets mode - Automatic fallback to secrets when credentials are missing
- Support for multiple secret naming conventions (e.g.,
wnsm_username,username) - PyYAML dependency for secrets file parsing
- Added
- Configuration Schema: Made credential fields optional (
str?) to support secrets mode - Configuration Loading: Enhanced logic to handle secrets, direct values, and automatic fallback
- Documentation: Updated DOCS.md with comprehensive secrets usage instructions
SECRETS_EXAMPLE.md: Detailed examples and troubleshooting guidetest_new_secrets_approach.py: Comprehensive test suite for secrets functionalitySECRETS_SOLUTION_SUMMARY.md: Technical implementation documentation
- Credentials no longer visible in add-on configuration UI when using secrets
- Sensitive values masked in logs
- Centralized credential management through
/config/secrets.yaml
- Repository Naming: Resolved "Dev" naming issue in add-on display
- Fixed
package-lock.jsonreferences fromhaos-addon-wnsm-devtohaos-addon-wnsm-sync - Updated README.md repository URL from dev to main repository
- Corrected Home Assistant add-on repository badge link
- Fixed
- All repository references now point to the main repository instead of dev fork
- Update version to 0.3.3
- Update version to 0.3.2
- Update version to 0.3.1
The Wiener Netze Smart Meter add-on was incorrectly aggregating 15-minute energy consumption data into cumulative values instead of publishing individual 15-minute deltas. This caused Home Assistant to show a single large cumulative value (15-16000 kWh) instead of individual 15-minute consumption intervals.
- Cumulative Sum Logic: The main processing function was calculating running totals (
total += value_kwh) instead of using individual delta values - Wrong State Class: MQTT discovery was configured with
state_class: total_increasingwhich expects cumulative values - Incorrect MQTT Payload: Publishing cumulative sums instead of individual 15-minute consumption deltas
Before:
total = Decimal(0)
for entry in bewegungsdaten.get("values", []):
value_kwh = Decimal(str(entry["wert"]))
total += value_kwh # ❌ Creating cumulative sum
statistics.append({
"start": ts.isoformat(),
"sum": float(total), # ❌ Cumulative value
"state": float(value_kwh)
})After:
for entry in bewegungsdaten.get("values", []):
value_kwh = float(entry["wert"]) # ✅ Individual 15-min consumption
statistics.append({
"start": ts.isoformat(),
"delta": value_kwh, # ✅ Individual delta value
"timestamp": ts.isoformat()
})Before:
- Complex grouping and sampling logic
- Publishing cumulative sums
- Multiple topics per day
After:
- Simple iteration through all 15-minute intervals
- Publishing individual delta values
- Single topic with timestamp-based messages
New MQTT Payload Format:
{
"delta": 0.234,
"timestamp": "2025-01-15T00:15:00+00:00"
}Before:
state_class: "total_increasing" # ❌ For cumulative values
value_template: "{{ value_json.value }}" # ❌ Wrong fieldAfter:
state_class: "measurement" # ✅ For delta/interval values
value_template: "{{ value_json.delta }}" # ✅ Extract delta field
name: "WNSM 15min Energy" # ✅ Clear naming- Individual 15-minute intervals: Each API response entry becomes a separate MQTT message
- Correct consumption values: Values like 0.234 kWh per 15-minute interval instead of 15000+ kWh cumulative
- Home Assistant integration: Sensor shows individual 15-minute consumption that can be:
- Graphed over time
- Summed for daily/monthly totals
- Multiplied with aWATTar price sensor for cost calculation
- Energy Dashboard compatibility: Can be added to HA Energy Dashboard for consumption tracking
wnsm_sync/sync_bewegungsdaten_to_ha.py:main()function: Fixed data processing logicpublish_mqtt_data()function: Simplified MQTT publishingpublish_mqtt_discovery()function: Updated HA discovery config
Created test_delta_fix.py to verify:
- ✅ Correct delta value processing
- ✅ Proper MQTT payload format
- ✅ Valid Home Assistant discovery configuration
- ✅ All existing tests still pass
After the fix, configure your Home Assistant sensor like this:
mqtt:
sensor:
- name: "WNSM 15min Energy"
state_topic: "smartmeter/energy/15min"
unit_of_measurement: "kWh"
device_class: energy
state_class: measurement
value_template: "{{ value_json.delta }}"
json_attributes_topic: "smartmeter/energy/15min"
json_attributes_template: "{{ {'timestamp': value_json.timestamp} | tojson }}"- Update version to 0.2.8
All notable changes to this project will be documented in this file. See standard-version for commit guidelines.
1.0.2 (2025-05-31)
1.0.1 (2025-05-31)
0.2.7 (2025-05-29)
- update MQTT discovery name and enhance data publishing with daily grouping and sampling (34c0ded)
0.2.7 (2025-05-29)
- Fix sensor naming in MQTT discovery configuration
- Improve data publishing to preserve historical data
- Add data sampling to prevent overwhelming Home Assistant
- Group data by day for better statistics visualization
0.2.6 (2025-05-29)
- extend HISTORY_DAYS option to support up to 1095 days (bb0e75e)
0.2.5 (2025-05-29)
- enhance data fetching with granularity support for 15-minute intervals (5005ca8)
0.2.5 (2025-05-29)
- Add support for daily data format from Wiener Netze API
- Add granularity parameter to request 15-minute interval data
- Convert daily data to hourly entries for better visualization
- Improve error handling for different API response formats
0.2.4 (2025-05-29)
- update bewegungsdaten processing to improve date handling and error logging (b2cb370)
0.2.4 (2025-05-29)
- Fix date range handling to use previous day as end date
- Improve error handling for empty API responses
- Add fallback to mock data when no real data is available
- Enhance logging for better troubleshooting
0.2.3 (2025-05-29)
- add data format conversion and robust processing for bewegungsdaten API responses (6c63638)
0.2.3 (2025-05-29)
- Add data format conversion to handle different response formats from vienna-smartmeter library
- Improve error handling and logging for data processing
- Add robust data processing for various API response formats
0.2.2 (2025-05-29)
- enhance error handling and logging for bewegungsdaten method in Smartmeter class (c85dfb8)
0.2.2 (2025-05-29)
- Fix parameter name issue in bewegungsdaten method call
- Add fallback for different vienna-smartmeter library versions
0.2.1 (2025-05-29)
- update Wiener Netze Smartmeter add-on to use vienna-smartmeter library with PKCE authentication (a8f2fad)
0.2.0 (2025-05-30)
- api: The addon now uses the vienna-smartmeter library with PKCE authentication support
- api: Switch to vienna-smartmeter library for API communication (#1)
- auth: Add support for PKCE authentication required by Wiener Netze API since May 2025
- config: Add HISTORY_DAYS option to control how much historical data is fetched
- mock: Improve mock data generation for testing without API access
- login: Fix login issues with Wiener Netze API by implementing PKCE authentication
- error: Improve error handling and logging for API communication failures
- docs: Update documentation with new configuration options and troubleshooting tips
0.1.27 (2025-05-29)
- api: improve URL handling and add headers for API requests (7650242)
0.1.27 (2025-05-29)
- api: fix URL joining for API endpoints to properly include base path
- api: update API headers to include Accept and Content-Type
- api: remove leading slashes from endpoint definitions for proper URL construction
0.1.26 (2025-05-29)
- config: add USE_MOCK_DATA option for testing and development (82be8f5)
0.1.26 (2025-05-29)
- config: add USE_MOCK_DATA option for testing and development (82be8f5)
0.1.25 (2025-05-29)
- api: enhance data fetching and processing logic for statistics (5b7f814)
0.1.24 (2025-05-29)
- api: add OAUTH_SCOPE constant and include it in token request parameters (a9c5c34)
0.1.23 (2025-05-29)
- api: implement mock data responses for API endpoints and add OpenAPI schema (2710158)
0.1.22 (2025-05-29)
0.1.21 (2025-05-29)
0.1.20 (2025-05-29)
0.1.19 (2025-05-29)
0.1.18 (2025-05-29)
0.1.17 (2025-05-29)
0.1.16 (2025-05-29)
0.1.15 (2025-05-29)
0.1.14 (2025-05-29)
0.1.13 (2025-05-29)
0.1.12 (2025-05-29)
0.1.11 (2025-05-21)
0.1.10 (2025-05-21)
0.1.9 (2025-05-21)
0.1.8 (2025-05-21)
0.1.7 (2025-05-21)
0.1.6 (2025-05-21)
- enhance MQTT configuration handling and add message publishing functions (8c1e229)
0.1.5 (2025-05-21)
0.1.4 (2025-05-21)
- add fetch_bewegungsdaten function to retrieve energy consumption data from Wiener Netze API (7f56d7d)
- initialize init.py for wnsm_sync module (1ce2a46)