iobroker.ebus 3.3.8 → 3.5.0

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/io-package.json CHANGED
@@ -1,8 +1,34 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "ebus",
4
- "version": "3.3.8",
4
+ "version": "3.5.0",
5
5
  "news": {
6
+ "3.5.0": {
7
+ "en": "catch exceptions reportet by sentry\noption to disable check of last update time (see issue #391)",
8
+ "de": "fangausnahmen reportet by sentry\noption zum deaktivieren der letzten aktualisierungszeit (siehe ausgabe #391)",
9
+ "ru": "репортаж об исключениях улова\nвозможность отключить проверку последнего времени обновления (см. вопрос #391)",
10
+ "pt": "captura exceções relatório por sentinela\nopção para desativar a verificação do último tempo de atualização (veja a edição #391)",
11
+ "nl": "vangstuitzonderingen verslaget door de wacht\noptie om controle van de laatste updatetijd uit te schakelen (zie probleem #391)",
12
+ "fr": "déclaration des exceptions de capture par sentinelle\noption pour désactiver la vérification de la dernière mise à jour (voir le numéro #391)",
13
+ "it": "cattura le eccezioni reportet da mittente\nopzione per disabilitare il controllo dell'ultimo aggiornamento (vedere numero #391)",
14
+ "es": "catch exceptions reportet by centry\nopción para desactivar el cheque de la última hora de actualización (ver número #391)",
15
+ "pl": "połowów wyjątków reportet przez wartownik\nopcja wyłączenia sprawdzania czasu ostatniej aktualizacji (patrz numer # 391)",
16
+ "uk": "виняток винятку по відправці\nможливість відключити перевірку останнього часу оновлення (див. проблему #391)",
17
+ "zh-cn": "按哨兵分列的渔获量例外报告\n选项以禁用上次更新时间的检查(见第391期)"
18
+ },
19
+ "3.4.0": {
20
+ "en": "migration to jsonConfig\nsee issue #383: add optionally parameters to HTTP call",
21
+ "de": "migration nach jsonConfig\nsiehe Ausgabe #383: optionale Parameter zum HTTP-Aufruf hinzufügen",
22
+ "ru": "миграции в jsonConfig\n#383: добавить дополнительные параметры к HTTP-звонку",
23
+ "pt": "migração para jsonConfig\nveja o problema #383: adicione parâmetros opcionalmente à chamada HTTP",
24
+ "nl": "migratie naar jsonConfig\nzie probleem #383: voeg optioneel parameters toe aan HTTP-aanroep",
25
+ "fr": "migration vers jsonConfig\nvoir le numéro #383: ajouter optionnellement des paramètres à l'appel HTTP",
26
+ "it": "migrazione a jsonConfig\nvedi numero #383: aggiungi parametri opzionalmente alla chiamata HTTP",
27
+ "es": "migración a jsonConfig\nver número #383: añadir parámetros opcionalmente a la llamada HTTP",
28
+ "pl": "migracja do jsonConfig\nzobacz numer # 383: dodać opcjonalne parametry do wywołania HTTP",
29
+ "uk": "міграції в jsonConfig\nпереглянути номер #383: додавати додаткові параметри до HTTP виклику",
30
+ "zh-cn": "迁移到 jsonConfig\n参见第383期: 在 HTTP 调用中添加可选参数"
31
+ },
6
32
  "3.3.8": {
7
33
  "en": "update dependencies\nissue #381: install widgets again",
8
34
  "de": "aktualisierung der abhängigkeiten\nausgabe #381: widgets erneut installieren",
@@ -67,32 +93,6 @@
67
93
  "pl": "naprawianie błędów po aktualizacji 3.3.2",
68
94
  "uk": "виправлення помилок після 3.3.2 оновлення",
69
95
  "zh-cn": "3.3.2 更新后修复错误"
70
- },
71
- "3.3.3": {
72
- "en": "downgrade of \"promise-socket\" to 7.0.0",
73
- "de": "downgrade von \"promise-socket\" bis 7.0.0",
74
- "ru": "понижение «промиза-сокет» до 7.0.0",
75
- "pt": "downgrade de \"promise-socket\" para 7.0.0",
76
- "nl": "downgrade van \"belofte-zak\" naar 7.0.0",
77
- "fr": "downgrade de \"promise-socket\" à 7.0.0",
78
- "it": "downgrade di \"promise-socket\" a 7.0.0",
79
- "es": "bajada de \"promise-socket\" a 7.0.0",
80
- "pl": "obniżenie wartości \"socket-socket\" do 7.0.0",
81
- "uk": "до 7.0.0",
82
- "zh-cn": "将\"承诺-口袋\"降级为7.0.0"
83
- },
84
- "3.3.2": {
85
- "en": "(René) see issue #338: due to error in ebusd json no data are parsed",
86
- "de": "(René) siehe Ausgabe #338: Durch Fehler in ebusd json werden keine Daten pariert",
87
- "ru": "(René) см. вопрос #338: из-за ошибки в ebusd json никакие данные не спариваются",
88
- "pt": "(René) veja a edição #338: devido ao erro no ebusd json nenhum dado é analisado",
89
- "nl": "(René) zie probleem #338: als gevolg van fout in ebusd json geen gegevens worden ontleed",
90
- "fr": "(René) voir le numéro 338 : en raison d'une erreur dans ebusd json aucune donnée n'est analysée",
91
- "it": "(René) vedi problema #338: a causa di errore in ebusd json non vengono analizzati dati",
92
- "es": "(René) ver el número #338: debido al error en ebusd json no se analizan los datos",
93
- "pl": "(René) see issue # 338: due to error in ebudd json no data are parsed",
94
- "uk": "(René) див. питання #338: через помилку в ebusd json немає даних",
95
- "zh-cn": "(René)参见第338期:由于ebusd json中的错误,没有解析数据"
96
96
  }
97
97
  },
98
98
  "titleLang": {
@@ -159,7 +159,7 @@
159
159
  "connectionType": "local",
160
160
  "dataSource": "push",
161
161
  "adminUI": {
162
- "config": "materialize"
162
+ "config": "json"
163
163
  },
164
164
  "messages": [
165
165
  {
@@ -289,13 +289,94 @@
289
289
  "interfacetype": "ebusd",
290
290
  "targetHTTPPort": 8889,
291
291
  "targetTelnetPort": 8890,
292
- "PolledValues": "",
293
- "HistoryValues": "",
294
292
  "parseTimeout": 60,
295
293
  "useBoolean4Onoff": false,
296
294
  "PolledDPs": [],
297
295
  "HistoryDPs": [],
298
296
  "maxretries": 5,
299
- "readInterval": 5
297
+ "readInterval": 5,
298
+ "History4Vis2": false,
299
+ "HTTPparameter": [
300
+ {
301
+ "active": false,
302
+ "name": "since",
303
+ "value": 300
304
+ },
305
+ {
306
+ "active": false,
307
+ "name": "poll",
308
+ "value": "prio"
309
+ },
310
+ {
311
+ "active": false,
312
+ "name": "exact",
313
+ "value": "true"
314
+ },
315
+ {
316
+ "active": false,
317
+ "name": "verbose",
318
+ "value": "true"
319
+ },
320
+ {
321
+ "active": false,
322
+ "name": "indexed",
323
+ "value": "true"
324
+ },
325
+ {
326
+ "active": false,
327
+ "name": "numeric",
328
+ "value": "true"
329
+ },
330
+ {
331
+ "active": false,
332
+ "name": "valuename",
333
+ "value": "true"
334
+ },
335
+ {
336
+ "active": false,
337
+ "name": "full",
338
+ "value": "true"
339
+ },
340
+ {
341
+ "active": false,
342
+ "name": "required",
343
+ "value": "true"
344
+ },
345
+ {
346
+ "active": false,
347
+ "name": "maxage",
348
+ "value": "5000"
349
+ },
350
+ {
351
+ "active": false,
352
+ "name": "write",
353
+ "value": "true"
354
+ },
355
+ {
356
+ "active": false,
357
+ "name": "raw",
358
+ "value": "true"
359
+ },
360
+ {
361
+ "active": false,
362
+ "name": "def",
363
+ "value": "true"
364
+ },
365
+ {
366
+ "active": false,
367
+ "name": "define",
368
+ "value": "DEFINITION"
369
+ },
370
+ {
371
+ "active": false,
372
+ "name": "user",
373
+ "value": "USER"
374
+ },
375
+ {
376
+ "active": false,
377
+ "name": "secret",
378
+ "value": "SECRET"
379
+ }
380
+ ]
300
381
  }
301
382
  }
package/main.js CHANGED
@@ -64,7 +64,7 @@ function startAdapter(options) {
64
64
  switch (obj.command) {
65
65
  case "findParams":
66
66
  // e.g. send email or pushover or whatever
67
- adapter.log.debug("findParams command");
67
+ //adapter.log.debug("findParams command");
68
68
  // Send response in callback if required
69
69
  await FindParams(obj);
70
70
  break;
@@ -96,6 +96,7 @@ async function main() {
96
96
 
97
97
  FillPolledVars();
98
98
  FillHistoryVars();
99
+ FillHTTPParamsVars();
99
100
 
100
101
  await checkVariables();
101
102
 
@@ -193,37 +194,45 @@ async function DataRequest() {
193
194
  const oPolledVars = [];
194
195
  function FillPolledVars() {
195
196
 
196
- if ( adapter.config.PolledDPs !== undefined && adapter.config.PolledDPs != null && adapter.config.PolledDPs.length > 0) {
197
- adapter.log.debug("use new object list for polled vars");
197
+ try {
198
+ if (adapter.config.PolledDPs !== undefined && adapter.config.PolledDPs != null && adapter.config.PolledDPs.length > 0) {
199
+ adapter.log.debug("use new object list for polled vars");
198
200
 
199
- //2023-02-10 only active vars
200
- for (let i = 0; i < adapter.config.PolledDPs.length; i++) {
201
- if (adapter.config.PolledDPs[i].active) {
202
- oPolledVars.push(adapter.config.PolledDPs[i]);
201
+ //2023-02-10 only active vars
202
+ for (let i = 0; i < adapter.config.PolledDPs.length; i++) {
203
+ if (adapter.config.PolledDPs[i].active) {
204
+ oPolledVars.push(adapter.config.PolledDPs[i]);
205
+ }
203
206
  }
207
+
204
208
  }
205
-
206
- }
207
- else {
208
- //make it compatible to old versions
209
- adapter.log.debug("check old comma separeted list for polled vars");
210
- const oPolled = adapter.config.PolledValues.split(",");
211
-
212
- if (oPolled.length > 0) {
213
-
214
- for (let i = 0; i < oPolled.length; i++) {
215
- if (oPolled[i].length > 0) {
216
- //console.log('add ' + oPolled[i]);
217
- const value = {
218
- circuit: "",
219
- name: oPolled[i],
220
- parameter: ""
221
- };
222
- oPolledVars.push(value);
209
+ else {
210
+ //make it compatible to old versions
211
+ adapter.log.debug("check old comma separeted list for polled vars " + adapter.config.PolledValues);
212
+
213
+ if (adapter.config.PolledValues !== undefined && typeof adapter.config.PolledValues == "string") {
214
+ const oPolled = adapter.config.PolledValues.split(",");
215
+
216
+ if (oPolled.length > 0) {
217
+
218
+ for (let i = 0; i < oPolled.length; i++) {
219
+ if (oPolled[i].length > 0) {
220
+ //console.log('add ' + oPolled[i]);
221
+ const value = {
222
+ circuit: "",
223
+ name: oPolled[i],
224
+ parameter: ""
225
+ };
226
+ oPolledVars.push(value);
227
+ }
228
+ }
223
229
  }
224
230
  }
225
231
  }
226
232
  }
233
+ catch (e) {
234
+ adapter.log.error("exception in FillPolledVars [" + e + "]");
235
+ }
227
236
 
228
237
  adapter.log.info("list of polled vars " + JSON.stringify(oPolledVars));
229
238
 
@@ -231,32 +240,45 @@ function FillPolledVars() {
231
240
 
232
241
  let oHistoryVars = [];
233
242
  function FillHistoryVars() {
234
-
235
- if (adapter.config.HistoryDPs !== undefined && adapter.config.HistoryDPs != null && adapter.config.HistoryDPs.length > 0) {
236
- adapter.log.debug("use new object list for history vars");
237
- oHistoryVars = adapter.config.HistoryDPs;
238
- }
239
- else {
240
- //make it compatible to old versions
241
- adapter.log.debug("check old comma separeted list for history vars");
242
- const oHistory = adapter.config.HistoryValues.split(",");
243
-
244
- if (oHistory.length > 0) {
245
243
 
246
- for (let i = 0; i < oHistory.length; i++) {
247
- if (oHistory[i].length > 0) {
248
- console.log("add " + oHistory[i]);
249
- const value = {
250
- name: oHistory[i],
251
- };
252
- oHistoryVars.push(value);
244
+ try {
245
+ if (adapter.config.HistoryDPs !== undefined && adapter.config.HistoryDPs != null && adapter.config.HistoryDPs.length > 0) {
246
+ adapter.log.debug("use new object list for history vars");
247
+ oHistoryVars = adapter.config.HistoryDPs;
248
+ }
249
+ else {
250
+ //make it compatible to old versions
251
+ adapter.log.debug("check old comma separeted list for history vars");
252
+ const oHistory = adapter.config.HistoryValues.split(",");
253
+
254
+ if (oHistory.length > 0) {
255
+
256
+ for (let i = 0; i < oHistory.length; i++) {
257
+ if (oHistory[i].length > 0) {
258
+ console.log("add " + oHistory[i]);
259
+ const value = {
260
+ name: oHistory[i],
261
+ };
262
+ oHistoryVars.push(value);
263
+ }
253
264
  }
254
265
  }
255
266
  }
256
267
  }
268
+ catch (e) {
269
+ adapter.log.error("exception in function FillHistoryVars [" + e + "]");
270
+ }
257
271
  }
258
272
 
273
+ let oHTTPParamsVars = [];
274
+ function FillHTTPParamsVars() {
275
+ if (adapter.config.HTTPparameter !== undefined && adapter.config.HTTPparameter != null && adapter.config.HTTPparameter.length > 0) {
276
+
277
+ oHTTPParamsVars = adapter.config.HTTPparameter;
259
278
 
279
+ adapter.log.debug("use optionally HTTP parameter " + JSON.stringify(oHTTPParamsVars));
280
+ }
281
+ }
260
282
 
261
283
 
262
284
 
@@ -385,6 +407,31 @@ async function ebusd_find(){
385
407
 
386
408
  //just call http://192.168.0.123:8889/data
387
409
 
410
+
411
+ /*
412
+ http://localhost:8080/data/mc?verbose&since=1483890000&exact
413
+
414
+ since=seconds: limit to messages that have changed since the specified UTC seconds
415
+ poll=prio: set the poll priority of matching message(s) to prio
416
+ exact[=true]: exact search for circuit/message name
417
+ verbose[=true]: include comments and field units
418
+ indexed[=true]: return field indexes instead of names
419
+ numeric[=true]: return numeric values of value list entries
420
+ valuename[=true]: include value and name of value list entries
421
+ full[=true]: include all available attributes
422
+ required[=true]: retrieve the data from the bus if not yet cached
423
+ maxage[=seconds]: retrieve the data from the bus if cached value is older than specified seconds (or not present at all)
424
+ write[=true]: include write messages in addition to read
425
+ raw[=true]: include the raw master/slave symbols as int arrays
426
+ def[=true]: include message/field definition (qq, id, fielddefs)
427
+ define=DEFINITION: (re-)define the message from DEFINITION (in CSV format)
428
+ user=USER: authenticate with USER name
429
+ secret=SECRET: authenticate with user SECRET
430
+
431
+
432
+ */
433
+
434
+
388
435
  async function subscribeVars() {
389
436
  adapter.subscribeStates("cmd");
390
437
 
@@ -608,14 +655,36 @@ function VersionCheck() {
608
655
  //get data via https in json -> this is the main data receiver; telnet just triggers ebusd to read data;
609
656
  //https://github.com/john30/ebusd/wiki/3.2.-HTTP-client
610
657
 
658
+ async function ebusd_ReceiveData() {
611
659
 
660
+ let sUrl = "http://" + adapter.config.targetIP + ":" + parseInt(adapter.config.targetHTTPPort) + "/data";
612
661
 
662
+ //Erweiterung mit optionalen parametern
663
+ var paramsCnt = 0;
664
+ if (oHTTPParamsVars !== undefined && oHTTPParamsVars != null && oHTTPParamsVars.length > 0) {
665
+ for (let i = 0; i < oHTTPParamsVars.length; i++) {
613
666
 
614
- async function ebusd_ReceiveData() {
667
+ if (oHTTPParamsVars[i].active) {
668
+ if (paramsCnt == 0) {
669
+ sUrl += "?" ;
670
+ }
671
+ else {
672
+ sUrl += "&";
673
+ }
674
+ sUrl += oHTTPParamsVars[i].name + "=" + oHTTPParamsVars[i].value;
675
+ paramsCnt++;
676
+ }
677
+ }
678
+ }
615
679
 
616
- const sUrl = "http://" + adapter.config.targetIP + ":" + parseInt(adapter.config.targetHTTPPort) + "/data";
617
680
  adapter.log.debug("request data from " + sUrl);
618
681
 
682
+ if (adapter.config.DisableTimeUpdateCheck === undefined) {
683
+ adapter.log.error("please check config, DisableTimeUpdateCheck not defined yet ");
684
+ }
685
+
686
+
687
+
619
688
  try {
620
689
 
621
690
  const buffer = await axios.get(sUrl);
@@ -820,7 +889,8 @@ async function ebusd_ReceiveData() {
820
889
  if (subnames[0].includes("scan") ||
821
890
  subnames[0].includes("Scan") ||
822
891
  subnames[0].includes("ehp") ||
823
- (subnames.length > 2 && subnames[2].includes("currenterror"))
892
+ (subnames.length > 2 && subnames[2].includes("currenterror")) ||
893
+ adapter.config.DisableTimeUpdateCheck
824
894
 
825
895
  ) {
826
896
  bSkip = true;
@@ -1257,72 +1327,86 @@ async function ebusd_ReadValues() {
1257
1327
 
1258
1328
  async function FindParams(obj) {
1259
1329
 
1260
- adapter.log.debug("FindParams " + JSON.stringify(obj));
1330
+ adapter.log.debug("FindParams " + JSON.stringify(obj) + " " + JSON.stringify(obj.message) + " " + JSON.stringify(obj.message.circuit));
1261
1331
 
1262
1332
  const list = [];
1333
+
1263
1334
 
1264
1335
  try {
1265
- const circuit = obj.message;
1336
+ //FindParams {"command":"findParams","message":{"circuit":"cc"},"from":"system.adapter.admin.0","callback":{"message":{"circuit":"cc"},"id":90,"ack":false,"time":1733690088670},"_id":39690903}
1266
1337
 
1267
- const socket = new net.Socket();
1268
- const promiseSocket = new PromiseSocket(socket);
1338
+ if (obj.message != null) {
1269
1339
 
1270
- await promiseSocket.connect(parseInt(adapter.config.targetTelnetPort), adapter.config.targetIP);
1271
- adapter.log.debug("telnet connected for cmd");
1272
- promiseSocket.setTimeout(5000);
1340
+ const circuit = obj.message.circuit;
1273
1341
 
1274
- await promiseSocket.write("find -c " + circuit + " -F circuit,name\n");
1342
+ const socket = new net.Socket();
1343
+ const promiseSocket = new PromiseSocket(socket);
1275
1344
 
1276
- const data = await promiseSocket.read();
1345
+ await promiseSocket.connect(parseInt(adapter.config.targetTelnetPort), adapter.config.targetIP);
1346
+ adapter.log.debug("telnet connected for cmd");
1347
+ promiseSocket.setTimeout(5000);
1277
1348
 
1278
- if (data.includes("ERR")) {
1279
- adapter.log.warn("received error! sent find, received " + data + " please check ebusd logs for details!");
1280
- }
1281
- else {
1282
- adapter.log.debug("received " + typeof data + " " + data);
1283
- }
1284
- /*
1285
- received object ehp,AccelerationTestModeehp,AccelerationTestModeehp,ActualEnvironmentPowerehp,ActualEnvironmentPowerehp,ActualEnvironmentPowerPercentageehp,ActualEnvironmentPowerPercentageehp,ApplianceCodeehp,ApplianceCodeehp,Backupehp,Backupehp,BackupHoursehp,BackupHoursHcehp,BackupHoursHwcehp,BackupHysteresisehp,BackupIntegralehp,BackupModeHcehp,BackupModeHwcehp,BackupPowerCutehp,BackupStartsehp,BackupStartsHcehp,BackupStartsHwcehp,BackupTypeehp,BivalentTempehp,Bleedingehp,Bleedingehp,CirPumpehp,CirPumpehp,Code1ehp,Code1Code2Validehp,Code2ehp,Compehp,Compehp,CompControlStateehp,CompCutPressHighCountehp,CompCutPressLowCountehp,CompCutTempCountehp,CompDemandehp,CompHoursehp,CompHoursHcehp,CompHoursHwcehp,CompHysteresisehp,CompIntegralehp,CompPressHighehp,CompPressHighehp,CompPressLowehp,CompPressLowehp,CompStartsehp,CompStartsHcehp,CompStartsHwcehp,CompStateehp,CondensorTempehp,CondensorTempehp,currenterrorehp,Dateehp,DateTimeehp,DeltaTempT6T7ehp,ElectricWiringDiagramehp,ElectricWiringDiagramehp,EnergyBalancingReleaseehp,errorhistoryehp,FlowTempehp,FlowTempehp,FlowtempCoolingMinehp,FlowTempOffsetehp,Hc1Pumpehp,Hc1Pumpehp,Hc1PumpHoursehp,Hc1PumpPortehp,Hc1PumpStartsehp,Hc2Pumpehp,Hc2PumpHoursehp,HcFlowTempehp,HcFlowTempOffsetehp,HcModeDemandHoursehp,HcModeFulfilledHoursehp,HcParallelStorageFillingEnabledehp,HcPressehp,HcReturnTempehp,HcReturnTempehp,HcReturnTempOffsetehp,HeatPumpStatusehp,HeatPumpStatusehp,HeatpumpTypeehp,HwcHcValveehp,HwcHcValveehp,HwcHcValveStartsehp,HwcLaggingTimeehp,HwcLoadingDelayehp,HwcModeDemandHoursehp,HwcModeFulfilledHoursehp,HwcPumpStartsehp,HwcSwitchehp,HwcTempehp,HwcTempehp,HwcTempOffsetehp,HydraulicSchemeehp,ICLOutehp,ICLOutehp,Injectionehp,Integralehp,Mixer1DutyCycleehp,NumberCompStartsehp,OutsideTempehp,OutsideTempOffsetehp,OverpressureThresholdehp,PhaseOrderehp,PhaseOrderehp,PhaseStatusehp,PhaseStatusehp,PowerCutehp,PowerCutPreloadingehp,PressSwitchehp,PressSwitchehp,RebootCounterehp,ReturnTempMaxehp,SetModeehp,SoftwareCodeehp,Source2PumpHoursehp,Sourceehp,Sourceehp,SourceHoursehp,SourcePortehp,SourcePressehp,SourcePumpPrerunTimeehp,SourceStartsehp,SourceSwitchehp,SourceSwitchehp,SourceTempInputehp,SourceTempInputehp,SourceTempInputOffsetehp,SourceTempOutputehp,SourceTempOutputehp,SourceTempOutputOffsetehp,SourceTempOutputT8Minehp,StateSoftwareCodeehp,StateSoftwareCodeehp,Status01ehp,Status02ehp,Status16ehp,Statusehp,StatusCirPumpehp,StorageTempBottomehp,StorageTempBottomehp,StorageTempBottomOffsetehp,StorageTempTopehp,StorageTempTopehp,StorageTempTopOffsetehp,Subcoolingehp,Superheatehp,T19MaxToCompOffehp,TempInputehp,TempInputehp,TempInputOffsetehp,TempOutputehp,TempOutputehp,TempOutputOffsetehp,Timeehp,TimeBetweenTwoCompStartsMinehp,TimeCompOffMinehp,TimeCompOnMinehp,TimeOfNextPredictedPowerCutehp,TimeOfNextPredictedPowerCutehp,Weekdayehp,YieldTotalehp,YieldTotal
1286
- */
1287
- const str = new TextDecoder().decode(data);
1288
- const datas = str.split(/\r?\n/);
1349
+ const cmd = "find -c " + circuit + " -F circuit,name\n";
1350
+ await promiseSocket.write(cmd);
1289
1351
 
1290
- for (let i = 0; i < datas.length; i++) {
1352
+ const data = await promiseSocket.read();
1291
1353
 
1292
- //adapter.log.debug(JSON.stringify(datas[i]));
1354
+ if (data.includes("ERR")) {
1355
+ adapter.log.warn("received error! sent find, received " + data + " please check ebusd logs for details! " + cmd);
1356
+ }
1357
+ else {
1358
+ adapter.log.debug("received " + typeof data + " " + data + " " + + cmd);
1359
+ }
1360
+ /*
1361
+ received object ehp,AccelerationTestModeehp,AccelerationTestModeehp,ActualEnvironmentPowerehp,ActualEnvironmentPowerehp,ActualEnvironmentPowerPercentageehp,ActualEnvironmentPowerPercentageehp,ApplianceCodeehp,ApplianceCodeehp,Backupehp,Backupehp,BackupHoursehp,BackupHoursHcehp,BackupHoursHwcehp,BackupHysteresisehp,BackupIntegralehp,BackupModeHcehp,BackupModeHwcehp,BackupPowerCutehp,BackupStartsehp,BackupStartsHcehp,BackupStartsHwcehp,BackupTypeehp,BivalentTempehp,Bleedingehp,Bleedingehp,CirPumpehp,CirPumpehp,Code1ehp,Code1Code2Validehp,Code2ehp,Compehp,Compehp,CompControlStateehp,CompCutPressHighCountehp,CompCutPressLowCountehp,CompCutTempCountehp,CompDemandehp,CompHoursehp,CompHoursHcehp,CompHoursHwcehp,CompHysteresisehp,CompIntegralehp,CompPressHighehp,CompPressHighehp,CompPressLowehp,CompPressLowehp,CompStartsehp,CompStartsHcehp,CompStartsHwcehp,CompStateehp,CondensorTempehp,CondensorTempehp,currenterrorehp,Dateehp,DateTimeehp,DeltaTempT6T7ehp,ElectricWiringDiagramehp,ElectricWiringDiagramehp,EnergyBalancingReleaseehp,errorhistoryehp,FlowTempehp,FlowTempehp,FlowtempCoolingMinehp,FlowTempOffsetehp,Hc1Pumpehp,Hc1Pumpehp,Hc1PumpHoursehp,Hc1PumpPortehp,Hc1PumpStartsehp,Hc2Pumpehp,Hc2PumpHoursehp,HcFlowTempehp,HcFlowTempOffsetehp,HcModeDemandHoursehp,HcModeFulfilledHoursehp,HcParallelStorageFillingEnabledehp,HcPressehp,HcReturnTempehp,HcReturnTempehp,HcReturnTempOffsetehp,HeatPumpStatusehp,HeatPumpStatusehp,HeatpumpTypeehp,HwcHcValveehp,HwcHcValveehp,HwcHcValveStartsehp,HwcLaggingTimeehp,HwcLoadingDelayehp,HwcModeDemandHoursehp,HwcModeFulfilledHoursehp,HwcPumpStartsehp,HwcSwitchehp,HwcTempehp,HwcTempehp,HwcTempOffsetehp,HydraulicSchemeehp,ICLOutehp,ICLOutehp,Injectionehp,Integralehp,Mixer1DutyCycleehp,NumberCompStartsehp,OutsideTempehp,OutsideTempOffsetehp,OverpressureThresholdehp,PhaseOrderehp,PhaseOrderehp,PhaseStatusehp,PhaseStatusehp,PowerCutehp,PowerCutPreloadingehp,PressSwitchehp,PressSwitchehp,RebootCounterehp,ReturnTempMaxehp,SetModeehp,SoftwareCodeehp,Source2PumpHoursehp,Sourceehp,Sourceehp,SourceHoursehp,SourcePortehp,SourcePressehp,SourcePumpPrerunTimeehp,SourceStartsehp,SourceSwitchehp,SourceSwitchehp,SourceTempInputehp,SourceTempInputehp,SourceTempInputOffsetehp,SourceTempOutputehp,SourceTempOutputehp,SourceTempOutputOffsetehp,SourceTempOutputT8Minehp,StateSoftwareCodeehp,StateSoftwareCodeehp,Status01ehp,Status02ehp,Status16ehp,Statusehp,StatusCirPumpehp,StorageTempBottomehp,StorageTempBottomehp,StorageTempBottomOffsetehp,StorageTempTopehp,StorageTempTopehp,StorageTempTopOffsetehp,Subcoolingehp,Superheatehp,T19MaxToCompOffehp,TempInputehp,TempInputehp,TempInputOffsetehp,TempOutputehp,TempOutputehp,TempOutputOffsetehp,Timeehp,TimeBetweenTwoCompStartsMinehp,TimeCompOffMinehp,TimeCompOnMinehp,TimeOfNextPredictedPowerCutehp,TimeOfNextPredictedPowerCutehp,Weekdayehp,YieldTotalehp,YieldTotal
1362
+ */
1363
+ const str = new TextDecoder().decode(data);
1364
+ const datas = str.split(/\r?\n/);
1293
1365
 
1294
- const names = datas[i].split(",");
1366
+ for (let i = 0; i < datas.length; i++) {
1295
1367
 
1296
- //doppelte und leere herausfiltern
1297
- let add = true;
1368
+ //adapter.log.debug(JSON.stringify(datas[i]));
1298
1369
 
1299
- if (names[0] == "" || names[1] == "") {
1300
- add = false;
1301
- }
1302
- else {
1370
+ const names = datas[i].split(",");
1371
+
1372
+ //doppelte und leere herausfiltern
1373
+ let add = true;
1374
+
1375
+ if (names[0] == "" || names[1] == "") {
1376
+ add = false;
1377
+ }
1378
+ else {
1303
1379
 
1304
- for (let n = 0; n < list.length; n++) {
1380
+ for (let n = 0; n < list.length; n++) {
1305
1381
 
1306
- if (list[n].circuit == names[0] && list[n].name == names[1]) {
1307
- add = false;
1308
- //already in list
1382
+ if (list[n].circuit == names[0] && list[n].name == names[1]) {
1383
+ add = false;
1384
+ //already in list
1385
+ }
1309
1386
  }
1310
1387
  }
1311
- }
1312
1388
 
1313
- if (add) {
1314
- const entry = {
1315
- active: false,
1316
- circuit: names[0],
1317
- name: names[1]
1318
- };
1389
+ if (add) {
1390
+ const entry = {
1391
+ active: false,
1392
+ circuit: names[0],
1393
+ name: names[1]
1394
+ };
1319
1395
 
1320
- list.push(entry);
1396
+ list.push(entry);
1397
+ }
1321
1398
  }
1322
1399
  }
1400
+ else {
1401
+ adapter.log.error("no circuit defined where to look for parameter, check values!");
1402
+ }
1323
1403
  } catch (e) {
1324
1404
  adapter.log.error("exception in FindParams " + "[" + e + "]");
1325
1405
  }
1406
+
1407
+ adapter.log.info("parameters " + JSON.stringify(list));
1408
+
1409
+
1326
1410
  adapter.sendTo(obj.from, obj.command, list, obj.callback);
1327
1411
  }
1328
1412
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.ebus",
3
- "version": "3.3.8",
3
+ "version": "3.5.0",
4
4
  "description": "ioBroker ebus Adapter",
5
5
  "author": {
6
6
  "name": "René G.",
@@ -23,8 +23,8 @@
23
23
  "node": ">= 18"
24
24
  },
25
25
  "dependencies": {
26
- "@iobroker/adapter-core": "^3.2.2",
27
- "axios": "^1.7.7",
26
+ "@iobroker/adapter-core": "^3.2.3",
27
+ "axios": "^1.7.9",
28
28
  "flat": "^5.0.2",
29
29
  "net": "^1.0.2",
30
30
  "promise-socket": "^7.0.0"
@@ -35,9 +35,9 @@
35
35
  "@alcalzone/release-script-plugin-license": "^3.7.0",
36
36
  "@alcalzone/release-script-plugin-manual-review": "^3.7.0",
37
37
  "@iobroker/adapter-dev": "^1.3.0",
38
- "@iobroker/testing": "^5.0.0",
38
+ "@iobroker/testing": "^5.0.3",
39
39
  "chai": "^5.1.2",
40
- "mocha": "^11.0.0"
40
+ "mocha": "^11.1.0"
41
41
  },
42
42
  "main": "main.js",
43
43
  "bugs": {