iobroker.ebus 2.3.2 → 2.4.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/README.md CHANGED
@@ -11,12 +11,10 @@
11
11
  [![NPM](https://nodei.co/npm/iobroker.ebus.png?downloads=true)](https://nodei.co/npm/iobroker.ebus/)
12
12
 
13
13
 
14
-
15
14
  **This adapter uses Sentry libraries to automatically report exceptions and code errors to the developers.**
16
15
  For more details and for information how to disable the error reporting see [Sentry-Plugin Documentation](https://github.com/ioBroker/plugin-sentry#plugin-sentry)! Sentry reporting is used starting with js-controller 3.0.
17
16
 
18
17
 
19
-
20
18
  **If you like it, please consider a donation:**
21
19
 
22
20
  [![paypal](https://www.paypalobjects.com/en_US/DK/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YBAZTEBT9SYC2&source=url)
@@ -34,11 +32,31 @@ Another feature is to send any command to ebusd and receive answer to work with
34
32
 
35
33
  current supported ebusd-version: 21.2
36
34
 
35
+
36
+ ## how to send commands to ebusd
37
+ 1. write a single command or an command list on datapoint ebus.0.cmd
38
+ If you want to use more then one command, use , to separate single commands.
39
+ example:
40
+ read -f YieldTotal,read LegioProtectionEnabled,read -f -c broadcast outsidetemp
41
+
42
+ 2. when command is executed you will receive results per command in datapoint ebus.0.cmdResult
43
+ The result is also comma-separeted
44
+ example:
45
+ 2000, ERR: element not found, 10.5
46
+
47
+ Attention: command in datapoint ebus.0.cmd is deleted after executing of command!
48
+
49
+
37
50
  ## known issues
38
51
  * please create issues at [github](https://github.com/rg-engineering/ioBroker.ebus/issues) if you find bugs or whish new features
39
52
 
40
53
  ## Changelog
41
54
 
55
+ ## 2.4.0 (in progress)
56
+ * (René) overwork handling of read datapoints and history datapoints, circuit added optionally
57
+ * (René) command can now include more then one command, just separate commands with ','
58
+ * (René) see issue #55: warnings changed to debug messages
59
+
42
60
  ## 2.3.2 (2021-09-02)
43
61
  * (René) see issue #49: support for ebusd 21.2
44
62
  * (René) see issue #40: option to use boolean instead string for values with on/off
@@ -1,25 +1,54 @@
1
1
  <html>
2
2
 
3
3
  <head>
4
+ <!-- Load ioBroker scripts and styles-->
5
+ <link rel="stylesheet" type="text/css" href="../../lib/css/fancytree/ui.fancytree.min.css" />
4
6
  <link rel="stylesheet" type="text/css" href="../../css/adapter.css" />
5
7
  <link rel="stylesheet" type="text/css" href="../../lib/css/materialize.css">
6
8
 
7
9
  <script type="text/javascript" src="../../lib/js/jquery-3.2.1.min.js"></script>
8
10
  <script type="text/javascript" src="../../socket.io/socket.io.js"></script>
9
11
 
10
- <script type="text/javascript" src="../../js/translate.js"></script>
11
12
  <script type="text/javascript" src="../../lib/js/materialize.js"></script>
13
+ <script type="text/javascript" src="../../lib/js/jquery-ui.min.js"></script>
14
+ <script type="text/javascript" src="../../lib/js/jquery.fancytree-all.min.js"></script>
15
+
16
+ <script type="text/javascript" src="../../js/translate.js"></script>
17
+ <script type="text/javascript" src="../../lib/js/selectID.js"></script>
12
18
  <script type="text/javascript" src="../../js/adapter-settings.js"></script>
19
+
20
+ <!-- my own styles -->
21
+ <link rel="stylesheet" type="text/css" href="style.css" />
13
22
  <script type="text/javascript" src="words.js"></script>
14
23
 
15
24
 
16
25
  <style>
17
- .polled {
18
- height: 100px !important;
26
+
27
+ #dialog-room-edit {
28
+ max-height: 95% !important;
29
+ max-width: 85% !important;
30
+ width: 80% !important;
31
+ height: 90% !important;
32
+ overflow: visible !important;
33
+ top: 10px !important;
19
34
  }
20
35
 
21
- .adapter-body {
22
- overflow: hidden !important;
36
+ #dialog-select-member {
37
+ max-height: 95% !important;
38
+ max-width: 85% !important;
39
+ width: 80% !important;
40
+ height: 90% !important;
41
+ overflow: visible !important;
42
+ top: 10px !important;
43
+ }
44
+
45
+ .collapsible-body {
46
+ margin-left: 2rem !important;
47
+ padding-top: 0 !important;
48
+ }
49
+
50
+ redlabel {
51
+ color: red;
23
52
  }
24
53
  </style>
25
54
 
@@ -27,11 +56,6 @@
27
56
  <!-- you have to define 2 functions in the global scope: -->
28
57
  <script type="text/javascript">
29
58
 
30
-
31
-
32
-
33
-
34
-
35
59
  // the function loadSettings has to exist ...
36
60
  function load(settings, onChange) {
37
61
 
@@ -53,14 +77,94 @@
53
77
  }
54
78
  }
55
79
 
56
-
80
+ myOnChange = onChange;
57
81
  // Signal to admin, that no changes yet
58
82
  onChange(false);
59
83
 
60
84
  M.updateTextFields();
61
85
 
86
+ FillTablePolledDP(settings);
87
+ FillTableHistoryDP(settings);
88
+
62
89
  }
63
90
 
91
+ function FillTablePolledDP(settings) {
92
+
93
+ if (typeof settings.PolledDPs !== 'undefined' && settings.PolledDPs != null && settings.PolledDPs.length > 0) {
94
+
95
+ values2table('polledDP', settings.PolledDPs, OnChange, tablePolledDPOnReady);
96
+ console.log('using new PolledDPs from settings ' + JSON.stringify(settings.PolledDPs));
97
+ }
98
+ // make it compatible to older versions
99
+ else if (typeof settings.PolledValues !== 'undefined' && settings.PolledValues != null) {
100
+
101
+ var values = settings.PolledValues.split(",");
102
+
103
+ var newValues = [];
104
+ for (let i = 0; i < values.length; i++) {
105
+ console.log('add ' + values[i]);
106
+ const value = {
107
+ circuit: "",
108
+ name: values[i],
109
+ parameter: "",
110
+ }
111
+ newValues.push(value);
112
+ }
113
+ values2table('polledDP', newValues, OnChange, tablePolledDPOnReady);
114
+ console.log('using PolledValues from settings ' + JSON.stringify(settings.PolledValues) + " " + JSON.stringify(newValues));
115
+
116
+ }
117
+
118
+ }
119
+
120
+ function tablePolledDPOnReady() {
121
+
122
+ showHideSettings();
123
+ }
124
+
125
+ var myOnChange = null;
126
+ function OnChange() {
127
+ //do nothing
128
+ console.log('on change called');
129
+
130
+ if (myOnChange != null) {
131
+ myOnChange();
132
+ }
133
+ }
134
+
135
+ function showHideSettings() {
136
+
137
+ }
138
+
139
+ function FillTableHistoryDP(settings) {
140
+
141
+ if (typeof settings.HistoryDPs !== 'undefined' && settings.HistoryDPs != null && settings.HistoryDPs.length > 0) {
142
+
143
+ values2table('historyDP', settings.HistoryDPs, OnChange, tableHistoryDPOnReady);
144
+ console.log('using new HistoryDPs from settings ' + JSON.stringify(settings.HistoryDPs));
145
+ }
146
+ // make it compatible to older versions
147
+ else if (typeof settings.HistoryValues !== 'undefined' && settings.HistoryValues != null) {
148
+
149
+ var values = settings.HistoryValues.split(",");
150
+
151
+ var newValues = [];
152
+ for (let i = 0; i < values.length; i++) {
153
+ console.log('add ' + values[i]);
154
+ const value = {
155
+ name: values[i],
156
+ }
157
+ newValues.push(value);
158
+ }
159
+ values2table('historyDP', newValues, OnChange, tableHistoryDPOnReady);
160
+ console.log('using HistoryValues from settings ' + JSON.stringify(settings.HistoryValues) + " " + JSON.stringify(newValues));
161
+
162
+ }
163
+ }
164
+
165
+ function tableHistoryDPOnReady() {
166
+
167
+ }
64
168
 
65
169
  // ... and the function save has to exist.
66
170
  // you have to make sure the callback is called with the settings object as first param!
@@ -78,10 +182,17 @@
78
182
  obj[$this.attr('id')] = $this.val();
79
183
  }
80
184
  });
185
+
186
+ obj.PolledDPs = table2values('polledDP');
187
+ obj.HistoryDPs = table2values('historyDP');
188
+
189
+ obj.PolledValues = "";
190
+ obj.HistoryValues = "";
191
+
81
192
  callback(obj);
82
193
  }
83
194
 
84
-
195
+
85
196
 
86
197
  </script>
87
198
  </head>
@@ -94,6 +205,8 @@
94
205
  <ul class="tabs">
95
206
  <li class="tab col s2"><a href="#tab-main" class="translate active">Main settings</a></li>
96
207
  <li class="tab col s2 le-settings"><a href="#tab-ebusd" class="translate">ebusd</a></li>
208
+ <li class="tab col s2 le-settings"><a href="#tab-polledDP" class="translate">polledDP</a></li>
209
+ <li class="tab col s2 le-settings"><a href="#tab-historyDP" class="translate">historyDP</a></li>
97
210
  </ul>
98
211
  </div>
99
212
 
@@ -140,50 +253,99 @@
140
253
  <input class="value number" id="targetHTTPPort" size="5" maxlength="5" type="number" />
141
254
  <label for="targetHTTPPort" class="translate">target_HTTPPort</label>
142
255
  </div>
143
-
256
+ </div>
257
+ <div class="row">
144
258
  <div class="input-field col s12 m4 l3">
145
259
  <input class="value number" id="targetTelnetPort" size="5" maxlength="5" type="number" />
146
260
  <label for="targetTelnetPort" class="translate">target_TelnetPort</label>
147
261
  </div>
148
-
149
-
262
+ </div>
263
+ <div class="row">
150
264
  <div class="input-field col s12 m4 l3">
151
265
  <input class="value number" id="parseTimeout" size="3" maxlength="3" type="number" />
152
266
  <label for="parseTimeout" class="translate">parse_timeout</label>
153
-
154
267
  </div>
268
+ </div>
155
269
 
270
+ <!--
271
+ <div class="row">
272
+ <div class="input-field col s6">
273
+ <textarea class="value materialize-textarea polled" id="PolledValues"></textarea>
274
+ <label class="translate" for="PolledValues">ListOfAllPolledValues</label>
275
+ </div>
156
276
 
277
+ <div class="col s6">
278
+ <span class="translate">hint_ebusd_polled</span>
279
+ </div>
280
+ </div>
157
281
 
158
- </div>
282
+ <div class="row">
283
+ <div class="input-field col s6">
284
+ <textarea class="value materialize-textarea polled" id="HistoryValues"></textarea>
285
+ <label class="translate" for="HistoryValues">ListOfAllHistoryValues</label>
286
+ </div>
159
287
 
160
- <div class="row">
161
- <div class="input-field col s6">
162
- <textarea class="value materialize-textarea polled" id="PolledValues"></textarea>
163
- <label class="translate" for="PolledValues">ListOfAllPolledValues</label>
164
- </div>
288
+ <div class="col s6">
289
+ <span class="translate">hint_ebusd_history</span>
290
+ </div>
291
+ </div>
292
+ -->
293
+
294
+ </div>
295
+
296
+ <!-- tab "tab-polledDP" -->
297
+ <div id="tab-polledDP" class="col s12 page">
165
298
 
299
+ <div class="row">
166
300
  <div class="col s6">
167
301
  <span class="translate">hint_ebusd_polled</span>
168
302
  </div>
169
303
  </div>
170
304
 
171
- <div class="row">
172
- <div class="input-field col s6">
173
- <textarea class="value materialize-textarea polled" id="HistoryValues"></textarea>
174
- <label class="translate" for="HistoryValues">ListOfAllHistoryValues</label>
305
+ <div class="col s12" id="polledDP">
306
+
307
+ <a class="btn-floating waves-effect waves-light blue table-button-add"><i class="material-icons">add</i></a>
308
+
309
+ <div class="table-values-div">
310
+ <table id="table_polledDP" class="table-values" style="width: 100%;">
311
+ <thead>
312
+ <tr>
313
+ <th id="polledDP_col_1" data-name="circuit" style="width: 20%; background: #64b5f6 " class="translate">circuit</th>
314
+ <th id="polledDP_col_2" data-name="name" style="background: #64b5f6" class="translate">name</th>
315
+ <th id="polledDP_col_3" data-name="parameter" style="background: #64b5f6" class="translate">addParameter</th>
316
+ <th data-buttons="up down delete" style="width: 100px; background: #64b5f6"></th>
317
+ </tr>
318
+ </thead>
319
+ </table>
175
320
  </div>
321
+ </div>
322
+ </div>
323
+
324
+ <!-- tab "tab-historyDP" -->
325
+ <div id="tab-historyDP" class="col s12 page">
176
326
 
327
+ <div class="row">
177
328
  <div class="col s6">
178
329
  <span class="translate">hint_ebusd_history</span>
179
330
  </div>
180
331
  </div>
181
332
 
333
+ <div class="col s12" id="historyDP">
182
334
 
183
- </div>
184
-
185
-
335
+ <a class="btn-floating waves-effect waves-light blue table-button-add"><i class="material-icons">add</i></a>
186
336
 
337
+ <div class="table-values-div">
338
+ <table id="table_historyDP" class="table-values" style="width: 100%;">
339
+ <thead>
340
+ <tr>
341
+ <th id="historyDP_col_1" data-name="name" style="width: 20%; background: #64b5f6 " class="translate">name</th>
342
+ <th data-buttons="add up down delete" style="width: 100px; background: #64b5f6"></th>
343
+ </tr>
344
+ </thead>
345
+ </table>
346
+ </div>
347
+ </div>
348
+ </div>
187
349
 
188
350
  </div>
189
351
  </div>
@@ -0,0 +1,18 @@
1
+ /* You can delete those if you want. I just found them very helpful */
2
+ * {
3
+ box-sizing: border-box
4
+ }
5
+
6
+ .m {
7
+ /* Don't cut off dropdowns! */
8
+ overflow: initial;
9
+ }
10
+
11
+ /* Add your styles here */
12
+ .polled {
13
+ height: 100px !important;
14
+ }
15
+
16
+ .adapter-body {
17
+ overflow: auto;
18
+ }
package/admin/words.js CHANGED
@@ -2,15 +2,16 @@
2
2
  'use strict';
3
3
 
4
4
  systemDictionary = {
5
- "ListOfAllHistoryValues": { "en": "comma separated list of datapoints for ebus history widget. Maximum 4 datapoints should be used, more can be used.", "de": "Komma-getrennte Liste von Datenpunkten für ebus history widget. Maximal 4 Datenpunkte sollten verwendet werden, mehr können verwendet werden.", "ru": "разделенный запятыми список точек данных для виджета истории ebus. Необходимо использовать максимум 4 точки данных, больше можно использовать.", "pt": "lista separada por vírgula de pontos de dados para o widget da história do ebus. O máximo de 4 pontos de dados deve ser usado, mais podem ser usados.", "nl": "door komma's gescheiden lijst van gegevenspunten voor de widget van de ebus-geschiedenis. Er moeten maximaal 4 gegevenspunten worden gebruikt, er kunnen er meer worden gebruikt.", "fr": "liste des points de données séparés par des virgules pour le widget d'historique ebus. Maximum 4 points de données doivent être utilisés, plus peuvent être utilisés.", "it": "elenco separato da virgole di punti dati per il widget della cronologia ebus. È necessario utilizzare un massimo di 4 punti dati, altri possono essere utilizzati.", "es": "lista de puntos de datos separados por comas para el widget de historial ebus. Se deben usar un máximo de 4 puntos de datos, se pueden usar más.", "pl": "rozdzielana przecinkami lista punktów danych dla widgetu historii ebus. Należy użyć maksymalnie 4 punktów danych, więcej można wykorzystać.", "zh-cn": "逗号分隔的ebus历史记录小部件的数据点列表。"},
6
- "ListOfAllPolledValues": { "en": "comma separated list of polled datapoints", "de": "Komma-getrennte Liste von abgefragten Datenpunkten", "ru": "разделенный запятыми список опрошенных точек данных", "pt": "lista separada por vírgulas de pontos de dados polidos", "nl": "door komma's gescheiden lijst van polled datapunten", "fr": "liste séparée par des virgules des points de données interrogés", "it": "elenco separato da virgole di punti di dati sottoposti a polling", "es": "lista separada por comas de puntos de datos sondeados", "pl": "rozdzielana przecinkami lista odpytanych punktów danych", "zh-cn": "逗号分隔的轮询数据点列表"},
5
+ "addParameter": { "en": "additional parameter", "de": "zusätzliche Parameter", "ru": "дополнительный параметр", "pt": "parâmetro adicional", "nl": "extra parameter", "fr": "paramètre supplémentaire", "it": "parametro aggiuntivo", "es": "parámetro adicional", "pl": "dodatkowy parametr", "zh-cn": "附加参数"},
6
+ "circuit": { "en": "circuit", "de": "Schaltkreis", "ru": "схема", "pt": "o circuito", "nl": "stroomkring", "fr": "circuit", "it": "circuito", "es": "circuito", "pl": "okrążenie", "zh-cn": "电路"},
7
7
  "ebus_adapter_settings": { "en": "ebus adapter settings", "de": "ebus Adaptereinstellungen", "ru": "настройки адаптера ebus", "pt": "Configurações do adaptador ebus", "nl": "ebus-adapterinstellingen", "fr": "Paramètres de l'adaptateur ebus", "it": "impostazioni dell'adattatore ebus", "es": "configuración del adaptador ebus", "pl": "ustawienia adaptera ebus", "zh-cn": "ebus适配器设置"},
8
- "hint_arduino": { "en": "for arduino interface you need arduino, ethernet shield, ebus adapter and our arduino software. Details see URL to do", "de": "für das Arduino Interface benötigen sie einen Arduino, Ethernet Shield, ebus Adapter und unsere Arduino Software. Details siehe: URL to do", "ru": "для интерфейса arduino вам нужны arduino, ethernet-экран, адаптер ebus и наше программное обеспечение arduino. Подробности см .:URL to do", "pt": "Para a interface arduino você precisa de arduino, ethernet shield, adaptador ebus e nosso software arduino. Detalhes:URL to do", "nl": "voor arduino-interface heeft u arduino, ethernet shield, ebus-adapter en onze arduino-software nodig. Details zien:URL to do", "fr": "Pour l'interface arduino, vous avez besoin d'arduino, d'un shield ethernet, d'un adaptateur ebus et de notre logiciel arduino. Détails voir:URL to do", "it": "per l'interfaccia arduino hai bisogno di arduino, schermo ethernet, adattatore ebus e il nostro software arduino. Dettagli vedi:URL to do", "es": "para la interfaz arduino necesitas arduino, escudo ethernet, adaptador ebus y nuestro software arduino. Los detalles ven:URL to do", "pl": "do interfejsu arduino potrzebujesz arduino, ekran ethernetowy, adapter ebus i nasze oprogramowanie arduino. Szczegóły patrz:URL to do", "zh-cn": "对于arduino接口,您需要arduino,以太网屏蔽,ebus适配器和我们的arduino软件。"},
9
- "hint_ebusd": { "en": "for ebusd interface you need a running ebusd incl. all necessary configurations. This adapter uses HTML to read data from ebusd and TCP to write to ebusd", "de": "Für ebusd interface benötigen Sie einen running ebusd incl. alle notwendigen Konfigurationen. Dieser Adapter verwendet HTML, um Daten von ebusd und TCP zu lesen, um auf ebusd zu schreiben", "ru": "для интерфейса ebusd вам необходимо запустить ebusd, вкл. все необходимые конфигурации. Этот адаптер использует HTML для чтения данных из ebusd и TCP для записи в ebusd", "pt": "Para a interface ebusd, você precisa de um ebusd executado. todas as configurações necessárias. Este adaptador usa HTML para ler dados de ebusd e TCP para escrever em ebusd", "nl": "voor ebusd-interface heeft u een lopende ebusd nodig. alle noodzakelijke configuraties. Deze adapter gebruikt HTML om gegevens van ebusd en TCP te lezen om naar ebusd te schrijven", "fr": "Pour l'interface ebusd, vous avez besoin d'un ebusd en cours d'exécution. toutes les configurations nécessaires. Cet adaptateur utilise le HTML pour lire les données d'ebusd et TCP pour écrire sur ebusd", "it": "per l'interfaccia ebusd hai bisogno di un ebusd in esecuzione incl. tutte le configurazioni necessarie Questo adattatore utilizza l'HTML per leggere i dati da ebusd e TCP per scrivere su ebusd", "es": "para la interfaz ebusd necesita un ebusd eb todas las configuraciones necesarias. Este adaptador usa HTML para leer datos de ebusd y TCP para escribir en ebusd", "pl": "do interfejsu ebusd potrzebny jest działający ebusd w tym. wszystkie niezbędne konfiguracje. Ten adapter używa HTML do odczytu danych z ebusd i TCP w celu zapisania do ebusd", "zh-cn": "对于ebusd接口,您需要一个正在运行的ebusd incl。"},
10
- "hint_ebusd_history": { "en": "comma seperated list of all datapoint names which should be used with ebus history widget.If datapoint is in the list then it appears in json - data with timestamp and value and can be used in ebus history widget", "de": "Komma getrennte Liste aller Datenpunktnamen, die mit ebus history widget verwendet werden sollen. Wenn sich der Datenpunkt in der Liste befindet, wird er in json-data mit Zeitstempel und Wert angezeigt und kann in ebus history widget verwendet werden", "ru": "разделенный запятыми список всех имен данных, которые должны использоваться с виджетами истории ebus. Если datapoint находится в списке, то он появляется в json-данных с меткой времени и значением и может использоваться в виджетах истории ebus", "pt": "lista separada por vírgulas de todos os nomes de pontos de dados que devem ser usados ​​com o widget de histórico do ebus. Se o ponto de dados estiver na lista, ele aparecerá em json-data com timestamp e valor e pode ser usado no widget de histórico do ebus", "nl": "een door komma's gescheiden lijst van alle datapuntnamen die met de ebus-geschiedeniswidget moeten worden gebruikt. Als datapunt in de lijst staat, verschijnt het in json-data met tijdstempel en waarde en kan het worden gebruikt in de ebus-geschiedeniswidget", "fr": "liste séparée par des virgules de tous les noms de point de données qui doivent être utilisés avec le widget d'historique ebus. Si le point de donnée est dans la liste, il apparaît dans json-data avec horodatage et valeur et peut être utilisé dans le widget de l'historique ebus", "it": "elenco separato da virgola di tutti i nomi dei punti dati che dovrebbero essere utilizzati con il widget della cronologia ebus. Se il datapoint è presente nell'elenco, viene visualizzato in json-data con data / ora e valore e può essere utilizzato nel widget della cronologia ebus", "es": "una lista separada por comas de todos los nombres de punto de datos que se deben usar con el widget de historial de ebus. Si el punto de datos está en la lista, aparece en json-data con indicación de fecha y hora y valor y se puede usar en el widget de historia ebus.", "pl": "rozdzielana przecinkami lista wszystkich nazw punktów danych, które powinny być używane z widżetem historii ebus. Jeśli data jest na liście, pojawia się w json-data ze znacznikiem czasowym i wartością i może być użyta w widżecie historii ebus", "zh-cn": "逗号分隔的所有数据点名称列表,该数据点名称应与ebus历史记录小部件一起使用。如果数据点在列表中,则它将出现在json-具有时间戳和值的数据中,并且可以在ebus历史记录小部件中使用"},
11
- "hint_ebusd_polled": { "en": "comma seperated list of all datapoint names which should be polled from adapter. Do not add datapoint which are already polled from ebusd. This list should include onle those which are not updated from ebusd itself", "de": "Komma getrennte Liste aller Datenpunktnamen, die vom Adapter abgefragt werden sollen. Fügen Sie keine Datenpunkte hinzu, die bereits von ebusd abgefragt wurden. Diese Liste sollte diejenigen enthalten, die nicht von ebusd selbst aktualisiert wurden", "ru": "разделенный запятыми список всех имен данных, которые должны быть опрошены из адаптера. Не добавляйте datapoint, которые уже опрошены с ebusd. Этот список должен включать только те, которые не обновляются с самого ebusd", "pt": "lista separada por vírgulas de todos os nomes de pontos de dados que devem ser consultados a partir do adaptador. Não adicione o datapoint que já foi consultado pelo ebusd. Esta lista deve incluir onle aqueles que não são atualizados da própria ebusd", "nl": "een door komma's gescheiden lijst met alle datapuntnamen die uit de adapter moeten worden gepolld. Voeg geen datapunten toe die al gepold zijn vanuit ebusd. Deze lijst moet alleen die bevatten die niet zijn bijgewerkt vanuit ebusd zelf", "fr": "liste séparée par des virgules de tous les noms de point de données qui doivent être interrogés à partir de l'adaptateur. N'ajoutez pas de point de données déjà interrogé depuis ebusd. Cette liste devrait inclure ceux qui ne sont pas mis à jour depuis ebusd lui-même", "it": "elenco separato da virgole di tutti i nomi dei punti dati che devono essere interrogati dall'adattatore. Non aggiungere datapoint che sono già stati interrogati da ebusd. Questo elenco dovrebbe includere quelli che non sono aggiornati da ebusd stesso", "es": "una lista separada por comas de todos los nombres de punto de datos que deben sondearse desde el adaptador. No agregue puntos de datos que ya están sondeados desde ebusd. Esta lista debe incluir onle aquellos que no se actualizan desde ebusd", "pl": "rozdzielana przecinkami lista wszystkich nazw punktów danych, które powinny być pobierane z adaptera. Nie dodawaj punktów danych, które są już odpytywane z ebusd. Ta lista powinna zawierać te, które nie są aktualizowane od samego ebusd", "zh-cn": "逗号分隔的所有数据点名称列表,应从适配器中轮询。"},
12
- "interface_type": { "en": "type of interface", "de": "Art der Schnittstelle", "ru": "тип интерфейса", "pt": "tipo de interface", "nl": "type interface", "fr": "type d'interface", "it": "tipo di interfaccia", "es": "tipo de interfaz", "pl": "typ interfejsu", "zh-cn": "接口类型"},
8
+ "hint_ebusd": { "en": "you need an running ebusd inclusive all necessary configurations. This adapter uses HTML to read data from ebusd. It uses TCP (Telnet) to write to ebusd.", "de": "Für ebusd interface benötigen Sie einen running ebusd incl. alle notwendigen Konfigurationen. Dieser Adapter verwendet HTML, um Daten von ebusd und TCP zu lesen, um auf ebusd zu schreiben", "ru": "для интерфейса ebusd вам необходимо запустить ebusd, вкл. все необходимые конфигурации. Этот адаптер использует HTML для чтения данных из ebusd и TCP для записи в ebusd", "pt": "Para a interface ebusd, você precisa de um ebusd executado. todas as configurações necessárias. Este adaptador usa HTML para ler dados de ebusd e TCP para escrever em ebusd", "nl": "voor ebusd-interface heeft u een lopende ebusd nodig. alle noodzakelijke configuraties. Deze adapter gebruikt HTML om gegevens van ebusd en TCP te lezen om naar ebusd te schrijven", "fr": "Pour l'interface ebusd, vous avez besoin d'un ebusd en cours d'exécution. toutes les configurations nécessaires. Cet adaptateur utilise le HTML pour lire les données d'ebusd et TCP pour écrire sur ebusd", "it": "per l'interfaccia ebusd hai bisogno di un ebusd in esecuzione incl. tutte le configurazioni necessarie Questo adattatore utilizza l'HTML per leggere i dati da ebusd e TCP per scrivere su ebusd", "es": "para la interfaz ebusd necesita un ebusd eb todas las configuraciones necesarias. Este adaptador usa HTML para leer datos de ebusd y TCP para escribir en ebusd", "pl": "do interfejsu ebusd potrzebny jest działający ebusd w tym. wszystkie niezbędne konfiguracje. Ten adapter używa HTML do odczytu danych z ebusd i TCP w celu zapisania do ebusd", "zh-cn": "对于ebusd接口,您需要一个正在运行的ebusd incl。"},
9
+ "hint_ebusd_history": { "en": "list of all datapoint names which should be used with ebus history widget. ", "de": "Liste aller Datenpunktnamen, die mit dem ebus-History-Widget verwendet werden sollen.", "ru": "список всех имен точек данных, которые следует использовать с виджетом истории ebus.", "pt": "lista de todos os nomes de pontos de dados que devem ser usados ​​com o widget de histórico do ebus.", "nl": "lijst met alle datapuntnamen die moeten worden gebruikt met de ebus-geschiedeniswidget.", "fr": "liste de tous les noms de points de données qui doivent être utilisés avec le widget historique ebus.", "it": "elenco di tutti i nomi dei punti dati che dovrebbero essere utilizzati con il widget cronologia ebus.", "es": "lista de todos los nombres de puntos de datos que deben usarse con el widget de historial de ebus.", "pl": "lista wszystkich nazw punktów danych, które powinny być używane z widżetem historii ebus.", "zh-cn": "应与 ebus 历史小部件一起使用的所有数据点名称的列表。"},
10
+ "hint_ebusd_polled": { "en": "list of all datapoint names which should be polled from adapter. Do not add datapoints which are already polled from ebusd. Circuit and additional parameter are optionally.", "de": "Liste aller Datenpunktnamen, die vom Adapter abgefragt werden sollen. ", "ru": "список всех имен точек данных, которые должны быть опрошены от адаптера. ", "pt": "lista de todos os nomes de pontos de dados que devem ser pesquisados ​​no adaptador. ", "nl": "lijst met alle datapuntnamen die van de adapter moeten worden opgevraagd. ", "fr": "liste de tous les noms de points de données qui doivent être interrogés à partir de l'adaptateur. ", "it": "elenco di tutti i nomi dei punti dati che devono essere interrogati dall'adattatore. ", "es": "lista de todos los nombres de puntos de datos que deben consultarse desde el adaptador. ", "pl": "lista wszystkich nazw punktów danych, które powinny być odpytywane z adaptera. ", "zh-cn": "应从适配器轮询的所有数据点名称的列表。"},
11
+ "historyDP": { "en": "history datapoints", "de": "Verlaufsdatenpunkte", "ru": "исторические данные", "pt": "pontos de dados de história", "nl": "geschiedenis datapunten", "fr": "points de données d'historique", "it": "punti dati della cronologia", "es": "puntos de datos históricos", "pl": "punkty danych historii", "zh-cn": "历史数据点"},
12
+ "name": { "en": "name", "de": "Name", "ru": "имя", "pt": "nome", "nl": "naam", "fr": "Nom", "it": "nome", "es": "nombre", "pl": "Nazwa", "zh-cn": "姓名"},
13
13
  "parse_timeout": { "en": "download and poll timeout [seconds]", "de": "Download und Abfrage-Timeout [Sekunden]", "ru": "время ожидания загрузки и опроса [секунд]", "pt": "tempo de download e poll timeout [segundos]", "nl": "downloaden en poll time-out [seconden]", "fr": "délai de téléchargement et d'interrogation [secondes]", "it": "download e polling timeout [secondi]", "es": "tiempo de espera de descarga y encuesta [segundos]", "pl": "czas pobierania i odpytywania [sekundy]", "zh-cn": "下载和轮询超时[秒]"},
14
+ "polledDP": { "en": "polled datapoints", "de": "abgefragte Datenpunkte", "ru": "опрошенные точки данных", "pt": "pontos de dados sondados", "nl": "opgevraagde datapunten", "fr": "points de données interrogés", "it": "punti dati interrogati", "es": "puntos de datos sondeados", "pl": "odpytywane punkty danych", "zh-cn": "轮询数据点"},
14
15
  "target_HTTPPort": { "en": "target HTTP Port to read data", "de": "target HTTP Port zum Lesen von Daten", "ru": "целевой HTTP-порт для чтения данных", "pt": "porta HTTP de destino para ler dados", "nl": "doel HTTP-poort om gegevens te lezen", "fr": "Port HTTP cible pour lire les données", "it": "Porta HTTP di destinazione per leggere i dati", "es": "target HTTP Port para leer datos", "pl": "docelowy port HTTP do odczytu danych", "zh-cn": "目标HTTP端口以读取数据"},
15
16
  "target_IP": { "en": "target IP", "de": "Ziel-IP", "ru": "целевой IP-адрес", "pt": "IP alvo", "nl": "doel-IP", "fr": "cible IP", "it": "IP di destinazione", "es": "IP objetivo", "pl": "docelowy adres IP", "zh-cn": "目标IP"},
16
17
  "target_TelnetPort": { "en": "target telnet Port to write data", "de": "target telnet Port zum Schreiben von Daten", "ru": "целевой порт telnet для записи данных", "pt": "destino telnet porta para escrever dados", "nl": "doel telnet-poort om gegevens te schrijven", "fr": "Port telnet cible pour écrire des données", "it": "Porta telnet target per scrivere dati", "es": "target telnet Port para escribir datos", "pl": "docelowy port telnet do zapisu danych", "zh-cn": "目标telnet用于写入数据的端口"},
package/io-package.json CHANGED
@@ -1,8 +1,20 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "ebus",
4
- "version": "2.3.2",
4
+ "version": "2.4.0",
5
5
  "news": {
6
+ "2.4.0": {
7
+ "en": "overwork handling of read and history datapoints; support of list of commands ",
8
+ "de": "Überarbeitung von Lese- und Verlaufsdatenpunkten; ",
9
+ "ru": "чрезмерная работа с точками чтения и истории; ",
10
+ "pt": "excesso de trabalho no manuseio de pontos de dados de leitura e histórico; ",
11
+ "nl": "overwerk afhandeling van lees- en geschiedenisdatapunten; ",
12
+ "fr": "traitement excessif des points de données de lecture et d'historique ; ",
13
+ "it": "gestione del lavoro eccessivo dei punti dati di lettura e cronologia; ",
14
+ "es": "manejo de exceso de trabajo de los puntos de datos de lectura e historial; ",
15
+ "pl": "przepracowanie obsługi odczytanych i historycznych punktów danych; ",
16
+ "zh-cn": "读取和历史数据点的过度处理;"
17
+ },
6
18
  "2.3.1": {
7
19
  "en": "support for ebusd 21.2",
8
20
  "de": "unterstützung für ebusd 21.2",
@@ -154,7 +166,10 @@
154
166
  }
155
167
  ],
156
168
  "connectionType": "local",
157
- "dataSource": "push"
169
+ "dataSource": "push",
170
+ "adminUI": {
171
+ "config": "materialize"
172
+ }
158
173
  },
159
174
  "native": {
160
175
  "targetIP": "192.168.0.1",
@@ -164,6 +179,8 @@
164
179
  "PolledValues": "",
165
180
  "HistoryValues": "",
166
181
  "parseTimeout": 60,
167
- "useBoolean4Onoff": false
182
+ "useBoolean4Onoff": false,
183
+ "PolledDPs": [],
184
+ "HistoryDPs": []
168
185
  }
169
186
  }
package/main.js CHANGED
@@ -49,16 +49,6 @@ let killTimer;
49
49
 
50
50
  async function main() {
51
51
 
52
- /*
53
- const options = {
54
- targetIP: adapter.config.targetIP || "192.168.0.100",
55
- targetHTTPPort: parseInt(adapter.config.targetHTTPPort),
56
- targetTelnetPort: parseInt(adapter.config.targetTelnetPort),
57
- polledValues: adapter.config.PolledValues,
58
- historyValues: adapter.config.HistoryValues
59
- };
60
- */
61
-
62
52
  let nParseTimeout = 60;
63
53
  if (adapter.config.parseTimeout > 0) {
64
54
  nParseTimeout = adapter.config.parseTimeout;
@@ -74,19 +64,19 @@ async function main() {
74
64
  }, nParseTimeout);
75
65
 
76
66
  adapter.log.debug("start with interface ebusd ");
67
+
68
+ FillPolledVars();
69
+ FillHistoryVars();
70
+
77
71
  await ebusd_checkVariables();
78
72
 
79
73
  await ebusd_Command();
80
74
  await ebusd_ReadValues();
81
- //await ebusd_StartReceive(options);
82
-
83
75
 
84
76
  //await TestFunction();
85
77
 
86
78
  await ebusd_ReceiveData();
87
79
 
88
-
89
-
90
80
  if (killTimer) {
91
81
  clearTimeout(killTimer);
92
82
  adapter.log.debug("timer killed");
@@ -96,31 +86,75 @@ async function main() {
96
86
 
97
87
  }
98
88
 
89
+ let oPolledVars = [];
90
+ function FillPolledVars() {
99
91
 
92
+ if (typeof adapter.config.PolledDPs !== 'undefined' && adapter.config.PolledDPs != null && adapter.config.PolledDPs.length > 0) {
93
+ adapter.log.debug("use new object list for polled vars");
94
+ oPolledVars = adapter.config.PolledDPs;
95
+ }
96
+ else {
97
+ //make it compatible to old versions
98
+ adapter.log.debug("check old comma separeted list for polled vars");
99
+ const oPolled = adapter.config.PolledValues.split(",");
100
+
101
+ if (oPolled.length > 0) {
102
+
103
+ for (let i = 0; i < oPolled.length; i++) {
104
+ console.log('add ' + oPolled[i]);
105
+ const value = {
106
+ circuit: "",
107
+ name: oPolled[i],
108
+ parameter: ""
109
+ }
110
+ oPolledVars.push(value);
111
+ }
112
+ }
113
+ }
114
+ }
100
115
 
101
- async function Common_checkVariables() {
116
+ let oHistoryVars = [];
117
+ function FillHistoryVars() {
118
+
119
+ if (typeof adapter.config.HistoryDPs !== 'undefined' && adapter.config.HistoryDPs != null && adapter.config.HistoryDPs.length > 0) {
120
+ adapter.log.debug("use new object list for history vars");
121
+ oHistoryVars = adapter.config.HistoryDPs;
122
+ }
123
+ else {
124
+ //make it compatible to old versions
125
+ adapter.log.debug("check old comma separeted list for history vars");
126
+ const oHistory = adapter.config.HistoryValues.split(",");
102
127
 
103
- // histories
104
- let nCtr = 0;
128
+ if (oHistory.length > 0) {
129
+
130
+ for (let i = 0; i < oHistory.length; i++) {
131
+ console.log('add ' + oHistory[i]);
132
+ const value = {
133
+ name: oHistory[i],
134
+ }
135
+ oHistoryVars.push(value);
136
+ }
137
+ }
138
+ }
139
+ }
105
140
 
106
- const oHistory = adapter.config.HistoryValues.split(",");
107
- nCtr = oHistory.length;
108
141
 
109
- adapter.log.debug("init common variables and " + nCtr + " history DP's");
142
+ async function Common_checkVariables() {
143
+
144
+ adapter.log.debug("init common variables and " + oHistoryVars.length + " history DP's");
110
145
  let key;
111
146
  let obj;
112
- //adapter.log.debug("_____ ctr " + nCtr);
113
147
 
114
- if (adapter.config.HistoryValues.length>0 && nCtr > 0) {
148
+ if (oHistoryVars.length > 0) {
115
149
 
116
- if (nCtr > 4) {
117
- adapter.log.warn("too many history values " + nCtr + " -> maximum is 4");
150
+ if (oHistoryVars.length > 4) {
151
+ adapter.log.warn("too many history values " + oHistoryVars.length + " -> maximum is 4");
118
152
  }
119
153
 
120
- for (let n = 1; n <= nCtr; n++) {
154
+ for (let n = 1; n <= oHistoryVars.length; n++) {
121
155
 
122
- if (oHistory[n - 1].length > 0) {
123
- const name = "history value " + n + " as JSON " + oHistory[n - 1];
156
+ if (oHistoryVars[n - 1].name.length > 0) {
157
+ const name = "history value " + n + " as JSON " + oHistoryVars[n - 1].name;
124
158
  key = "history.value" + n;
125
159
  await adapter.setObjectNotExistsAsync(key, {
126
160
  type: "state",
@@ -191,9 +225,6 @@ async function Common_checkVariables() {
191
225
  });
192
226
  }
193
227
  }
194
-
195
-
196
-
197
228
  }
198
229
 
199
230
 
@@ -206,50 +237,55 @@ async function ebusd_Command() {
206
237
  const obj = await adapter.getStateAsync("cmd");
207
238
 
208
239
  if (typeof obj != undefined && obj != null) {
209
- const cmd = obj.val;
210
- if (cmd !== "") {
211
- adapter.log.debug("got command " + cmd);
240
+ const cmds = obj.val;
241
+ if (cmds !== "") {
242
+ adapter.log.debug("got command(s): " + cmds);
212
243
 
213
244
  adapter.log.debug("connect telnet to IP " + adapter.config.targetIP + " port " + parseInt(adapter.config.targetTelnetPort));
214
245
 
215
-
216
- const socket = new net.Socket();
217
- const promiseSocket = new PromiseSocket(socket);
218
-
219
246
  try {
247
+ const socket = new net.Socket();
248
+ const promiseSocket = new PromiseSocket(socket);
249
+
220
250
  await promiseSocket.connect(parseInt(adapter.config.targetTelnetPort), adapter.config.targetIP);
221
251
  adapter.log.debug("telnet connected for cmd");
222
252
  promiseSocket.setTimeout(5000);
223
253
 
224
- await promiseSocket.write(cmd + "\n");
254
+ const oCmds = cmds.split(",");
225
255
 
226
- const data = await promiseSocket.read();
256
+ if (oCmds.length > 0) {
257
+ let received = "";
258
+ for (let n = 0; n < oCmds.length; n++) {
227
259
 
228
- adapter.log.debug("received " + data);
260
+ adapter.log.debug("send " + oCmds[n]);
261
+ await promiseSocket.write(oCmds[n] + "\n");
229
262
 
230
- //set result to cmdResult
231
- await adapter.setStateAsync("cmdResult", { ack: true, val: data.toString() });
232
- //aufruf next step
233
- //ebusd_ReadValues(options); // to trigger read over ebus
263
+ const data = await promiseSocket.read();
234
264
 
265
+ if (data.includes("ERR")) {
266
+ adapter.log.error("sent " + oCmds[n] + ", received " + data);
267
+ }
268
+ else {
269
+ adapter.log.debug("received " + data);
270
+ }
271
+ received += data.toString();
272
+ received += ", ";
273
+ }
274
+
275
+ //set result to cmdResult
276
+ await adapter.setStateAsync("cmdResult", { ack: true, val: received });
277
+ }
278
+ else {
279
+ adapter.log.warn("no commands in list " + cmds + " " + JSON.stringify(oCmds));
280
+ }
235
281
  await adapter.setStateAsync("cmd", { ack: true, val: "" });
236
282
 
283
+ promiseSocket.destroy();
284
+
237
285
  } catch (e) {
238
- //if (e instanceof TimeoutError) {
239
- // adapter.log.error("Socket timeout");
240
- //}
241
- //else {
242
286
  adapter.log.error("exception from tcp socket" + "[" + e + "]");
243
- //}
244
287
  }
245
-
246
- promiseSocket.destroy();
247
-
248
-
249
-
250
-
251
288
  }
252
-
253
289
  }
254
290
  else {
255
291
  adapter.log.debug("object cmd not found " + JSON.stringify(obj));
@@ -363,8 +399,6 @@ async function ebusd_ReceiveData() {
363
399
 
364
400
  //adapter.log.debug("history: " + options.historyValues);
365
401
 
366
- const oHistory = adapter.config.HistoryValues.split(",");
367
-
368
402
  const historyvalues = [];
369
403
  const historydates = [];
370
404
 
@@ -447,7 +481,7 @@ async function ebusd_ReceiveData() {
447
481
  let value = newData[org_key];
448
482
 
449
483
  if (value == null || value == undefined) {
450
- adapter.log.warn('Key : ' + key + ', Value : ' + newData[org_key] + " name " + name);
484
+ adapter.log.debug('Key : ' + key + ', Value : ' + newData[org_key] + " name " + name);
451
485
  }
452
486
 
453
487
 
@@ -493,9 +527,9 @@ async function ebusd_ReceiveData() {
493
527
  if (!subnames[temp - 2].includes("sensor") //ignore sensor states
494
528
  && !subnames[temp - 2].includes("mirror") //ignore mirror-data
495
529
  ) {
496
- for (let ii = 0; ii < oHistory.length; ii++) {
530
+ for (let ii = 0; ii < oHistoryVars.length; ii++) {
497
531
 
498
- if (name === oHistory[ii]) {
532
+ if (name === oHistoryVars[ii].name) {
499
533
 
500
534
  const sTemp = '{"' + name + '": "' + value + '"}';
501
535
  //adapter.log.debug(sTemp);
@@ -586,7 +620,7 @@ async function ebusd_ReceiveData() {
586
620
 
587
621
  async function UpdateHistory(values, dates) {
588
622
 
589
- if (adapter.config.HistoryValues.length > 0) {
623
+ if (oHistoryVars.length > 0) {
590
624
  //prüfen ob alle json gleich lang sind
591
625
  let NoOfDates = -1;
592
626
 
@@ -625,13 +659,11 @@ async function UpdateHistory(values, dates) {
625
659
  await adapter.setStateAsync("history.date", { ack: true, val: "[]" });
626
660
  NoOfDates = 0;
627
661
  }
662
+
663
+ if (oHistoryVars.length > 0) {
664
+ for (let ctr = 1; ctr <= oHistoryVars.length; ctr++) {
628
665
 
629
- const oHistory = adapter.config.HistoryValues.split(",");
630
-
631
- if (oHistory.length > 0) {
632
- for (let ctr = 1; ctr <= oHistory.length; ctr++) {
633
-
634
- if (oHistory[ctr - 1].length > 0) {
666
+ if (oHistoryVars[ctr - 1].name.length > 0) {
635
667
  const ctrOkay = await UpdateHistoryValues(values, ctr, NoOfDates);
636
668
 
637
669
  if (!ctrOkay) {
@@ -796,38 +828,42 @@ find -f YieldTotal
796
828
  read -f YieldTotal
797
829
  read LegioProtectionEnabled
798
830
 
831
+ read -f YieldTotal,read LegioProtectionEnabled,read -f -c broadcast outsidetemp
832
+
799
833
  */
800
834
 
801
835
 
802
836
  //this function just triggers ebusd to read data; result will not be parsed; we just take the values from http result
803
837
  //here we need a loop over all configured read data in admin-page
804
838
  async function ebusd_ReadValues() {
805
-
806
839
 
807
- //adapter.log.debug("polled: " + options.polledValues);
808
- //adapter.log.debug("history: " + options.historyValues);
840
+
809
841
 
810
- const oPolled = adapter.config.PolledValues.split(",");
811
- let nCtr = 0;
812
842
 
813
- if (oPolled.length > 0 && adapter.config.PolledValues.length>0) {
814
843
 
815
- adapter.log.debug("to poll ctr " + oPolled.length + " vals: " + oPolled + " org " + adapter.config.PolledValues + " org length " + adapter.config.PolledValues.length);
844
+ if (oPolledVars.length > 0) {
816
845
 
817
- const socket = new net.Socket();
818
- const promiseSocket = new PromiseSocket(socket);
846
+ adapter.log.debug("to poll ctr " + oPolledVars.length + " vals: " + JSON.stringify(oPolledVars));
819
847
 
820
848
  try {
849
+ const socket = new net.Socket();
850
+ const promiseSocket = new PromiseSocket(socket);
851
+
821
852
  await promiseSocket.connect(parseInt(adapter.config.targetTelnetPort), adapter.config.targetIP);
822
- adapter.log.debug("telnet connected for cmd");
853
+ adapter.log.debug("telnet connected to poll variables " + adapter.config.targetIP + " port " + adapter.config.targetTelnetPort);
823
854
  promiseSocket.setTimeout(5000);
824
855
 
856
+ for (let nCtr = 0; nCtr < oPolledVars.length; nCtr++) {
825
857
 
826
-
827
-
828
- for (nCtr = 0; nCtr < oPolled.length; nCtr++) {
829
-
830
- let cmd = "read -f " + oPolled[nCtr];
858
+ let circuit = "";
859
+ let params = "";
860
+ if (oPolledVars[nCtr].circuit != null && oPolledVars[nCtr].circuit.length > 0) {
861
+ circuit = "-c " + oPolledVars[nCtr].circuit;
862
+ }
863
+ if (oPolledVars[nCtr].parameter != null && oPolledVars[nCtr].parameter.length > 0) {
864
+ params = " " + oPolledVars[nCtr].parameter;
865
+ }
866
+ let cmd = "read -f " + circuit + oPolledVars[nCtr].name + params;
831
867
 
832
868
  adapter.log.debug("send cmd " + cmd);
833
869
 
@@ -836,23 +872,25 @@ async function ebusd_ReadValues() {
836
872
 
837
873
  const data = await promiseSocket.read();
838
874
 
839
- adapter.log.debug("received " + data + " for " + oPolled[nCtr]);
840
-
875
+ //received ERR: arbitration lost for YieldThisYear
876
+ if (data.includes("ERR")) {
877
+ adapter.log.error("sent " + cmd + ", received " + data + " for " + JSON.stringify(oPolledVars[nCtr]));
878
+ }
879
+ else {
880
+ adapter.log.debug("received " + data + " for " + JSON.stringify(oPolledVars[nCtr]));
881
+ }
841
882
  }
883
+ promiseSocket.destroy();
884
+ adapter.log.debug("telnet disonnected");
842
885
 
843
886
  } catch (e) {
844
887
  adapter.log.error("exception from tcp socket in ebusd_ReadValues " + "[" + e + "]");
845
888
  }
846
889
 
847
- promiseSocket.destroy();
848
-
849
890
 
850
-
851
891
  }
852
892
  else {
853
893
  adapter.log.debug("nothing to poll; skip telnet");
854
-
855
- //ebusd_StartReceive(options);
856
894
  }
857
895
 
858
896
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.ebus",
3
- "version": "2.3.2",
3
+ "version": "2.4.0",
4
4
  "description": "ioBroker ebus Adapter",
5
5
  "author": {
6
6
  "name": "René G.",
@@ -21,31 +21,31 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@iobroker/adapter-core": "2.5.1",
24
- "@sentry/node": "6.11.0",
24
+ "@sentry/node": "6.13.3",
25
25
  "bent": "7.3.12",
26
26
  "flat": "5.0.2",
27
27
  "net": "1.0.2",
28
28
  "promise-socket": "7.0.0"
29
29
  },
30
30
  "devDependencies": {
31
- "@iobroker/testing": "2.4.4",
32
- "@types/chai": "4.2.19",
31
+ "@iobroker/testing": "2.5.2",
32
+ "@types/chai": "4.2.22",
33
33
  "@types/chai-as-promised": "7.1.4",
34
- "@types/gulp": "4.0.8",
35
- "@types/mocha": "8.2.2",
36
- "@types/node": "12.20.15",
34
+ "@types/gulp": "4.0.9",
35
+ "@types/mocha": "9.0.0",
36
+ "@types/node": "12.20.33",
37
37
  "@types/proxyquire": "1.3.28",
38
- "@types/request-promise-native": "1.0.17",
39
- "@types/sinon": "10.0.2",
38
+ "@types/request-promise-native": "1.0.18",
39
+ "@types/sinon": "10.0.4",
40
40
  "@types/sinon-chai": "3.2.5",
41
- "axios": "0.21.1",
41
+ "axios": "0.23.0",
42
42
  "chai": "4.3.4",
43
43
  "chai-as-promised": "7.1.1",
44
- "eslint": "7.29.0",
44
+ "eslint": "8.0.1",
45
45
  "gulp": "4.0.2",
46
- "mocha": "9.0.1",
46
+ "mocha": "9.1.3",
47
47
  "proxyquire": "2.1.3",
48
- "sinon": "11.1.1",
48
+ "sinon": "11.1.2",
49
49
  "sinon-chai": "3.7.0"
50
50
  },
51
51
  "main": "main.js",