homebridge-enphase-envoy 10.4.1 → 10.4.2-beta.0
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/config.schema.json +7 -3
- package/index.js +2 -2
- package/package.json +1 -1
- package/src/envoydevice.js +0 -3
package/config.schema.json
CHANGED
|
@@ -180,8 +180,13 @@
|
|
|
180
180
|
"allOf": [
|
|
181
181
|
{
|
|
182
182
|
"if": {
|
|
183
|
-
"
|
|
184
|
-
"
|
|
183
|
+
"required": [
|
|
184
|
+
"enable"
|
|
185
|
+
],
|
|
186
|
+
"properties": {
|
|
187
|
+
"enable": {
|
|
188
|
+
"const": true
|
|
189
|
+
}
|
|
185
190
|
}
|
|
186
191
|
},
|
|
187
192
|
"then": {
|
|
@@ -1385,7 +1390,6 @@
|
|
|
1385
1390
|
"energyConsumptionNetLifetimeOffset": {
|
|
1386
1391
|
"title": "Energy Lifetime Offset",
|
|
1387
1392
|
"type": "integer",
|
|
1388
|
-
"default": 0,
|
|
1389
1393
|
"description": "Offset in (Wh) for net energy consumption (if needed)"
|
|
1390
1394
|
},
|
|
1391
1395
|
"energyConsumptionNetLevelSensors": {
|
package/index.js
CHANGED
|
@@ -96,8 +96,8 @@ class EnvoyPlatform {
|
|
|
96
96
|
.on('start', async () => {
|
|
97
97
|
try {
|
|
98
98
|
const envoyDevice = new EnvoyDevice(api, log, url, deviceName, device, envoyIdFile, envoyTokenFile, prefDir, energyMeterHistoryFileName)
|
|
99
|
-
.on('devInfo', (info) => log.info(info))
|
|
100
|
-
.on('success', (msg) => log.success(`Device: ${host} ${deviceName}, ${msg}`))
|
|
99
|
+
.on('devInfo', (info) => logLevel.devInfo && log.info(info))
|
|
100
|
+
.on('success', (msg) => logLevel.success && log.success(`Device: ${host} ${deviceName}, ${msg}`))
|
|
101
101
|
.on('info', (msg) => log.info(`Device: ${host} ${deviceName}, ${msg}`))
|
|
102
102
|
.on('debug', (msg, data) => log.info(`Device: ${host} ${deviceName}, debug: ${data ? `${msg} ${JSON.stringify(data, null, 2)}` : msg}`))
|
|
103
103
|
.on('warn', (msg) => log.warn(`Device: ${host} ${deviceName}, ${msg}`))
|
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.4.
|
|
5
|
+
"version": "10.4.2-beta.0",
|
|
6
6
|
"description": "Homebridge p7ugin for Photovoltaic Energy System manufactured by Enphase.",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"author": "grzegorz914",
|
package/src/envoydevice.js
CHANGED
|
@@ -91,8 +91,6 @@ class EnvoyDevice extends EventEmitter {
|
|
|
91
91
|
this.dataSamplingSensor = device.dataRefreshSensor || {};
|
|
92
92
|
|
|
93
93
|
//log
|
|
94
|
-
this.logDeviceInfo = device.log?.deviceInfo || true;
|
|
95
|
-
this.logSuccess = device.log?.logSuccess || false;
|
|
96
94
|
this.logInfo = device.log?.info || false;
|
|
97
95
|
this.logWarn = device.log?.warn || true;
|
|
98
96
|
this.logError = device.log?.error || true;
|
|
@@ -3119,7 +3117,6 @@ class EnvoyDevice extends EventEmitter {
|
|
|
3119
3117
|
|
|
3120
3118
|
if (this.logDebug) this.emit('debug', `Requesting device info`);
|
|
3121
3119
|
if (this.logSuccess) this.emit('success', `Connect Success`);
|
|
3122
|
-
if (!this.logDeviceInfo) return;
|
|
3123
3120
|
|
|
3124
3121
|
// Device basic info
|
|
3125
3122
|
this.emit('devInfo', `-------- ${this.name} --------`);
|