homebridge-enphase-envoy 10.8.3 → 10.8.4
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/package.json +1 -1
- package/src/envoydata.js +21 -6
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.8.4] - (16.11.2026)
|
|
15
|
+
|
|
16
|
+
### Changes
|
|
17
|
+
|
|
18
|
+
- fixed: the power factor was above 1 (about 2.9) and the voltage about 710 V for a three phase installation after the update of the gateway to D8.3.6022, the gateway reports the sum of the phases, the power factor is now calculated as the active power to the apparent power, and the voltage of the production.json is divided by the number of the phases
|
|
19
|
+
|
|
14
20
|
## [10.8.3] - (04.11.2026)
|
|
15
21
|
|
|
16
22
|
### Changes
|
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.8.
|
|
5
|
+
"version": "10.8.4",
|
|
6
6
|
"description": "Homebridge plugin for Photovoltaic Energy System manufactured by Enphase.",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"author": "grzegorz914",
|
package/src/envoydata.js
CHANGED
|
@@ -1212,6 +1212,21 @@ class EnvoyData extends EventEmitter {
|
|
|
1212
1212
|
}
|
|
1213
1213
|
}
|
|
1214
1214
|
|
|
1215
|
+
// The gateway reports the sum of the phase voltages in the production.json for a split and three phase installation
|
|
1216
|
+
countPhases(lines) {
|
|
1217
|
+
return (lines ?? []).filter(line => line.rmsVoltage > 0).length || 1;
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
// For a three phase installation the gateway (firmware D8.3.6022 and newer) reports the sum of the phase power factors, so the value
|
|
1221
|
+
// is above 1, the power factor of the installation is the ratio of the active power to the apparent power
|
|
1222
|
+
calculatePowerFactor(pwrFactor, divide, phases, activePower, apparentPower) {
|
|
1223
|
+
if (phases >= 3 && apparentPower > 0) {
|
|
1224
|
+
const value = Math.round(activePower / apparentPower * 1000) / 1000;
|
|
1225
|
+
return Math.max(-1, Math.min(1, value));
|
|
1226
|
+
}
|
|
1227
|
+
return pwrFactor / divide;
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1215
1230
|
async updateMetersReading(start) {
|
|
1216
1231
|
if (this.logDebug) this.emit('debug', `Requesting meters reading`);
|
|
1217
1232
|
|
|
@@ -1237,7 +1252,7 @@ class EnvoyData extends EventEmitter {
|
|
|
1237
1252
|
apparentEnergy: meter.apparentEnergy,
|
|
1238
1253
|
current: meter.current,
|
|
1239
1254
|
voltage: meter.voltage / meterConfig.voltageDivide,
|
|
1240
|
-
pwrFactor: meter.pwrFactor
|
|
1255
|
+
pwrFactor: this.calculatePowerFactor(meter.pwrFactor, meterConfig.powerFactorDivide, meterConfig.phaseCount, meter.activePower, meter.apparentPower),
|
|
1241
1256
|
frequency: meter.freq,
|
|
1242
1257
|
channels: meter.channels ?? [],
|
|
1243
1258
|
};
|
|
@@ -1293,7 +1308,7 @@ class EnvoyData extends EventEmitter {
|
|
|
1293
1308
|
apparentEnergy: cumulative.vahCum,
|
|
1294
1309
|
current: cumulative.rmsCurrent,
|
|
1295
1310
|
voltage: cumulative.rmsVoltage / meterConfig.voltageDivide,
|
|
1296
|
-
pwrFactor: cumulative.pwrFactor
|
|
1311
|
+
pwrFactor: this.calculatePowerFactor(cumulative.pwrFactor, meterConfig.powerFactorDivide, meterConfig.phaseCount, cumulative.actPower, cumulative.apprntPwr),
|
|
1297
1312
|
frequency: cumulative.freqHz,
|
|
1298
1313
|
channels: meter.lines ?? [],
|
|
1299
1314
|
};
|
|
@@ -1686,8 +1701,8 @@ class EnvoyData extends EventEmitter {
|
|
|
1686
1701
|
reactivePower: productionEim.reactPwr,
|
|
1687
1702
|
apparentPower: productionEim.apprntPwr,
|
|
1688
1703
|
current: productionEim.rmsCurrent,
|
|
1689
|
-
voltage: productionEim.rmsVoltage,
|
|
1690
|
-
pwrFactor: productionEim.pwrFactor
|
|
1704
|
+
voltage: productionEim.rmsVoltage / this.countPhases(productionEim.lines),
|
|
1705
|
+
pwrFactor: this.calculatePowerFactor(productionEim.pwrFactor, 1, this.countPhases(productionEim.lines), productionEim.wNow, productionEim.apprntPwr)
|
|
1691
1706
|
};
|
|
1692
1707
|
this.pv.powerAndEnergy.production.eim = obj;
|
|
1693
1708
|
this.feature.productionCt.production.eim.supported = true;
|
|
@@ -1713,8 +1728,8 @@ class EnvoyData extends EventEmitter {
|
|
|
1713
1728
|
reactivePower: item.reactPwr,
|
|
1714
1729
|
apparentPower: item.apprntPwr,
|
|
1715
1730
|
current: item.rmsCurrent,
|
|
1716
|
-
voltage: item.rmsVoltage,
|
|
1717
|
-
pwrFactor: item.pwrFactor
|
|
1731
|
+
voltage: item.rmsVoltage / this.countPhases(item.lines),
|
|
1732
|
+
pwrFactor: this.calculatePowerFactor(item.pwrFactor, 1, this.countPhases(item.lines), item.wNow, item.apprntPwr)
|
|
1718
1733
|
};
|
|
1719
1734
|
Object.assign(this.pv.powerAndEnergy[key], obj);
|
|
1720
1735
|
this.feature.productionCt[key].supported = true;
|