iobroker.nexowatt-ui 0.8.87 → 0.8.89
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/ems/modules/storage-control.js +344 -56
- package/ems/modules/storage-mapping.js +117 -11
- package/io-package.json +9 -9
- package/package.json +4 -2
- package/www/ems-apps.html +28 -0
- package/www/ems-apps.js +58 -6
- package/www/manifest.webmanifest +2 -2
- package/www/sw.js +2 -2
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
|
|
3
3
|
*
|
|
4
4
|
* Quelle: src-ts/runtime-executables/ems/modules/storage-control.ts
|
|
5
|
-
* Quell-Hash: sha256:
|
|
5
|
+
* Quell-Hash: sha256:e490bf02b6ecb49ff95069f0a20c082ceb91150108ead21635882bf00fccd7b1
|
|
6
6
|
* Erzeugung: npm run sync:ts-runtime-executables
|
|
7
7
|
*
|
|
8
8
|
* Zweck:
|
|
@@ -340,6 +340,13 @@ class SpeicherRegelungModule extends BaseModule {
|
|
|
340
340
|
// NVP-begrenzt bei echtem Netzbezug ohne PV-Deckung ein.
|
|
341
341
|
this._sungrowHybridLastMode = '';
|
|
342
342
|
|
|
343
|
+
// E3/DC RSCP Sondermodus:
|
|
344
|
+
// Der ioBroker.e3dc-rscp Adapter steuert den Speicher ueber zwei gekoppelte
|
|
345
|
+
// EMS-Datenpunkte: SET_POWER_MODE und SET_POWER_VALUE. Dieser Marker dient
|
|
346
|
+
// nur der Diagnose, damit nach Profilwechseln keine alten Statusmeldungen
|
|
347
|
+
// stehen bleiben.
|
|
348
|
+
this._e3dcRscpLastMode = '';
|
|
349
|
+
|
|
343
350
|
}
|
|
344
351
|
|
|
345
352
|
/**
|
|
@@ -497,6 +504,15 @@ class SpeicherRegelungModule extends BaseModule {
|
|
|
497
504
|
});
|
|
498
505
|
this._sungrowHybridLastMode = 'disabled';
|
|
499
506
|
}
|
|
507
|
+
if (this._isE3dcRscpControlConfigured(cfg) || this._e3dcRscpLastMode) {
|
|
508
|
+
await this._setE3dcRscpDiag({
|
|
509
|
+
active: false,
|
|
510
|
+
mode: 'disabled',
|
|
511
|
+
reason: 'Speicherregelung deaktiviert – E3/DC-RSCP-Schreibpfad in Ruhe',
|
|
512
|
+
writeMode: 'disabled',
|
|
513
|
+
});
|
|
514
|
+
this._e3dcRscpLastMode = 'disabled';
|
|
515
|
+
}
|
|
500
516
|
} catch {
|
|
501
517
|
// ignore
|
|
502
518
|
}
|
|
@@ -518,9 +534,19 @@ class SpeicherRegelungModule extends BaseModule {
|
|
|
518
534
|
await this._setIfChanged('speicher.regelung.aktivSpeicherfarm', !!hasFarmSetpoints);
|
|
519
535
|
|
|
520
536
|
const hasSignedTarget = this.dp ? !!this.dp.getEntry('st.targetPowerW') : false;
|
|
521
|
-
const
|
|
522
|
-
const
|
|
537
|
+
const hasChargeTarget = this.dp ? !!this.dp.getEntry('st.targetChargePowerW') : false;
|
|
538
|
+
const hasDischargeTarget = this.dp ? !!this.dp.getEntry('st.targetDischargePowerW') : false;
|
|
539
|
+
// Herstellerprofile koennen entweder einen bidirektionalen signed-Sollwert
|
|
540
|
+
// oder getrennte Lade-/Entlade-DPs anbieten. Fuer Feldanlagen darf auch ein
|
|
541
|
+
// einzelner Split-DP als gueltiger Zielpfad gelten; die fehlende Richtung wird
|
|
542
|
+
// spaeter in _applyTargetW sauber gesperrt bzw. auf signed fallback gesetzt.
|
|
543
|
+
const hasSplitTarget = hasChargeTarget || hasDischargeTarget;
|
|
523
544
|
const storageVendorProfile = this._getStorageVendorProfile(cfg);
|
|
545
|
+
const e3dcRscpConfigured = this._isE3dcRscpControlConfigured(cfg);
|
|
546
|
+
const hasE3dcSetPowerTarget = e3dcRscpConfigured && this.dp
|
|
547
|
+
? !!(this.dp.getEntry('st.e3dcSetPowerMode') && this.dp.getEntry('st.e3dcSetPowerValueW'))
|
|
548
|
+
: false;
|
|
549
|
+
const hasTarget = hasSignedTarget || hasSplitTarget || hasE3dcSetPowerTarget;
|
|
524
550
|
const feneconHybridConfigured = this._isFeneconHybridControlConfigured(cfg);
|
|
525
551
|
const sungrowHybridConfigured = this._isSungrowHybridControlConfigured(cfg);
|
|
526
552
|
// FENECON/OpenEMS ist kein Speicherfarm-Blocker mehr:
|
|
@@ -546,8 +572,8 @@ class SpeicherRegelungModule extends BaseModule {
|
|
|
546
572
|
if (!hasTarget && !hasFarmSetpoints) {
|
|
547
573
|
await this._setIfChanged('speicher.regelung.requestW', 0);
|
|
548
574
|
await this._setIfChanged('speicher.regelung.requestQuelle', 'aus');
|
|
549
|
-
await this._setIfChanged('speicher.regelung.requestGrund', 'Sollleistung-Datenpunkt fehlt: signed Ziel
|
|
550
|
-
await this._setIfChanged('speicher.regelung.dispatcherJson', JSON.stringify({ ts: Date.now(), reqW: 0, reason: 'Sollleistung-Datenpunkt fehlt: signed Ziel
|
|
575
|
+
await this._setIfChanged('speicher.regelung.requestGrund', 'Sollleistung-Datenpunkt fehlt: signed Ziel, getrennte Lade-/Entlade-Sollwerte oder E3/DC SET_POWER_MODE + SET_POWER_VALUE');
|
|
576
|
+
await this._setIfChanged('speicher.regelung.dispatcherJson', JSON.stringify({ ts: Date.now(), reqW: 0, reason: 'Sollleistung-Datenpunkt fehlt: signed Ziel, getrennte Lade-/Entlade-Sollwerte oder E3/DC SET_POWER_MODE + SET_POWER_VALUE', src: 'aus' }));
|
|
551
577
|
|
|
552
578
|
await this._applyTargetW(0, 'Sollleistung-Datenpunkt fehlt: signed Ziel oder getrennte Lade-/Entlade-Sollwerte', 'aus');
|
|
553
579
|
return;
|
|
@@ -3060,6 +3086,14 @@ const _prevRampW = (typeof this._lastTargetW === 'number' && Number.isFinite(thi
|
|
|
3060
3086
|
sungrowTargetGridImportW: storage.sungrowTargetGridImportW,
|
|
3061
3087
|
sungrowImportThresholdW: storage.sungrowImportThresholdW,
|
|
3062
3088
|
sungrowAssistBufferW: storage.sungrowAssistBufferW,
|
|
3089
|
+
// E3/DC RSCP Herstellerprofil: NexoWatt schreibt keine signed Batterie-
|
|
3090
|
+
// Sollleistung, sondern das vom ioBroker.e3dc-rscp Adapter erwartete
|
|
3091
|
+
// Tupel EMS.SET_POWER_MODE + EMS.SET_POWER_VALUE. PowerLimits sind
|
|
3092
|
+
// optional und werden nur geschrieben, wenn der Installer sie bewusst aktiviert.
|
|
3093
|
+
e3dcRscpEnabled: storage.e3dcRscpEnabled,
|
|
3094
|
+
e3dcZeroMode: storage.e3dcZeroMode,
|
|
3095
|
+
e3dcAllowGridCharge: storage.e3dcAllowGridCharge,
|
|
3096
|
+
e3dcUsePowerLimits: storage.e3dcUsePowerLimits,
|
|
3063
3097
|
// Legacy: feneconAcMode bleibt als Migrations-Alias erhalten.
|
|
3064
3098
|
// feneconGridControlEnabled ist aus UI-/Migrationsgründen der gespeicherte
|
|
3065
3099
|
// Haken, bedeutet ab 0.6.255 aber: Hybrid-/Gateway-Priorität-Gateway-Priorität.
|
|
@@ -3121,10 +3155,12 @@ const _prevRampW = (typeof this._lastTargetW === 'number' && Number.isFinite(thi
|
|
|
3121
3155
|
const raw = String((cfg && cfg.vendorProfile) || '').trim().toLowerCase();
|
|
3122
3156
|
if (raw === 'fenecon' || raw === 'openems' || raw === 'fems' || raw === 'fenecon-openems') return 'fenecon-openems';
|
|
3123
3157
|
if (raw === 'sungrow' || raw === 'sungrow-ess' || raw === 'sungrow-hybrid') return 'sungrow-hybrid';
|
|
3158
|
+
if (raw === 'e3dc' || raw === 'e3/dc' || raw === 'e3dc-rscp' || raw === 'e3dc-rscp-iobroker') return 'e3dc-rscp';
|
|
3124
3159
|
// Migration: alte FENECON-Haken bleiben als Profil erkennbar, solange kein
|
|
3125
3160
|
// explizites anderes Herstellerprofil gespeichert wurde.
|
|
3126
3161
|
if (!raw && cfg && (cfg.feneconGridControlEnabled === true || cfg.feneconAcMode === true)) return 'fenecon-openems';
|
|
3127
3162
|
if (!raw && cfg && cfg.sungrowHybridEnabled === true) return 'sungrow-hybrid';
|
|
3163
|
+
if (!raw && cfg && cfg.e3dcRscpEnabled === true) return 'e3dc-rscp';
|
|
3128
3164
|
return 'generic';
|
|
3129
3165
|
}
|
|
3130
3166
|
|
|
@@ -3143,6 +3179,10 @@ const _prevRampW = (typeof this._lastTargetW === 'number' && Number.isFinite(thi
|
|
|
3143
3179
|
return this._getStorageVendorProfile(cfg) === 'sungrow-hybrid';
|
|
3144
3180
|
}
|
|
3145
3181
|
|
|
3182
|
+
_isE3dcRscpControlConfigured(cfg = {}) {
|
|
3183
|
+
return this._getStorageVendorProfile(cfg) === 'e3dc-rscp';
|
|
3184
|
+
}
|
|
3185
|
+
|
|
3146
3186
|
// Legacy-Alias für ältere interne Aufrufe.
|
|
3147
3187
|
/**
|
|
3148
3188
|
* Code-Teil: Methode `_isFeneconGridControlConfigured`
|
|
@@ -3315,6 +3355,133 @@ const _prevRampW = (typeof this._lastTargetW === 'number' && Number.isFinite(thi
|
|
|
3315
3355
|
await this._setIfChanged('speicher.regelung.sungrowHybridNvpBalanceAktiv', !!ctx.nvpBalanceNeeded);
|
|
3316
3356
|
}
|
|
3317
3357
|
|
|
3358
|
+
/**
|
|
3359
|
+
* Code-Teil: _isE3dcGridChargeSource
|
|
3360
|
+
* Zweck: Erkennt, ob ein negativer Speicher-Sollwert wirklich Netzladen bedeutet.
|
|
3361
|
+
* Zusammenhang: E3/DC unterscheidet bei SET_POWER_MODE zwischen CHARGE und
|
|
3362
|
+
* GRID_CHARGE. Standard-PV-Laden bleibt CHARGE; GRID_CHARGE wird nur fuer
|
|
3363
|
+
* Tarif-/Reserve-/LSK-Nachladung verwendet und muss im Herstellerprofil erlaubt sein.
|
|
3364
|
+
*/
|
|
3365
|
+
_isE3dcGridChargeSource(source) {
|
|
3366
|
+
const s = String(source || '').trim().toLowerCase();
|
|
3367
|
+
return s === 'tarif_grid_charge'
|
|
3368
|
+
|| s === 'tarif-netzladen'
|
|
3369
|
+
|| s === 'reserve_grid'
|
|
3370
|
+
|| s === 'reserve-netzladen'
|
|
3371
|
+
|| s === 'lastspitze_refill'
|
|
3372
|
+
|| s === 'lsk_refill'
|
|
3373
|
+
|| s === 'grid_charge';
|
|
3374
|
+
}
|
|
3375
|
+
|
|
3376
|
+
/**
|
|
3377
|
+
* Code-Teil: _writeE3dcRscpTargetW
|
|
3378
|
+
* Zweck: Uebersetzt die NexoWatt-Konvention (+W Entladen, -W Laden) in die
|
|
3379
|
+
* ioBroker.e3dc-rscp-Datenpunkte EMS.SET_POWER_MODE und EMS.SET_POWER_VALUE.
|
|
3380
|
+
* Zusammenhang: Der e3dc-rscp Adapter reagiert auf Aenderungen beider States;
|
|
3381
|
+
* deshalb schreibt NexoWatt den Modus zuerst und danach den Leistungswert. So
|
|
3382
|
+
* wird bei Richtungswechseln nicht kurz die alte Richtung mit neuem Wert gesendet.
|
|
3383
|
+
*/
|
|
3384
|
+
async _writeE3dcRscpTargetW(targetW, reason, source, cfg = {}) {
|
|
3385
|
+
const w = Number.isFinite(Number(targetW)) ? Math.round(Number(targetW)) : 0;
|
|
3386
|
+
const absW = Math.max(0, Math.abs(w));
|
|
3387
|
+
const allowGridCharge = cfg.e3dcAllowGridCharge === true;
|
|
3388
|
+
const gridCharge = !!(w < 0 && allowGridCharge && this._isE3dcGridChargeSource(source));
|
|
3389
|
+
const zeroModeRaw = String(cfg.e3dcZeroMode || 'normal').trim().toLowerCase();
|
|
3390
|
+
const zeroModeCode = zeroModeRaw === 'idle' ? 1 : 0;
|
|
3391
|
+
|
|
3392
|
+
// ioBroker.e3dc-rscp / RSCP SET_POWER_MODE:
|
|
3393
|
+
// 0=NORMAL, 1=IDLE, 2=DISCHARGE, 3=CHARGE, 4=GRID_CHARGE.
|
|
3394
|
+
// Bei 0 W wird standardmaessig NORMAL geschrieben, damit E3/DC wieder seine
|
|
3395
|
+
// eigene Eigenverbrauchslogik fuehren kann. IDLE bleibt als Expertenoption
|
|
3396
|
+
// verfuegbar, wenn bewusst eine Batteriepause gewuenscht ist.
|
|
3397
|
+
const modeCode = w > 0 ? 2 : (w < 0 ? (gridCharge ? 4 : 3) : zeroModeCode);
|
|
3398
|
+
const modeName = ({ 0: 'NORMAL', 1: 'IDLE', 2: 'DISCHARGE', 3: 'CHARGE', 4: 'GRID_CHARGE' })[modeCode] || 'NORMAL';
|
|
3399
|
+
const writes = [];
|
|
3400
|
+
let ok = true;
|
|
3401
|
+
|
|
3402
|
+
const writeNumber = async (key, value) => {
|
|
3403
|
+
try {
|
|
3404
|
+
const res = await this.dp.writeNumber(key, value, false);
|
|
3405
|
+
writes.push({ key, value, result: res });
|
|
3406
|
+
if (res === false) ok = false;
|
|
3407
|
+
return res;
|
|
3408
|
+
} catch (_e) {
|
|
3409
|
+
writes.push({ key, value, result: false });
|
|
3410
|
+
ok = false;
|
|
3411
|
+
return false;
|
|
3412
|
+
}
|
|
3413
|
+
};
|
|
3414
|
+
const writeBoolean = async (key, value) => {
|
|
3415
|
+
try {
|
|
3416
|
+
const res = await this.dp.writeBoolean(key, value, false);
|
|
3417
|
+
writes.push({ key, value: !!value, result: res });
|
|
3418
|
+
if (res === false) ok = false;
|
|
3419
|
+
return res;
|
|
3420
|
+
} catch (_e) {
|
|
3421
|
+
writes.push({ key, value: !!value, result: false });
|
|
3422
|
+
ok = false;
|
|
3423
|
+
return false;
|
|
3424
|
+
}
|
|
3425
|
+
};
|
|
3426
|
+
|
|
3427
|
+
// Optional: E3/DC PowerLimits aktivieren und die Maximalwerte mitfuehren.
|
|
3428
|
+
// Diese DPs sind nicht fuer den normalen Zielwert erforderlich, schuetzen aber
|
|
3429
|
+
// Anlagen, bei denen E3/DC die gesetzten Limits nur mit POWER_LIMITS_USED=true
|
|
3430
|
+
// beachtet. Der Haken bleibt bewusst aus, bis der Installer ihn aktiviert.
|
|
3431
|
+
const useLimits = cfg.e3dcUsePowerLimits === true;
|
|
3432
|
+
const hasLimitFlag = !!(this.dp && this.dp.getEntry && this.dp.getEntry('st.e3dcPowerLimitsUsed'));
|
|
3433
|
+
const hasMaxCharge = !!(this.dp && this.dp.getEntry && this.dp.getEntry('st.e3dcMaxChargePowerW'));
|
|
3434
|
+
const hasMaxDischarge = !!(this.dp && this.dp.getEntry && this.dp.getEntry('st.e3dcMaxDischargePowerW'));
|
|
3435
|
+
if (useLimits && hasLimitFlag) await writeBoolean('st.e3dcPowerLimitsUsed', true);
|
|
3436
|
+
const cfgMaxChargeW = Number(cfg.maxChargeW);
|
|
3437
|
+
const cfgMaxDischargeW = Number(cfg.maxDischargeW);
|
|
3438
|
+
if (useLimits && hasMaxCharge && Number.isFinite(cfgMaxChargeW) && cfgMaxChargeW > 0) await writeNumber('st.e3dcMaxChargePowerW', Math.round(cfgMaxChargeW));
|
|
3439
|
+
if (useLimits && hasMaxDischarge && Number.isFinite(cfgMaxDischargeW) && cfgMaxDischargeW > 0) await writeNumber('st.e3dcMaxDischargePowerW', Math.round(cfgMaxDischargeW));
|
|
3440
|
+
|
|
3441
|
+
await writeNumber('st.e3dcSetPowerMode', modeCode);
|
|
3442
|
+
await writeNumber('st.e3dcSetPowerValueW', absW);
|
|
3443
|
+
|
|
3444
|
+
this._e3dcRscpLastMode = modeName;
|
|
3445
|
+
await this._setE3dcRscpDiag({
|
|
3446
|
+
active: true,
|
|
3447
|
+
mode: modeName,
|
|
3448
|
+
modeCode,
|
|
3449
|
+
valueW: absW,
|
|
3450
|
+
targetW: w,
|
|
3451
|
+
writeMode: 'set-power',
|
|
3452
|
+
reason: String(reason || ''),
|
|
3453
|
+
source: String(source || ''),
|
|
3454
|
+
gridCharge,
|
|
3455
|
+
zeroMode: zeroModeCode === 1 ? 'idle' : 'normal',
|
|
3456
|
+
powerLimitsUsed: useLimits,
|
|
3457
|
+
ok,
|
|
3458
|
+
});
|
|
3459
|
+
|
|
3460
|
+
return { ok, modeCode, modeName, valueW: absW, targetW: w, gridCharge, powerLimitsUsed: useLimits, writes };
|
|
3461
|
+
}
|
|
3462
|
+
|
|
3463
|
+
/**
|
|
3464
|
+
* Code-Teil: _setE3dcRscpDiag
|
|
3465
|
+
* Zweck: Spiegeln des E3/DC-Schreibpfads in eigene Diagnose-States, damit keine
|
|
3466
|
+
* ioBroker-Warnungen durch fehlende Objekte entstehen und der Installateur sieht,
|
|
3467
|
+
* welches SET_POWER-Tupel zuletzt geschrieben wurde.
|
|
3468
|
+
*/
|
|
3469
|
+
async _setE3dcRscpDiag(ctx = {}) {
|
|
3470
|
+
const n = (v, def = 0) => Number.isFinite(Number(v)) ? Math.round(Number(v)) : def;
|
|
3471
|
+
await this._setIfChanged('speicher.regelung.e3dcRscpAktiv', !!ctx.active);
|
|
3472
|
+
await this._setIfChanged('speicher.regelung.e3dcRscpModus', String(ctx.mode || ''));
|
|
3473
|
+
await this._setIfChanged('speicher.regelung.e3dcRscpModeCode', n(ctx.modeCode, 0));
|
|
3474
|
+
await this._setIfChanged('speicher.regelung.e3dcRscpValueW', n(ctx.valueW, 0));
|
|
3475
|
+
await this._setIfChanged('speicher.regelung.e3dcRscpSollW', n(ctx.targetW, 0));
|
|
3476
|
+
await this._setIfChanged('speicher.regelung.e3dcRscpSchreibmodus', String(ctx.writeMode || ''));
|
|
3477
|
+
await this._setIfChanged('speicher.regelung.e3dcRscpQuelle', String(ctx.source || ''));
|
|
3478
|
+
await this._setIfChanged('speicher.regelung.e3dcRscpGrund', String(ctx.reason || ''));
|
|
3479
|
+
await this._setIfChanged('speicher.regelung.e3dcRscpGridCharge', !!ctx.gridCharge);
|
|
3480
|
+
await this._setIfChanged('speicher.regelung.e3dcRscpZeroMode', String(ctx.zeroMode || ''));
|
|
3481
|
+
await this._setIfChanged('speicher.regelung.e3dcRscpPowerLimitsUsed', !!ctx.powerLimitsUsed);
|
|
3482
|
+
await this._setIfChanged('speicher.regelung.e3dcRscpSchreibOk', ctx.ok === true);
|
|
3483
|
+
}
|
|
3484
|
+
|
|
3318
3485
|
async _buildFeneconHybridContext({ cfg = {}, staleMs = 15000, readCacheNumber = null, gridW = null, gridRawW = null } = {}) {
|
|
3319
3486
|
const thresholdW = Math.max(0, num(cfg.feneconPvPassthroughThresholdW, 300));
|
|
3320
3487
|
const additionalThresholdW = Math.max(0, num(cfg.feneconAdditionalPvThresholdW, 100));
|
|
@@ -3734,19 +3901,57 @@ const _prevRampW = (typeof this._lastTargetW === 'number' && Number.isFinite(thi
|
|
|
3734
3901
|
const chargeEntry = (this.dp && this.dp.getEntry) ? this.dp.getEntry('st.targetChargePowerW') : null;
|
|
3735
3902
|
const dischargeEntry = (this.dp && this.dp.getEntry) ? this.dp.getEntry('st.targetDischargePowerW') : null;
|
|
3736
3903
|
const runEntry = (this.dp && this.dp.getEntry) ? this.dp.getEntry('st.run') : null;
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
//
|
|
3740
|
-
//
|
|
3741
|
-
//
|
|
3742
|
-
//
|
|
3743
|
-
|
|
3744
|
-
const
|
|
3904
|
+
|
|
3905
|
+
// E3/DC RSCP-Profil: Der ioBroker.e3dc-rscp Adapter schreibt aktive
|
|
3906
|
+
// Speicherleistung nicht ueber einen signed W-DP, sondern ueber das gekoppelte
|
|
3907
|
+
// Tupel EMS.SET_POWER_MODE + EMS.SET_POWER_VALUE. Diese beiden Datenpunkte
|
|
3908
|
+
// werden nur genutzt, wenn das E3/DC-Herstellerprofil im AppCenter aktiv ist;
|
|
3909
|
+
// alle generischen Speicher bleiben auf signed/split Zielpfaden.
|
|
3910
|
+
const cfg = this._getCfg();
|
|
3911
|
+
const storageVendorProfile = this._getStorageVendorProfile(cfg);
|
|
3912
|
+
const e3dcModeEntry = (this.dp && this.dp.getEntry) ? this.dp.getEntry('st.e3dcSetPowerMode') : null;
|
|
3913
|
+
const e3dcValueEntry = (this.dp && this.dp.getEntry) ? this.dp.getEntry('st.e3dcSetPowerValueW') : null;
|
|
3914
|
+
const e3dcTargetConfigured = storageVendorProfile === 'e3dc-rscp' && !!(e3dcModeEntry && e3dcValueEntry);
|
|
3915
|
+
|
|
3916
|
+
const objectIdOf = (entry) => entry && entry.objectId ? String(entry.objectId).trim() : '';
|
|
3917
|
+
const sameObject = (a, b) => {
|
|
3918
|
+
const aa = objectIdOf(a);
|
|
3919
|
+
const bb = objectIdOf(b);
|
|
3920
|
+
return !!(aa && bb && aa === bb);
|
|
3921
|
+
};
|
|
3922
|
+
|
|
3923
|
+
// Zielpfad-Regel:
|
|
3924
|
+
// - Signed-DP bleibt der bidirektionale Standard (+W=Entladen, -W=Laden).
|
|
3925
|
+
// - Getrennte Lade-/Entlade-DPs koennen einzeln oder zusammen gemappt werden.
|
|
3926
|
+
// - Sind Signed und Split vorhanden, werden die Split-DPs synchron genullt/gesetzt
|
|
3927
|
+
// und der Signed-DP bleibt als bidirektionaler Hauptpfad konsistent.
|
|
3928
|
+
// - Wenn ein Split-DP versehentlich auf dasselbe Objekt wie der Signed-DP zeigt,
|
|
3929
|
+
// schreibt NexoWatt diesen Split-DP nicht nochmal mit anderer Vorzeichenlogik.
|
|
3930
|
+
const chargeSameAsSigned = sameObject(chargeEntry, signedEntry);
|
|
3931
|
+
const dischargeSameAsSigned = sameObject(dischargeEntry, signedEntry);
|
|
3932
|
+
const canWriteChargeSplit = !!(chargeEntry && !chargeSameAsSigned);
|
|
3933
|
+
const canWriteDischargeSplit = !!(dischargeEntry && !dischargeSameAsSigned);
|
|
3934
|
+
const hasAnySplitTarget = !!(chargeEntry || dischargeEntry);
|
|
3935
|
+
const hasAnyWritableSplit = !!(canWriteChargeSplit || canWriteDischargeSplit);
|
|
3936
|
+
const hasSignedTarget = !!signedEntry;
|
|
3937
|
+
const genericDirectionSupported = w === 0 || hasSignedTarget || (w < 0 ? canWriteChargeSplit : canWriteDischargeSplit);
|
|
3938
|
+
const directionSupported = e3dcTargetConfigured ? true : genericDirectionSupported;
|
|
3939
|
+
const genericTargetMode = hasSignedTarget && hasAnySplitTarget
|
|
3940
|
+
? 'signed+split-targetPower'
|
|
3941
|
+
: (hasAnySplitTarget
|
|
3942
|
+
? (canWriteChargeSplit && canWriteDischargeSplit
|
|
3943
|
+
? 'split-charge-discharge'
|
|
3944
|
+
: (canWriteChargeSplit ? 'split-charge-only' : (canWriteDischargeSplit ? 'split-discharge-only' : 'split-unwritable')))
|
|
3945
|
+
: (hasSignedTarget ? 'signed-targetPower' : 'none'));
|
|
3946
|
+
const targetMode = e3dcTargetConfigured ? 'e3dc-rscp-set-power' : genericTargetMode;
|
|
3947
|
+
|
|
3745
3948
|
await this._setIfChanged('speicher.regelung.targetMode', targetMode);
|
|
3746
3949
|
await this._setIfChanged('speicher.regelung.targetObjId', signedEntry && signedEntry.objectId ? String(signedEntry.objectId) : '');
|
|
3747
3950
|
await this._setIfChanged('speicher.regelung.splitTargetObjIds', JSON.stringify({
|
|
3748
3951
|
charge: chargeEntry && chargeEntry.objectId ? String(chargeEntry.objectId) : '',
|
|
3749
3952
|
discharge: dischargeEntry && dischargeEntry.objectId ? String(dischargeEntry.objectId) : '',
|
|
3953
|
+
chargeSkippedBecauseSignedSameObject: !!chargeSameAsSigned,
|
|
3954
|
+
dischargeSkippedBecauseSignedSameObject: !!dischargeSameAsSigned,
|
|
3750
3955
|
}));
|
|
3751
3956
|
await this._setIfChanged('speicher.regelung.runObjId', runEntry && runEntry.objectId ? String(runEntry.objectId) : '');
|
|
3752
3957
|
|
|
@@ -3780,55 +3985,68 @@ const _prevRampW = (typeof this._lastTargetW === 'number' && Number.isFinite(thi
|
|
|
3780
3985
|
writeResult = false;
|
|
3781
3986
|
await this._setIfChanged('speicher.regelung.lastWriteRaw', null);
|
|
3782
3987
|
await this._setIfChanged('speicher.regelung.lastWriteSplitJson', null);
|
|
3783
|
-
} else if (
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3988
|
+
} else if (e3dcTargetConfigured) {
|
|
3989
|
+
const e3dcResult = await this._writeE3dcRscpTargetW(w, reason, source, cfg);
|
|
3990
|
+
writeResult = e3dcResult && e3dcResult.ok === true;
|
|
3991
|
+
await this._setIfChanged('speicher.regelung.lastWriteRaw', e3dcResult ? Math.round(Number(e3dcResult.valueW) || 0) : null);
|
|
3992
|
+
await this._setIfChanged('speicher.regelung.lastWriteSplitJson', e3dcResult ? JSON.stringify({
|
|
3993
|
+
profile: 'e3dc-rscp',
|
|
3994
|
+
modeCode: e3dcResult.modeCode,
|
|
3995
|
+
modeName: e3dcResult.modeName,
|
|
3996
|
+
valueW: e3dcResult.valueW,
|
|
3997
|
+
gridCharge: !!e3dcResult.gridCharge,
|
|
3998
|
+
powerLimitsUsed: !!e3dcResult.powerLimitsUsed,
|
|
3999
|
+
writes: e3dcResult.writes || [],
|
|
4000
|
+
}) : null);
|
|
4001
|
+
} else if (hasSignedTarget || hasAnySplitTarget) {
|
|
4002
|
+
const chargeW = directionSupported && w < 0 ? Math.abs(w) : 0;
|
|
4003
|
+
const dischargeW = directionSupported && w > 0 ? w : 0;
|
|
4004
|
+
const runActive = directionSupported && w !== 0;
|
|
4005
|
+
let wroteAnyTarget = false;
|
|
4006
|
+
|
|
4007
|
+
if (canWriteChargeSplit) {
|
|
4008
|
+
try { writeResults.push(await this.dp.writeNumber('st.targetChargePowerW', chargeW, false)); wroteAnyTarget = true; } catch (_e) { writeResults.push(false); }
|
|
4009
|
+
}
|
|
4010
|
+
if (canWriteDischargeSplit) {
|
|
4011
|
+
try { writeResults.push(await this.dp.writeNumber('st.targetDischargePowerW', dischargeW, false)); wroteAnyTarget = true; } catch (_e) { writeResults.push(false); }
|
|
3803
4012
|
}
|
|
3804
4013
|
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
4014
|
+
await this._setIfChanged('speicher.regelung.lastWriteSplitJson', hasAnySplitTarget ? JSON.stringify({
|
|
4015
|
+
chargeW: canWriteChargeSplit ? chargeW : null,
|
|
4016
|
+
dischargeW: canWriteDischargeSplit ? dischargeW : null,
|
|
4017
|
+
run: runActive,
|
|
4018
|
+
mode: targetMode,
|
|
4019
|
+
signedAlsoWritten: !!hasSignedTarget,
|
|
4020
|
+
directionSupported,
|
|
4021
|
+
chargeSkippedBecauseSignedSameObject: !!chargeSameAsSigned,
|
|
4022
|
+
dischargeSkippedBecauseSignedSameObject: !!dischargeSameAsSigned,
|
|
4023
|
+
}) : null);
|
|
4024
|
+
|
|
4025
|
+
if (hasSignedTarget) {
|
|
4026
|
+
try {
|
|
4027
|
+
const e = signedEntry;
|
|
4028
|
+
const scale = (e && Number.isFinite(Number(e.scale)) && Number(e.scale) !== 0) ? Number(e.scale) : 1;
|
|
4029
|
+
const offset = (e && Number.isFinite(Number(e.offset))) ? Number(e.offset) : 0;
|
|
4030
|
+
let raw = (w - offset) / scale;
|
|
4031
|
+
if (e && e.invert) raw = -raw;
|
|
4032
|
+
if (e && Number.isFinite(Number(e.min))) raw = Math.max(Number(e.min), raw);
|
|
4033
|
+
if (e && Number.isFinite(Number(e.max))) raw = Math.min(Number(e.max), raw);
|
|
4034
|
+
await this._setIfChanged('speicher.regelung.lastWriteRaw', Math.round(raw));
|
|
4035
|
+
} catch {
|
|
4036
|
+
await this._setIfChanged('speicher.regelung.lastWriteRaw', null);
|
|
4037
|
+
}
|
|
4038
|
+
|
|
4039
|
+
try { writeResults.push(await this.dp.writeNumber('st.targetPowerW', w, false)); wroteAnyTarget = true; } catch (_e) { writeResults.push(false); }
|
|
4040
|
+
} else {
|
|
3822
4041
|
await this._setIfChanged('speicher.regelung.lastWriteRaw', null);
|
|
3823
|
-
await this._setIfChanged('speicher.regelung.lastWriteSplitJson', null);
|
|
3824
4042
|
}
|
|
3825
4043
|
|
|
3826
|
-
try { writeResults.push(await this.dp.writeNumber('st.targetPowerW', w, false)); } catch (_e) { writeResults.push(false); }
|
|
3827
4044
|
if (runEntry && this.dp && typeof this.dp.writeBoolean === 'function') {
|
|
3828
|
-
try { writeResults.push(await this.dp.writeBoolean('st.run',
|
|
4045
|
+
try { writeResults.push(await this.dp.writeBoolean('st.run', runActive, false)); } catch (_e) { writeResults.push(false); }
|
|
3829
4046
|
}
|
|
4047
|
+
|
|
3830
4048
|
const failed = writeResults.some(r => r === false);
|
|
3831
|
-
writeResult = failed ? false : true;
|
|
4049
|
+
writeResult = (!directionSupported || !wroteAnyTarget || failed) ? false : true;
|
|
3832
4050
|
} else {
|
|
3833
4051
|
await this._setIfChanged('speicher.regelung.lastWriteRaw', null);
|
|
3834
4052
|
await this._setIfChanged('speicher.regelung.lastWriteSplitJson', null);
|
|
@@ -3845,14 +4063,17 @@ const _prevRampW = (typeof this._lastTargetW === 'number' && Number.isFinite(thi
|
|
|
3845
4063
|
await this._setIfChanged('speicher.regelung.quelle', String(source || ''));
|
|
3846
4064
|
await this._setIfChanged('speicher.regelung.grund', String(reason || ''));
|
|
3847
4065
|
await this._setIfChanged('speicher.regelung.schreibOk', writeResult === true);
|
|
4066
|
+
const singleStatus = writeResult === true
|
|
4067
|
+
? (e3dcTargetConfigured ? 'e3dc-rscp-geschrieben' : (hasSignedTarget && hasAnyWritableSplit ? 'signed+split-geschrieben' : (hasAnyWritableSplit ? 'split-geschrieben' : 'geschrieben')))
|
|
4068
|
+
: (!directionSupported ? 'zielrichtung-nicht-gemappt' : 'nicht möglich');
|
|
3848
4069
|
const writeStatus = farmApplied
|
|
3849
4070
|
? 'farm'
|
|
3850
4071
|
: (farmEnabledForWrite && !allowSingleTargetFallback
|
|
3851
4072
|
? ('farm-nicht-moeglich' + (farmReason ? ':' + farmReason : ''))
|
|
3852
|
-
: ((writeResult === null) ? 'unverändert' :
|
|
4073
|
+
: ((writeResult === null) ? 'unverändert' : singleStatus));
|
|
3853
4074
|
await this._setIfChanged('speicher.regelung.schreibStatus', writeStatus);
|
|
3854
4075
|
|
|
3855
|
-
this._lastTargetW = w;
|
|
4076
|
+
this._lastTargetW = (writeResult === true || farmApplied) ? w : 0;
|
|
3856
4077
|
this._lastReason = String(reason || '');
|
|
3857
4078
|
this._lastSource = String(source || '');
|
|
3858
4079
|
}
|
|
@@ -3932,6 +4153,7 @@ const _prevRampW = (typeof this._lastTargetW === 'number' && Number.isFinite(thi
|
|
|
3932
4153
|
await mk('speicher.regelung.aktivAutoMultiUse', 'Auto-Aktivierung durch MultiUse-Policy', 'boolean', 'indicator', false);
|
|
3933
4154
|
await mk('speicher.regelung.aktivSpeicherfarm', 'Speicherfarm-Verteilpfad verfügbar', 'boolean', 'indicator', false);
|
|
3934
4155
|
await mk('speicher.regelung.aktivAutoSpeicherfarm', 'Auto-Aktivierung durch Speicherfarm (deaktiviert)', 'boolean', 'indicator', false);
|
|
4156
|
+
await mk('speicher.regelung.herstellerprofil', 'Speicher-Herstellerprofil', 'string', 'text', 'generic');
|
|
3935
4157
|
await mk('speicher.regelung.speicherKopplung', 'Speicher-Kopplung AC/DC', 'string', 'text', 'ac');
|
|
3936
4158
|
await mk('speicher.regelung.dcPvPowerW', 'DC-/Hybrid-PV Erzeugungsleistung', 'number', 'value.power', 0);
|
|
3937
4159
|
await mk('speicher.regelung.dcPvPowerAlterMs', 'DC-/Hybrid-PV Erzeugungswert Alter', 'number', 'value.interval', null);
|
|
@@ -3986,6 +4208,7 @@ const _prevRampW = (typeof this._lastTargetW === 'number' && Number.isFinite(thi
|
|
|
3986
4208
|
await mk('speicher.regelung.feneconHybridAssistAktiv', 'FENECON/OpenEMS Assist aktiv', 'boolean', 'indicator', false);
|
|
3987
4209
|
await mk('speicher.regelung.feneconHybridAssistSchwelleW', 'FENECON/OpenEMS Assist Netzbezugsschwelle', 'number', 'value.power', 800);
|
|
3988
4210
|
|
|
4211
|
+
|
|
3989
4212
|
await mk('speicher.regelung.netzLeistungW', 'Netzleistung (W)', 'number', 'value.power');
|
|
3990
4213
|
await mk('speicher.regelung.netzAlterMs', 'Netzleistung Alter (ms)', 'number', 'value.interval');
|
|
3991
4214
|
await mk('speicher.regelung.netzLadenErlaubt', 'Netzladen erlaubt', 'boolean', 'indicator', true);
|
|
@@ -4023,12 +4246,47 @@ const _prevRampW = (typeof this._lastTargetW === 'number' && Number.isFinite(thi
|
|
|
4023
4246
|
await mk('speicher.regelung.selfTargetGridImportW', 'Eigenverbrauch Ziel-Netzbezug (W)', 'number', 'value.power', 0);
|
|
4024
4247
|
await mk('speicher.regelung.selfImportThresholdW', 'Eigenverbrauch Deadband (W)', 'number', 'value.power', 0);
|
|
4025
4248
|
await mk('speicher.regelung.selfEntladenAktiviert', 'Eigenverbrauch-Entladen aktiviert', 'boolean', 'indicator', false);
|
|
4249
|
+
|
|
4250
|
+
// Sungrow-Hybrid-Diagnoseobjekte vor dem ersten zyklischen Schreiben anlegen.
|
|
4251
|
+
// Zusätzlich sichert _setIfChanged fehlende Runtime-States ab, falls ein Update
|
|
4252
|
+
// ohne sauberen Objekt-Neuaufbau gestartet wurde.
|
|
4253
|
+
await mk('speicher.regelung.sungrowHybridAktiv', 'Sungrow Hybrid Herstellerprofil aktiv', 'boolean', 'indicator', false);
|
|
4254
|
+
await mk('speicher.regelung.sungrowHybridModus', 'Sungrow Hybrid Modus', 'string', 'text', '');
|
|
4255
|
+
await mk('speicher.regelung.sungrowHybridGrund', 'Sungrow Hybrid Grund', 'string', 'text', '');
|
|
4256
|
+
await mk('speicher.regelung.sungrowHybridSchreibmodus', 'Sungrow Hybrid Schreibmodus', 'string', 'text', '');
|
|
4257
|
+
await mk('speicher.regelung.sungrowHybridSollW', 'Sungrow Hybrid angewendeter Sollwert', 'number', 'value.power', 0);
|
|
4258
|
+
await mk('speicher.regelung.sungrowHybridPvW', 'Sungrow Hybrid erkannte PV-Leistung', 'number', 'value.power', 0);
|
|
4259
|
+
await mk('speicher.regelung.sungrowHybridLastW', 'Sungrow Hybrid erkannte Gebäudelast', 'number', 'value.power', 0);
|
|
4260
|
+
await mk('speicher.regelung.sungrowHybridNvpW', 'Sungrow Hybrid Netzpunktleistung', 'number', 'value.power', null);
|
|
4261
|
+
await mk('speicher.regelung.sungrowHybridImportW', 'Sungrow Hybrid Netzbezug', 'number', 'value.power', 0);
|
|
4262
|
+
await mk('speicher.regelung.sungrowHybridExportW', 'Sungrow Hybrid Netzeinspeisung', 'number', 'value.power', 0);
|
|
4263
|
+
await mk('speicher.regelung.sungrowHybridPvDecktLast', 'Sungrow Hybrid PV deckt Gebäudelast', 'boolean', 'indicator', false);
|
|
4264
|
+
await mk('speicher.regelung.sungrowHybridSchwelleW', 'Sungrow Hybrid PV-Schwellwert', 'number', 'value.power', 300);
|
|
4265
|
+
await mk('speicher.regelung.sungrowHybridLastReserveW', 'Sungrow Hybrid Lastdeckungsreserve', 'number', 'value.power', 300);
|
|
4266
|
+
await mk('speicher.regelung.sungrowHybridImportSchwelleW', 'Sungrow Hybrid Import-Schwelle', 'number', 'value.power', 100);
|
|
4267
|
+
|
|
4026
4268
|
await mk('speicher.regelung.sungrowHybridNvpZielW', 'Sungrow NVP Zielbezug (W)', 'number', 'value.power', 0);
|
|
4027
4269
|
await mk('speicher.regelung.sungrowHybridNvpDeadbandW', 'Sungrow NVP Deadband (W)', 'number', 'value.power', 0);
|
|
4028
4270
|
await mk('speicher.regelung.sungrowHybridNvpFehlerW', 'Sungrow NVP Regelfehler (W)', 'number', 'value.power', 0);
|
|
4029
4271
|
await mk('speicher.regelung.sungrowHybridNvpBalanceBasisW', 'Sungrow NVP Balancing Basis/Ist (W)', 'number', 'value.power', 0);
|
|
4030
4272
|
await mk('speicher.regelung.sungrowHybridNvpBalanceZielW', 'Sungrow NVP Balancing Ziel (W)', 'number', 'value.power', 0);
|
|
4031
4273
|
await mk('speicher.regelung.sungrowHybridNvpBalanceAktiv', 'Sungrow NVP Balancing aktiv', 'boolean', 'indicator', false);
|
|
4274
|
+
|
|
4275
|
+
// E3/DC-RSCP-Diagnoseobjekte vor dem ersten Schreibzugriff anlegen.
|
|
4276
|
+
// Der ioBroker.e3dc-rscp Adapter nutzt SET_POWER_MODE + SET_POWER_VALUE;
|
|
4277
|
+
// diese States zeigen transparent, welches RSCP-Tupel NexoWatt zuletzt gesetzt hat.
|
|
4278
|
+
await mk('speicher.regelung.e3dcRscpAktiv', 'E3/DC RSCP Herstellerprofil aktiv', 'boolean', 'indicator', false);
|
|
4279
|
+
await mk('speicher.regelung.e3dcRscpModus', 'E3/DC RSCP Modus', 'string', 'text', '');
|
|
4280
|
+
await mk('speicher.regelung.e3dcRscpModeCode', 'E3/DC RSCP SET_POWER_MODE Code', 'number', 'value', 0);
|
|
4281
|
+
await mk('speicher.regelung.e3dcRscpValueW', 'E3/DC RSCP SET_POWER_VALUE (W)', 'number', 'value.power', 0);
|
|
4282
|
+
await mk('speicher.regelung.e3dcRscpSollW', 'E3/DC RSCP NexoWatt Sollwert (W)', 'number', 'value.power', 0);
|
|
4283
|
+
await mk('speicher.regelung.e3dcRscpSchreibmodus', 'E3/DC RSCP Schreibmodus', 'string', 'text', '');
|
|
4284
|
+
await mk('speicher.regelung.e3dcRscpQuelle', 'E3/DC RSCP Quelle', 'string', 'text', '');
|
|
4285
|
+
await mk('speicher.regelung.e3dcRscpGrund', 'E3/DC RSCP Grund', 'string', 'text', '');
|
|
4286
|
+
await mk('speicher.regelung.e3dcRscpGridCharge', 'E3/DC RSCP GRID_CHARGE aktiv', 'boolean', 'indicator', false);
|
|
4287
|
+
await mk('speicher.regelung.e3dcRscpZeroMode', 'E3/DC RSCP 0-W-Modus', 'string', 'text', 'normal');
|
|
4288
|
+
await mk('speicher.regelung.e3dcRscpPowerLimitsUsed', 'E3/DC RSCP PowerLimits gesetzt', 'boolean', 'indicator', false);
|
|
4289
|
+
await mk('speicher.regelung.e3dcRscpSchreibOk', 'E3/DC RSCP Schreiben OK', 'boolean', 'indicator', false);
|
|
4032
4290
|
await mk('speicher.regelung.policyMode', 'Speicher-Policy-Modus', 'string', 'text', 'eigenverbrauch');
|
|
4033
4291
|
await mk('speicher.regelung.policyLayerStorageOnly', 'Policy-Schicht reine Eigenverbrauchsoptimierung', 'boolean', 'indicator', true);
|
|
4034
4292
|
await mk('speicher.regelung.multiUsePolicyActive', 'MultiUse-Policy aktiv', 'boolean', 'indicator', false);
|
|
@@ -4053,12 +4311,42 @@ const _prevRampW = (typeof this._lastTargetW === 'number' && Number.isFinite(thi
|
|
|
4053
4311
|
* Zusammenhang: Teil von EMS-Modul: Regelung, Diagnose oder Beratung; Aufrufstellen und abhängige States/APIs beim Ändern mitprüfen.
|
|
4054
4312
|
* TypeScript: Parameter, Rückgabewert und verwendete Config-/State-Objekte später explizit typisieren.
|
|
4055
4313
|
*/
|
|
4314
|
+
async _ensureRuntimeStateObject(id, val) {
|
|
4315
|
+
// Sicherheitsnetz fuer Feld-Updates: Wenn ein neuer Diagnose-State vor dem
|
|
4316
|
+
// Objekt-Rebuild geschrieben wird, legt ioBroker sonst bei jedem Tick eine
|
|
4317
|
+
// Warnung ins Log. Wir legen nur eigene Runtime-States im Speicher-Regelungs-
|
|
4318
|
+
// Namespace nachtraeglich an und vermeiden damit Log-Spam durch neue States.
|
|
4319
|
+
try {
|
|
4320
|
+
if (!this.adapter || typeof this.adapter.setObjectNotExistsAsync !== 'function') return;
|
|
4321
|
+
const sid = String(id || '');
|
|
4322
|
+
if (!sid.startsWith('speicher.regelung.')) return;
|
|
4323
|
+
const numericById = /W$|Pct$|Ms$|Limit|Headroom|Schwelle|Reserve|Soc|SoC|Ziel|Fehler|Basis/.test(sid);
|
|
4324
|
+
const booleanById = /Aktiv$|Ok$|Erlaubt$|DecktLast$|Ignored$|Active$/.test(sid);
|
|
4325
|
+
const type = (typeof val === 'boolean' || booleanById)
|
|
4326
|
+
? 'boolean'
|
|
4327
|
+
: ((typeof val === 'number' || numericById) ? 'number' : 'string');
|
|
4328
|
+
let role = type === 'boolean' ? 'indicator' : (type === 'number' ? 'value' : 'text');
|
|
4329
|
+
if (type === 'number') {
|
|
4330
|
+
if (/W$/.test(sid) || /Power/.test(sid) || /Leistung/.test(sid)) role = 'value.power';
|
|
4331
|
+
else if (/Ms$/.test(sid) || /Alter/.test(sid)) role = 'value.interval';
|
|
4332
|
+
}
|
|
4333
|
+
await this.adapter.setObjectNotExistsAsync(sid, {
|
|
4334
|
+
type: 'state',
|
|
4335
|
+
common: { name: sid, type, role, read: true, write: false, def: val === undefined ? null : val },
|
|
4336
|
+
native: {},
|
|
4337
|
+
});
|
|
4338
|
+
} catch {
|
|
4339
|
+
// Diagnose-Objekterstellung darf den Regeltakt nie abbrechen.
|
|
4340
|
+
}
|
|
4341
|
+
}
|
|
4342
|
+
|
|
4056
4343
|
async _setIfChanged(id, val) {
|
|
4057
4344
|
const v = (val === undefined) ? null : val;
|
|
4058
4345
|
try {
|
|
4059
4346
|
const cur = await this.adapter.getStateAsync(id);
|
|
4060
4347
|
const curVal = cur ? cur.val : null;
|
|
4061
4348
|
if (cur && curVal === v) return;
|
|
4349
|
+
if (!cur) await this._ensureRuntimeStateObject(id, v);
|
|
4062
4350
|
await this.adapter.setStateAsync(id, v, true);
|
|
4063
4351
|
} catch (e) {
|
|
4064
4352
|
// ignore
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
|
|
3
3
|
*
|
|
4
4
|
* Quelle: src-ts/runtime-executables/ems/modules/storage-mapping.ts
|
|
5
|
-
* Quell-Hash: sha256:
|
|
5
|
+
* Quell-Hash: sha256:fce39f5e4f2f86558710d8f15a4c7724ea785664577ed8076bb3236d709a270b
|
|
6
6
|
* Erzeugung: npm run sync:ts-runtime-executables
|
|
7
7
|
*
|
|
8
8
|
* Zweck:
|
|
@@ -156,6 +156,7 @@ class SpeicherMappingModule extends BaseModule {
|
|
|
156
156
|
{ id: `${base}.mapping.aktiv`, name: 'Speicher-Zuordnung aktiv', type: 'boolean', role: 'indicator', def: false },
|
|
157
157
|
{ id: `${base}.mapping.modus`, name: 'Speicher Steuerungsart', type: 'string', role: 'text', def: '' },
|
|
158
158
|
{ id: `${base}.mapping.kopplung`, name: 'Speicher-Kopplung AC/DC', type: 'string', role: 'text', def: 'ac' },
|
|
159
|
+
{ id: `${base}.mapping.herstellerprofil`, name: 'Speicher-Herstellerprofil', type: 'string', role: 'text', def: 'generic' },
|
|
159
160
|
{ id: `${base}.mapping.ok`, name: 'Speicher-Zuordnung vollständig', type: 'boolean', role: 'indicator', def: false },
|
|
160
161
|
{ id: `${base}.mapping.fehlt`, name: 'Fehlende Datenpunkte (Liste)', type: 'string', role: 'text', def: '' },
|
|
161
162
|
|
|
@@ -172,6 +173,11 @@ class SpeicherMappingModule extends BaseModule {
|
|
|
172
173
|
{ id: `${base}.mapping.entladenErlaubtId`, name: 'Entladen erlaubt Datenpunkt-ID', type: 'string', role: 'text', def: '' },
|
|
173
174
|
{ id: `${base}.mapping.reserveSocId`, name: 'Reserve-SoC Datenpunkt-ID', type: 'string', role: 'text', def: '' },
|
|
174
175
|
{ id: `${base}.mapping.feneconGridSetpointId`, name: 'Legacy Netzpunkt-Sollwert Datenpunkt-ID (nicht genutzt)', type: 'string', role: 'text', def: '' },
|
|
176
|
+
{ id: `${base}.mapping.e3dcSetPowerModeId`, name: 'E3/DC EMS.SET_POWER_MODE Datenpunkt-ID', type: 'string', role: 'text', def: '' },
|
|
177
|
+
{ id: `${base}.mapping.e3dcSetPowerValueId`, name: 'E3/DC EMS.SET_POWER_VALUE Datenpunkt-ID', type: 'string', role: 'text', def: '' },
|
|
178
|
+
{ id: `${base}.mapping.e3dcPowerLimitsUsedId`, name: 'E3/DC EMS.POWER_LIMITS_USED Datenpunkt-ID', type: 'string', role: 'text', def: '' },
|
|
179
|
+
{ id: `${base}.mapping.e3dcMaxChargePowerId`, name: 'E3/DC EMS.MAX_CHARGE_POWER Datenpunkt-ID', type: 'string', role: 'text', def: '' },
|
|
180
|
+
{ id: `${base}.mapping.e3dcMaxDischargePowerId`, name: 'E3/DC EMS.MAX_DISCHARGE_POWER Datenpunkt-ID', type: 'string', role: 'text', def: '' },
|
|
175
181
|
|
|
176
182
|
{ id: `${base}.socPct`, name: 'Speicher Ladezustand (SoC)', type: 'number', role: 'value.battery', def: 0 },
|
|
177
183
|
{ id: `${base}.dcPvPowerW`, name: 'DC-/Hybrid-PV Erzeugungsleistung', type: 'number', role: 'value.power', def: 0 },
|
|
@@ -221,11 +227,20 @@ class SpeicherMappingModule extends BaseModule {
|
|
|
221
227
|
const controlMode = (storage && typeof storage.controlMode === 'string') ? storage.controlMode : 'targetPower';
|
|
222
228
|
const couplingRaw = (storage && typeof storage.coupling === 'string') ? storage.coupling.trim().toLowerCase() : 'ac';
|
|
223
229
|
const coupling = couplingRaw === 'dc' ? 'dc' : 'ac';
|
|
230
|
+
const normalizeVendorProfile = (value) => {
|
|
231
|
+
const raw = String(value || '').trim().toLowerCase();
|
|
232
|
+
if (raw === 'fenecon' || raw === 'openems' || raw === 'fems' || raw === 'fenecon-openems') return 'fenecon-openems';
|
|
233
|
+
if (raw === 'sungrow' || raw === 'sungrow-ess' || raw === 'sungrow-hybrid') return 'sungrow-hybrid';
|
|
234
|
+
if (raw === 'e3dc' || raw === 'e3/dc' || raw === 'e3dc-rscp' || raw === 'e3dc-rscp-iobroker') return 'e3dc-rscp';
|
|
235
|
+
if (!raw && storage && storage.e3dcRscpEnabled === true) return 'e3dc-rscp';
|
|
236
|
+
return 'generic';
|
|
237
|
+
};
|
|
238
|
+
const vendorProfile = normalizeVendorProfile(storage.vendorProfile);
|
|
224
239
|
const dp = (storage && storage.datapoints && typeof storage.datapoints === 'object') ? storage.datapoints : {};
|
|
225
240
|
const feneconGridControlEnabled = storage.feneconGridControlEnabled;
|
|
226
241
|
const feneconAcMode = storage.feneconAcMode;
|
|
227
242
|
const farmEnabled = !!(this.adapter && this.adapter.config && this.adapter.config.enableStorageFarm);
|
|
228
|
-
return { controlMode, coupling, dp, feneconGridControlEnabled, feneconAcMode, farmEnabled };
|
|
243
|
+
return { controlMode, coupling, vendorProfile, dp, feneconGridControlEnabled, feneconAcMode, farmEnabled };
|
|
229
244
|
}
|
|
230
245
|
|
|
231
246
|
/**
|
|
@@ -243,7 +258,7 @@ class SpeicherMappingModule extends BaseModule {
|
|
|
243
258
|
async _upsertFromConfig() {
|
|
244
259
|
if (!this.dp) return;
|
|
245
260
|
|
|
246
|
-
const { controlMode, coupling, dp, feneconGridControlEnabled, feneconAcMode, farmEnabled } = this._getCfg();
|
|
261
|
+
const { controlMode, coupling, vendorProfile, dp, feneconGridControlEnabled, feneconAcMode, farmEnabled } = this._getCfg();
|
|
247
262
|
|
|
248
263
|
const socId = String(dp.socObjectId || '').trim();
|
|
249
264
|
const socScale = Number.isFinite(Number(dp.socScale)) ? Number(dp.socScale) : 1;
|
|
@@ -268,8 +283,10 @@ class SpeicherMappingModule extends BaseModule {
|
|
|
268
283
|
// Einige Systeme (z. B. Split-Sollwertsysteme über nexowatt-devices) nutzen keine signed
|
|
269
284
|
// Sollleistung, sondern getrennte positive Vorgaben für Laden und Entladen.
|
|
270
285
|
// Diese DPs werden als alternative Zielpfade zum allgemeinen signed targetPower
|
|
271
|
-
// registriert.
|
|
272
|
-
//
|
|
286
|
+
// registriert. storage-control beruecksichtigt jeden Split-DP einzeln: sind
|
|
287
|
+
// beide vorhanden, werden beide sauber gegeneinander verriegelt; ist nur eine
|
|
288
|
+
// Richtung vorhanden, bleibt diese nutzbar und die fehlende Richtung kann bei
|
|
289
|
+
// Bedarf ueber den signed-DP als Fallback laufen.
|
|
273
290
|
const sollChargeId = String(dp.targetChargePowerObjectId || '').trim();
|
|
274
291
|
const sollChargeScale = Number.isFinite(Number(dp.targetChargePowerScale)) ? Number(dp.targetChargePowerScale) : 1;
|
|
275
292
|
const sollChargeInv = !!dp.targetChargePowerInvert;
|
|
@@ -288,9 +305,21 @@ class SpeicherMappingModule extends BaseModule {
|
|
|
288
305
|
// Der alte Konfigurationswert bleibt nur als Legacy-Diagnose erhalten.
|
|
289
306
|
const feneconGridSetpointId = '';
|
|
290
307
|
|
|
308
|
+
// E3/DC RSCP / ioBroker.e3dc-rscp: Dieser Adapter steuert aktive
|
|
309
|
+
// Batterie-Vorgaben nicht ueber einen signed Leistungs-DP, sondern ueber
|
|
310
|
+
// das gekoppelte Tupel EMS.SET_POWER_MODE + EMS.SET_POWER_VALUE.
|
|
311
|
+
// Optional koennen PowerLimits mitgefuehrt werden, wenn die Anlage diese
|
|
312
|
+
// Grenzen ebenfalls ueber den RSCP-Adapter setzen soll.
|
|
313
|
+
const e3dcSetPowerModeId = String(dp.e3dcSetPowerModeObjectId || '').trim();
|
|
314
|
+
const e3dcSetPowerValueId = String(dp.e3dcSetPowerValueObjectId || '').trim();
|
|
315
|
+
const e3dcPowerLimitsUsedId = String(dp.e3dcPowerLimitsUsedObjectId || '').trim();
|
|
316
|
+
const e3dcMaxChargePowerId = String(dp.e3dcMaxChargePowerObjectId || '').trim();
|
|
317
|
+
const e3dcMaxDischargePowerId = String(dp.e3dcMaxDischargePowerObjectId || '').trim();
|
|
318
|
+
|
|
291
319
|
// Diagnose schreiben
|
|
292
320
|
await this._setIfChanged('speicher.mapping.modus', String(controlMode || ''));
|
|
293
321
|
await this._setIfChanged('speicher.mapping.kopplung', String(coupling || 'ac'));
|
|
322
|
+
await this._setIfChanged('speicher.mapping.herstellerprofil', String(vendorProfile || 'generic'));
|
|
294
323
|
await this._setIfChanged('speicher.mapping.socId', socId);
|
|
295
324
|
await this._setIfChanged('speicher.mapping.istLeistungId', istId);
|
|
296
325
|
await this._setIfChanged('speicher.mapping.dcPvId', dcPvId);
|
|
@@ -304,6 +333,11 @@ class SpeicherMappingModule extends BaseModule {
|
|
|
304
333
|
await this._setIfChanged('speicher.mapping.entladenErlaubtId', dischargeEnId);
|
|
305
334
|
await this._setIfChanged('speicher.mapping.reserveSocId', reserveSocId);
|
|
306
335
|
await this._setIfChanged('speicher.mapping.feneconGridSetpointId', feneconGridSetpointId);
|
|
336
|
+
await this._setIfChanged('speicher.mapping.e3dcSetPowerModeId', e3dcSetPowerModeId);
|
|
337
|
+
await this._setIfChanged('speicher.mapping.e3dcSetPowerValueId', e3dcSetPowerValueId);
|
|
338
|
+
await this._setIfChanged('speicher.mapping.e3dcPowerLimitsUsedId', e3dcPowerLimitsUsedId);
|
|
339
|
+
await this._setIfChanged('speicher.mapping.e3dcMaxChargePowerId', e3dcMaxChargePowerId);
|
|
340
|
+
await this._setIfChanged('speicher.mapping.e3dcMaxDischargePowerId', e3dcMaxDischargePowerId);
|
|
307
341
|
|
|
308
342
|
// Datenpunkte registrieren (st.*)
|
|
309
343
|
if (socId) {
|
|
@@ -464,6 +498,70 @@ class SpeicherMappingModule extends BaseModule {
|
|
|
464
498
|
});
|
|
465
499
|
}
|
|
466
500
|
|
|
501
|
+
if (e3dcSetPowerModeId) {
|
|
502
|
+
await this.dp.upsert({
|
|
503
|
+
key: 'st.e3dcSetPowerMode',
|
|
504
|
+
name: 'E3/DC EMS.SET_POWER_MODE',
|
|
505
|
+
objectId: e3dcSetPowerModeId,
|
|
506
|
+
dataType: 'number',
|
|
507
|
+
direction: 'out',
|
|
508
|
+
unit: '',
|
|
509
|
+
min: 0,
|
|
510
|
+
max: 4,
|
|
511
|
+
note: 'ioBroker.e3dc-rscp; 0=NORMAL, 1=IDLE, 2=DISCHARGE, 3=CHARGE, 4=GRID_CHARGE'
|
|
512
|
+
});
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
if (e3dcSetPowerValueId) {
|
|
516
|
+
await this.dp.upsert({
|
|
517
|
+
key: 'st.e3dcSetPowerValueW',
|
|
518
|
+
name: 'E3/DC EMS.SET_POWER_VALUE',
|
|
519
|
+
objectId: e3dcSetPowerValueId,
|
|
520
|
+
dataType: 'number',
|
|
521
|
+
direction: 'out',
|
|
522
|
+
unit: 'W',
|
|
523
|
+
min: 0,
|
|
524
|
+
note: 'ioBroker.e3dc-rscp; positive Absolutleistung passend zum SET_POWER_MODE'
|
|
525
|
+
});
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
if (e3dcPowerLimitsUsedId) {
|
|
529
|
+
await this.dp.upsert({
|
|
530
|
+
key: 'st.e3dcPowerLimitsUsed',
|
|
531
|
+
name: 'E3/DC EMS.POWER_LIMITS_USED',
|
|
532
|
+
objectId: e3dcPowerLimitsUsedId,
|
|
533
|
+
dataType: 'boolean',
|
|
534
|
+
direction: 'out',
|
|
535
|
+
note: 'Optional; aktiviert RSCP PowerLimits, wenn im Herstellerprofil freigegeben'
|
|
536
|
+
});
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
if (e3dcMaxChargePowerId) {
|
|
540
|
+
await this.dp.upsert({
|
|
541
|
+
key: 'st.e3dcMaxChargePowerW',
|
|
542
|
+
name: 'E3/DC EMS.MAX_CHARGE_POWER',
|
|
543
|
+
objectId: e3dcMaxChargePowerId,
|
|
544
|
+
dataType: 'number',
|
|
545
|
+
direction: 'out',
|
|
546
|
+
unit: 'W',
|
|
547
|
+
min: 0,
|
|
548
|
+
note: 'Optional; Ladeleistungsgrenze fuer E3/DC RSCP'
|
|
549
|
+
});
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
if (e3dcMaxDischargePowerId) {
|
|
553
|
+
await this.dp.upsert({
|
|
554
|
+
key: 'st.e3dcMaxDischargePowerW',
|
|
555
|
+
name: 'E3/DC EMS.MAX_DISCHARGE_POWER',
|
|
556
|
+
objectId: e3dcMaxDischargePowerId,
|
|
557
|
+
dataType: 'number',
|
|
558
|
+
direction: 'out',
|
|
559
|
+
unit: 'W',
|
|
560
|
+
min: 0,
|
|
561
|
+
note: 'Optional; Entladeleistungsgrenze fuer E3/DC RSCP'
|
|
562
|
+
});
|
|
563
|
+
}
|
|
564
|
+
|
|
467
565
|
if (reserveSocId) {
|
|
468
566
|
await this.dp.upsert({
|
|
469
567
|
key: 'st.reserveSocPct',
|
|
@@ -485,13 +583,21 @@ class SpeicherMappingModule extends BaseModule {
|
|
|
485
583
|
const feneconHybridConfiguredRaw = (typeof feneconGridControlEnabled === 'boolean') ? (feneconGridControlEnabled === true) : (feneconAcMode === true);
|
|
486
584
|
const feneconHybridConfigured = !!(feneconHybridConfiguredRaw && !farmEnabled);
|
|
487
585
|
if (feneconHybridConfigured || String(controlMode) === 'targetPower') {
|
|
488
|
-
// Für targetPower reicht entweder ein allgemeiner signed Sollleistungs-DP
|
|
489
|
-
//
|
|
490
|
-
//
|
|
491
|
-
//
|
|
586
|
+
// Für targetPower reicht entweder ein allgemeiner signed Sollleistungs-DP,
|
|
587
|
+
// ein Split-Zielpfad oder beim E3/DC-RSCP-Profil das Tupel aus
|
|
588
|
+
// EMS.SET_POWER_MODE + EMS.SET_POWER_VALUE. Split-Zielpfade duerfen auch
|
|
589
|
+
// einzeln vorhanden sein; storage-control sperrt die nicht gemappte Richtung
|
|
590
|
+
// oder nutzt signed als Fallback, falls vorhanden.
|
|
492
591
|
const hasSignedTarget = !!sollId;
|
|
493
|
-
const hasSplitTarget = !!(sollChargeId
|
|
494
|
-
|
|
592
|
+
const hasSplitTarget = !!(sollChargeId || sollDischargeId);
|
|
593
|
+
const hasE3dcTarget = !!(e3dcSetPowerModeId && e3dcSetPowerValueId);
|
|
594
|
+
if (vendorProfile === 'e3dc-rscp') {
|
|
595
|
+
if (!hasE3dcTarget && !hasSignedTarget && !hasSplitTarget) {
|
|
596
|
+
missing.push('E3/DC EMS.SET_POWER_MODE + EMS.SET_POWER_VALUE oder normaler Sollwert');
|
|
597
|
+
}
|
|
598
|
+
} else if (!hasSignedTarget && !hasSplitTarget) {
|
|
599
|
+
missing.push('Sollleistung signed oder Sollwert Laden/Entladen');
|
|
600
|
+
}
|
|
495
601
|
} else if (String(controlMode) === 'limits') {
|
|
496
602
|
if (!maxChargeId) missing.push('Max Ladeleistung (W)');
|
|
497
603
|
if (!maxDischargeId) missing.push('Max Entladeleistung (W)');
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "nexowatt-ui",
|
|
4
|
-
"version": "0.8.
|
|
4
|
+
"version": "0.8.89",
|
|
5
5
|
"news": {
|
|
6
|
+
"0.8.89": {
|
|
7
|
+
"de": "Version 0.8.89: Ergänzt das Herstellerprofil E3/DC RSCP für die Einzel-Speicherregelung. Der ioBroker.e3dc-rscp Adapter wird über EMS.SET_POWER_MODE und EMS.SET_POWER_VALUE angesteuert; optionale PowerLimits und Diagnose-States wurden ergänzt. Die E3/DC-spezifischen Datenpunkte sind nur beim E3/DC-Herstellerprofil sichtbar.",
|
|
8
|
+
"en": "Version 0.8.89: Adds the E3/DC RSCP manufacturer profile for single-storage control. The ioBroker.e3dc-rscp adapter is controlled via EMS.SET_POWER_MODE and EMS.SET_POWER_VALUE; optional power limits and diagnostic states were added. E3/DC-specific datapoints are only visible for the E3/DC manufacturer profile."
|
|
9
|
+
},
|
|
10
|
+
"0.8.88": {
|
|
11
|
+
"de": "Version 0.8.88: Legt alle Sungrow-Hybrid-Diagnose-States vor dem zyklischen Schreiben an, damit keine ioBroker-Logflut durch fehlende Objekte entsteht. Die Speicherregelung berücksichtigt getrennte Lade-/Entlade-Sollwertpfade jetzt auch einzeln und nutzt den signed-Sollwert als Fallback, wenn eine Richtung nicht separat gemappt ist.",
|
|
12
|
+
"en": "Version 0.8.88: Creates all Sungrow hybrid diagnostic states before cyclic writes to avoid ioBroker log spam from missing objects. Storage control now supports separate charge/discharge target paths individually and uses the signed target as fallback when one direction is not mapped separately."
|
|
13
|
+
},
|
|
6
14
|
"0.8.87": {
|
|
7
15
|
"de": "Version 0.8.87: Korrigiert das Sungrow-Hybrid-ESS-NVP-Balancing. Die Speicherregelung verrechnet jetzt laufende Be-/Entladung mit der aktuellen NVP-Abweichung, damit Rest-Netzbezug über dem Zielband und Rest-Export nachgeregelt werden. PV-deckender Sungrow-Betrieb schreibt nur noch 0 W, wenn der NVP wirklich im Zielband liegt.",
|
|
8
16
|
"en": "Version 0.8.87: Fixes Sungrow Hybrid ESS NVP balancing. Storage control now combines the current charge/discharge power with the live NVP deviation so residual grid import above the target band and residual export are corrected. PV-covering Sungrow operation only writes 0 W when the NVP is actually within the target band."
|
|
@@ -22,14 +30,6 @@
|
|
|
22
30
|
"0.8.83": {
|
|
23
31
|
"de": "Version 0.8.83: Verschiebt die Einzel-Speicherregelung in einen eigenen App-Center-Reiter und ergänzt AC/DC-Hybrid-Auswahl mit optionaler DC-/Hybrid-PV-Erzeugungszuordnung. Dieser PV-Wert wird als Messwert für Energiefluss, Historie und FENECON-/0-Einspeise-Kontext genutzt, nicht als Speicher-Sollwert.",
|
|
24
32
|
"en": "Version 0.8.83: Moves single-storage control into its own App Center tab and adds AC/DC-hybrid selection with an optional DC/hybrid PV generation mapping. This PV value is used as measurement context for energy flow, history and FENECON/zero-export handling, not as a battery setpoint."
|
|
25
|
-
},
|
|
26
|
-
"0.8.82": {
|
|
27
|
-
"de": "Version 0.8.82: Ergänzt den FENECON/OpenEMS/FEMS-Speichermodus. Im Tages-/PV-Betrieb kann NexoWatt externe Speicheranforderungen pausieren, damit FEMS intern regelt; ein optionaler Assist greift nur zeitverzögert und NVP-begrenzt bei dauerhaftem Netzbezug.",
|
|
28
|
-
"en": "Version 0.8.82: Adds the FENECON/OpenEMS/FEMS storage mode. During day/PV operation NexoWatt can pause external battery setpoints so FEMS controls internally; an optional assist only intervenes after sustained grid import and is capped at NVP demand."
|
|
29
|
-
},
|
|
30
|
-
"0.8.81": {
|
|
31
|
-
"de": "Version 0.8.81: Speicherlogik fachlich neu abgesichert. Speicherregelung bleibt reine Eigenverbrauchsoptimierung, MultiUse führt Reserve/LSK/EVCS-Zonen, Speicherfarm verteilt nur Sollwerte; Entlade-Caps verhindern alte Sollwert-/Last-Rückkopplungen für Eigenverbrauch, Tarif und LSK.",
|
|
32
|
-
"en": "Version 0.8.81: Hardens the storage control policy routing. Storage control stays pure self-consumption, MultiUse owns reserve/peak/EVCS zones, the storage farm only dispatches targets; discharge caps prevent stale setpoint/load feedback for self-consumption, tariff and peak shaving."
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
"title": "NexoWatt UI",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iobroker.nexowatt-ui",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.89",
|
|
4
4
|
"description": "Responsive NexoWatt EMS visualization adapter.",
|
|
5
5
|
"author": "NexoWatt",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -295,7 +295,9 @@
|
|
|
295
295
|
"test:storage-single-tab-coupling": "node scripts/verify-storage-single-tab-coupling.js",
|
|
296
296
|
"test:heating-rod-zero-export-budget": "node scripts/verify-heating-rod-zero-export-budget.js",
|
|
297
297
|
"test:storagefarm-menu-appcenter-gate": "node scripts/verify-storagefarm-menu-appcenter-gate.js",
|
|
298
|
-
"test:storage-sungrow-hybrid-profile": "node scripts/verify-storage-sungrow-hybrid-profile.js"
|
|
298
|
+
"test:storage-sungrow-hybrid-profile": "node scripts/verify-storage-sungrow-hybrid-profile.js",
|
|
299
|
+
"test:storage-sungrow-diagnostics-split-targets": "node scripts/verify-storage-sungrow-diagnostics-split-targets.js",
|
|
300
|
+
"test:storage-e3dc-rscp-profile": "node scripts/verify-storage-e3dc-rscp-profile.js"
|
|
299
301
|
},
|
|
300
302
|
"dependencies": {
|
|
301
303
|
"@iobroker/adapter-core": "^3.4.1",
|
package/www/ems-apps.html
CHANGED
|
@@ -808,6 +808,7 @@
|
|
|
808
808
|
<option value="generic">Generic / Standard-Speicher</option>
|
|
809
809
|
<option value="fenecon-openems">FENECON / OpenEMS / FEMS</option>
|
|
810
810
|
<option value="sungrow-hybrid">Sungrow Hybrid ESS</option>
|
|
811
|
+
<option value="e3dc-rscp">E3/DC RSCP / ioBroker.e3dc-rscp</option>
|
|
811
812
|
</select>
|
|
812
813
|
<div class="nw-config-help" style="margin-top:4px; opacity:0.85;">
|
|
813
814
|
Herstellerprofile ändern nur den Schreibpfad und die Schutzlogik der Einzel-Speicherregelung. Grundlogik, NVP-Messung, SoC und Budget bleiben weiterhin zentral geführt.
|
|
@@ -881,6 +882,33 @@
|
|
|
881
882
|
</div>
|
|
882
883
|
</div>
|
|
883
884
|
</div>
|
|
885
|
+
<div class="nw-config-field-row" id="storageE3dcOptionsRow" style="display:none;">
|
|
886
|
+
<div class="nw-config-field-label">E3/DC RSCP</div>
|
|
887
|
+
<div class="nw-config-field-control nw-config-field-control--stack">
|
|
888
|
+
<label class="nw-config-checklabel" for="storageE3dcRscpEnabled">
|
|
889
|
+
<input id="storageE3dcRscpEnabled" class="nw-config-checkbox" type="checkbox" />
|
|
890
|
+
<span>E3/DC SET_POWER über ioBroker.e3dc-rscp verwenden</span>
|
|
891
|
+
</label>
|
|
892
|
+
<label class="nw-config-checklabel" for="storageE3dcAllowGridCharge">
|
|
893
|
+
<input id="storageE3dcAllowGridCharge" class="nw-config-checkbox" type="checkbox" />
|
|
894
|
+
<span>Tarif-/Reserve-Netzladen als GRID_CHARGE erlauben</span>
|
|
895
|
+
</label>
|
|
896
|
+
<label class="nw-config-checklabel" for="storageE3dcUsePowerLimits">
|
|
897
|
+
<input id="storageE3dcUsePowerLimits" class="nw-config-checkbox" type="checkbox" />
|
|
898
|
+
<span>PowerLimits automatisch setzen</span>
|
|
899
|
+
</label>
|
|
900
|
+
<div style="display:flex; gap:8px; align-items:center; flex-wrap:wrap;">
|
|
901
|
+
<span class="nw-config-help" style="min-width:160px; opacity:0.85;">0-W-Vorgabe schreibt:</span>
|
|
902
|
+
<select id="storageE3dcZeroMode" class="nw-config-input" style="max-width:240px;">
|
|
903
|
+
<option value="normal">NORMAL (interne Regelung)</option>
|
|
904
|
+
<option value="idle">IDLE (halten/pausieren)</option>
|
|
905
|
+
</select>
|
|
906
|
+
</div>
|
|
907
|
+
<div class="nw-config-help" style="margin-top:4px; opacity:0.85;">
|
|
908
|
+
Für den ioBroker.e3dc-rscp Adapter nutzt NexoWatt <b>EMS.SET_POWER_MODE</b> und <b>EMS.SET_POWER_VALUE</b>. Positiver NexoWatt-Sollwert wird als DISCHARGE geschrieben, negativer als CHARGE bzw. bei erlaubtem Tarif-/Reserve-Netzladen als GRID_CHARGE. Die E3/DC-spezifischen Datenpunkte werden unten nur bei diesem Herstellerprofil eingeblendet.
|
|
909
|
+
</div>
|
|
910
|
+
</div>
|
|
911
|
+
</div>
|
|
884
912
|
<div id="storageTable" class="nw-config-list" style="margin-top:6px;"></div>
|
|
885
913
|
</div>
|
|
886
914
|
</div>
|
package/www/ems-apps.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
|
|
3
3
|
*
|
|
4
4
|
* Quelle: src-ts/runtime-executables/www/ems-apps.ts
|
|
5
|
-
* Quell-Hash: sha256:
|
|
5
|
+
* Quell-Hash: sha256:69c06d1347d5cea3371f3482717d051a6b7eed79cb7d9a9697e76fef76b89d5f
|
|
6
6
|
* Erzeugung: npm run sync:ts-runtime-executables
|
|
7
7
|
*
|
|
8
8
|
* Zweck:
|
|
@@ -116,6 +116,11 @@
|
|
|
116
116
|
storageSungrowPvPassthrough: document.getElementById('storageSungrowPvPassthrough'),
|
|
117
117
|
storageSungrowZeroOnPvCoverage: document.getElementById('storageSungrowZeroOnPvCoverage'),
|
|
118
118
|
storageSungrowDischargeOnlyOnImport: document.getElementById('storageSungrowDischargeOnlyOnImport'),
|
|
119
|
+
storageE3dcOptionsRow: document.getElementById('storageE3dcOptionsRow'),
|
|
120
|
+
storageE3dcRscpEnabled: document.getElementById('storageE3dcRscpEnabled'),
|
|
121
|
+
storageE3dcZeroMode: document.getElementById('storageE3dcZeroMode'),
|
|
122
|
+
storageE3dcAllowGridCharge: document.getElementById('storageE3dcAllowGridCharge'),
|
|
123
|
+
storageE3dcUsePowerLimits: document.getElementById('storageE3dcUsePowerLimits'),
|
|
119
124
|
|
|
120
125
|
// Speicherfarm
|
|
121
126
|
storageFarmMode: document.getElementById('storageFarmMode'),
|
|
@@ -846,14 +851,19 @@
|
|
|
846
851
|
{ key: 'socObjectId', label: 'SoC (%)', requiredModes: ['targetPower','limits','enableFlags'] },
|
|
847
852
|
{ key: 'batteryPowerObjectId', label: 'Ist-Leistung (W) (optional)', requiredModes: [] },
|
|
848
853
|
{ key: 'dcPvPowerObjectId', label: 'DC-/Hybrid-PV Erzeugung (W)', requiredModes: [], showForCoupling: ['dc'], hint: 'Nur bei DC-/Hybrid-Speichern: Erzeugungsleistung des Hybrid-/PV-Wechselrichters. Dieser Wert ist eine Messung, kein Batterie-Sollwert, und hilft bei Forecast-/0-Einspeise-/FENECON-Erkennung.' },
|
|
849
|
-
{ key: 'targetPowerObjectId', label: 'Sollleistung signed (W)', requiredModes: ['targetPower'], hint: 'Allgemeiner bidirektionaler Sollwert. NexoWatt-Konvention: +W = Entladen, -W = Laden.
|
|
850
|
-
{ key: 'targetChargePowerObjectId', label: 'Sollwert Laden (W) getrennt', requiredModes: ['targetPower'], hint: 'Optional: positiver Lade-Sollwert.
|
|
851
|
-
{ key: 'targetDischargePowerObjectId', label: 'Sollwert Entladen (W) getrennt', requiredModes: ['targetPower'], hint: 'Optional: positiver Entlade-Sollwert.
|
|
854
|
+
{ key: 'targetPowerObjectId', label: 'Sollleistung signed (W)', requiredModes: ['targetPower'], hint: 'Allgemeiner bidirektionaler Sollwert. NexoWatt-Konvention: +W = Entladen, -W = Laden. Wird genutzt, wenn keine getrennten Ziel-DPs gesetzt sind oder als Fallback fuer eine fehlende Split-Richtung.' },
|
|
855
|
+
{ key: 'targetChargePowerObjectId', label: 'Sollwert Laden (W) getrennt', requiredModes: ['targetPower'], hint: 'Optional: positiver Lade-Sollwert. Kann zusammen mit Entladen oder einzeln gemappt werden; bei Split wird die Gegenrichtung auf 0 gesetzt.' },
|
|
856
|
+
{ key: 'targetDischargePowerObjectId', label: 'Sollwert Entladen (W) getrennt', requiredModes: ['targetPower'], hint: 'Optional: positiver Entlade-Sollwert. Kann zusammen mit Laden oder einzeln gemappt werden; bei Split wird die Gegenrichtung auf 0 gesetzt.' },
|
|
852
857
|
{ key: 'runObjectId', label: 'Run / externe Speicherregelung (bool)', requiredModes: ['targetPower'], hint: 'Optional: wird auf true gesetzt, wenn NexoWatt einen Lade-/Entlade-Sollwert vorgibt, und auf false bei 0 W. Hilfreich für externe Speicher-Controller oder Alias-Bridge-Datenpunkte.' },
|
|
853
858
|
{ key: 'maxChargeObjectId', label: 'Max Ladeleistung (W)', requiredModes: ['limits'] },
|
|
854
859
|
{ key: 'maxDischargeObjectId', label: 'Max Entladeleistung (W)', requiredModes: ['limits'] },
|
|
855
860
|
{ key: 'chargeEnableObjectId', label: 'Laden erlaubt (bool)', requiredModes: ['enableFlags'] },
|
|
856
861
|
{ key: 'dischargeEnableObjectId', label: 'Entladen erlaubt (bool)', requiredModes: ['enableFlags'] },
|
|
862
|
+
{ key: 'e3dcSetPowerModeObjectId', label: 'E3/DC EMS.SET_POWER_MODE', requiredModes: ['targetPower'], showForVendor: ['e3dc-rscp'], hint: 'ioBroker.e3dc-rscp: Zahlenmodus 0=NORMAL, 1=IDLE, 2=DISCHARGE, 3=CHARGE, 4=GRID_CHARGE. Dieser DP ist zusammen mit SET_POWER_VALUE der bevorzugte E3/DC-Schreibpfad.' },
|
|
863
|
+
{ key: 'e3dcSetPowerValueObjectId', label: 'E3/DC EMS.SET_POWER_VALUE (W)', requiredModes: ['targetPower'], showForVendor: ['e3dc-rscp'], hint: 'ioBroker.e3dc-rscp: positive Absolutleistung in Watt passend zum SET_POWER_MODE.' },
|
|
864
|
+
{ key: 'e3dcPowerLimitsUsedObjectId', label: 'E3/DC EMS.POWER_LIMITS_USED (optional)', requiredModes: [], showForVendor: ['e3dc-rscp'], hint: 'Optional: wird nur geschrieben, wenn „PowerLimits automatisch setzen“ aktiv ist.' },
|
|
865
|
+
{ key: 'e3dcMaxChargePowerObjectId', label: 'E3/DC EMS.MAX_CHARGE_POWER (optional)', requiredModes: [], showForVendor: ['e3dc-rscp'], hint: 'Optional: Ladeleistungsgrenze fuer E3/DC RSCP PowerLimits.' },
|
|
866
|
+
{ key: 'e3dcMaxDischargePowerObjectId', label: 'E3/DC EMS.MAX_DISCHARGE_POWER (optional)', requiredModes: [], showForVendor: ['e3dc-rscp'], hint: 'Optional: Entladeleistungsgrenze fuer E3/DC RSCP PowerLimits.' },
|
|
857
867
|
{ key: 'reserveSocObjectId', label: 'Reserve-SoC (%) (optional)', requiredModes: [] }
|
|
858
868
|
];
|
|
859
869
|
|
|
@@ -8417,6 +8427,7 @@ http://mesh-peer.local:8188" ${isEos ? '' : 'disabled'}>${_meshHtmlEscape(Array.
|
|
|
8417
8427
|
const s = String(v || '').trim().toLowerCase();
|
|
8418
8428
|
if (s === 'fenecon' || s === 'openems' || s === 'fems' || s === 'fenecon-openems') return 'fenecon-openems';
|
|
8419
8429
|
if (s === 'sungrow' || s === 'sungrow-ess' || s === 'sungrow-hybrid') return 'sungrow-hybrid';
|
|
8430
|
+
if (s === 'e3dc' || s === 'e3/dc' || s === 'e3dc-rscp' || s === 'e3dc-rscp-iobroker') return 'e3dc-rscp';
|
|
8420
8431
|
return 'generic';
|
|
8421
8432
|
}
|
|
8422
8433
|
|
|
@@ -8452,6 +8463,7 @@ http://mesh-peer.local:8188" ${isEos ? '' : 'disabled'}>${_meshHtmlEscape(Array.
|
|
|
8452
8463
|
const profile = getStorageVendorProfile();
|
|
8453
8464
|
if (els.storageFeneconOptionsRow) els.storageFeneconOptionsRow.style.display = (profile === 'fenecon-openems') ? '' : 'none';
|
|
8454
8465
|
if (els.storageSungrowOptionsRow) els.storageSungrowOptionsRow.style.display = (profile === 'sungrow-hybrid') ? '' : 'none';
|
|
8466
|
+
if (els.storageE3dcOptionsRow) els.storageE3dcOptionsRow.style.display = (profile === 'e3dc-rscp') ? '' : 'none';
|
|
8455
8467
|
}
|
|
8456
8468
|
/**
|
|
8457
8469
|
* Code-Teil: rebuildStorageTable
|
|
@@ -8462,9 +8474,12 @@ http://mesh-peer.local:8188" ${isEos ? '' : 'disabled'}>${_meshHtmlEscape(Array.
|
|
|
8462
8474
|
function rebuildStorageTable() {
|
|
8463
8475
|
const mode = getStorageMode();
|
|
8464
8476
|
const coupling = getStorageCoupling();
|
|
8477
|
+
const vendorProfile = getStorageVendorProfile();
|
|
8465
8478
|
updateStorageCouplingUi();
|
|
8479
|
+
updateStorageVendorProfileUi();
|
|
8466
8480
|
const fields = STORAGE_DP_FIELDS.filter(f => {
|
|
8467
8481
|
if (Array.isArray(f.showForCoupling) && f.showForCoupling.length && !f.showForCoupling.includes(coupling)) return false;
|
|
8482
|
+
if (Array.isArray(f.showForVendor) && f.showForVendor.length && !f.showForVendor.includes(vendorProfile)) return false;
|
|
8468
8483
|
if (!f.requiredModes || !f.requiredModes.length) return true;
|
|
8469
8484
|
return f.requiredModes.includes(mode);
|
|
8470
8485
|
});
|
|
@@ -10692,12 +10707,13 @@ http://mesh-peer.local:8188" ${isEos ? '' : 'disabled'}>${_meshHtmlEscape(Array.
|
|
|
10692
10707
|
const legacyFeneconModeActive = (typeof stF.feneconGridControlEnabled === 'boolean')
|
|
10693
10708
|
? !!stF.feneconGridControlEnabled
|
|
10694
10709
|
: !!stF.feneconAcMode;
|
|
10695
|
-
const vendorProfile = normalizeStorageVendorProfile(stF.vendorProfile || (legacyFeneconModeActive ? 'fenecon-openems' : (stF.sungrowHybridEnabled ? 'sungrow-hybrid' : 'generic')));
|
|
10710
|
+
const vendorProfile = normalizeStorageVendorProfile(stF.vendorProfile || (legacyFeneconModeActive ? 'fenecon-openems' : (stF.sungrowHybridEnabled ? 'sungrow-hybrid' : (stF.e3dcRscpEnabled ? 'e3dc-rscp' : 'generic'))));
|
|
10696
10711
|
if (els.storageVendorProfile) els.storageVendorProfile.value = vendorProfile;
|
|
10697
10712
|
updateStorageVendorProfileUi();
|
|
10698
10713
|
|
|
10699
10714
|
const feneconModeActive = vendorProfile === 'fenecon-openems';
|
|
10700
10715
|
const sungrowModeActive = vendorProfile === 'sungrow-hybrid';
|
|
10716
|
+
const e3dcModeActive = vendorProfile === 'e3dc-rscp';
|
|
10701
10717
|
if (els.storageFeneconAcMode) {
|
|
10702
10718
|
els.storageFeneconAcMode.checked = feneconModeActive;
|
|
10703
10719
|
}
|
|
@@ -10722,6 +10738,19 @@ http://mesh-peer.local:8188" ${isEos ? '' : 'disabled'}>${_meshHtmlEscape(Array.
|
|
|
10722
10738
|
if (els.storageSungrowDischargeOnlyOnImport) {
|
|
10723
10739
|
els.storageSungrowDischargeOnlyOnImport.checked = sungrowModeActive && (stF.sungrowDischargeOnlyOnGridImport !== false);
|
|
10724
10740
|
}
|
|
10741
|
+
if (els.storageE3dcRscpEnabled) {
|
|
10742
|
+
els.storageE3dcRscpEnabled.checked = e3dcModeActive;
|
|
10743
|
+
}
|
|
10744
|
+
if (els.storageE3dcZeroMode) {
|
|
10745
|
+
const zeroMode = String(stF.e3dcZeroMode || 'normal').trim().toLowerCase();
|
|
10746
|
+
els.storageE3dcZeroMode.value = zeroMode === 'idle' ? 'idle' : 'normal';
|
|
10747
|
+
}
|
|
10748
|
+
if (els.storageE3dcAllowGridCharge) {
|
|
10749
|
+
els.storageE3dcAllowGridCharge.checked = e3dcModeActive && stF.e3dcAllowGridCharge === true;
|
|
10750
|
+
}
|
|
10751
|
+
if (els.storageE3dcUsePowerLimits) {
|
|
10752
|
+
els.storageE3dcUsePowerLimits.checked = e3dcModeActive && stF.e3dcUsePowerLimits === true;
|
|
10753
|
+
}
|
|
10725
10754
|
rebuildStorageTable();
|
|
10726
10755
|
try { buildStorageFarmUI(); } catch (_e) {}
|
|
10727
10756
|
try { buildStorageMultiUseUI(); } catch (_e) {}
|
|
@@ -12127,6 +12156,7 @@ http://mesh-peer.local:8188" ${isEos ? '' : 'disabled'}>${_meshHtmlEscape(Array.
|
|
|
12127
12156
|
patch.storage.datapoints = deepMerge({}, (currentConfig.storage && currentConfig.storage.datapoints) ? currentConfig.storage.datapoints : {});
|
|
12128
12157
|
patch.storage.feneconGridControlEnabled = patch.storage.vendorProfile === 'fenecon-openems';
|
|
12129
12158
|
patch.storage.sungrowHybridEnabled = patch.storage.vendorProfile === 'sungrow-hybrid';
|
|
12159
|
+
patch.storage.e3dcRscpEnabled = patch.storage.vendorProfile === 'e3dc-rscp';
|
|
12130
12160
|
// FENECON/OpenEMS/FEMS: Der Herstellerprofil-Haken aktiviert den
|
|
12131
12161
|
// Gateway-Modus. Die Zusatz-Haken steuern, ob NexoWatt tagsueber gar nicht
|
|
12132
12162
|
// schreibt und ob ein zeitverzoegerter NVP-Assist erlaubt ist.
|
|
@@ -12138,6 +12168,12 @@ http://mesh-peer.local:8188" ${isEos ? '' : 'disabled'}>${_meshHtmlEscape(Array.
|
|
|
12138
12168
|
patch.storage.sungrowPvPassthroughEnabled = !!(els.storageSungrowPvPassthrough && els.storageSungrowPvPassthrough.checked);
|
|
12139
12169
|
patch.storage.sungrowZeroOnPvCoverage = !!(els.storageSungrowZeroOnPvCoverage && els.storageSungrowZeroOnPvCoverage.checked);
|
|
12140
12170
|
patch.storage.sungrowDischargeOnlyOnGridImport = !!(els.storageSungrowDischargeOnlyOnImport && els.storageSungrowDischargeOnlyOnImport.checked);
|
|
12171
|
+
// E3/DC RSCP: SET_POWER_MODE + SET_POWER_VALUE werden nur beim Herstellerprofil
|
|
12172
|
+
// E3/DC sichtbar/gespeichert; die Grundlogik bleibt weiterhin reine NVP-/Budget-
|
|
12173
|
+
// Eigenverbrauchsoptimierung.
|
|
12174
|
+
patch.storage.e3dcZeroMode = (els.storageE3dcZeroMode && String(els.storageE3dcZeroMode.value).toLowerCase() === 'idle') ? 'idle' : 'normal';
|
|
12175
|
+
patch.storage.e3dcAllowGridCharge = !!(els.storageE3dcAllowGridCharge && els.storageE3dcAllowGridCharge.checked);
|
|
12176
|
+
patch.storage.e3dcUsePowerLimits = !!(els.storageE3dcUsePowerLimits && els.storageE3dcUsePowerLimits.checked);
|
|
12141
12177
|
// Der Haken bedeutet ab 0.6.255: Hybrid-/Gateway-Priorität.
|
|
12142
12178
|
// SetGridActivePower wird nicht mehr verwendet; ein eventuell vorhandener Legacy-DP wird entfernt.
|
|
12143
12179
|
try {
|
|
@@ -14380,6 +14416,7 @@ http://mesh-peer.local:8188" ${isEos ? '' : 'disabled'}>${_meshHtmlEscape(Array.
|
|
|
14380
14416
|
currentConfig.storage.vendorProfile = profile;
|
|
14381
14417
|
currentConfig.storage.feneconGridControlEnabled = profile === 'fenecon-openems';
|
|
14382
14418
|
currentConfig.storage.sungrowHybridEnabled = profile === 'sungrow-hybrid';
|
|
14419
|
+
currentConfig.storage.e3dcRscpEnabled = profile === 'e3dc-rscp';
|
|
14383
14420
|
|
|
14384
14421
|
if (els.storageFeneconAcMode) els.storageFeneconAcMode.checked = profile === 'fenecon-openems';
|
|
14385
14422
|
if (els.storageFeneconDayNoWrite) {
|
|
@@ -14413,6 +14450,21 @@ http://mesh-peer.local:8188" ${isEos ? '' : 'disabled'}>${_meshHtmlEscape(Array.
|
|
|
14413
14450
|
}
|
|
14414
14451
|
currentConfig.storage.sungrowDischargeOnlyOnGridImport = !!els.storageSungrowDischargeOnlyOnImport.checked;
|
|
14415
14452
|
}
|
|
14453
|
+
|
|
14454
|
+
if (els.storageE3dcRscpEnabled) {
|
|
14455
|
+
els.storageE3dcRscpEnabled.checked = profile === 'e3dc-rscp';
|
|
14456
|
+
}
|
|
14457
|
+
if (els.storageE3dcZeroMode) {
|
|
14458
|
+
const zeroMode = String(els.storageE3dcZeroMode.value || currentConfig.storage.e3dcZeroMode || 'normal').trim().toLowerCase();
|
|
14459
|
+
els.storageE3dcZeroMode.value = zeroMode === 'idle' ? 'idle' : 'normal';
|
|
14460
|
+
currentConfig.storage.e3dcZeroMode = els.storageE3dcZeroMode.value;
|
|
14461
|
+
}
|
|
14462
|
+
if (els.storageE3dcAllowGridCharge) {
|
|
14463
|
+
currentConfig.storage.e3dcAllowGridCharge = !!els.storageE3dcAllowGridCharge.checked;
|
|
14464
|
+
}
|
|
14465
|
+
if (els.storageE3dcUsePowerLimits) {
|
|
14466
|
+
currentConfig.storage.e3dcUsePowerLimits = !!els.storageE3dcUsePowerLimits.checked;
|
|
14467
|
+
}
|
|
14416
14468
|
updateStorageVendorProfileUi();
|
|
14417
14469
|
scheduleValidation(200);
|
|
14418
14470
|
};
|
|
@@ -14421,7 +14473,7 @@ http://mesh-peer.local:8188" ${isEos ? '' : 'disabled'}>${_meshHtmlEscape(Array.
|
|
|
14421
14473
|
els.storageVendorProfile.addEventListener('change', _updateStorageVendorProfile);
|
|
14422
14474
|
els.storageVendorProfile.addEventListener('input', _updateStorageVendorProfile);
|
|
14423
14475
|
}
|
|
14424
|
-
[els.storageFeneconAcMode, els.storageFeneconDayNoWrite, els.storageFeneconAssist, els.storageSungrowPvPassthrough, els.storageSungrowZeroOnPvCoverage, els.storageSungrowDischargeOnlyOnImport]
|
|
14476
|
+
[els.storageFeneconAcMode, els.storageFeneconDayNoWrite, els.storageFeneconAssist, els.storageSungrowPvPassthrough, els.storageSungrowZeroOnPvCoverage, els.storageSungrowDischargeOnlyOnImport, els.storageE3dcRscpEnabled, els.storageE3dcZeroMode, els.storageE3dcAllowGridCharge, els.storageE3dcUsePowerLimits]
|
|
14425
14477
|
.filter(Boolean)
|
|
14426
14478
|
.forEach((el) => {
|
|
14427
14479
|
el.addEventListener('change', _updateStorageVendorProfile);
|
package/www/manifest.webmanifest
CHANGED
package/www/sw.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
|
|
3
3
|
*
|
|
4
4
|
* Quelle: src-ts/runtime-executables/www/sw.ts
|
|
5
|
-
* Quell-Hash: sha256:
|
|
5
|
+
* Quell-Hash: sha256:356bb59bdf5d6e7a442c127e6b15660ca7367e2dfcc0d63e3783c845ea063a0c
|
|
6
6
|
* Erzeugung: npm run sync:ts-runtime-executables
|
|
7
7
|
*
|
|
8
8
|
* Zweck:
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
|
|
43
43
|
// Increment cache name on releases so browser updates JS/HTML reliably.
|
|
44
44
|
// NOTE: Keep this monotonic to force SW updates on hotfixes.
|
|
45
|
-
const CACHE_NAME = 'nexowatt-cache-
|
|
45
|
+
const CACHE_NAME = 'nexowatt-cache-v391';
|
|
46
46
|
|
|
47
47
|
const OFFLINE_URLS = [
|
|
48
48
|
'./',
|