iobroker.ebus 2.5.1 → 3.0.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/.github/workflows/test-and-release.yml +5 -5
- package/LICENSE +1 -1
- package/README.md +10 -3
- package/admin/words.js +1 -1
- package/io-package.json +33 -160
- package/main.js +184 -99
- package/package.json +16 -16
|
@@ -28,7 +28,7 @@ jobs:
|
|
|
28
28
|
node-version: [12.x]
|
|
29
29
|
|
|
30
30
|
steps:
|
|
31
|
-
- uses: actions/checkout@
|
|
31
|
+
- uses: actions/checkout@v2
|
|
32
32
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
33
33
|
uses: actions/setup-node@v1
|
|
34
34
|
with:
|
|
@@ -58,7 +58,7 @@ jobs:
|
|
|
58
58
|
- os: windows-latest
|
|
59
59
|
node-version: 8.x
|
|
60
60
|
steps:
|
|
61
|
-
- uses: actions/checkout@
|
|
61
|
+
- uses: actions/checkout@v2
|
|
62
62
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
63
63
|
uses: actions/setup-node@v1
|
|
64
64
|
with:
|
|
@@ -78,7 +78,7 @@ jobs:
|
|
|
78
78
|
if: startsWith(runner.OS, 'windows')
|
|
79
79
|
run: set DEBUG=testing:* & npm run test:integration
|
|
80
80
|
|
|
81
|
-
# TODO: To enable automatic npm releases, create a token on npmjs.org
|
|
81
|
+
# TODO: To enable automatic npm releases, create a token on npmjs.org
|
|
82
82
|
# Enter this token as a GitHub secret (with name NPM_TOKEN) in the repository options
|
|
83
83
|
# Then uncomment the following block:
|
|
84
84
|
|
|
@@ -90,7 +90,7 @@ jobs:
|
|
|
90
90
|
# if: |
|
|
91
91
|
# contains(github.event.head_commit.message, '[skip ci]') == false &&
|
|
92
92
|
# github.event_name == 'push' &&
|
|
93
|
-
#
|
|
93
|
+
# github.event.base_ref == 'refs/heads/master' &&
|
|
94
94
|
# startsWith(github.ref, 'refs/tags/v')
|
|
95
95
|
#
|
|
96
96
|
# runs-on: ubuntu-latest
|
|
@@ -99,7 +99,7 @@ jobs:
|
|
|
99
99
|
# node-version: [12.x]
|
|
100
100
|
#
|
|
101
101
|
# steps:
|
|
102
|
-
# - uses: actions/checkout@
|
|
102
|
+
# - uses: actions/checkout@v2
|
|
103
103
|
# - name: Use Node.js ${{ matrix.node-version }}
|
|
104
104
|
# uses: actions/setup-node@v1
|
|
105
105
|
# with:
|
package/LICENSE
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Copyright (C) <2017 -
|
|
1
|
+
Copyright (C) <2017 - 2022> <info@rg-engineering.eu>
|
|
2
2
|
|
|
3
3
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
4
|
|
package/README.md
CHANGED
|
@@ -30,7 +30,10 @@ 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:
|
|
33
|
+
current supported ebusd-version: 22.2
|
|
34
|
+
|
|
35
|
+
**Attention** with ebusd - version 22.1 config path has been changed to http://cfg.ebusd.eu/. Make sure you change it in your installation of ebusd.
|
|
36
|
+
details see in [changelog](https://github.com/john30/ebusd/blob/master/ChangeLog.md)
|
|
34
37
|
|
|
35
38
|
|
|
36
39
|
## how to send commands to ebusd
|
|
@@ -52,7 +55,11 @@ Attention: command in datapoint ebus.0.cmd is deleted after executing of command
|
|
|
52
55
|
|
|
53
56
|
## Changelog
|
|
54
57
|
|
|
55
|
-
###
|
|
58
|
+
### 3.0.0 (2022-04-02)
|
|
59
|
+
* (René) **ATTENTION** change from scheduled to daemon adapter
|
|
60
|
+
* (René) bent by axios replaced
|
|
61
|
+
|
|
62
|
+
### 2.5.1 (2021-12-29)
|
|
56
63
|
* (René) adjustable retries to send data if arbitration error appeared
|
|
57
64
|
|
|
58
65
|
### 2.5.0 (2021-12-28)
|
|
@@ -171,7 +178,7 @@ Attention: command in datapoint ebus.0.cmd is deleted after executing of command
|
|
|
171
178
|
* (René) initial release
|
|
172
179
|
|
|
173
180
|
## License
|
|
174
|
-
Copyright (C) <2017 -
|
|
181
|
+
Copyright (C) <2017 - 2022> <info@rg-engineering.eu>
|
|
175
182
|
|
|
176
183
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
177
184
|
|
package/admin/words.js
CHANGED
|
@@ -9,6 +9,7 @@ systemDictionary = {
|
|
|
9
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
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
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
|
+
"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": "发送命令的最大重试次数"},
|
|
12
13
|
"name": { "en": "name", "de": "Name", "ru": "имя", "pt": "nome", "nl": "naam", "fr": "Nom", "it": "nome", "es": "nombre", "pl": "Nazwa", "zh-cn": "姓名"},
|
|
13
14
|
"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
15
|
"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": "轮询数据点"},
|
|
@@ -16,5 +17,4 @@ systemDictionary = {
|
|
|
16
17
|
"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
18
|
"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
19
|
"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": "发送命令的最大重试次数"},
|
|
20
20
|
};
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "ebus",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "3.0.0",
|
|
5
5
|
"news": {
|
|
6
|
+
"3.0.0": {
|
|
7
|
+
"en": "from 'scheduled' to 'daemon' adapter changed",
|
|
8
|
+
"de": "von 'geplant' zu 'daemon' Adapter geändert",
|
|
9
|
+
"ru": "изменен адаптер с «запланированного» на «демон»",
|
|
10
|
+
"pt": "adaptador 'agendado' para 'daemon' alterado",
|
|
11
|
+
"nl": "van 'scheduled' naar 'daemon' adapter gewijzigd",
|
|
12
|
+
"fr": "de l'adaptateur 'scheduled' à 'daemon' changé",
|
|
13
|
+
"it": "adattatore da \"programmato\" a \"demone\" modificato",
|
|
14
|
+
"es": "Se cambió el adaptador de 'programado' a 'daemon'",
|
|
15
|
+
"pl": "Zmieniono adapter z „zaplanowanego” na „demon”",
|
|
16
|
+
"zh-cn": "从 'scheduled' 到 'daemon' 适配器已更改"
|
|
17
|
+
},
|
|
18
|
+
"2.6.0": {
|
|
19
|
+
"en": " 'bent' replaced by 'axios'",
|
|
20
|
+
"de": "'bent' ersetzt durch 'axios'",
|
|
21
|
+
"ru": "«согнутый» заменен на «аксиос»",
|
|
22
|
+
"pt": "'curvado' substituído por 'axios'",
|
|
23
|
+
"nl": "'gebogen' vervangen door 'axios'",
|
|
24
|
+
"fr": "'plié' remplacé par 'axios'",
|
|
25
|
+
"it": "'piegato' sostituito da 'assios'",
|
|
26
|
+
"es": "'doblado' reemplazado por 'axios'",
|
|
27
|
+
"pl": "„wygięty” zastąpiony przez „axios”",
|
|
28
|
+
"zh-cn": "'bent' 替换为 'axios'"
|
|
29
|
+
},
|
|
6
30
|
"2.5.1": {
|
|
7
31
|
"en": "maximum retries to send data in case of arbitration error",
|
|
8
32
|
"de": "maximale Wiederholungsversuche zum Senden von Daten im Falle eines Vermittlungsfehlers",
|
|
@@ -14,162 +38,6 @@
|
|
|
14
38
|
"es": "reintentos máximos para enviar datos en caso de error de arbitraje",
|
|
15
39
|
"pl": "maksymalna liczba prób wysłania danych w przypadku błędu arbitrażu",
|
|
16
40
|
"zh-cn": "仲裁错误时发送数据的最大重试次数"
|
|
17
|
-
},
|
|
18
|
-
"2.5.0": {
|
|
19
|
-
"en": "support ebusd 21.3",
|
|
20
|
-
"de": "ebusd 21,3 . unterstützen",
|
|
21
|
-
"ru": "поддержка ebusd 21.3",
|
|
22
|
-
"pt": "suporte ebusd 21.3",
|
|
23
|
-
"nl": "ondersteuning ebusd 21.3",
|
|
24
|
-
"fr": "soutien ebusd 21.3",
|
|
25
|
-
"it": "supporto ebusd 21.3",
|
|
26
|
-
"es": "soporte ebusd 21.3",
|
|
27
|
-
"pl": "wsparcie ebusd 21.3",
|
|
28
|
-
"zh-cn": "支持 ebusd 21.3"
|
|
29
|
-
},
|
|
30
|
-
"2.4.5": {
|
|
31
|
-
"en": "bug fix color of labels in widget",
|
|
32
|
-
"de": "Fehlerkorrektur Farbe der Labels im Widget",
|
|
33
|
-
"ru": "исправлена ошибка цвета меток в виджете",
|
|
34
|
-
"pt": "correção de bug de cor de rótulos no widget",
|
|
35
|
-
"nl": "bug fix kleur van labels in widget",
|
|
36
|
-
"fr": "correction de bogues couleur des étiquettes dans le widget",
|
|
37
|
-
"it": "bug fix colore delle etichette nel widget",
|
|
38
|
-
"es": "corrección de errores de color de las etiquetas en el widget",
|
|
39
|
-
"pl": "naprawa błędu koloru etykiet w widżecie",
|
|
40
|
-
"zh-cn": "错误修复小部件中标签的颜色"
|
|
41
|
-
},
|
|
42
|
-
"2.4.4": {
|
|
43
|
-
"en": "avoid endles loops",
|
|
44
|
-
"de": "Endlosschleifen vermeiden",
|
|
45
|
-
"ru": "избегать петель endles",
|
|
46
|
-
"pt": "evite loops de endles",
|
|
47
|
-
"nl": "vermijd eindeloze lussen",
|
|
48
|
-
"fr": "éviter les boucles sans fin",
|
|
49
|
-
"it": "evita i loop infiniti",
|
|
50
|
-
"es": "evitar bucles endles",
|
|
51
|
-
"pl": "unikaj niekończących się pętli",
|
|
52
|
-
"zh-cn": "避免无限循环"
|
|
53
|
-
},
|
|
54
|
-
"2.4.3": {
|
|
55
|
-
"en": "small bugs solved",
|
|
56
|
-
"de": "kleine Fehler behoben",
|
|
57
|
-
"ru": "исправлены мелкие ошибки",
|
|
58
|
-
"pt": "pequenos bugs resolvidos",
|
|
59
|
-
"nl": "kleine bugs opgelost",
|
|
60
|
-
"fr": "petits bugs résolus",
|
|
61
|
-
"it": "piccoli bug risolti",
|
|
62
|
-
"es": "pequeños errores resueltos",
|
|
63
|
-
"pl": "małe błędy rozwiązane",
|
|
64
|
-
"zh-cn": "小错误已解决"
|
|
65
|
-
},
|
|
66
|
-
"2.4.0": {
|
|
67
|
-
"en": "overwork handling of read and history datapoints; support of list of commands ",
|
|
68
|
-
"de": "Überarbeitung von Lese- und Verlaufsdatenpunkten; ",
|
|
69
|
-
"ru": "чрезмерная работа с точками чтения и истории; ",
|
|
70
|
-
"pt": "excesso de trabalho no manuseio de pontos de dados de leitura e histórico; ",
|
|
71
|
-
"nl": "overwerk afhandeling van lees- en geschiedenisdatapunten; ",
|
|
72
|
-
"fr": "traitement excessif des points de données de lecture et d'historique ; ",
|
|
73
|
-
"it": "gestione del lavoro eccessivo dei punti dati di lettura e cronologia; ",
|
|
74
|
-
"es": "manejo de exceso de trabajo de los puntos de datos de lectura e historial; ",
|
|
75
|
-
"pl": "przepracowanie obsługi odczytanych i historycznych punktów danych; ",
|
|
76
|
-
"zh-cn": "读取和历史数据点的过度处理;"
|
|
77
|
-
},
|
|
78
|
-
"2.3.1": {
|
|
79
|
-
"en": "support for ebusd 21.2",
|
|
80
|
-
"de": "unterstützung für ebusd 21.2",
|
|
81
|
-
"ru": "поддержка ebusd 21.2",
|
|
82
|
-
"pt": "suporte para ebusd 21.2",
|
|
83
|
-
"nl": "ondersteuning voor ebusd 21.2",
|
|
84
|
-
"fr": "prise en charge d'ebusd 21.2",
|
|
85
|
-
"it": "supporto per ebusd 21.2",
|
|
86
|
-
"es": "soporte para ebusd 21.2",
|
|
87
|
-
"pl": "obsługa ebusd 21,2",
|
|
88
|
-
"zh-cn": "支持 ebusd 21.2"
|
|
89
|
-
},
|
|
90
|
-
"2.2.7": {
|
|
91
|
-
"en": "bug fix for wrong data type logs",
|
|
92
|
-
"de": "Bugfix für falsche Datentyp-Logs",
|
|
93
|
-
"ru": "исправление ошибки для журналов неправильного типа данных",
|
|
94
|
-
"pt": "correção de bug para registros de tipo de dados errado",
|
|
95
|
-
"nl": "bugfix voor logs van verkeerde gegevenstypes",
|
|
96
|
-
"fr": "correction de bogues pour les journaux de type de données incorrect",
|
|
97
|
-
"it": "correzione di bug per log di tipi di dati errati",
|
|
98
|
-
"es": "corrección de errores para registros de tipo de datos incorrectos",
|
|
99
|
-
"pl": "poprawka błędów w logach z nieprawidłowymi typami danych",
|
|
100
|
-
"zh-cn": "错误数据类型日志的错误修复"
|
|
101
|
-
},
|
|
102
|
-
"2.2.5": {
|
|
103
|
-
"en": "dependencies updated",
|
|
104
|
-
"de": "Abhängigkeiten aktualisiert",
|
|
105
|
-
"ru": "зависимости обновлены",
|
|
106
|
-
"pt": "dependências atualizadas",
|
|
107
|
-
"nl": "afhankelijkheden bijgewerkt",
|
|
108
|
-
"fr": "dépendances mises à jour",
|
|
109
|
-
"it": "dipendenze aggiornate",
|
|
110
|
-
"es": "dependencias actualizadas",
|
|
111
|
-
"pl": "zaktualizowane zależności",
|
|
112
|
-
"zh-cn": "依赖关系已更新"
|
|
113
|
-
},
|
|
114
|
-
"2.2.4": {
|
|
115
|
-
"en": "bug fix: exception in widget removed",
|
|
116
|
-
"de": "Fehlerbehebung: Ausnahme im Widget entfernt",
|
|
117
|
-
"ru": "исправление ошибки: исключение в виджете удалено",
|
|
118
|
-
"pt": "correção de bug: exceção no widget removida",
|
|
119
|
-
"nl": "bug fix: uitzondering in widget verwijderd",
|
|
120
|
-
"fr": "correction de bogue: exception dans le widget supprimée",
|
|
121
|
-
"it": "correzione bug: eccezione nel widget rimossa",
|
|
122
|
-
"es": "corrección de errores: excepción en el widget eliminado",
|
|
123
|
-
"pl": "poprawka: wyjątek w widżecie został usunięty",
|
|
124
|
-
"zh-cn": "错误修复:删除了小部件中的异常"
|
|
125
|
-
},
|
|
126
|
-
"2.2.3": {
|
|
127
|
-
"en": "create history DP if not available ",
|
|
128
|
-
"de": "History-DP erstellen, falls nicht verfügbar",
|
|
129
|
-
"ru": "создать историю DP, если недоступен",
|
|
130
|
-
"pt": "criar histórico DP se não estiver disponível",
|
|
131
|
-
"nl": "maak een geschiedenis-DP als deze niet beschikbaar is",
|
|
132
|
-
"fr": "créer l'historique DP s'il n'est pas disponible",
|
|
133
|
-
"it": "creare la cronologia DP se non disponibile",
|
|
134
|
-
"es": "crear historial DP si no está disponible",
|
|
135
|
-
"pl": "utwórz historię DP, jeśli nie jest dostępna",
|
|
136
|
-
"zh-cn": "创建历史记录DP(如果不可用)"
|
|
137
|
-
},
|
|
138
|
-
"2.2.0": {
|
|
139
|
-
"en": "change DP only if necessary to reduce system load",
|
|
140
|
-
"de": "Ändern Sie den DP nur bei Bedarf, um die Systemlast zu verringern",
|
|
141
|
-
"ru": "изменяйте DP только в случае необходимости для снижения нагрузки на систему",
|
|
142
|
-
"pt": "mude DP apenas se necessário para reduzir a carga do sistema",
|
|
143
|
-
"nl": "verander DP alleen indien nodig om de systeembelasting te verminderen",
|
|
144
|
-
"fr": "changer DP uniquement si nécessaire pour réduire la charge du système",
|
|
145
|
-
"it": "cambiare DP solo se necessario per ridurre il carico del sistema",
|
|
146
|
-
"es": "cambie DP solo si es necesario para reducir la carga del sistema",
|
|
147
|
-
"pl": "zmień DP tylko wtedy, gdy jest to konieczne, aby zmniejszyć obciążenie systemu",
|
|
148
|
-
"zh-cn": "仅在需要减少系统负载时才更改DP"
|
|
149
|
-
},
|
|
150
|
-
"2.1.1": {
|
|
151
|
-
"en": "refactoring: 'async/await' used",
|
|
152
|
-
"de": "Refactoring: 'async / await' verwendet",
|
|
153
|
-
"ru": "рефакторинг: используется async / await",
|
|
154
|
-
"pt": "refatoração: 'async / waitit' usado",
|
|
155
|
-
"nl": "refactoring: 'async / await' gebruikt",
|
|
156
|
-
"fr": "refactoring: 'async / wait' utilisé",
|
|
157
|
-
"it": "refactoring: 'async / await' usato",
|
|
158
|
-
"es": "refactorización: 'async / await' usado",
|
|
159
|
-
"pl": "refaktoryzacja: użyto opcji „asynchronizuj / czekaj”",
|
|
160
|
-
"zh-cn": "重构:使用“异步/等待”"
|
|
161
|
-
},
|
|
162
|
-
"1.0.0": {
|
|
163
|
-
"en": "update to flot 3.0",
|
|
164
|
-
"de": "Update auf Flot 3.0",
|
|
165
|
-
"ru": "обновление до флота 3.0",
|
|
166
|
-
"pt": "atualizar para o flot 3.0",
|
|
167
|
-
"nl": "update naar flot 3.0",
|
|
168
|
-
"fr": "mise à jour vers flot 3.0",
|
|
169
|
-
"it": "aggiornamento a flot 3.0",
|
|
170
|
-
"es": "actualizar a flot 3.0",
|
|
171
|
-
"pl": "aktualizacja do flot 3.0",
|
|
172
|
-
"zh-cn": "更新到flot 3.0"
|
|
173
41
|
}
|
|
174
42
|
},
|
|
175
43
|
"title": "ebus",
|
|
@@ -198,8 +66,7 @@
|
|
|
198
66
|
"zh-cn": "ebus适配器;"
|
|
199
67
|
},
|
|
200
68
|
"platform": "Javascript/Node.js",
|
|
201
|
-
"mode": "
|
|
202
|
-
"schedule": "*/5 * * * *",
|
|
69
|
+
"mode": "daemon",
|
|
203
70
|
"icon": "ebus.png",
|
|
204
71
|
"enabled": true,
|
|
205
72
|
"messagebox": true,
|
|
@@ -213,6 +80,11 @@
|
|
|
213
80
|
"type": "hardware",
|
|
214
81
|
"license": "MIT",
|
|
215
82
|
"materialize": true,
|
|
83
|
+
"dependencies": [
|
|
84
|
+
{
|
|
85
|
+
"js-controller": ">=2.0.0"
|
|
86
|
+
}
|
|
87
|
+
],
|
|
216
88
|
"plugins": {
|
|
217
89
|
"sentry": {
|
|
218
90
|
"dsn": "https://bb7e6f51a1274ced81576d84f82f667e@o390433.ingest.sentry.io/5434784"
|
|
@@ -242,6 +114,7 @@
|
|
|
242
114
|
"useBoolean4Onoff": false,
|
|
243
115
|
"PolledDPs": [],
|
|
244
116
|
"HistoryDPs": [],
|
|
245
|
-
"maxretries": 5
|
|
117
|
+
"maxretries": 5,
|
|
118
|
+
"readInterval": 5
|
|
246
119
|
}
|
|
247
120
|
}
|
package/main.js
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
const utils = require("@iobroker/adapter-core");
|
|
18
|
-
const ebusdMinVersion = [
|
|
18
|
+
const ebusdMinVersion = [22, 2];
|
|
19
19
|
let ebusdVersion = [0, 0];
|
|
20
20
|
let ebusdUpdateVersion = [0, 0];
|
|
21
21
|
|
|
@@ -24,6 +24,8 @@ function startAdapter(options) {
|
|
|
24
24
|
options = options || {};
|
|
25
25
|
Object.assign(options, {
|
|
26
26
|
name: "ebus",
|
|
27
|
+
//#######################################
|
|
28
|
+
//
|
|
27
29
|
ready: function () {
|
|
28
30
|
try {
|
|
29
31
|
//adapter.log.debug('start');
|
|
@@ -32,7 +34,39 @@ function startAdapter(options) {
|
|
|
32
34
|
catch (e) {
|
|
33
35
|
adapter.log.error("exception catch after ready [" + e + "]");
|
|
34
36
|
}
|
|
35
|
-
}
|
|
37
|
+
},
|
|
38
|
+
//#######################################
|
|
39
|
+
// is called when adapter shuts down
|
|
40
|
+
unload: function (callback) {
|
|
41
|
+
try {
|
|
42
|
+
adapter && adapter.log && adapter.log.info && adapter.log.info("cleaned everything up...");
|
|
43
|
+
//to do stop intervall
|
|
44
|
+
callback();
|
|
45
|
+
} catch (e) {
|
|
46
|
+
callback();
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
//#######################################
|
|
50
|
+
//
|
|
51
|
+
SIGINT: function () {
|
|
52
|
+
adapter && adapter.log && adapter.log.info && adapter.log.info("cleaned everything up...");
|
|
53
|
+
CronStop();
|
|
54
|
+
},
|
|
55
|
+
//#######################################
|
|
56
|
+
// is called if a subscribed object changes
|
|
57
|
+
//objectChange: function (id, obj) {
|
|
58
|
+
// adapter.log.debug("[OBJECT CHANGE] ==== " + id + " === " + JSON.stringify(obj));
|
|
59
|
+
//},
|
|
60
|
+
//#######################################
|
|
61
|
+
// is called if a subscribed state changes
|
|
62
|
+
//stateChange: function (id, state) {
|
|
63
|
+
//HandleStateChange(id, state);
|
|
64
|
+
//},
|
|
65
|
+
stateChange: async (id, state) => {
|
|
66
|
+
await HandleStateChange(id, state);
|
|
67
|
+
},
|
|
68
|
+
//#######################################
|
|
69
|
+
//
|
|
36
70
|
});
|
|
37
71
|
adapter = new utils.Adapter(options);
|
|
38
72
|
|
|
@@ -40,18 +74,21 @@ function startAdapter(options) {
|
|
|
40
74
|
}
|
|
41
75
|
|
|
42
76
|
//var request = require('request');
|
|
43
|
-
const bent = require("bent");
|
|
77
|
+
//const bent = require("bent");
|
|
78
|
+
const axios = require('axios');
|
|
44
79
|
//const parseString = require("xml2js").parseString;
|
|
45
80
|
const net = require("net");
|
|
46
81
|
const { PromiseSocket } = require("promise-socket");
|
|
47
82
|
|
|
48
83
|
|
|
49
84
|
|
|
50
|
-
let killTimer;
|
|
85
|
+
//let killTimer;
|
|
86
|
+
let intervalID;
|
|
51
87
|
|
|
52
88
|
|
|
53
89
|
async function main() {
|
|
54
90
|
|
|
91
|
+
/*
|
|
55
92
|
let nParseTimeout = 60;
|
|
56
93
|
if (adapter.config.parseTimeout > 0) {
|
|
57
94
|
nParseTimeout = adapter.config.parseTimeout;
|
|
@@ -65,30 +102,68 @@ async function main() {
|
|
|
65
102
|
//process.exit(0);
|
|
66
103
|
adapter.terminate ? adapter.terminate(15) : process.exit(15);
|
|
67
104
|
}, nParseTimeout);
|
|
105
|
+
*/
|
|
68
106
|
|
|
69
107
|
adapter.log.debug("start with interface ebusd ");
|
|
70
108
|
|
|
71
109
|
FillPolledVars();
|
|
72
110
|
FillHistoryVars();
|
|
73
111
|
|
|
74
|
-
await
|
|
112
|
+
await checkVariables();
|
|
75
113
|
|
|
76
|
-
|
|
77
|
-
await ebusd_ReadValues();
|
|
114
|
+
subscribeVars();
|
|
78
115
|
|
|
79
116
|
//await TestFunction();
|
|
80
117
|
|
|
81
|
-
|
|
118
|
+
let readInterval = 5;
|
|
119
|
+
if (parseInt(adapter.config.readInterval) > 0) {
|
|
120
|
+
readInterval = adapter.config.readInterval;
|
|
121
|
+
}
|
|
122
|
+
adapter.log.debug("read every " + readInterval + " minutes");
|
|
123
|
+
intervalID = setInterval(Do, readInterval * 60 * 1000);
|
|
82
124
|
|
|
125
|
+
/*
|
|
83
126
|
if (killTimer) {
|
|
84
127
|
clearTimeout(killTimer);
|
|
85
128
|
adapter.log.debug("timer killed");
|
|
86
129
|
}
|
|
87
130
|
|
|
88
131
|
adapter.terminate ? adapter.terminate(0) : process.exit(0);
|
|
132
|
+
*/
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
async function Do() {
|
|
136
|
+
|
|
137
|
+
adapter.log.debug("starting ... " );
|
|
138
|
+
|
|
139
|
+
await ebusd_Command();
|
|
89
140
|
|
|
141
|
+
await ebusd_ReadValues();
|
|
142
|
+
|
|
143
|
+
await ebusd_ReceiveData();
|
|
90
144
|
}
|
|
91
145
|
|
|
146
|
+
|
|
147
|
+
async function HandleStateChange(id, state) {
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
if (state.ack !== true) {
|
|
151
|
+
|
|
152
|
+
adapter.log.debug("handle state change " + id);
|
|
153
|
+
const ids = id.split(".");
|
|
154
|
+
|
|
155
|
+
if (ids[2] === "cmd") {
|
|
156
|
+
await ebusd_Command();
|
|
157
|
+
}
|
|
158
|
+
else {
|
|
159
|
+
adapter.log.warn("unhandled state change " + id);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
92
167
|
let oPolledVars = [];
|
|
93
168
|
function FillPolledVars() {
|
|
94
169
|
|
|
@@ -146,93 +221,7 @@ function FillHistoryVars() {
|
|
|
146
221
|
}
|
|
147
222
|
|
|
148
223
|
|
|
149
|
-
async function Common_checkVariables() {
|
|
150
|
-
|
|
151
|
-
adapter.log.debug("init common variables and " + oHistoryVars.length + " history DP's");
|
|
152
|
-
let key;
|
|
153
|
-
let obj;
|
|
154
|
-
|
|
155
|
-
if (oHistoryVars.length > 0) {
|
|
156
|
-
|
|
157
|
-
if (oHistoryVars.length > 4) {
|
|
158
|
-
adapter.log.warn("too many history values " + oHistoryVars.length + " -> maximum is 4");
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
for (let n = 1; n <= oHistoryVars.length; n++) {
|
|
162
|
-
|
|
163
|
-
if (oHistoryVars[n - 1].name.length > 0) {
|
|
164
|
-
const name = "history value " + n + " as JSON " + oHistoryVars[n - 1].name;
|
|
165
|
-
key = "history.value" + n;
|
|
166
|
-
await adapter.setObjectNotExistsAsync(key, {
|
|
167
|
-
type: "state",
|
|
168
|
-
common: {
|
|
169
|
-
name: name,
|
|
170
|
-
type: "string",
|
|
171
|
-
role: "value",
|
|
172
|
-
unit: "",
|
|
173
|
-
read: true,
|
|
174
|
-
write: false
|
|
175
|
-
},
|
|
176
|
-
native: { location: key }
|
|
177
|
-
});
|
|
178
|
-
|
|
179
|
-
obj = await adapter.getObjectAsync(key);
|
|
180
|
-
|
|
181
|
-
if (obj != null) {
|
|
182
|
-
|
|
183
|
-
if (obj.common.role != "value" || obj.common.name != name) {
|
|
184
|
-
await adapter.extendObject(key, {
|
|
185
|
-
common: {
|
|
186
|
-
name: name,
|
|
187
|
-
role: "value",
|
|
188
|
-
}
|
|
189
|
-
});
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
else {
|
|
194
|
-
adapter.log.warn("ignoring history value " + n + " (invalid name)");
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
key = "history.date";
|
|
199
|
-
await adapter.setObjectNotExistsAsync(key, {
|
|
200
|
-
type: "state",
|
|
201
|
-
common: { name: "ebus history date as JSON", type: "string", role: "value", unit: "", read: true, write: false },
|
|
202
|
-
native: { location: key }
|
|
203
|
-
});
|
|
204
|
-
obj = await adapter.getObjectAsync(key);
|
|
205
|
-
|
|
206
|
-
if (obj != null) {
|
|
207
|
-
|
|
208
|
-
if (obj.common.role != "value") {
|
|
209
|
-
await adapter.extendObject(key, {
|
|
210
|
-
common: {
|
|
211
|
-
role: "value",
|
|
212
|
-
}
|
|
213
|
-
});
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
key = "history.error";
|
|
218
|
-
await adapter.setObjectNotExistsAsync(key, {
|
|
219
|
-
type: "state",
|
|
220
|
-
common: { name: "ebus error", type: "string", role: "value", unit: "", read: true, write: false },
|
|
221
|
-
native: { location: key }
|
|
222
|
-
});
|
|
223
|
-
obj = await adapter.getObjectAsync(key);
|
|
224
224
|
|
|
225
|
-
if (obj != null) {
|
|
226
|
-
|
|
227
|
-
if (obj.common.role != "value") {
|
|
228
|
-
await adapter.extendObject(key, {
|
|
229
|
-
common: {
|
|
230
|
-
role: "value",
|
|
231
|
-
}
|
|
232
|
-
});
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
225
|
|
|
237
226
|
|
|
238
227
|
|
|
@@ -302,7 +291,12 @@ async function ebusd_Command() {
|
|
|
302
291
|
|
|
303
292
|
//just call http://192.168.0.123:8889/data
|
|
304
293
|
|
|
305
|
-
|
|
294
|
+
function subscribeVars() {
|
|
295
|
+
adapter.subscribeStates("cmd");
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
async function checkVariables() {
|
|
306
300
|
adapter.log.debug("init variables ");
|
|
307
301
|
|
|
308
302
|
let key;
|
|
@@ -356,7 +350,92 @@ async function ebusd_checkVariables() {
|
|
|
356
350
|
});
|
|
357
351
|
}
|
|
358
352
|
}
|
|
359
|
-
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
adapter.log.debug("init common variables and " + oHistoryVars.length + " history DP's");
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
if (oHistoryVars.length > 0) {
|
|
360
|
+
|
|
361
|
+
if (oHistoryVars.length > 4) {
|
|
362
|
+
adapter.log.warn("too many history values " + oHistoryVars.length + " -> maximum is 4");
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
for (let n = 1; n <= oHistoryVars.length; n++) {
|
|
366
|
+
|
|
367
|
+
if (oHistoryVars[n - 1].name.length > 0) {
|
|
368
|
+
const name = "history value " + n + " as JSON " + oHistoryVars[n - 1].name;
|
|
369
|
+
key = "history.value" + n;
|
|
370
|
+
await adapter.setObjectNotExistsAsync(key, {
|
|
371
|
+
type: "state",
|
|
372
|
+
common: {
|
|
373
|
+
name: name,
|
|
374
|
+
type: "string",
|
|
375
|
+
role: "value",
|
|
376
|
+
unit: "",
|
|
377
|
+
read: true,
|
|
378
|
+
write: false
|
|
379
|
+
},
|
|
380
|
+
native: { location: key }
|
|
381
|
+
});
|
|
382
|
+
|
|
383
|
+
obj = await adapter.getObjectAsync(key);
|
|
384
|
+
|
|
385
|
+
if (obj != null) {
|
|
386
|
+
|
|
387
|
+
if (obj.common.role != "value" || obj.common.name != name) {
|
|
388
|
+
await adapter.extendObject(key, {
|
|
389
|
+
common: {
|
|
390
|
+
name: name,
|
|
391
|
+
role: "value",
|
|
392
|
+
}
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
else {
|
|
398
|
+
adapter.log.warn("ignoring history value " + n + " (invalid name)");
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
key = "history.date";
|
|
403
|
+
await adapter.setObjectNotExistsAsync(key, {
|
|
404
|
+
type: "state",
|
|
405
|
+
common: { name: "ebus history date as JSON", type: "string", role: "value", unit: "", read: true, write: false },
|
|
406
|
+
native: { location: key }
|
|
407
|
+
});
|
|
408
|
+
obj = await adapter.getObjectAsync(key);
|
|
409
|
+
|
|
410
|
+
if (obj != null) {
|
|
411
|
+
|
|
412
|
+
if (obj.common.role != "value") {
|
|
413
|
+
await adapter.extendObject(key, {
|
|
414
|
+
common: {
|
|
415
|
+
role: "value",
|
|
416
|
+
}
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
key = "history.error";
|
|
422
|
+
await adapter.setObjectNotExistsAsync(key, {
|
|
423
|
+
type: "state",
|
|
424
|
+
common: { name: "ebus error", type: "string", role: "value", unit: "", read: true, write: false },
|
|
425
|
+
native: { location: key }
|
|
426
|
+
});
|
|
427
|
+
obj = await adapter.getObjectAsync(key);
|
|
428
|
+
|
|
429
|
+
if (obj != null) {
|
|
430
|
+
|
|
431
|
+
if (obj.common.role != "value") {
|
|
432
|
+
await adapter.extendObject(key, {
|
|
433
|
+
common: {
|
|
434
|
+
role: "value",
|
|
435
|
+
}
|
|
436
|
+
});
|
|
437
|
+
}
|
|
438
|
+
}
|
|
360
439
|
}
|
|
361
440
|
|
|
362
441
|
|
|
@@ -390,13 +469,19 @@ async function ebusd_ReceiveData() {
|
|
|
390
469
|
adapter.log.debug("request data from " + sUrl);
|
|
391
470
|
|
|
392
471
|
try {
|
|
393
|
-
|
|
472
|
+
/*
|
|
394
473
|
const getBuffer = bent("string");
|
|
395
474
|
const buffer = await getBuffer(sUrl);
|
|
475
|
+
*/
|
|
476
|
+
|
|
477
|
+
const buffer = await axios.get(sUrl);
|
|
478
|
+
|
|
479
|
+
adapter.log.debug("got data " + typeof buffer.data + " " + JSON.stringify(buffer.data));
|
|
396
480
|
|
|
397
|
-
const oData = JSON.parse(buffer);
|
|
481
|
+
//const oData = JSON.parse(buffer.data);
|
|
482
|
+
const oData = buffer.data;
|
|
398
483
|
|
|
399
|
-
adapter.log.debug("oData " +
|
|
484
|
+
//adapter.log.debug("oData " + oData);
|
|
400
485
|
|
|
401
486
|
const flatten = require("flat");
|
|
402
487
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iobroker.ebus",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "ioBroker ebus Adapter",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "René G.",
|
|
@@ -20,32 +20,32 @@
|
|
|
20
20
|
"url": "https://github.com/rg-engineering/ioBroker.ebus"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@iobroker/adapter-core": "2.
|
|
24
|
-
"@sentry/node": "6.
|
|
25
|
-
"bent": "7.3.12",
|
|
23
|
+
"@iobroker/adapter-core": "2.6.0",
|
|
24
|
+
"@sentry/node": "6.19.3",
|
|
26
25
|
"flat": "5.0.2",
|
|
27
26
|
"net": "1.0.2",
|
|
28
|
-
"promise-socket": "7.0.0"
|
|
27
|
+
"promise-socket": "7.0.0",
|
|
28
|
+
"cron": "1.8.2"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@iobroker/testing": "2.5.
|
|
31
|
+
"@iobroker/testing": "2.5.6",
|
|
32
32
|
"@types/chai": "4.3.0",
|
|
33
|
-
"@types/chai-as-promised": "7.1.
|
|
33
|
+
"@types/chai-as-promised": "7.1.5",
|
|
34
34
|
"@types/gulp": "4.0.9",
|
|
35
|
-
"@types/mocha": "9.
|
|
36
|
-
"@types/node": "
|
|
35
|
+
"@types/mocha": "9.1.0",
|
|
36
|
+
"@types/node": "17.0.23",
|
|
37
37
|
"@types/proxyquire": "1.3.28",
|
|
38
38
|
"@types/request-promise-native": "1.0.18",
|
|
39
|
-
"@types/sinon": "10.0.
|
|
40
|
-
"@types/sinon-chai": "3.2.
|
|
41
|
-
"axios": "0.
|
|
42
|
-
"chai": "4.3.
|
|
39
|
+
"@types/sinon": "10.0.11",
|
|
40
|
+
"@types/sinon-chai": "3.2.8",
|
|
41
|
+
"axios": "0.26.1",
|
|
42
|
+
"chai": "4.3.6",
|
|
43
43
|
"chai-as-promised": "7.1.1",
|
|
44
|
-
"eslint": "8.
|
|
44
|
+
"eslint": "8.12.0",
|
|
45
45
|
"gulp": "4.0.2",
|
|
46
|
-
"mocha": "9.
|
|
46
|
+
"mocha": "9.2.2",
|
|
47
47
|
"proxyquire": "2.1.3",
|
|
48
|
-
"sinon": "
|
|
48
|
+
"sinon": "13.0.1",
|
|
49
49
|
"sinon-chai": "3.7.0"
|
|
50
50
|
},
|
|
51
51
|
"main": "main.js",
|