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 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",
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
- const wirelessConnections = home.wireless_connection ?? [];
912
- const networkInterfaces = network.interfaces ?? [];
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 = networkInterfaces.length > 0;
930
- this.feature.home.networkInterfaces.installed = networkInterfaces.some(i => i.signal_strength_max > 0);
931
- this.feature.home.networkInterfaces.count = networkInterfaces.length;
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 = wirelessConnections.length > 0;
934
- this.feature.home.wirelessConnections.installed = wirelessConnections.some(w => w.signal_strength_max > 0);
935
- this.feature.home.wirelessConnections.count = wirelessConnections.length;
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
@@ -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 : [];