homebridge-enphase-envoy 9.4.1 → 9.4.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 +9 -0
- package/config.schema.json +7 -13
- package/package.json +1 -1
- package/src/envoydevice.js +27 -26
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [9.4.2] - (11.11.2024)
|
|
9
|
+
|
|
10
|
+
## Changes
|
|
11
|
+
|
|
12
|
+
- fix reconnect if error ocurred during start
|
|
13
|
+
- correct some logs wording
|
|
14
|
+
- config.schema updated
|
|
15
|
+
- cleanup
|
|
16
|
+
|
|
8
17
|
## [9.4.1] - (30.10.2024)
|
|
9
18
|
|
|
10
19
|
## Changes
|
package/config.schema.json
CHANGED
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"condition": {
|
|
60
60
|
"functionBody": "return model.devices[arrayIndices].envoyFirmware7xx === true;"
|
|
61
61
|
},
|
|
62
|
-
"required":
|
|
62
|
+
"required": false
|
|
63
63
|
},
|
|
64
64
|
"envoyPasswd": {
|
|
65
65
|
"title": "Envoy Password",
|
|
@@ -1081,7 +1081,6 @@
|
|
|
1081
1081
|
"profile": {
|
|
1082
1082
|
"title": "Profile",
|
|
1083
1083
|
"type": "string",
|
|
1084
|
-
"default": "backup",
|
|
1085
1084
|
"oneOf": [
|
|
1086
1085
|
{
|
|
1087
1086
|
"title": "Savings",
|
|
@@ -1121,7 +1120,7 @@
|
|
|
1121
1120
|
}
|
|
1122
1121
|
],
|
|
1123
1122
|
"description": "Here select the profile.",
|
|
1124
|
-
"required":
|
|
1123
|
+
"required": false
|
|
1125
1124
|
},
|
|
1126
1125
|
"displayType": {
|
|
1127
1126
|
"title": "Type",
|
|
@@ -1237,7 +1236,6 @@
|
|
|
1237
1236
|
"gridMode": {
|
|
1238
1237
|
"title": "Mode",
|
|
1239
1238
|
"type": "string",
|
|
1240
|
-
"default": "on-grid",
|
|
1241
1239
|
"oneOf": [
|
|
1242
1240
|
{
|
|
1243
1241
|
"title": "Grid On",
|
|
@@ -1277,7 +1275,7 @@
|
|
|
1277
1275
|
}
|
|
1278
1276
|
],
|
|
1279
1277
|
"description": "Here select the grid mode.",
|
|
1280
|
-
"required":
|
|
1278
|
+
"required": false
|
|
1281
1279
|
},
|
|
1282
1280
|
"displayType": {
|
|
1283
1281
|
"title": "Type",
|
|
@@ -1342,7 +1340,6 @@
|
|
|
1342
1340
|
"compareMode": {
|
|
1343
1341
|
"title": "Compare Mode",
|
|
1344
1342
|
"type": "integer",
|
|
1345
|
-
"default": 2,
|
|
1346
1343
|
"oneOf": [
|
|
1347
1344
|
{
|
|
1348
1345
|
"title": ">",
|
|
@@ -1376,7 +1373,7 @@
|
|
|
1376
1373
|
}
|
|
1377
1374
|
],
|
|
1378
1375
|
"description": "Here select the compare mode.",
|
|
1379
|
-
"required":
|
|
1376
|
+
"required": false
|
|
1380
1377
|
},
|
|
1381
1378
|
"backupLevel": {
|
|
1382
1379
|
"title": "Level",
|
|
@@ -1558,7 +1555,6 @@
|
|
|
1558
1555
|
"gridMode": {
|
|
1559
1556
|
"title": "Mode",
|
|
1560
1557
|
"type": "string",
|
|
1561
|
-
"default": "on-grid",
|
|
1562
1558
|
"oneOf": [
|
|
1563
1559
|
{
|
|
1564
1560
|
"title": "Grid On",
|
|
@@ -1598,7 +1594,7 @@
|
|
|
1598
1594
|
}
|
|
1599
1595
|
],
|
|
1600
1596
|
"description": "Here select the grid mode.",
|
|
1601
|
-
"required":
|
|
1597
|
+
"required": false
|
|
1602
1598
|
},
|
|
1603
1599
|
"displayType": {
|
|
1604
1600
|
"title": "Type",
|
|
@@ -1674,7 +1670,6 @@
|
|
|
1674
1670
|
"gridMode": {
|
|
1675
1671
|
"title": "Mode",
|
|
1676
1672
|
"type": "string",
|
|
1677
|
-
"default": "on-grid",
|
|
1678
1673
|
"oneOf": [
|
|
1679
1674
|
{
|
|
1680
1675
|
"title": "Grid On",
|
|
@@ -1714,7 +1709,7 @@
|
|
|
1714
1709
|
}
|
|
1715
1710
|
],
|
|
1716
1711
|
"description": "Here select the grid mode.",
|
|
1717
|
-
"required":
|
|
1712
|
+
"required": false
|
|
1718
1713
|
},
|
|
1719
1714
|
"displayType": {
|
|
1720
1715
|
"title": "Type",
|
|
@@ -1971,7 +1966,6 @@
|
|
|
1971
1966
|
"mode": {
|
|
1972
1967
|
"title": "Mode",
|
|
1973
1968
|
"type": "string",
|
|
1974
|
-
"default": "off",
|
|
1975
1969
|
"oneOf": [
|
|
1976
1970
|
{
|
|
1977
1971
|
"title": "Off",
|
|
@@ -1993,7 +1987,7 @@
|
|
|
1993
1987
|
}
|
|
1994
1988
|
],
|
|
1995
1989
|
"description": "Here select the mode.",
|
|
1996
|
-
"required":
|
|
1990
|
+
"required": false
|
|
1997
1991
|
},
|
|
1998
1992
|
"displayType": {
|
|
1999
1993
|
"title": "Type",
|
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": "9.4.
|
|
5
|
+
"version": "9.4.2",
|
|
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
|
@@ -1045,7 +1045,7 @@ class EnvoyDevice extends EventEmitter {
|
|
|
1045
1045
|
|
|
1046
1046
|
return true;
|
|
1047
1047
|
} catch (error) {
|
|
1048
|
-
|
|
1048
|
+
throw new Error(`Start error: ${error}`);
|
|
1049
1049
|
};
|
|
1050
1050
|
};
|
|
1051
1051
|
|
|
@@ -1098,7 +1098,7 @@ class EnvoyDevice extends EventEmitter {
|
|
|
1098
1098
|
return true;
|
|
1099
1099
|
} catch (error) {
|
|
1100
1100
|
this.getJwtTokenRunning = this.getJwtTokenRunning ? false : this.getJwtTokenRunning;
|
|
1101
|
-
throw new Error(`
|
|
1101
|
+
throw new Error(`Get JWT token error: ${error.message || error}`);
|
|
1102
1102
|
};
|
|
1103
1103
|
};
|
|
1104
1104
|
|
|
@@ -1144,7 +1144,7 @@ class EnvoyDevice extends EventEmitter {
|
|
|
1144
1144
|
|
|
1145
1145
|
return true;
|
|
1146
1146
|
} catch (error) {
|
|
1147
|
-
throw new Error(`
|
|
1147
|
+
throw new Error(`Validate JWT token error: ${error.message || error}`);
|
|
1148
1148
|
};
|
|
1149
1149
|
};
|
|
1150
1150
|
|
|
@@ -1299,7 +1299,7 @@ class EnvoyDevice extends EventEmitter {
|
|
|
1299
1299
|
const mqtt = this.mqttConnected ? this.mqtt.emit('publish', 'Info', parseInfoData) : false;
|
|
1300
1300
|
return true;
|
|
1301
1301
|
} catch (error) {
|
|
1302
|
-
throw new Error(`
|
|
1302
|
+
throw new Error(`Update info error: ${error.message || error}`);
|
|
1303
1303
|
};
|
|
1304
1304
|
};
|
|
1305
1305
|
|
|
@@ -1322,7 +1322,7 @@ class EnvoyDevice extends EventEmitter {
|
|
|
1322
1322
|
|
|
1323
1323
|
return true;
|
|
1324
1324
|
} catch (error) {
|
|
1325
|
-
this.emit('warn', `
|
|
1325
|
+
this.emit('warn', `Calculaate envoy password error: ${error.message || error}, dont worry all working correct, only the power and power max of microinverters will not be displayed.`);
|
|
1326
1326
|
return false;
|
|
1327
1327
|
};
|
|
1328
1328
|
};
|
|
@@ -1375,7 +1375,7 @@ class EnvoyDevice extends EventEmitter {
|
|
|
1375
1375
|
|
|
1376
1376
|
return true;
|
|
1377
1377
|
} catch (error) {
|
|
1378
|
-
this.emit('warn', `
|
|
1378
|
+
this.emit('warn', `Calculate installer password error: ${error.message || error}, dont worry all working correct, only the power production state/control and plc level will not be displayed.`);
|
|
1379
1379
|
return false;
|
|
1380
1380
|
};
|
|
1381
1381
|
};
|
|
@@ -1546,7 +1546,7 @@ class EnvoyDevice extends EventEmitter {
|
|
|
1546
1546
|
const mqtt = this.mqttConnected ? this.mqtt.emit('publish', 'Home', envoy) : false;
|
|
1547
1547
|
return true;
|
|
1548
1548
|
} catch (error) {
|
|
1549
|
-
throw new Error(`
|
|
1549
|
+
throw new Error(`Update home error: ${error.message || error}`);
|
|
1550
1550
|
};
|
|
1551
1551
|
};
|
|
1552
1552
|
|
|
@@ -1812,7 +1812,7 @@ class EnvoyDevice extends EventEmitter {
|
|
|
1812
1812
|
const mqtt = this.mqttConnected ? this.mqtt.emit('publish', 'Inventory', inventory) : false;
|
|
1813
1813
|
return true;
|
|
1814
1814
|
} catch (error) {
|
|
1815
|
-
throw new Error(`
|
|
1815
|
+
throw new Error(`Update inventory error: ${error.message || error}`);
|
|
1816
1816
|
};
|
|
1817
1817
|
};
|
|
1818
1818
|
|
|
@@ -1893,7 +1893,7 @@ class EnvoyDevice extends EventEmitter {
|
|
|
1893
1893
|
const mqtt = this.mqttConnected ? this.mqtt.emit('publish', 'Meters', meters) : false;
|
|
1894
1894
|
return metersEnabled;
|
|
1895
1895
|
} catch (error) {
|
|
1896
|
-
throw new Error(`
|
|
1896
|
+
throw new Error(`Update meters error: ${error.message || error}`);
|
|
1897
1897
|
};
|
|
1898
1898
|
};
|
|
1899
1899
|
|
|
@@ -1960,7 +1960,7 @@ class EnvoyDevice extends EventEmitter {
|
|
|
1960
1960
|
const mqtt = this.mqttConnected ? this.mqtt.emit('publish', 'Meters Reading', metersReading) : false;
|
|
1961
1961
|
return true;
|
|
1962
1962
|
} catch (error) {
|
|
1963
|
-
throw new Error(`
|
|
1963
|
+
throw new Error(`Update meters reading error: ${error.message || error}`);
|
|
1964
1964
|
};
|
|
1965
1965
|
};
|
|
1966
1966
|
|
|
@@ -2017,7 +2017,7 @@ class EnvoyDevice extends EventEmitter {
|
|
|
2017
2017
|
const mqtt = this.mqttConnected ? this.mqtt.emit('publish', 'Microinverters', microinverters) : false;
|
|
2018
2018
|
return true;
|
|
2019
2019
|
} catch (error) {
|
|
2020
|
-
throw new Error(`
|
|
2020
|
+
throw new Error(`Update microinverters status error: ${error.message || error}`);
|
|
2021
2021
|
};
|
|
2022
2022
|
};
|
|
2023
2023
|
|
|
@@ -2057,7 +2057,7 @@ class EnvoyDevice extends EventEmitter {
|
|
|
2057
2057
|
const mqtt = this.mqttConnected ? this.mqtt.emit('publish', 'Production', production) : false;
|
|
2058
2058
|
return true;
|
|
2059
2059
|
} catch (error) {
|
|
2060
|
-
throw new Error(`
|
|
2060
|
+
throw new Error(`Update production error: ${error.message || error}`);
|
|
2061
2061
|
};
|
|
2062
2062
|
};
|
|
2063
2063
|
|
|
@@ -2481,7 +2481,7 @@ class EnvoyDevice extends EventEmitter {
|
|
|
2481
2481
|
const mqtt = this.mqttConnected ? this.mqtt.emit('publish', 'Production CT', productionCtData) : false;
|
|
2482
2482
|
return true;
|
|
2483
2483
|
} catch (error) {
|
|
2484
|
-
throw new Error(`
|
|
2484
|
+
throw new Error(`Update production ct error: ${error.message || error}`);
|
|
2485
2485
|
};
|
|
2486
2486
|
};
|
|
2487
2487
|
|
|
@@ -2539,7 +2539,7 @@ class EnvoyDevice extends EventEmitter {
|
|
|
2539
2539
|
const mqtt = this.mqttConnected ? this.mqtt.emit('publish', 'Power Mode', powerProductionState) : false;
|
|
2540
2540
|
return true;
|
|
2541
2541
|
} catch (error) {
|
|
2542
|
-
throw new Error(`
|
|
2542
|
+
throw new Error(`Update power production state error: ${error.message || error}`);
|
|
2543
2543
|
};
|
|
2544
2544
|
};
|
|
2545
2545
|
|
|
@@ -2774,7 +2774,7 @@ class EnvoyDevice extends EventEmitter {
|
|
|
2774
2774
|
const mqtt = this.mqttConnected ? this.mqtt.emit('publish', 'Ensemble Inventory', ensembleInventory) : false;
|
|
2775
2775
|
return true;
|
|
2776
2776
|
} catch (error) {
|
|
2777
|
-
throw new Error(`
|
|
2777
|
+
throw new Error(`Update ensemble inventory error: ${error.message || error}`);
|
|
2778
2778
|
};
|
|
2779
2779
|
};
|
|
2780
2780
|
|
|
@@ -3098,7 +3098,7 @@ class EnvoyDevice extends EventEmitter {
|
|
|
3098
3098
|
const mqtt = this.mqttConnected ? this.mqtt.emit('publish', 'Ensemble Status', ensembleStatus) : false;
|
|
3099
3099
|
return true;
|
|
3100
3100
|
} catch (error) {
|
|
3101
|
-
throw new Error(`
|
|
3101
|
+
throw new Error(`Update ensemble status error: ${error.message || error}`);
|
|
3102
3102
|
};
|
|
3103
3103
|
};
|
|
3104
3104
|
|
|
@@ -3150,7 +3150,7 @@ class EnvoyDevice extends EventEmitter {
|
|
|
3150
3150
|
const mqtt = this.mqttConnected ? this.mqtt.emit('publish', 'Encharge Settings', enchargeSettings) : false;
|
|
3151
3151
|
return true;
|
|
3152
3152
|
} catch (error) {
|
|
3153
|
-
throw new Error(`
|
|
3153
|
+
throw new Error(`Update encharge settings. error: ${error.message || error}`);
|
|
3154
3154
|
};
|
|
3155
3155
|
};
|
|
3156
3156
|
|
|
@@ -3347,7 +3347,7 @@ class EnvoyDevice extends EventEmitter {
|
|
|
3347
3347
|
const mqtt = this.mqttConnected ? this.mqtt.emit('publish', 'Tariff', tariffSettings) : false;
|
|
3348
3348
|
return true;
|
|
3349
3349
|
} catch (error) {
|
|
3350
|
-
throw new Error(`
|
|
3350
|
+
throw new Error(`Update tariff. error: ${error.message || error}`);
|
|
3351
3351
|
};
|
|
3352
3352
|
};
|
|
3353
3353
|
|
|
@@ -3405,7 +3405,7 @@ class EnvoyDevice extends EventEmitter {
|
|
|
3405
3405
|
const mqtt = this.mqttConnected ? this.mqtt.emit('publish', 'Dry Contacts', ensembleDryContacts) : false;
|
|
3406
3406
|
return true;
|
|
3407
3407
|
} catch (error) {
|
|
3408
|
-
throw new Error(`
|
|
3408
|
+
throw new Error(`Update dry contacts error: ${error.message || error}`);
|
|
3409
3409
|
};
|
|
3410
3410
|
};
|
|
3411
3411
|
|
|
@@ -3470,7 +3470,7 @@ class EnvoyDevice extends EventEmitter {
|
|
|
3470
3470
|
const mqtt = this.mqttConnected ? this.mqtt.emit('publish', 'Dry Contacts Settings', ensembleDryContactsSettings) : false;
|
|
3471
3471
|
return true;
|
|
3472
3472
|
} catch (error) {
|
|
3473
|
-
throw new Error(`
|
|
3473
|
+
throw new Error(`Update dry contacts settings error: ${error.message || error}`);
|
|
3474
3474
|
};
|
|
3475
3475
|
};
|
|
3476
3476
|
|
|
@@ -3599,7 +3599,7 @@ class EnvoyDevice extends EventEmitter {
|
|
|
3599
3599
|
const mqtt = this.mqttConnected ? this.mqtt.emit('publish', 'Generator', ensembleGenerator) : false;
|
|
3600
3600
|
return true;
|
|
3601
3601
|
} catch (error) {
|
|
3602
|
-
throw new Error(`
|
|
3602
|
+
throw new Error(`Update generator error: ${error.message || error}`);
|
|
3603
3603
|
};
|
|
3604
3604
|
};
|
|
3605
3605
|
|
|
@@ -3647,7 +3647,7 @@ class EnvoyDevice extends EventEmitter {
|
|
|
3647
3647
|
const mqtt = this.mqttConnected ? this.mqtt.emit('publish', 'Generator Settings', generatorSettings) : false;
|
|
3648
3648
|
return true;
|
|
3649
3649
|
} catch (error) {
|
|
3650
|
-
throw new Error(`
|
|
3650
|
+
throw new Error(`Update generator settings error: ${error.message || error}`);
|
|
3651
3651
|
};
|
|
3652
3652
|
};
|
|
3653
3653
|
|
|
@@ -3756,7 +3756,7 @@ class EnvoyDevice extends EventEmitter {
|
|
|
3756
3756
|
const mqtt = this.mqttConnected ? this.mqtt.emit('publish', 'PLC Level', plcLevel) : false;
|
|
3757
3757
|
return true;
|
|
3758
3758
|
} catch (error) {
|
|
3759
|
-
throw new Error(`
|
|
3759
|
+
throw new Error(`Update plc level error: ${error.message || error}`);
|
|
3760
3760
|
};
|
|
3761
3761
|
};
|
|
3762
3762
|
|
|
@@ -3942,7 +3942,7 @@ class EnvoyDevice extends EventEmitter {
|
|
|
3942
3942
|
const mqtt = this.mqttConnected ? this.mqtt.emit('publish', 'Live Data', live) : false;
|
|
3943
3943
|
return true;
|
|
3944
3944
|
} catch (error) {
|
|
3945
|
-
throw new Error(`
|
|
3945
|
+
throw new Error(`Update live data error: ${error.message || error}`);
|
|
3946
3946
|
};
|
|
3947
3947
|
};
|
|
3948
3948
|
|
|
@@ -4145,7 +4145,7 @@ class EnvoyDevice extends EventEmitter {
|
|
|
4145
4145
|
const debug = this.enableDebugMode ? this.emit('debug', `Live data stream enable:`, response.data) : false;
|
|
4146
4146
|
return;
|
|
4147
4147
|
} catch (error) {
|
|
4148
|
-
throw new Error(`
|
|
4148
|
+
throw new Error(`Set live data stream enable error: ${error.message || error}`);
|
|
4149
4149
|
};
|
|
4150
4150
|
};
|
|
4151
4151
|
|
|
@@ -4276,7 +4276,8 @@ class EnvoyDevice extends EventEmitter {
|
|
|
4276
4276
|
.setCharacteristic(Characteristic.Manufacturer, 'Enphase')
|
|
4277
4277
|
.setCharacteristic(Characteristic.Model, this.pv.envoy.modelName ?? 'Model Name')
|
|
4278
4278
|
.setCharacteristic(Characteristic.SerialNumber, this.pv.envoy.serialNumber ?? 'Serial Number')
|
|
4279
|
-
.setCharacteristic(Characteristic.FirmwareRevision, this.pv.envoy.software.replace(/[a-zA-Z]/g, '') ?? '0')
|
|
4279
|
+
.setCharacteristic(Characteristic.FirmwareRevision, this.pv.envoy.software.replace(/[a-zA-Z]/g, '') ?? '0')
|
|
4280
|
+
.setCharacteristic(Characteristic.ConfiguredName, accessoryName);
|
|
4280
4281
|
|
|
4281
4282
|
//system and envoy
|
|
4282
4283
|
if (envoyInstalled) {
|