homebridge-enphase-envoy 10.2.2-beta.99 → 10.2.2
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 +12 -0
- package/README.md +2 -2
- package/index.js +9 -12
- package/package.json +1 -1
- package/src/customcharacteristics.js +4 -4
- package/src/energymeter.js +287 -384
- package/src/envoydata.js +79 -71
- package/src/envoydevice.js +854 -886
- package/src/functions.js +53 -29
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
9
9
|
|
|
10
10
|
- after update to v10.0.0 and above the accessory and bridge need to be removed from the homebridge / Home.app and added again
|
|
11
11
|
|
|
12
|
+
## [10.2.2] - (12.10.2025)
|
|
13
|
+
|
|
14
|
+
## Changes
|
|
15
|
+
|
|
16
|
+
- fix power level not refresh if meter production not enabled [#213](https://github.com/grzegorz914/homebridge-enphase-envoy/issues/213)
|
|
17
|
+
- fix enable live data stream [#214](https://github.com/grzegorz914/homebridge-enphase-envoy/issues/214)
|
|
18
|
+
- changed OFF state to < 0.5% for power and backup level accessory, before was OFF if level < 1%
|
|
19
|
+
- stability and performance improvements
|
|
20
|
+
- other small fixes
|
|
21
|
+
- redme updates
|
|
22
|
+
- cleanup
|
|
23
|
+
|
|
12
24
|
## [10.2.1] - (03.10.2025)
|
|
13
25
|
|
|
14
26
|
## Changes
|
package/README.md
CHANGED
|
@@ -312,7 +312,7 @@ Path `status` response all available paths.
|
|
|
312
312
|
|
|
313
313
|
| Method | URL | Path | Response | Type |
|
|
314
314
|
| --- | --- | --- | --- | --- |
|
|
315
|
-
| GET | `http//ip:port` | `token`, `info`, `home`, `homedata`, `inventory`, `microinvertersstatus`, `meters`, `metersreading`, `metersreports`, `detaileddevicesdata`, `microinvertersdata`, `qrelaysdata`, `metersdata`, `production`, `productionpdm`, `energypdm`, `productionct`,`powerandenergydata`, `acbatterydata`, `ensembleinventory`, `ensemblestatus`, `ensemblepower`, `enchargesettings`, `tariff`, `drycontacts`, `drycontactssettings`, `generator`, `generatorsettings`, `ensembledata`, `gridprofile`, `livedata`, `productionstate`, `plclevel`, `datasampling`. | `{wNow: 2353}` | JSON |
|
|
315
|
+
| GET | `http//ip:port` | `token`, `info`, `home`, `homedata`, `inventory`, `microinvertersstatus`, `meters`, `metersreading`, `metersreports`, `detaileddevicesdata`, `microinvertersdata`, `qrelaysdata`, `metersdata`, `production`, `productionpdm`, `energypdm`, `productionct`,`powerandenergydata`, `acbatterydata`, `ensembleinventory`, `ensemblestatus`, `ensemblepower`, `enchargesettings`, `tariff`, `drycontacts`, `drycontactssettings`, `generator`, `generatorsettings`, `ensembledata`, `gridprofile`, `livedata`, `livedatadata`, `productionstate`, `plclevel`, `datasampling`. | `{wNow: 2353}` | JSON |
|
|
316
316
|
|
|
317
317
|
| Method | URL | Key | Value | Type | Description |
|
|
318
318
|
| --- | --- | --- | --- | --- | --- |
|
|
@@ -331,7 +331,7 @@ Subscribe using JSON `{ "EnchargeProfile": "savings" }`
|
|
|
331
331
|
|
|
332
332
|
| Method | Topic | Message | Type |
|
|
333
333
|
| --- | --- | --- | --- |
|
|
334
|
-
| Publish | `Token`, `Info`, `Home`, `Home Data`, `Inventory`, `Microinverters Status`, `Meters`, `Meters Reading`, `Meters Reports`, `Detailed Devices Data`, `Microinverters Data`, `Q-Relays Data`, `Meters Data`, `Production`, `Production Pdm`, `Energy Pdm`, `Production CT`, `Power And Energy Data`, `AC Battery Data`, `Ensemble Inventory`, `Ensemble Status`, `Ensemble Status`, `Encharge Power`, `Tariff`, `Dry Contacts`, `Dry Contacts Settings`, `Generator`, `Generator Settings`, `Ensemble Data`, `Grid Profile`, `Live Data`, `Production State`, `PLC Level`, `Data Sampling` | `{wNow: 2353}` | JSON |
|
|
334
|
+
| Publish | `Token`, `Info`, `Home`, `Home Data`, `Inventory`, `Microinverters Status`, `Meters`, `Meters Reading`, `Meters Reports`, `Detailed Devices Data`, `Microinverters Data`, `Q-Relays Data`, `Meters Data`, `Production`, `Production Pdm`, `Energy Pdm`, `Production CT`, `Power And Energy Data`, `AC Battery Data`, `Ensemble Inventory`, `Ensemble Status`, `Ensemble Status`, `Encharge Power`, `Tariff`, `Dry Contacts`, `Dry Contacts Settings`, `Generator`, `Generator Settings`, `Ensemble Data`, `Grid Profile`, `Live Data`, `Live Data Data`, `Production State`, `PLC Level`, `Data Sampling` | `{wNow: 2353}` | JSON |
|
|
335
335
|
|
|
336
336
|
| Method | Topic | Key | Value | Type | Description |
|
|
337
337
|
| --- | --- | --- | --- | --- | --- |
|
package/index.js
CHANGED
|
@@ -5,7 +5,6 @@ import EnergyMeter from './src/energymeter.js';
|
|
|
5
5
|
import ImpulseGenerator from './src/impulsegenerator.js';
|
|
6
6
|
import { PluginName, PlatformName } from './src/constants.js';
|
|
7
7
|
import CustomCharacteristics from './src/customcharacteristics.js';
|
|
8
|
-
import fakegato from 'fakegato-history';
|
|
9
8
|
|
|
10
9
|
class EnvoyPlatform {
|
|
11
10
|
constructor(log, config, api) {
|
|
@@ -16,7 +15,6 @@ class EnvoyPlatform {
|
|
|
16
15
|
|
|
17
16
|
this.log = log;
|
|
18
17
|
this.accessories = [];
|
|
19
|
-
this.FakeGatoHistoryService = fakegato(api);
|
|
20
18
|
|
|
21
19
|
const prefDir = join(api.user.storagePath(), 'enphaseEnvoy');
|
|
22
20
|
try {
|
|
@@ -80,7 +78,7 @@ class EnvoyPlatform {
|
|
|
80
78
|
const postFix = host.split('.').join('');
|
|
81
79
|
const envoyIdFile = join(prefDir, `envoyId_${postFix}`);
|
|
82
80
|
const envoyTokenFile = join(prefDir, `envoyToken_${postFix}`);
|
|
83
|
-
const
|
|
81
|
+
const energyMeterHistoryFileName = `energyMeterHistory_${postFix}.json`;
|
|
84
82
|
|
|
85
83
|
try {
|
|
86
84
|
[envoyIdFile, envoyTokenFile].forEach(file => {
|
|
@@ -100,21 +98,21 @@ class EnvoyPlatform {
|
|
|
100
98
|
const impulseGenerator = new ImpulseGenerator()
|
|
101
99
|
.on('start', async () => {
|
|
102
100
|
try {
|
|
103
|
-
const envoyDevice = new DeviceClass(api, accessoryName, host, displayType, envoyFirmware7xxTokenGenerationMode, envoyPasswd, envoyToken, envoyTokenInstaller, enlightenUser, enlightenPasswd, envoyIdFile, envoyTokenFile, device,
|
|
101
|
+
const envoyDevice = new DeviceClass(api, accessoryName, host, displayType, envoyFirmware7xxTokenGenerationMode, envoyPasswd, envoyToken, envoyTokenInstaller, enlightenUser, enlightenPasswd, envoyIdFile, envoyTokenFile, device, prefDir, energyMeterHistoryFileName)
|
|
104
102
|
.on('devInfo', (info) => logLevel.devInfo && log.info(info))
|
|
105
|
-
.on('success', (msg) => logLevel.success && log.success(`Device: ${host} ${
|
|
106
|
-
.on('info', (msg) => logLevel.info && log.info(`Device: ${host} ${
|
|
107
|
-
.on('debug', (msg, data) => logLevel.debug && log.info(`Device: ${host} ${
|
|
108
|
-
.on('warn', (msg) => logLevel.warn && log.warn(`Device: ${host} ${
|
|
109
|
-
.on('error', (msg) => logLevel.error && log.error(`Device: ${host} ${
|
|
103
|
+
.on('success', (msg) => logLevel.success && log.success(`Device: ${host} ${accessoryName}, ${msg}`))
|
|
104
|
+
.on('info', (msg) => logLevel.info && log.info(`Device: ${host} ${accessoryName}, ${msg}`))
|
|
105
|
+
.on('debug', (msg, data) => logLevel.debug && log.info(`Device: ${host} ${accessoryName}, debug: ${data ? `${msg} ${JSON.stringify(data, null, 2)}` : msg}`))
|
|
106
|
+
.on('warn', (msg) => logLevel.warn && log.warn(`Device: ${host} ${accessoryName}, ${msg}`))
|
|
107
|
+
.on('error', (msg) => logLevel.error && log.error(`Device: ${host} ${accessoryName}, ${msg}`));
|
|
110
108
|
|
|
111
109
|
const accessory = await envoyDevice.start();
|
|
112
110
|
if (accessory) {
|
|
113
111
|
api.publishExternalAccessories(PluginName, [accessory]);
|
|
114
|
-
if (logLevel.success) log.success(`Device: ${host} ${
|
|
112
|
+
if (logLevel.success) log.success(`Device: ${host} ${accessoryName}, Published as external accessory.`);
|
|
115
113
|
|
|
116
114
|
await impulseGenerator.stop();
|
|
117
|
-
await envoyDevice.
|
|
115
|
+
await envoyDevice.startStopImpulseGenerator(true);
|
|
118
116
|
}
|
|
119
117
|
} catch (error) {
|
|
120
118
|
if (logLevel.error) log.error(`Device: ${host} ${accessoryName}, Start impulse generator error: ${error}, retrying.`);
|
|
@@ -136,7 +134,6 @@ class EnvoyPlatform {
|
|
|
136
134
|
|
|
137
135
|
configureAccessory(accessory) {
|
|
138
136
|
accessory.log = this.log;
|
|
139
|
-
this.loggingService = new fakegato('energy', accessory, 4032);
|
|
140
137
|
this.accessories.push(accessory);
|
|
141
138
|
}
|
|
142
139
|
}
|
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.2.2
|
|
5
|
+
"version": "10.2.2",
|
|
6
6
|
"description": "Homebridge p7ugin for Photovoltaic Energy System manufactured by Enphase.",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"author": "grzegorz914",
|
|
@@ -2279,7 +2279,7 @@ export default (api) => {
|
|
|
2279
2279
|
format: Formats.FLOAT,
|
|
2280
2280
|
unit: 'kWh',
|
|
2281
2281
|
maxValue: 4294967295,
|
|
2282
|
-
minValue:
|
|
2282
|
+
minValue: -100000,
|
|
2283
2283
|
minStep: 0.001,
|
|
2284
2284
|
perms: [Perms.PAIRED_READ, Perms.NOTIFY]
|
|
2285
2285
|
});
|
|
@@ -2304,7 +2304,7 @@ export default (api) => {
|
|
|
2304
2304
|
}
|
|
2305
2305
|
Characteristic.EveVoltage = EveVoltage;
|
|
2306
2306
|
|
|
2307
|
-
class
|
|
2307
|
+
class EveCurrent extends Characteristic {
|
|
2308
2308
|
constructor() {
|
|
2309
2309
|
super('Current', 'E863F126-079E-48FF-8F27-9C2605A29F52');
|
|
2310
2310
|
this.setProps({
|
|
@@ -2318,7 +2318,7 @@ export default (api) => {
|
|
|
2318
2318
|
this.value = this.getDefaultValue();
|
|
2319
2319
|
}
|
|
2320
2320
|
}
|
|
2321
|
-
Characteristic.
|
|
2321
|
+
Characteristic.EveCurrent = EveCurrent;
|
|
2322
2322
|
|
|
2323
2323
|
class EveResetTime extends Characteristic {
|
|
2324
2324
|
constructor() {
|
|
@@ -2342,7 +2342,7 @@ export default (api) => {
|
|
|
2342
2342
|
this.addCharacteristic(Characteristic.EveTotalConsumption);
|
|
2343
2343
|
// Optional Characteristics
|
|
2344
2344
|
this.addOptionalCharacteristic(Characteristic.EveVoltage);
|
|
2345
|
-
this.addOptionalCharacteristic(Characteristic.
|
|
2345
|
+
this.addOptionalCharacteristic(Characteristic.EveCurrent);
|
|
2346
2346
|
this.addOptionalCharacteristic(Characteristic.EveResetTime);
|
|
2347
2347
|
this.addOptionalCharacteristic(Characteristic.ConfiguredName);
|
|
2348
2348
|
}
|