iobroker.nexowatt-ui 0.8.2 → 0.8.6
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/module-manager.js +30 -12
- package/io-package.json +17 -17
- package/main.js +341 -42
- package/package.json +6 -4
- package/www/ems-apps.html +1 -78
- package/www/ems-apps.js +222 -32
- package/www/manifest.webmanifest +1 -1
- package/www/sw.js +2 -2
- package/admin/license-generator.html +0 -66
package/ems/module-manager.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
|
|
3
3
|
*
|
|
4
4
|
* Quelle: src-ts/runtime-executables/ems/module-manager.ts
|
|
5
|
-
* Quell-Hash: sha256:
|
|
5
|
+
* Quell-Hash: sha256:138e498ef2823e48e9bd755091453e05f6f30b5fc63aa8c8c7e9af3683d97126
|
|
6
6
|
* Erzeugung: npm run sync:ts-runtime-executables
|
|
7
7
|
*
|
|
8
8
|
* Zweck:
|
|
@@ -112,6 +112,23 @@ class ModuleManager {
|
|
|
112
112
|
* Zusammenhang: Teil von EMS-Kern: Engine, Module, Datenpunkte; Aufrufstellen und abhängige States/APIs beim Ändern mitprüfen.
|
|
113
113
|
* TypeScript: Parameter, Rückgabewert und verwendete Config-/State-Objekte später explizit typisieren.
|
|
114
114
|
*/
|
|
115
|
+
_licenseEdition() {
|
|
116
|
+
const info = this.adapter && this.adapter._nwLicenseInfo && typeof this.adapter._nwLicenseInfo === 'object' ? this.adapter._nwLicenseInfo : {};
|
|
117
|
+
if (info && info.ok === true) {
|
|
118
|
+
const e = String(info.edition || 'eos').toLowerCase();
|
|
119
|
+
return e === 'hems' ? 'hems' : 'eos';
|
|
120
|
+
}
|
|
121
|
+
return 'none';
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
_licenseAllowsApp(appId) {
|
|
125
|
+
const edition = this._licenseEdition();
|
|
126
|
+
if (edition === 'eos') return true;
|
|
127
|
+
if (edition !== 'hems') return false;
|
|
128
|
+
const hemsApps = new Set(['charging', 'storage', 'thermal', 'heatingrod', 'threshold', 'relay', 'aiAdvisor', 'tariff', 'para14a']);
|
|
129
|
+
return hemsApps.has(String(appId || ''));
|
|
130
|
+
}
|
|
131
|
+
|
|
115
132
|
_getDiagCfg() {
|
|
116
133
|
const cfg = (this.adapter && this.adapter.config && this.adapter.config.diagnostics) ? this.adapter.config.diagnostics : null;
|
|
117
134
|
const enabled = !!(cfg && cfg.enabled);
|
|
@@ -206,14 +223,14 @@ class ModuleManager {
|
|
|
206
223
|
this.modules.push({
|
|
207
224
|
key: 'gridConstraints',
|
|
208
225
|
instance: new GridConstraintsModule(this.adapter, this.dp),
|
|
209
|
-
enabledFn: () => !!this.adapter.config.enableGridConstraints,
|
|
226
|
+
enabledFn: () => this._licenseAllowsApp('grid') && !!this.adapter.config.enableGridConstraints,
|
|
210
227
|
});
|
|
211
228
|
|
|
212
229
|
// Peak shaving
|
|
213
230
|
this.modules.push({
|
|
214
231
|
key: 'peakShaving',
|
|
215
232
|
instance: new PeakShavingModule(this.adapter, this.dp),
|
|
216
|
-
enabledFn: () => !!this.adapter.config.enablePeakShaving || !!(this.adapter.config.peakShaving && this.adapter.config.peakShaving.atypical && this.adapter.config.peakShaving.atypical.enabled),
|
|
233
|
+
enabledFn: () => this._licenseAllowsApp('peak') && (!!this.adapter.config.enablePeakShaving || !!(this.adapter.config.peakShaving && this.adapter.config.peakShaving.atypical && this.adapter.config.peakShaving.atypical.enabled)),
|
|
217
234
|
});
|
|
218
235
|
|
|
219
236
|
// §14a EnWG (steuerbare Verbrauchseinrichtungen)
|
|
@@ -221,7 +238,7 @@ class ModuleManager {
|
|
|
221
238
|
this.modules.push({
|
|
222
239
|
key: 'para14a',
|
|
223
240
|
instance: new Para14aModule(this.adapter, this.dp),
|
|
224
|
-
enabledFn: () => !!(this.adapter?.config?.installerConfig?.para14a),
|
|
241
|
+
enabledFn: () => this._licenseAllowsApp('para14a') && !!(this.adapter?.config?.installerConfig?.para14a),
|
|
225
242
|
});
|
|
226
243
|
|
|
227
244
|
// Tarif (VIS) – stellt Ladepark-Deckel bereit
|
|
@@ -251,6 +268,7 @@ class ModuleManager {
|
|
|
251
268
|
key: 'chargingManagement',
|
|
252
269
|
instance: new ChargingManagementModule(this.adapter, this.dp),
|
|
253
270
|
enabledFn: () => {
|
|
271
|
+
if (!this._licenseAllowsApp('charging')) return false;
|
|
254
272
|
// Backwards compatible default:
|
|
255
273
|
// Older installations may not have the new EMS config persisted yet.
|
|
256
274
|
// If the flag is missing (undefined/null), we enable the module so the
|
|
@@ -283,7 +301,7 @@ class ModuleManager {
|
|
|
283
301
|
// das Modul nicht explizit aktiviert hat, der Endkunde aber den dynamischen Tarif
|
|
284
302
|
// (VIS) nutzt. Die eigentliche Schreiblogik entscheidet im Modul selbst, ob
|
|
285
303
|
// tatsächlich Setpoints geschrieben werden (Failsafe).
|
|
286
|
-
enabledFn: () =>
|
|
304
|
+
enabledFn: () => this._licenseAllowsApp('storage'),
|
|
287
305
|
});
|
|
288
306
|
|
|
289
307
|
// Thermische Steuerung (Wärmepumpe/Klima)
|
|
@@ -292,7 +310,7 @@ class ModuleManager {
|
|
|
292
310
|
this.modules.push({
|
|
293
311
|
key: 'thermalControl',
|
|
294
312
|
instance: new ThermalControlModule(this.adapter, this.dp),
|
|
295
|
-
enabledFn: () => !!this.adapter.config.enableThermalControl,
|
|
313
|
+
enabledFn: () => this._licenseAllowsApp('thermal') && !!this.adapter.config.enableThermalControl,
|
|
296
314
|
});
|
|
297
315
|
|
|
298
316
|
// Gestufte Heizstäbe (native 1..12 Stufen)
|
|
@@ -301,20 +319,20 @@ class ModuleManager {
|
|
|
301
319
|
this.modules.push({
|
|
302
320
|
key: 'heatingRodControl',
|
|
303
321
|
instance: new HeatingRodControlModule(this.adapter, this.dp),
|
|
304
|
-
enabledFn: () => !!this.adapter.config.enableHeatingRodControl,
|
|
322
|
+
enabledFn: () => this._licenseAllowsApp('heatingrod') && !!this.adapter.config.enableHeatingRodControl,
|
|
305
323
|
});
|
|
306
324
|
|
|
307
325
|
// BHKW Steuerung (Start/Stop, SoC-geführt)
|
|
308
326
|
this.modules.push({
|
|
309
327
|
key: 'bhkwControl',
|
|
310
328
|
instance: new BhkwControlModule(this.adapter, this.dp),
|
|
311
|
-
enabledFn: () => !!this.adapter.config.enableBhkwControl,
|
|
329
|
+
enabledFn: () => this._licenseAllowsApp('bhkw') && !!this.adapter.config.enableBhkwControl,
|
|
312
330
|
});
|
|
313
331
|
|
|
314
332
|
this.modules.push({
|
|
315
333
|
key: 'generatorControl',
|
|
316
334
|
instance: new GeneratorControlModule(this.adapter, this.dp),
|
|
317
|
-
enabledFn: () => !!this.adapter.config.enableGeneratorControl,
|
|
335
|
+
enabledFn: () => this._licenseAllowsApp('generator') && !!this.adapter.config.enableGeneratorControl,
|
|
318
336
|
});
|
|
319
337
|
|
|
320
338
|
// Schwellwertsteuerung (generische Regeln)
|
|
@@ -322,7 +340,7 @@ class ModuleManager {
|
|
|
322
340
|
this.modules.push({
|
|
323
341
|
key: 'thresholdControl',
|
|
324
342
|
instance: new ThresholdControlModule(this.adapter, this.dp),
|
|
325
|
-
enabledFn: () => !!this.adapter.config.enableThresholdControl,
|
|
343
|
+
enabledFn: () => this._licenseAllowsApp('threshold') && !!this.adapter.config.enableThresholdControl,
|
|
326
344
|
});
|
|
327
345
|
|
|
328
346
|
// KI‑Energieberater / KI‑Optimierung (advisory only)
|
|
@@ -330,14 +348,14 @@ class ModuleManager {
|
|
|
330
348
|
this.modules.push({
|
|
331
349
|
key: 'aiAdvisor',
|
|
332
350
|
instance: new AiAdvisorModule(this.adapter, this.dp),
|
|
333
|
-
enabledFn: () => !!(this.adapter.config.enableAiAdvisor || this.adapter.config.enableAiOptimization),
|
|
351
|
+
enabledFn: () => this._licenseAllowsApp('aiAdvisor') && !!(this.adapter.config.enableAiAdvisor || this.adapter.config.enableAiOptimization),
|
|
334
352
|
});
|
|
335
353
|
|
|
336
354
|
// Multi use (future)
|
|
337
355
|
this.modules.push({
|
|
338
356
|
key: 'multiUse',
|
|
339
357
|
instance: new MultiUseModule(this.adapter, this.dp),
|
|
340
|
-
enabledFn: () => !!this.adapter.config.enableMultiUse,
|
|
358
|
+
enabledFn: () => this._licenseAllowsApp('multiuse') && !!this.adapter.config.enableMultiUse,
|
|
341
359
|
});
|
|
342
360
|
|
|
343
361
|
// Init modules
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "nexowatt-ui",
|
|
4
|
-
"version": "0.8.
|
|
4
|
+
"version": "0.8.6",
|
|
5
5
|
"news": {
|
|
6
|
+
"0.8.6": {
|
|
7
|
+
"de": "Version 0.8.6: Hotfix für EOS/HEMS-Freischaltung im App-Center. Die Installer-API liefert Lizenzdaten zusätzlich top-level aus und das App-Center nutzt /api/license/info als No-Cache-Fallback, damit gültige EOS-Lizenzen sofort alle Apps anzeigen.",
|
|
8
|
+
"en": "Version 0.8.6: Hotfix for EOS/HEMS activation in the App Center. The installer API exposes license data additionally at top level and the App Center uses /api/license/info as a no-cache fallback so valid EOS licenses immediately show all apps."
|
|
9
|
+
},
|
|
10
|
+
"0.8.5": {
|
|
11
|
+
"de": "Version 0.8.5: Windows-Publish-Hotfix. Die automatische DevDependency-Installation nutzt nun npm-cli.js/cmd.exe-Fallback statt direktem npm.cmd-Spawn und verhindert EINVAL-Abbrüche beim npm publish.",
|
|
12
|
+
"en": "Version 0.8.5: Windows publish hotfix. Automatic devDependency installation now uses npm-cli.js/cmd.exe fallback instead of direct npm.cmd spawning and prevents EINVAL aborts during npm publish."
|
|
13
|
+
},
|
|
14
|
+
"0.8.4": {
|
|
15
|
+
"de": "Version 0.8.4: Release-Cleanup gegen Merge-Konfliktmarker und npm-Publish-Abbrueche. Service-Worker-Cache aktualisiert; EOS/HEMS-Lizenzmodell und App-Center-Cleanup bleiben unveraendert.",
|
|
16
|
+
"en": "Version 0.8.4: Release cleanup against merge conflict markers and npm publish aborts. Service worker cache updated; EOS/HEMS license model and App Center cleanup remain unchanged."
|
|
17
|
+
},
|
|
18
|
+
"0.8.3": {
|
|
19
|
+
"de": "Version 0.8.3: App-Center bereinigt die sichtbaren TypeScript-Migrationsdiagnosen. Neues Lizenzmodell mit EOS als Vollprodukt und HEMS als kleiner Edition; HEMS erhält die freigegebenen Basis-/Steuerfunktionen inklusive Lademanagement bis 3 Wallboxen, EOS erhält Vollzugriff.",
|
|
20
|
+
"en": "Version 0.8.3: The App Center hides the visible TypeScript migration diagnostics. New license model with EOS as the full product and HEMS as the smaller edition; HEMS receives the approved base/control features including charging management up to 3 wallboxes, EOS receives full access."
|
|
21
|
+
},
|
|
6
22
|
"0.8.2": {
|
|
7
23
|
"de": "Version 0.8.2: Windows-sicherer npm-Publish-Check. Der TypeScript-Compiler wird vor Publish-Checks robust aufgelöst oder DevDependencies werden automatisch nachinstalliert; App-Center-Statusfarben aus 0.8.1 bleiben erhalten.",
|
|
8
24
|
"en": "Version 0.8.2: Windows-safe npm publish check. The TypeScript compiler is resolved robustly before publish checks or devDependencies are installed automatically; App Center status colors from 0.8.1 remain in place."
|
|
@@ -14,22 +30,6 @@
|
|
|
14
30
|
"0.8.0": {
|
|
15
31
|
"de": "Version 0.8.0: TypeScript bleibt kanonische Runtime-Quelle; sichtbares Branding in der Topbar zeigt jetzt nur noch NexoWatt ohne EMS-Zusatz. Service-Worker-/PWA-Version und Brand-Cleanup-Gate ergänzt.",
|
|
16
32
|
"en": "Version 0.8.0: TypeScript remains the canonical runtime source; visible topbar branding now shows NexoWatt without the EMS suffix. Service worker/PWA version and brand cleanup gate added."
|
|
17
|
-
},
|
|
18
|
-
"0.7.132": {
|
|
19
|
-
"de": "TypeScript-Runtime-Cleanup: nicht mehr genutzter .nwcore-JS-Doppelbaum und stale build-ts-Artefakte entfernt; EMS/main/www bleiben generierte Runtime-JS-Artefakte aus src-ts/runtime-executables, EVCS bleibt TS-Normalquelle mit JS nur als Executor/Hard-Fallback.",
|
|
20
|
-
"en": "TypeScript runtime cleanup: removed the unused .nwcore JS duplicate tree and stale build-ts artifacts; EMS/main/www remain generated runtime JS artifacts from src-ts/runtime-executables, EVCS remains the TS normal source with JS only as executor/hard fallback."
|
|
21
|
-
},
|
|
22
|
-
"0.7.131": {
|
|
23
|
-
"de": "Adapterweite TypeScript-Runtime-Quelle aktiviert: main.js, EMS-/NwCore-Module und www-Runtime-Dateien sind jetzt generierte JavaScript-Artefakte aus src-ts/runtime-executables; EVCS bleibt TS-Normalquelle mit JS nur als ioBroker-Executor/Hard-Fallback.",
|
|
24
|
-
"en": "Adapter-wide TypeScript runtime source enabled: main.js, EMS/NwCore modules and www runtime files are now generated JavaScript artifacts from src-ts/runtime-executables; EVCS remains the TS normal source with JS only as ioBroker executor/hard fallback."
|
|
25
|
-
},
|
|
26
|
-
"0.7.130": {
|
|
27
|
-
"de": "EVCS-TypeScript-Normalquelle aktiviert: Allocation und kompletter EVCS-Handover laufen im grünen Gate als TS-Normalpfad; JS bleibt nur ioBroker-Executor und harter Fallback. App-Center/API zeigen Normalquellen-Lockdown und Migrationsbereitschaft.",
|
|
28
|
-
"en": "EVCS TypeScript normal source enabled: allocation and the complete EVCS handover run through the green TS normal-path gate; JS remains only the ioBroker executor and hard fallback. App Center/API expose normal-source lockdown and migration readiness."
|
|
29
|
-
},
|
|
30
|
-
"0.7.129": {
|
|
31
|
-
"en": "EVCS TypeScript handover hardened: safety stop/ramp-down paths can now use the productive TS Allocation + Write-Plan zero-setpoint contract; JavaScript remains executor and hard fallback only.",
|
|
32
|
-
"de": "EVCS-TypeScript-Handover gehärtet: Safety-Stop/Rampdown-Zweige können jetzt den produktiven TS-Allocation- und Write-Plan-0-Setpoint-Vertrag nutzen; JavaScript bleibt nur Executor und harter Fallback."
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
"title": "NexoWatt UI",
|