iobroker.ebus 2.5.0 → 2.5.1

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
@@ -30,7 +30,7 @@ There is a possibillity to poll data which are not polled by ebusd directly. Com
30
30
 
31
31
  Another feature is to send any command to ebusd and receive answer to work with e.g. scripts.
32
32
 
33
- current supported ebusd-version: 21.2
33
+ current supported ebusd-version: 21.3
34
34
 
35
35
 
36
36
  ## how to send commands to ebusd
@@ -52,7 +52,10 @@ Attention: command in datapoint ebus.0.cmd is deleted after executing of command
52
52
 
53
53
  ## Changelog
54
54
 
55
- ### 2.5.0 (in progress)
55
+ ### 2.5.1 (in progress)
56
+ * (René) adjustable retries to send data if arbitration error appeared
57
+
58
+ ### 2.5.0 (2021-12-28)
56
59
  * (René) see issue #62: support ebusd 21.3
57
60
 
58
61
  ### 2.4.5 (2021-11-07)
@@ -273,30 +273,14 @@
273
273
  <label for="parseTimeout" class="translate">parse_timeout</label>
274
274
  </div>
275
275
  </div>
276
+ <div class="row">
277
+ <div class="input-field col s12 m4 l3">
278
+ <input class="value number" id="maxretries" size="3" maxlength="3" type="number" min="0" max="10" />
279
+ <label for="maxretries" class="translate">maxretries</label>
280
+ </div>
281
+ </div>
276
282
 
277
- <!--
278
- <div class="row">
279
- <div class="input-field col s6">
280
- <textarea class="value materialize-textarea polled" id="PolledValues"></textarea>
281
- <label class="translate" for="PolledValues">ListOfAllPolledValues</label>
282
- </div>
283
-
284
- <div class="col s6">
285
- <span class="translate">hint_ebusd_polled</span>
286
- </div>
287
- </div>
288
-
289
- <div class="row">
290
- <div class="input-field col s6">
291
- <textarea class="value materialize-textarea polled" id="HistoryValues"></textarea>
292
- <label class="translate" for="HistoryValues">ListOfAllHistoryValues</label>
293
- </div>
294
-
295
- <div class="col s6">
296
- <span class="translate">hint_ebusd_history</span>
297
- </div>
298
- </div>
299
- -->
283
+
300
284
 
301
285
  </div>
302
286
 
package/admin/words.js CHANGED
@@ -16,4 +16,5 @@ systemDictionary = {
16
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"},
17
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用于写入数据的端口"},
18
18
  "useBoolean4Onoff": { "en": "use boolean instead string for datapoints with on/off values ", "de": "Verwenden Sie Boolean anstelle von Strings für Datenpunkte mit Ein-/Aus-Werten", "ru": "используйте логическое значение вместо строки для точек данных со значениями включения / выключения", "pt": "use booleano em vez de string para pontos de dados com valores on / off", "nl": "gebruik in plaats daarvan booleaanse string voor datapunten met aan/uit-waarden", "fr": "utiliser une chaîne booléenne à la place pour les points de données avec des valeurs activées/désactivées", "it": "usa la stringa booleana invece per i punti dati con valori on/off", "es": "use booleano en lugar de cadena para puntos de datos con valores de encendido / apagado", "pl": "użyj wartości logicznej zamiast ciągu dla punktów danych z wartościami włączonymi / wyłączonymi", "zh-cn": "对具有开/关值的数据点使用布尔值代替字符串"},
19
+ "maxretries": { "en": "maximum number of retries to send a command ", "de": "maximale Anzahl von Wiederholungen, um einen Befehl zu senden", "ru": "максимальное количество попыток отправки команды", "pt": "número máximo de tentativas para enviar um comando", "nl": "maximum aantal pogingen om een ​​opdracht te verzenden", "fr": "nombre maximum de tentatives pour envoyer une commande", "it": "numero massimo di tentativi per inviare un comando", "es": "número máximo de reintentos para enviar un comando", "pl": "maksymalna liczba ponownych prób wysłania polecenia", "zh-cn": "发送命令的最大重试次数"},
19
20
  };
package/io-package.json CHANGED
@@ -1,8 +1,20 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "ebus",
4
- "version": "2.5.0",
4
+ "version": "2.5.1",
5
5
  "news": {
6
+ "2.5.1": {
7
+ "en": "maximum retries to send data in case of arbitration error",
8
+ "de": "maximale Wiederholungsversuche zum Senden von Daten im Falle eines Vermittlungsfehlers",
9
+ "ru": "максимальное количество попыток отправки данных в случае ошибки арбитража",
10
+ "pt": "máximo de tentativas para enviar dados em caso de erro de arbitragem",
11
+ "nl": "maximaal aantal pogingen om gegevens te verzenden in geval van arbitragefout",
12
+ "fr": "nombre maximum de tentatives d'envoi de données en cas d'erreur d'arbitrage",
13
+ "it": "numero massimo di tentativi di invio dei dati in caso di errore di arbitrato",
14
+ "es": "reintentos máximos para enviar datos en caso de error de arbitraje",
15
+ "pl": "maksymalna liczba prób wysłania danych w przypadku błędu arbitrażu",
16
+ "zh-cn": "仲裁错误时发送数据的最大重试次数"
17
+ },
6
18
  "2.5.0": {
7
19
  "en": "support ebusd 21.3",
8
20
  "de": "ebusd 21,3 . unterstützen",
@@ -229,6 +241,7 @@
229
241
  "parseTimeout": 60,
230
242
  "useBoolean4Onoff": false,
231
243
  "PolledDPs": [],
232
- "HistoryDPs": []
244
+ "HistoryDPs": [],
245
+ "maxretries": 5
233
246
  }
234
247
  }
package/main.js CHANGED
@@ -844,10 +844,6 @@ read -f YieldTotal,read LegioProtectionEnabled,read -f -c broadcast outsidetemp
844
844
  //here we need a loop over all configured read data in admin-page
845
845
  async function ebusd_ReadValues() {
846
846
 
847
-
848
-
849
-
850
-
851
847
  if (oPolledVars.length > 0) {
852
848
 
853
849
  adapter.log.debug("to poll ctr " + oPolledVars.length + " vals: " + JSON.stringify(oPolledVars));
@@ -860,6 +856,7 @@ async function ebusd_ReadValues() {
860
856
  adapter.log.debug("telnet connected to poll variables " + adapter.config.targetIP + " port " + adapter.config.targetTelnetPort);
861
857
  promiseSocket.setTimeout(5000);
862
858
 
859
+ let retries = 0;
863
860
  for (let nCtr = 0; nCtr < oPolledVars.length; nCtr++) {
864
861
 
865
862
  let circuit = "";
@@ -887,7 +884,16 @@ async function ebusd_ReadValues() {
887
884
  * sent read -f YieldLastYear, received ERR: arbitration lost for {"circuit":"","name":"YieldLastYear","parameter":""}
888
885
  * */
889
886
  if (data.includes("arbitration lost")) {
890
- nCtr--;
887
+
888
+ retries++;
889
+ if (retries > adapter.config.maxretries) {
890
+ adapter.log.error("max retries, skip cmd " + cmd);
891
+ retries = 0;
892
+ }
893
+ else {
894
+ nCtr--;
895
+ adapter.log.debug("retry to send data ");
896
+ }
891
897
  }
892
898
  }
893
899
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.ebus",
3
- "version": "2.5.0",
3
+ "version": "2.5.1",
4
4
  "description": "ioBroker ebus Adapter",
5
5
  "author": {
6
6
  "name": "René G.",