@enyo-energy/sunspec-sdk 0.0.49 → 0.0.50
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/dist/cjs/sunspec-devices.cjs +12 -9
- package/dist/cjs/sunspec-devices.d.cts +9 -6
- package/dist/cjs/version.cjs +1 -1
- package/dist/cjs/version.d.cts +1 -1
- package/dist/sunspec-devices.d.ts +9 -6
- package/dist/sunspec-devices.js +12 -9
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -335,7 +335,7 @@ class SunspecInverter extends BaseSunspecDevice {
|
|
|
335
335
|
const dcStrings = this.mapMPPTToStrings(mpptDataList);
|
|
336
336
|
if (inverterData) {
|
|
337
337
|
const pvPowerW = dcStrings.reduce((sum, s) => sum + (s.powerW || 0), 0);
|
|
338
|
-
console.
|
|
338
|
+
console.debug(`Got PV Power from DC strings: ${pvPowerW}W`);
|
|
339
339
|
const inverterMessage = {
|
|
340
340
|
id: (0, node_crypto_1.randomUUID)(),
|
|
341
341
|
message: enyo_data_bus_value_js_1.EnyoDataBusMessageEnum.InverterValuesUpdateV1,
|
|
@@ -425,19 +425,22 @@ class SunspecInverter extends BaseSunspecDevice {
|
|
|
425
425
|
}
|
|
426
426
|
/**
|
|
427
427
|
* Map a set bit in the Evt2 register. Reserved in the SunSpec spec, so
|
|
428
|
-
* the default
|
|
429
|
-
* vendor-specific
|
|
428
|
+
* the default returns `undefined` — Evt2 bits are not treated as errors.
|
|
429
|
+
* Override in a vendor-specific subclass to opt specific bits in as
|
|
430
|
+
* errors.
|
|
430
431
|
*/
|
|
431
|
-
mapEvt2Bit(
|
|
432
|
-
return
|
|
432
|
+
mapEvt2Bit(_bit) {
|
|
433
|
+
return undefined;
|
|
433
434
|
}
|
|
434
435
|
/**
|
|
435
436
|
* Map a set bit in one of the four vendor-specific event registers.
|
|
436
|
-
*
|
|
437
|
-
*
|
|
437
|
+
* Vendor bits are not standardized and many are informational rather
|
|
438
|
+
* than faults, so the default returns `undefined` and no error code is
|
|
439
|
+
* emitted. Override in a vendor-specific subclass to opt specific bits
|
|
440
|
+
* in as errors.
|
|
438
441
|
*/
|
|
439
|
-
mapVendorEventBit(
|
|
440
|
-
return
|
|
442
|
+
mapVendorEventBit(_registerIndex, _bit) {
|
|
443
|
+
return undefined;
|
|
441
444
|
}
|
|
442
445
|
hasErrorSetChanged(newCodeIds) {
|
|
443
446
|
const prev = this.errorState.activeCodes;
|
|
@@ -98,16 +98,19 @@ export declare class SunspecInverter extends BaseSunspecDevice {
|
|
|
98
98
|
protected mapEvt1Bit(bit: number): EnyoApplianceErrorCode | undefined;
|
|
99
99
|
/**
|
|
100
100
|
* Map a set bit in the Evt2 register. Reserved in the SunSpec spec, so
|
|
101
|
-
* the default
|
|
102
|
-
* vendor-specific
|
|
101
|
+
* the default returns `undefined` — Evt2 bits are not treated as errors.
|
|
102
|
+
* Override in a vendor-specific subclass to opt specific bits in as
|
|
103
|
+
* errors.
|
|
103
104
|
*/
|
|
104
|
-
protected mapEvt2Bit(
|
|
105
|
+
protected mapEvt2Bit(_bit: number): EnyoApplianceErrorCode | undefined;
|
|
105
106
|
/**
|
|
106
107
|
* Map a set bit in one of the four vendor-specific event registers.
|
|
107
|
-
*
|
|
108
|
-
*
|
|
108
|
+
* Vendor bits are not standardized and many are informational rather
|
|
109
|
+
* than faults, so the default returns `undefined` and no error code is
|
|
110
|
+
* emitted. Override in a vendor-specific subclass to opt specific bits
|
|
111
|
+
* in as errors.
|
|
109
112
|
*/
|
|
110
|
-
protected mapVendorEventBit(
|
|
113
|
+
protected mapVendorEventBit(_registerIndex: 1 | 2 | 3 | 4, _bit: number): EnyoApplianceErrorCode | undefined;
|
|
111
114
|
private hasErrorSetChanged;
|
|
112
115
|
private buildStatusMessage;
|
|
113
116
|
private storageKey;
|
package/dist/cjs/version.cjs
CHANGED
|
@@ -9,7 +9,7 @@ exports.getSdkVersion = getSdkVersion;
|
|
|
9
9
|
/**
|
|
10
10
|
* Current version of the enyo Energy App SDK.
|
|
11
11
|
*/
|
|
12
|
-
exports.SDK_VERSION = '0.0.
|
|
12
|
+
exports.SDK_VERSION = '0.0.50';
|
|
13
13
|
/**
|
|
14
14
|
* Gets the current SDK version.
|
|
15
15
|
* @returns The semantic version string of the SDK
|
package/dist/cjs/version.d.cts
CHANGED
|
@@ -98,16 +98,19 @@ export declare class SunspecInverter extends BaseSunspecDevice {
|
|
|
98
98
|
protected mapEvt1Bit(bit: number): EnyoApplianceErrorCode | undefined;
|
|
99
99
|
/**
|
|
100
100
|
* Map a set bit in the Evt2 register. Reserved in the SunSpec spec, so
|
|
101
|
-
* the default
|
|
102
|
-
* vendor-specific
|
|
101
|
+
* the default returns `undefined` — Evt2 bits are not treated as errors.
|
|
102
|
+
* Override in a vendor-specific subclass to opt specific bits in as
|
|
103
|
+
* errors.
|
|
103
104
|
*/
|
|
104
|
-
protected mapEvt2Bit(
|
|
105
|
+
protected mapEvt2Bit(_bit: number): EnyoApplianceErrorCode | undefined;
|
|
105
106
|
/**
|
|
106
107
|
* Map a set bit in one of the four vendor-specific event registers.
|
|
107
|
-
*
|
|
108
|
-
*
|
|
108
|
+
* Vendor bits are not standardized and many are informational rather
|
|
109
|
+
* than faults, so the default returns `undefined` and no error code is
|
|
110
|
+
* emitted. Override in a vendor-specific subclass to opt specific bits
|
|
111
|
+
* in as errors.
|
|
109
112
|
*/
|
|
110
|
-
protected mapVendorEventBit(
|
|
113
|
+
protected mapVendorEventBit(_registerIndex: 1 | 2 | 3 | 4, _bit: number): EnyoApplianceErrorCode | undefined;
|
|
111
114
|
private hasErrorSetChanged;
|
|
112
115
|
private buildStatusMessage;
|
|
113
116
|
private storageKey;
|
package/dist/sunspec-devices.js
CHANGED
|
@@ -331,7 +331,7 @@ export class SunspecInverter extends BaseSunspecDevice {
|
|
|
331
331
|
const dcStrings = this.mapMPPTToStrings(mpptDataList);
|
|
332
332
|
if (inverterData) {
|
|
333
333
|
const pvPowerW = dcStrings.reduce((sum, s) => sum + (s.powerW || 0), 0);
|
|
334
|
-
console.
|
|
334
|
+
console.debug(`Got PV Power from DC strings: ${pvPowerW}W`);
|
|
335
335
|
const inverterMessage = {
|
|
336
336
|
id: randomUUID(),
|
|
337
337
|
message: EnyoDataBusMessageEnum.InverterValuesUpdateV1,
|
|
@@ -421,19 +421,22 @@ export class SunspecInverter extends BaseSunspecDevice {
|
|
|
421
421
|
}
|
|
422
422
|
/**
|
|
423
423
|
* Map a set bit in the Evt2 register. Reserved in the SunSpec spec, so
|
|
424
|
-
* the default
|
|
425
|
-
* vendor-specific
|
|
424
|
+
* the default returns `undefined` — Evt2 bits are not treated as errors.
|
|
425
|
+
* Override in a vendor-specific subclass to opt specific bits in as
|
|
426
|
+
* errors.
|
|
426
427
|
*/
|
|
427
|
-
mapEvt2Bit(
|
|
428
|
-
return
|
|
428
|
+
mapEvt2Bit(_bit) {
|
|
429
|
+
return undefined;
|
|
429
430
|
}
|
|
430
431
|
/**
|
|
431
432
|
* Map a set bit in one of the four vendor-specific event registers.
|
|
432
|
-
*
|
|
433
|
-
*
|
|
433
|
+
* Vendor bits are not standardized and many are informational rather
|
|
434
|
+
* than faults, so the default returns `undefined` and no error code is
|
|
435
|
+
* emitted. Override in a vendor-specific subclass to opt specific bits
|
|
436
|
+
* in as errors.
|
|
434
437
|
*/
|
|
435
|
-
mapVendorEventBit(
|
|
436
|
-
return
|
|
438
|
+
mapVendorEventBit(_registerIndex, _bit) {
|
|
439
|
+
return undefined;
|
|
437
440
|
}
|
|
438
441
|
hasErrorSetChanged(newCodeIds) {
|
|
439
442
|
const prev = this.errorState.activeCodes;
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED