iobroker.wem-canapi 0.0.3 → 0.0.4

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.
@@ -8,6 +8,7 @@
8
8
  </head>
9
9
  <body>
10
10
  <div id="root"></div>
11
+ <script src="../../lib/js/socket.io.js"></script>
11
12
  <script src="index.js"></script>
12
13
  </body>
13
14
  </html>
package/io-package.json CHANGED
@@ -2,16 +2,59 @@
2
2
  "common": {
3
3
  "name": "wem-canapi",
4
4
  "messagebox": true,
5
- "version": "0.0.3",
5
+ "version": "0.0.4",
6
6
  "news": {
7
+ "0.0.4": {
8
+ "en": "Verify. Datapoints\nDisable Datapoints on 5 Errors\nReset disabled Datapoint\nTransaltion integrated",
9
+ "de": "Prüfen. Datenpunkte\nDatenpunkte bei 5 Fehlern deaktivieren\nDatapoint zurücksetzen\nIntegrierte Übersetzung",
10
+ "ru": "Подтвердите. Точки данных\nОтключите точки данных при 5 ошибках\nСбросить отключенную точку данных\nИнтегрированный перевод",
11
+ "pt": "Verifica. Datapoints\nDesative datapoints em 5 erros\nRedefinir datapoint inativo\nTradução integrada",
12
+ "nl": "Verifiëren. Datapunten\nDatapunten uitschakelen voor 5 fouten\nUitgeschakeld Datapoint opnieuw instellen\nGeïntegreerde vertaling",
13
+ "fr": "Vérifiez. Points de données\nDésactivez les points en cas de 5 erreurs\nPoint de données désactivé\nTraduction intégrée",
14
+ "it": "Verifichi Datapoint\nDisattiva i datapoint su 5 errori\nReimposta Datapoint\nTraduzione integrata",
15
+ "es": "Comprobar. Puntos de datos\nDesactivar puntos de datos en 5 errores\nReiniciar Datapoint\nTraducción integrada",
16
+ "pl": "Zweryfikuj. Punkty danych\nWyłącz punkty danych przy 5 błędach\nZresetuj wyłączony punkt danych\nTransalcja zintegrowana",
17
+ "uk": "Перевірити. Точки даних\nВідключення точок даних по 5 помилках\nСкинути вимкнену точку даних\nТрансальція інтегрована",
18
+ "zh-cn": "验证。数据点\n出现 5 个错误时禁用 DataPoints\n重置已禁用的数据点\n整合翻译"
19
+ },
7
20
  "0.0.1": {
8
- "en": "initial release"
21
+ "en": "initial release",
22
+ "de": "Erstveröffentlichung",
23
+ "ru": "первоначальный выпуск",
24
+ "pt": "lançamento inicial",
25
+ "nl": "eerste release",
26
+ "fr": "version initiale",
27
+ "it": "rilascio iniziale",
28
+ "es": "lanzamiento inicial",
29
+ "pl": "pierwsze wydanie",
30
+ "uk": "початковий випуск",
31
+ "zh-cn": "初始版本"
9
32
  },
10
33
  "0.0.2": {
11
- "en": "First working release CSV Datapoint has to be approved"
34
+ "en": "First working release CSV Datapoint has to be approved",
35
+ "de": "Die erste Arbeitsversion von CSV Datapoints müssen getested werden",
36
+ "ru": "Первый рабочий выпуск CSV Datapoint должен быть одобрен.",
37
+ "pt": "A primeira versão de trabalho do CSV Datapoint precisa ser aprovada",
38
+ "nl": "Eerste werkrelease CSV Datapoint moet worden goedgekeurd",
39
+ "fr": "La première version de travail CSV Datapoint doit être approuvée",
40
+ "it": "La prima versione funzionante CSV Datapoint deve essere approvata",
41
+ "es": "La primera versión funcional de CSV Datapoint debe aprobarse",
42
+ "pl": "Pierwsza działająca wersja CSV Datapoint musi zostać zatwierdzona",
43
+ "uk": "Перший робочий випуск CSV Datapoint має бути затверджений",
44
+ "zh-cn": "第一个工作版本 CSV 数据点必须获得批准"
12
45
  },
13
46
  "0.0.3": {
14
- "en": "First release with release-Script"
47
+ "en": "First release with release-Script",
48
+ "de": "Erste Veröffentlichung mit Release-Script",
49
+ "ru": "Первый выпуск с релиз-скриптом",
50
+ "pt": "Primeiro lançamento com release-Script",
51
+ "nl": "Eerste release met release-Script",
52
+ "fr": "Première version avec release-Script",
53
+ "it": "Prima versione con release-Script",
54
+ "es": "Primer lanzamiento con lanzamiento-Script",
55
+ "pl": "Pierwsze wydanie ze skryptem wydania",
56
+ "uk": "Перший випуск зі сценарієм випуску",
57
+ "zh-cn": "第一个版本带有release-Script"
15
58
  }
16
59
  },
17
60
  "titleLang": {
@@ -41,7 +84,7 @@
41
84
  "zh-cn": "通过 CanAPI 直接从 Weishaupt 设备获取值"
42
85
  },
43
86
  "authors": [
44
- "TanteJoe <giithub@schubel.info>"
87
+ "TanteJoe <github@schubel.info>"
45
88
  ],
46
89
  "keywords": [
47
90
  "WEM Weishaupt CanAPI"
@@ -59,7 +102,7 @@
59
102
  "tier": 3,
60
103
  "mode": "daemon",
61
104
  "type": "climate-control",
62
- "compact": true,
105
+ "compact": false,
63
106
  "connectionType": "local",
64
107
  "dataSource": "poll",
65
108
  "adminUI": {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- import { adapter } from '@iobroker/adapter-core';
3
+ //import { adapter } from '@iobroker/adapter-core';
4
4
  //import { adapter, Credentials } from '@iobroker/adapter-core';
5
5
  //import { secureHeapUsed } from 'node:crypto';
6
6
 
@@ -24,14 +24,16 @@ class CanApiClient {
24
24
  * @param {string} [config.password] HTTP-Auth Passwort
25
25
  * @param {number} [config.timeout] Request-Timeout in ms (Standard 5000)
26
26
  * @param {object} config.log ioBroker Logger
27
+ * @param {object} config.adapter ioBrokeradapter
27
28
  */
28
29
  constructor(config) {
29
30
  this.host = config.host;
30
31
  this.port = config.port || 80;
31
- this.username = config.username || 'admin';
32
- this.password = config.password || 'Admin123';
32
+ this.username = config.username || '';
33
+ this.password = config.password || '';
33
34
  this.timeout = config.timeout || 5000;
34
35
  this.log = config.log || console;
36
+ this.adapter = config.adapter;
35
37
 
36
38
  this.baseUrl = `http://${this.host}:${this.port}/ajax/CanApiJson.json`;
37
39
  this.testURL = `http://${this.host}:${this.port}/`;
@@ -101,7 +103,12 @@ class CanApiClient {
101
103
  true,
102
104
  );
103
105
 
104
- await this._httpPost(payload);
106
+ const responseText = await this._httpPost(payload);
107
+ const resp = await this._parseResponse(responseText, Array.of(datapoint));
108
+ if (!resp || resp.length === 0 || resp[0].value === null) {
109
+ this.log.error(`[CanAPI] Schreibfehler ${datapoint.pointName}: Keine gültige Antwort`);
110
+ return false;
111
+ }
105
112
  return true;
106
113
  } catch (e) {
107
114
  this.log.error(`[CanAPI] Schreibfehler ${datapoint.pointName}: ${e.message}`);
@@ -153,22 +160,21 @@ class CanApiClient {
153
160
  });
154
161
 
155
162
  req.on('error', err => {
156
- console.error('Connection error:', err);
163
+ this.log.debug(`Connection error: ${err.message}`);
157
164
  resolve(false); // Bei Verbindungsfehler false zurückgeben
158
165
  });
159
166
 
160
167
  req.on('timeout', () => {
161
168
  req.destroy();
162
- console.error(`Timeout nach ${this.timeout}ms`);
169
+ this.log.debug(`Timeout nach ${this.timeout}ms`);
163
170
  resolve(false); // Bei Timeout false zurückgeben
164
- reject(true);
165
171
  });
166
172
 
167
173
  req.setTimeout(this.timeout);
168
174
  req.end();
169
175
  });
170
176
  } catch (error) {
171
- console.error('Unexpected error:', error);
177
+ this.log.debug(`Unexpected error: ${error.message}`);
172
178
  return false;
173
179
  }
174
180
  }
@@ -263,7 +269,7 @@ class CanApiClient {
263
269
  const factor = this._getResolutionFactor(dp);
264
270
  const rawValue = Math.round(value * factor);
265
271
  const dpadress = dp.readHex.slice(0, -2);
266
- const bitescount = dp.respbites.match(/\d+/g);
272
+ const bitescount = parseInt(dp.respbites, 10);
267
273
  const bits = {
268
274
  1: 0xff,
269
275
  2: 0xffff,
@@ -328,7 +334,7 @@ class CanApiClient {
328
334
  const rawHex = entry.VG;
329
335
  const value = this._convertRawValue(rawHex, dp);
330
336
 
331
- this.log.debug(`[CanAPI] ${dp.pointName}: VW=${rawHex} → ${value} ${dp.unit || ''}`);
337
+ this.log.silly(`[CanAPI] ${dp.pointName}: VW=${rawHex} → ${value} ${dp.unit || ''}`);
332
338
 
333
339
  results.push({ id: dp.id, value, raw: rawHex });
334
340
  });
@@ -353,14 +359,44 @@ class CanApiClient {
353
359
  if (count <= 1 && raw > 32767) raw -= 65536;
354
360
  if (count === 2 && raw > 2147483647) raw -= 4294967296; */
355
361
 
356
- this.log.debug(`Spit result Hex${result[6]}`);
362
+ this.log.silly(`Split result Hex ${result[6]}`);
357
363
  if (result[0] === '05') {
358
364
  this.log.warn(
359
365
  `Fehlercode ${dp.deviceName} ${dp.pointName}: ${result[1]}${result[2]}${result[3]}${result[4]}${result[5]}`,
360
366
  );
367
+ this.adapter._getObj(`${dp.treePath}`).then(obj => {
368
+ if (obj?.common?.color !== undefined) {
369
+ if ((obj.errorcount || 0) <= 4) {
370
+ obj.common.color = '#FFFF44';
371
+ obj.errorcount = (obj.errorcount || 0) + 1;
372
+ this.adapter.setObjectAsync(`${dp.treePath}`, obj);
373
+ } else {
374
+ obj.common.color = '#b917a1';
375
+ obj.errorcount = (obj.errorcount || 0) + 1;
376
+ this.adapter.setObjectAsync(`${dp.treePath}`, obj);
377
+ }
378
+ } else {
379
+ this.adapter.extendObjectAsync(`${dp.treePath}`, {
380
+ common: {
381
+ color: '#ffff44',
382
+ },
383
+ errorcount: 1,
384
+ });
385
+ }
386
+ });
387
+ return null;
361
388
  }
362
-
363
- return result[0] === '05' ? 0 : parseInt(result[6], 16);
389
+ if (!result[6]) {
390
+ this.log.warn(`[CanAPI] Antwort ohne Wert für ${dp.pointName}: ${response}`);
391
+ return null;
392
+ }
393
+ // Temperaturen sind vorzeichenbehaftet (Zweierkomplement über die Breite des Werts)
394
+ const raw = parseInt(result[6], 16);
395
+ const bits = result[6].length * 4;
396
+ if ((dp.dataType || '') === 'Temperatur' && raw >= 2 ** (bits - 1)) {
397
+ return raw - 2 ** bits;
398
+ }
399
+ return raw;
364
400
  }
365
401
 
366
402
  /**
@@ -372,22 +408,39 @@ class CanApiClient {
372
408
  }
373
409
 
374
410
  // Hex → Integer
375
- let raw = this._splitResponse(rawHex, dp);
411
+ const raw = this._splitResponse(rawHex, dp);
412
+ if (raw === null || Number.isNaN(raw)) {
413
+ return null;
414
+ }
376
415
 
377
416
  // Sonderfall Boolean
378
- if ((dp.ioType || '').toLowerCase() === 'boolean') {
417
+ if (CanApiClient.ioType(dp) === 'boolean') {
379
418
  return raw !== 0;
380
419
  }
381
420
 
382
421
  // Auflösung anwenden
383
422
  const factor = this._getResolutionFactor(dp);
384
423
  if (factor !== 1) {
385
- return Math.round((raw / factor) * 10) / 10;
424
+ const decimals = Math.log10(factor);
425
+ return Number((raw / factor).toFixed(decimals));
386
426
  }
387
427
 
388
428
  return raw;
389
429
  }
390
430
 
431
+ /**
432
+ * ioBroker-Datentyp eines Datenpunkts (CSV-Spalte ioType ist leer, daher aus dataType abgeleitet)
433
+ *
434
+ * @param {object} dp
435
+ * @returns {'boolean'|'number'|'string'}
436
+ */
437
+ static ioType(dp) {
438
+ if (dp.ioType) {
439
+ return dp.ioType;
440
+ }
441
+ return (dp.dataType || '').toLowerCase() === 'boolesch' ? 'boolean' : 'number';
442
+ }
443
+
391
444
  /**
392
445
  * Ermittelt den Auflösungsfaktor
393
446
  * "0.1 °C" → 10, "0.01 bar" → 100, sonst 1
package/lib/csvParser.js CHANGED
@@ -1,36 +0,0 @@
1
- 'use strict';
2
-
3
- class CanApiCSVParser {
4
- parse(csvContent) {
5
- if (!csvContent) {
6
- return [];
7
- }
8
-
9
- return {
10
- id: '',
11
- MI: '', //3 field in csv
12
- MX: '',
13
- OX: '',
14
- OS: '',
15
- VS: '',
16
- updateInterval: '', //10 field in csv
17
- deviceGroupName: '',
18
- deviceName: '',
19
- pointName: '', //15 in csv
20
- pointfunction: '',
21
- dataType: '',
22
- resolution: '',
23
- unit: '',
24
- sCov: '',
25
- enumValues: '',
26
- canWrite: '',
27
- ioType: '',
28
- treePath: '',
29
- label: '',
30
- readHex: '',
31
- respbites: '',
32
- };
33
- }
34
- }
35
-
36
- module.exports = CanApiCSVParser;
package/main.js CHANGED
@@ -3,22 +3,13 @@
3
3
  /*
4
4
  * Created with @iobroker/create-adapter v3.1.5
5
5
  */
6
- // const CanApiClient = require('./lib/canApiClient');
7
6
  import CanApiClient from './lib/canApiClient.js';
8
- // The adapter-core module gives you access to the core ioBroker functions
9
- // you need to create an adapter
10
- //const utils = require('@iobroker/adapter-core');
11
-
7
+ // @ts-expect-error adapter-core is supplied by the ioBroker runtime and may be absent in editor-only environments.
12
8
  import { Adapter } from '@iobroker/adapter-core';
13
- // const CsvParser = require('./lib/csvParser');
14
- import CsvParser from './lib/csvParser.js';
15
-
16
- // Load your modules here, e.g.:
17
- // const fs = require('fs');
18
9
 
19
10
  class WemCanapi extends Adapter {
20
11
  /**
21
- * @param {import('@iobroker/adapter-core').AdapterOptions} [options] - Adapter options
12
+ * @param {object} [options] - Adapter options
22
13
  */
23
14
  constructor(options) {
24
15
  super({
@@ -47,7 +38,7 @@ class WemCanapi extends Adapter {
47
38
  * Is called when databases are connected and adapter received configuration.
48
39
  */
49
40
  async onReady() {
50
- await this.setState('info.connection', false, true);
41
+ await this.setStateAsync('info.connection', false, true);
51
42
 
52
43
  const cfg = this.config;
53
44
  if (!cfg.host) {
@@ -69,18 +60,22 @@ class WemCanapi extends Adapter {
69
60
  this.dpMap.set(dp.id, dp);
70
61
  }
71
62
 
63
+ if (!cfg.username || !cfg.password) {
64
+ this.log.warn('Benutzername oder Passwort nicht konfiguriert - Anfrage erfolgt ohne Authentifizierung.');
65
+ }
66
+
72
67
  // HTTP-Client erstellen
73
68
  this.client = new CanApiClient({
74
69
  host: cfg.host,
75
70
  port: cfg.port || 80,
76
- username: cfg.username || 'admin',
77
- password: cfg.password || 'Admin123',
71
+ username: cfg.username || '',
72
+ password: cfg.password || '',
78
73
  timeout: cfg.timeout || 5000,
79
74
  log: this.log,
75
+ adapter: this,
80
76
  });
81
77
 
82
78
  // Verbindung testen
83
- //const testpwd = this.config.password;
84
79
  const ok = await this.client.testConnection();
85
80
  await this.setState('info.connection', ok, true);
86
81
 
@@ -92,6 +87,7 @@ class WemCanapi extends Adapter {
92
87
  // Objekte anlegen
93
88
  const activeDPs = selected.map(id => this.dpMap.get(id)).filter(Boolean);
94
89
  await this._createSyncState();
90
+ await this._createResetObject();
95
91
  await this._createObjects(activeDPs);
96
92
  await this.subscribeStatesAsync('*');
97
93
 
@@ -107,20 +103,15 @@ class WemCanapi extends Adapter {
107
103
  */
108
104
  async onUnload(callback) {
109
105
  try {
110
- /* for (const t of this.timers.values()) this.clearInterval(t);
111
- this.timers.clear();
112
- await this.setState('info.connection', false, true); */
113
106
  if (this.timerId) {
114
107
  this.clearTimeout(this.timerId);
115
- await this.setState('info.connection', false, true);
116
108
  }
117
- callback();
118
- //}
109
+ await this.setState('info.connection', false, true);
119
110
  } catch (e) {
120
111
  this.log.debug(`Error on stopping ${e.message}`);
121
- /* ignore */
112
+ } finally {
113
+ callback();
122
114
  }
123
- callback();
124
115
  }
125
116
 
126
117
  // ─────────────────────────────────────────────────────────────
@@ -134,17 +125,23 @@ class WemCanapi extends Adapter {
134
125
 
135
126
  // ioBroker-ID → Datenpunkt finden
136
127
  const localId = id.replace(`${this.namespace}.`, '');
128
+ if ('info.ResetAllObjects' === localId && state.val === true) {
129
+ this.log.info('Reset All Objects');
130
+ await this._resetObj(this.dpMap.values());
131
+ await this.setState(localId, { val: false, ack: true });
132
+ return;
133
+ }
137
134
 
138
135
  for (const dp of this.dpMap.values()) {
139
136
  if (dp.treePath !== localId) {
140
137
  continue;
141
138
  }
142
139
  if (!dp.canWrite) {
143
- this.log.warn(`${dp.registerName} ist nicht schreibbar`);
140
+ this.log.warn(`${dp.pointName} ist nicht schreibbar`);
144
141
  return;
145
142
  }
146
143
 
147
- this.log.info(`Schreibe ${state.val} → ${dp.registerName}`);
144
+ this.log.info(`Schreibe ${state.val} → ${dp.pointName} `);
148
145
  const ok = await this.client.writeDatapoint(dp, state.val);
149
146
 
150
147
  if (ok) {
@@ -169,18 +166,6 @@ class WemCanapi extends Adapter {
169
166
  }
170
167
 
171
168
  switch (obj.command) {
172
- // ── CSV parsen ───────────────────────────────────────
173
- case 'parseCSV': {
174
- try {
175
- const parser = new CsvParser();
176
- const dps = parser.parse(obj.message.csvContent);
177
- this._respond(obj, { result: dps, error: null });
178
- } catch (e) {
179
- this._respond(obj, { result: null, error: e.message });
180
- }
181
- break;
182
- }
183
-
184
169
  // ── Verbindungstest ──────────────────────────────────
185
170
  case 'testConnection': {
186
171
  try {
@@ -189,7 +174,8 @@ class WemCanapi extends Adapter {
189
174
  port: obj.message.port || 80,
190
175
  username: obj.message.username || '',
191
176
  password: obj.message.password || '',
192
- log: this.log.debug,
177
+ log: this.log,
178
+ adapter: this,
193
179
  });
194
180
  this.log.debug('Testing Connection from AdminGUI');
195
181
  const ok = await testClient.testConnection();
@@ -228,6 +214,23 @@ class WemCanapi extends Adapter {
228
214
  native: {},
229
215
  });
230
216
  }
217
+ async _createResetObject() {
218
+ // State anlegen if Sync is running
219
+
220
+ await this.setObjectNotExistsAsync('info.ResetAllObjects', {
221
+ type: 'state',
222
+ common: {
223
+ name: 'Reset All Objects',
224
+ desc: 'Reset error counts for all objects',
225
+ type: 'boolean',
226
+ role: 'button',
227
+ def: false,
228
+ read: true,
229
+ write: true,
230
+ },
231
+ native: {},
232
+ });
233
+ }
231
234
  async _createObjects(datapoints) {
232
235
  for (const dp of datapoints) {
233
236
  // Channel-Hierarchie anlegen
@@ -247,7 +250,7 @@ class WemCanapi extends Adapter {
247
250
  const common = {
248
251
  name: dp.pointName || dp.deviceName,
249
252
  desc: `${dp.deviceName}: ${dp.pointName}`,
250
- type: dp.ioType || 'number',
253
+ type: CanApiClient.ioType(dp),
251
254
  role: this._role(dp),
252
255
  read: true,
253
256
  write: dp.canWrite || false,
@@ -325,8 +328,8 @@ class WemCanapi extends Adapter {
325
328
  this.timerrunning = true;
326
329
  for (const [interval, dps] of this.groups.entries()) {
327
330
  if (lastinterval != interval) {
328
- if ((this.timercounter * 10000) % interval === 0) {
329
- this.log.info(`Starte Polling: ${dps.length} Datenpunkte alle ${interval}s`);
331
+ if ((this.timercounter * 10) % interval === 0) {
332
+ this.log.debug(`Starte Polling: ${dps.length} Datenpunkte alle ${interval}s`);
330
333
 
331
334
  await this._pollGroup(interval, dps);
332
335
  // console.log('debug groups');
@@ -365,7 +368,7 @@ class WemCanapi extends Adapter {
365
368
  if (!isrunning) {
366
369
  await this.setState('info.syncrunnig', true, true);
367
370
  // @ts-expect-error Client null breits abgefangen
368
- const results = await this.client.readDatapoints(datapoints, this);
371
+ const results = await this.client.readDatapoints(await this._filterDatapointsOnError(datapoints), this);
369
372
 
370
373
  let anyOk = false;
371
374
 
@@ -394,20 +397,33 @@ class WemCanapi extends Adapter {
394
397
  }
395
398
  } catch (e) {
396
399
  this.log.warn(`[Poll ${interval}s] Fehler: ${e.message}`);
397
- // await this.setState('info.connection', false, true);
400
+ await this.setState('info.syncrunnig', false, true);
398
401
  }
399
402
  }
400
- }
403
+ async _getObj(obj) {
404
+ const returnobj = await this.getObjectAsync(obj);
405
+ return returnobj;
406
+ }
407
+ async _filterDatapointsOnError(datapoints) {
408
+ const filtered = [];
409
+ for (const dp of datapoints) {
410
+ const obj = await this._getObj(dp.treePath);
411
+ if (!obj?.errorcount || obj.errorcount <= 5) {
412
+ filtered.push(dp);
413
+ }
414
+ }
401
415
 
402
- export default new WemCanapi();
403
-
404
- // if (require.main !== module) {
405
- // // Export the constructor in compact mode
406
- // /**
407
- // * @param {Partial<utils.AdapterOptions>} [options] - Adapter options
408
- // */
409
- // module.exports = options => new WemCanapi(options);
410
- // } else {
411
- // // otherwise start the instance directly
412
- // new WemCanapi();
413
- // }
416
+ return filtered;
417
+ }
418
+ async _resetObj(datapoints) {
419
+ for (const dp of datapoints) {
420
+ const obj = await this._getObj(dp.treePath);
421
+ if (obj?.errorcount) {
422
+ obj.common.color = '';
423
+ obj.errorcount = 0;
424
+ await this.setObjectAsync(`${dp.treePath}`, obj);
425
+ }
426
+ }
427
+ }
428
+ }
429
+ new WemCanapi();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.wem-canapi",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "Get Values directly from the Weishaupt devices via CanAPI",
5
5
  "author": "TanteJoe <github@schubel.info>",
6
6
  "homepage": "https://github.com/TanteJoe/ioBroker.wem-canapi",
@@ -19,7 +19,8 @@
19
19
  "node": ">= 22"
20
20
  },
21
21
  "dependencies": {
22
- "@iobroker/adapter-core": "^3.4.3"
22
+ "@iobroker/adapter-core": "^3.4.3",
23
+ "@iobroker/adapter-react-v5": "^7.5.0"
23
24
  },
24
25
  "devDependencies": {
25
26
  "@alcalzone/release-script": "^5.2.1",
@@ -45,8 +46,9 @@
45
46
  "vite": "^6.0.0"
46
47
  },
47
48
  "main": "main.js",
49
+ "type": "module",
48
50
  "files": [
49
- "admin/build/",
51
+ "admin/i18n/",
50
52
  "admin/index_m.html",
51
53
  "admin/index.js",
52
54
  "admin/index.css",