homebridge-enphase-envoy 10.3.1-beta.5 → 10.3.1-beta.7
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/package.json +1 -1
- package/src/envoydata.js +13 -14
- package/src/envoydevice.js +2 -1
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.3.1-beta.
|
|
5
|
+
"version": "10.3.1-beta.7",
|
|
6
6
|
"description": "Homebridge p7ugin for Photovoltaic Energy System manufactured by Enphase.",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"author": "grzegorz914",
|
package/src/envoydata.js
CHANGED
|
@@ -906,17 +906,16 @@ class EnvoyData extends EventEmitter {
|
|
|
906
906
|
const home = response.data;
|
|
907
907
|
if (this.logDebug) this.emit('debug', 'Home:', home);
|
|
908
908
|
|
|
909
|
-
const comm = home.comm ?? {};
|
|
910
909
|
const network = home.network ?? {};
|
|
911
|
-
|
|
912
|
-
|
|
910
|
+
network.interfaces = (network.interfaces ?? []).filter(iface => iface.ip !== '169.254.120.1');
|
|
911
|
+
home.wireless_connection = (home.wireless_connection ?? []).filter(kit => kit.signal_strength_max > 0);
|
|
913
912
|
|
|
914
913
|
// Communication device support flags
|
|
915
|
-
const microinvertersSupported = 'pcu' in comm;
|
|
916
|
-
const acBatteriesSupported = 'acb' in comm;
|
|
917
|
-
const qRelaysSupported = 'nsrb' in comm;
|
|
918
|
-
const ensemblesSupported = 'esub' in comm;
|
|
919
|
-
const enchargesSupported = 'encharge' in comm;
|
|
914
|
+
const microinvertersSupported = 'pcu' in home.comm;
|
|
915
|
+
const acBatteriesSupported = 'acb' in home.comm;
|
|
916
|
+
const qRelaysSupported = 'nsrb' in home.comm;
|
|
917
|
+
const ensemblesSupported = 'esub' in home.comm;
|
|
918
|
+
const enchargesSupported = 'encharge' in home.comm;
|
|
920
919
|
this.pv.home = home;
|
|
921
920
|
|
|
922
921
|
// Update feature flags
|
|
@@ -926,13 +925,13 @@ class EnvoyData extends EventEmitter {
|
|
|
926
925
|
this.feature.inventory.esubs.supported = ensemblesSupported;
|
|
927
926
|
this.feature.inventory.esubs.encharges.supported = enchargesSupported;
|
|
928
927
|
|
|
929
|
-
this.feature.home.networkInterfaces.supported =
|
|
930
|
-
this.feature.home.networkInterfaces.installed =
|
|
931
|
-
this.feature.home.networkInterfaces.count =
|
|
928
|
+
this.feature.home.networkInterfaces.supported = network.interfaces.length > 0;
|
|
929
|
+
this.feature.home.networkInterfaces.installed = network.interfaces.some(i => i.carrier);
|
|
930
|
+
this.feature.home.networkInterfaces.count = network.interfaces.length;
|
|
932
931
|
|
|
933
|
-
this.feature.home.wirelessConnections.supported =
|
|
934
|
-
this.feature.home.wirelessConnections.installed =
|
|
935
|
-
this.feature.home.wirelessConnections.count =
|
|
932
|
+
this.feature.home.wirelessConnections.supported = home.wireless_connection.length > 0;
|
|
933
|
+
this.feature.home.wirelessConnections.installed = home.wireless_connection.some(w => w.connected);
|
|
934
|
+
this.feature.home.wirelessConnections.count = home.wireless_connection.length;
|
|
936
935
|
this.feature.home.supported = true;
|
|
937
936
|
|
|
938
937
|
// RESTful + MQTT
|
package/src/envoydevice.js
CHANGED
|
@@ -3205,7 +3205,8 @@ class EnvoyDevice extends EventEmitter {
|
|
|
3205
3205
|
const comm = home.comm ?? {};
|
|
3206
3206
|
const network = home.network ?? {};
|
|
3207
3207
|
const wirelessConnections = home.wireless_connection ?? [];
|
|
3208
|
-
const networkInterfaces = network.interfaces ?? []
|
|
3208
|
+
const networkInterfaces = network.interfaces ?? []
|
|
3209
|
+
|
|
3209
3210
|
// Communication device support flags
|
|
3210
3211
|
const commEnsemble = comm.esub ?? {};
|
|
3211
3212
|
const commEncharges = Array.isArray(comm.encharge) ? comm.encharge : [];
|