node-red-contrib-octopus-intelligent 1.0.3 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,78 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.0.5] - 2025-12-31
9
+
10
+ ### Fixed
11
+ - **README Documentation** - Removed misleading "Octopus Energy branded device cards" claim
12
+ - Changed to accurate description: "Clean Organization" and "Professional Layout"
13
+ - No actual Octopus Energy branding exists in Home Assistant device cards
14
+ - Avoids potential trademark/copyright concerns
15
+
16
+ ## [1.0.4] - 2025-12-11
17
+
18
+ ### Added
19
+ - **Manual Refresh Button (MQTT)** - "Octopus Refresh API" button in Home Assistant
20
+ - Hardcoded 30-second rate limiting to prevent API spam
21
+ - Shows warning in Node-RED when rate limited
22
+ - Publishes refresh cooldown state to MQTT
23
+ - **Refresh Available At Sensor** - Diagnostic timestamp sensor
24
+ - Shows ISO timestamp when manual refresh becomes available
25
+ - Displays as countdown in Home Assistant ("in 25 seconds")
26
+ - Automatically clears to `null` after 30 seconds
27
+ - Leverages Home Assistant's native timestamp handling
28
+ - **Next Poll Time Sensors** - Shows when next automatic poll will occur
29
+ - `sensor.octopus_next_poll_time` - Main sensor (timestamp class)
30
+ - `sensor.octopus_next_poll_time_raw` - Diagnostic raw timestamp
31
+ - Updates after each successful poll
32
+ - **API Complexity Tracking** - Monitor API usage against 50,000 hourly limit
33
+ - `sensor.octopus_api_requests_hour` - Count of requests (last 60 min)
34
+ - `sensor.octopus_api_complexity_hour` - Total complexity used
35
+ - `sensor.octopus_api_complexity_usage` - Percentage of limit used
36
+ - Estimated complexity: Regular poll (300), Mutation (250), Pre-validation (200)
37
+ - All API complexity sensors in Diagnostics section
38
+ - **Enhanced Debug Output** - `msg.debug` now includes:
39
+ - `responseHeaders` - Full HTTP response headers from API
40
+ - `extensions` - GraphQL extensions field (if present)
41
+ - `api_usage` - Comprehensive API usage metrics per request
42
+ - **Comprehensive Test Coverage** - Added 5 new tests
43
+ - Tests for MQTT refresh button rate limiting
44
+ - Tests for countdown expiry behavior
45
+ - Validates countdown doesn't go negative
46
+ - Tests timer cleanup and MQTT message structure
47
+
48
+ ### Changed
49
+ - **Rate Limiting Strategy** - Different behavior for MQTT vs Node-RED
50
+ - MQTT Button: Hardcoded 30-second cooldown (enforced)
51
+ - Node-RED Input: No rate limiting (programmers control this)
52
+ - Timestamp-based cooldown (not seconds counter)
53
+ - **State Output** - Node-RED now outputs state on every poll
54
+ - Previously only output on changes
55
+ - Now outputs full `statusPayload` every poll cycle
56
+ - Better for automations and monitoring
57
+ - **Global Setter** - Updated `NodeRed_Global_Setter.js` with new fields:
58
+ - `octopus_next_poll`
59
+ - `octopus_refresh_available_at`
60
+ - `octopus_api_requests_hour`
61
+ - `octopus_api_complexity_hour`
62
+ - `octopus_api_complexity_percent`
63
+
64
+ ### Fixed
65
+ - **Cooldown Timer Expiry** - Properly publishes `null` at 30 seconds
66
+ - Prevents countdown showing negative values in Home Assistant
67
+ - Timer cleanup prevents memory leaks
68
+ - Exactly 2 MQTT messages per refresh (start + expiry)
69
+
70
+ ### Technical Details
71
+ - **API Complexity Estimation** - Since Octopus API doesn't provide actual complexity:
72
+ - Uses estimated values based on query types
73
+ - Tracks rolling 60-minute window
74
+ - If actual complexity becomes available, will use it automatically
75
+ - **Timestamp-Based Cooldown** - Uses ISO timestamps instead of seconds
76
+ - Home Assistant handles countdown display automatically
77
+ - Zero MQTT spam during countdown
78
+ - Clean `null` state when ready
79
+
8
80
  ## [1.0.3] - 2025-12-04
9
81
 
10
82
  ### Added