homebridge-enphase-envoy 10.7.2 → 10.7.3
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 +6 -0
- package/README.md +4 -4
- package/package.json +1 -1
- package/src/envoydevice.js +28 -0
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
11
11
|
- For plugin >= v10.4.0 use Homebridge UI >= v5.13.0
|
|
12
12
|
- after update to v10.0.0 and above the accessory and bridge need to be removed from the homebridge / Home.app and added again
|
|
13
13
|
|
|
14
|
+
## [10.7.3] - (14.05.2026)
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- Energy history: `prit`, `cnit`, `ctit` spike after a connection gap is now distributed evenly across all preceding null records and the first real record; when data resumes after N missing minutes, each slot receives `delta / (N + 1)` instead of all accumulation appearing in one record; previously saved null records on disk are also retroactively backfilled when a real record finally follows them
|
|
19
|
+
|
|
14
20
|
## [10.7.2] - (14.05.2026)
|
|
15
21
|
|
|
16
22
|
### Fixed
|
package/README.md
CHANGED
|
@@ -320,8 +320,8 @@ The plugin integrates Enphase Envoy solar energy monitoring systems with Homebri
|
|
|
320
320
|
REST POST calls must include a content-type header of `application/json`.
|
|
321
321
|
Path `pv` response all available data.
|
|
322
322
|
Path `status` response all available paths.
|
|
323
|
-
Energy history stored every 1 minute at `:00` second and at `23:59:59` each day. Missing records are filled with `null` values. Retention is controlled by `energyHistoryTime` and `energyHistoryReserveSpace` settings:
|
|
324
|
-
`ts - timestamp`, `pr - production lifetime`, `prit - production interval Wh (same day only)`, `prt - production today`, `pru - production lifetime upload`, `prut - production today upload`, `cn - consumption net lifetime`, `cnit - net consumption interval Wh (same day only)`, `cnt - consumption net today`, `cnu - consumption net lifetime upload`, `cnut - consumption net today upload`, `ct - consumption total lifetime`, `ctit - total consumption interval Wh (same day only)`, `ctt - consumption total today`, `ctp - consumption total lifetime from pv`, `ctpt - consumption total today from pv`
|
|
323
|
+
Energy history stored every 1 minute at `:00` second and at `23:59:59` each day. Missing records are filled with `null` values; interval fields (`prit`, `cnit`, `ctit`) for gap records are distributed evenly across the gap when data resumes. Retention is controlled by `energyHistoryTime` and `energyHistoryReserveSpace` settings:
|
|
324
|
+
`ts - timestamp`, `pr - production lifetime`, `prit - production interval Wh between records (same day only, evenly distributed across gaps)`, `prt - production today`, `pru - production lifetime upload`, `prut - production today upload`, `cn - consumption net lifetime`, `cnit - net consumption interval Wh between records (same day only, evenly distributed across gaps)`, `cnt - consumption net today`, `cnu - consumption net lifetime upload`, `cnut - consumption net today upload`, `ct - consumption total lifetime`, `ctit - total consumption interval Wh between records (same day only, evenly distributed across gaps)`, `ctt - consumption total today`, `ctp - consumption total lifetime from pv`, `ctpt - consumption total today from pv`
|
|
325
325
|
|
|
326
326
|
| Method | URL | Path | Response | Type |
|
|
327
327
|
| --- | --- | --- | --- | --- |
|
|
@@ -341,8 +341,8 @@ Energy history stored every 1 minute at `:00` second and at `23:59:59` each day.
|
|
|
341
341
|
### MQTT Integration
|
|
342
342
|
|
|
343
343
|
Subscribe using JSON `{ "EnchargeProfile": "savings" }`
|
|
344
|
-
Energy history stored every 1 minute at `:00` second and at `23:59:59` each day. Missing records are filled with `null` values. Retention is controlled by `energyHistoryTime` and `energyHistoryReserveSpace` settings:
|
|
345
|
-
`ts - timestamp`, `pr - production lifetime`, `prit - production interval Wh (same day only)`, `prt - production today`, `pru - production lifetime upload`, `prut - production today upload`, `cn - consumption net lifetime`, `cnit - net consumption interval Wh (same day only)`, `cnt - consumption net today`, `cnu - consumption net lifetime upload`, `cnut - consumption net today upload`, `ct - consumption total lifetime`, `ctit - total consumption interval Wh (same day only)`, `ctt - consumption total today`, `ctp - consumption total lifetime from pv`, `ctpt - consumption total today from pv`
|
|
344
|
+
Energy history stored every 1 minute at `:00` second and at `23:59:59` each day. Missing records are filled with `null` values; interval fields (`prit`, `cnit`, `ctit`) for gap records are distributed evenly across the gap when data resumes. Retention is controlled by `energyHistoryTime` and `energyHistoryReserveSpace` settings:
|
|
345
|
+
`ts - timestamp`, `pr - production lifetime`, `prit - production interval Wh between records (same day only, evenly distributed across gaps)`, `prt - production today`, `pru - production lifetime upload`, `prut - production today upload`, `cn - consumption net lifetime`, `cnit - net consumption interval Wh between records (same day only, evenly distributed across gaps)`, `cnt - consumption net today`, `cnu - consumption net lifetime upload`, `cnut - consumption net today upload`, `ct - consumption total lifetime`, `ctit - total consumption interval Wh between records (same day only, evenly distributed across gaps)`, `ctt - consumption total today`, `ctp - consumption total lifetime from pv`, `ctpt - consumption total today from pv`
|
|
346
346
|
|
|
347
347
|
| Method | Topic | Message | Type |
|
|
348
348
|
| --- | --- | --- | --- |
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"private": false,
|
|
3
3
|
"displayName": "Enphase Envoy",
|
|
4
4
|
"name": "homebridge-enphase-envoy",
|
|
5
|
-
"version": "10.7.
|
|
5
|
+
"version": "10.7.3",
|
|
6
6
|
"description": "Homebridge plugin for Photovoltaic Energy System manufactured by Enphase.",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"author": "grzegorz914",
|
package/src/envoydevice.js
CHANGED
|
@@ -4373,6 +4373,7 @@ class EnvoyDevice extends EventEmitter {
|
|
|
4373
4373
|
|
|
4374
4374
|
const lastTs = energyHistory.reduce((max, item) => (item?.ts > max ? item.ts : max), 0);
|
|
4375
4375
|
const targetTs = needsEndOfDaySave ? Math.max(minuteTs, endOfDayTs) : minuteTs;
|
|
4376
|
+
const historyLengthBeforeAdding = energyHistory.length;
|
|
4376
4377
|
|
|
4377
4378
|
if (lastTs > 0) {
|
|
4378
4379
|
|
|
@@ -4413,6 +4414,33 @@ class EnvoyDevice extends EventEmitter {
|
|
|
4413
4414
|
|
|
4414
4415
|
}
|
|
4415
4416
|
|
|
4417
|
+
// Distribute interval spike evenly across preceding gap records
|
|
4418
|
+
for (let i = historyLengthBeforeAdding; i < energyHistory.length; i++) {
|
|
4419
|
+
const rec = energyHistory[i];
|
|
4420
|
+
if (!rec || rec.pr === null) continue;
|
|
4421
|
+
|
|
4422
|
+
const gapIndices = [];
|
|
4423
|
+
for (let j = i - 1; j >= 0 && energyHistory[j]?.pr === null; j--) {
|
|
4424
|
+
gapIndices.unshift(j);
|
|
4425
|
+
}
|
|
4426
|
+
|
|
4427
|
+
if (gapIndices.length === 0) continue;
|
|
4428
|
+
|
|
4429
|
+
const slots = gapIndices.length + 1;
|
|
4430
|
+
const pritSlot = r3(rec.prit / slots);
|
|
4431
|
+
const cnitSlot = r3(rec.cnit / slots);
|
|
4432
|
+
const ctitSlot = r3(rec.ctit / slots);
|
|
4433
|
+
|
|
4434
|
+
for (const idx of gapIndices) {
|
|
4435
|
+
energyHistory[idx].prit = pritSlot;
|
|
4436
|
+
energyHistory[idx].cnit = cnitSlot;
|
|
4437
|
+
energyHistory[idx].ctit = ctitSlot;
|
|
4438
|
+
}
|
|
4439
|
+
rec.prit = pritSlot;
|
|
4440
|
+
rec.cnit = cnitSlot;
|
|
4441
|
+
rec.ctit = ctitSlot;
|
|
4442
|
+
}
|
|
4443
|
+
|
|
4416
4444
|
if (needsMinuteSave) this._lastSavedMinuteTs = minuteTs;
|
|
4417
4445
|
if (needsEndOfDaySave) this._lastSavedEndOfDayDate = todayStr;
|
|
4418
4446
|
|