@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.
@@ -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.log(`Got PV Power from DC strings: ${pvPowerW}W`);
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 emits a generic code with no translation. Override for
429
- * vendor-specific Evt2 semantics.
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(bit) {
432
- return { code: `inverter_event2_bit_${bit}` };
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
- * Override in a vendor-specific subclass to translate vendor bits.
437
- * Return `undefined` to drop a bit entirely.
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(registerIndex, bit) {
440
- return { code: `inverter_vendor_event${registerIndex}_bit_${bit}` };
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 emits a generic code with no translation. Override for
102
- * vendor-specific Evt2 semantics.
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(bit: number): EnyoApplianceErrorCode | undefined;
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
- * Override in a vendor-specific subclass to translate vendor bits.
108
- * Return `undefined` to drop a bit entirely.
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(registerIndex: 1 | 2 | 3 | 4, bit: number): EnyoApplianceErrorCode | undefined;
113
+ protected mapVendorEventBit(_registerIndex: 1 | 2 | 3 | 4, _bit: number): EnyoApplianceErrorCode | undefined;
111
114
  private hasErrorSetChanged;
112
115
  private buildStatusMessage;
113
116
  private storageKey;
@@ -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.49';
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
@@ -5,7 +5,7 @@
5
5
  /**
6
6
  * Current version of the enyo Energy App SDK.
7
7
  */
8
- export declare const SDK_VERSION = "0.0.49";
8
+ export declare const SDK_VERSION = "0.0.50";
9
9
  /**
10
10
  * Gets the current SDK version.
11
11
  * @returns The semantic version string of the SDK
@@ -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 emits a generic code with no translation. Override for
102
- * vendor-specific Evt2 semantics.
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(bit: number): EnyoApplianceErrorCode | undefined;
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
- * Override in a vendor-specific subclass to translate vendor bits.
108
- * Return `undefined` to drop a bit entirely.
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(registerIndex: 1 | 2 | 3 | 4, bit: number): EnyoApplianceErrorCode | undefined;
113
+ protected mapVendorEventBit(_registerIndex: 1 | 2 | 3 | 4, _bit: number): EnyoApplianceErrorCode | undefined;
111
114
  private hasErrorSetChanged;
112
115
  private buildStatusMessage;
113
116
  private storageKey;
@@ -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.log(`Got PV Power from DC strings: ${pvPowerW}W`);
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 emits a generic code with no translation. Override for
425
- * vendor-specific Evt2 semantics.
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(bit) {
428
- return { code: `inverter_event2_bit_${bit}` };
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
- * Override in a vendor-specific subclass to translate vendor bits.
433
- * Return `undefined` to drop a bit entirely.
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(registerIndex, bit) {
436
- return { code: `inverter_vendor_event${registerIndex}_bit_${bit}` };
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
@@ -5,7 +5,7 @@
5
5
  /**
6
6
  * Current version of the enyo Energy App SDK.
7
7
  */
8
- export declare const SDK_VERSION = "0.0.49";
8
+ export declare const SDK_VERSION = "0.0.50";
9
9
  /**
10
10
  * Gets the current SDK version.
11
11
  * @returns The semantic version string of the SDK
package/dist/version.js CHANGED
@@ -5,7 +5,7 @@
5
5
  /**
6
6
  * Current version of the enyo Energy App SDK.
7
7
  */
8
- export const SDK_VERSION = '0.0.49';
8
+ export const SDK_VERSION = '0.0.50';
9
9
  /**
10
10
  * Gets the current SDK version.
11
11
  * @returns The semantic version string of the SDK
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enyo-energy/sunspec-sdk",
3
- "version": "0.0.49",
3
+ "version": "0.0.50",
4
4
  "description": "enyo Energy Sunspec SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",