iobroker.ebus 3.0.7 → 3.1.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 +6 -0
- package/admin/img/info-big.png +0 -0
- package/admin/words.js +25 -19
- package/io-package.json +231 -208
- package/main.js +8 -73
- package/package.json +17 -15
- package/.github/ISSUE_TEMPLATE/BugReport.md +0 -36
- package/.github/ISSUE_TEMPLATE/Enhancement.md +0 -19
- package/.github/workflows/npmpublish.yml +0 -30
- package/.github/workflows/test-and-release.yml +0 -120
package/README.md
CHANGED
|
@@ -55,6 +55,12 @@ Attention: command in datapoint ebus.0.cmd is deleted after executing of command
|
|
|
55
55
|
|
|
56
56
|
## Changelog
|
|
57
57
|
|
|
58
|
+
### 3.1.0 (in progress)
|
|
59
|
+
* (René) support ebusd 22.4
|
|
60
|
+
* (René) see issue #77: Update data point when read-cmd is used
|
|
61
|
+
* (René) see issue #78: remove CR, LF in answer from ebusd for DP ebus.0.cmdResult
|
|
62
|
+
|
|
63
|
+
|
|
58
64
|
### 3.0.7 (2022-08-20)
|
|
59
65
|
* (René) support ebusd 22.3
|
|
60
66
|
|
|
Binary file
|
package/admin/words.js
CHANGED
|
@@ -1,21 +1,27 @@
|
|
|
1
|
-
/*global systemDictionary:true */
|
|
1
|
+
/*global systemDictionary:true */
|
|
2
|
+
/*
|
|
3
|
+
+===================== DO NOT MODIFY ======================+
|
|
4
|
+
| This file was generated by translate-adapter, please use |
|
|
5
|
+
| `translate-adapter adminLanguages2words` to update it. |
|
|
6
|
+
+===================== DO NOT MODIFY ======================+
|
|
7
|
+
*/
|
|
2
8
|
'use strict';
|
|
3
|
-
|
|
4
|
-
systemDictionary = {
|
|
5
|
-
"addParameter": {
|
|
6
|
-
"circuit": {
|
|
7
|
-
"ebus_adapter_settings": {
|
|
8
|
-
"hint_ebusd": {
|
|
9
|
-
"hint_ebusd_history": {
|
|
10
|
-
"hint_ebusd_polled": {
|
|
11
|
-
"historyDP": {
|
|
12
|
-
"maxretries": {
|
|
13
|
-
"name": {
|
|
14
|
-
"parse_timeout": {
|
|
15
|
-
"polledDP": {
|
|
16
|
-
"readInterval": {
|
|
17
|
-
"target_HTTPPort": {
|
|
18
|
-
"target_IP": {
|
|
19
|
-
"target_TelnetPort": {
|
|
20
|
-
"useBoolean4Onoff": {
|
|
9
|
+
|
|
10
|
+
systemDictionary = {
|
|
11
|
+
"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", "uk": "додатковий параметр", "zh-cn": "附加参数"},
|
|
12
|
+
"circuit": { "en": "circuit", "de": "Schaltkreis", "ru": "схема", "pt": "o circuito", "nl": "stroomkring", "fr": "circuit", "it": "circuito", "es": "circuito", "pl": "okrążenie", "uk": "схема", "zh-cn": "电路"},
|
|
13
|
+
"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", "uk": "налаштування адаптера ebus", "zh-cn": "ebus适配器设置"},
|
|
14
|
+
"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", "uk": "вам потрібен запущений ebusd з усіма необхідними налаштуваннями. Цей адаптер використовує HTML для читання даних з ebusd. Він використовує TCP (Telnet) для запису в ebusd.", "zh-cn": "对于ebusd接口,您需要一个正在运行的ebusd incl。"},
|
|
15
|
+
"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.", "uk": "список усіх назв точок даних, які слід використовувати з віджетом історії ebus.", "zh-cn": "应与 ebus 历史小部件一起使用的所有数据点名称的列表。"},
|
|
16
|
+
"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. ", "uk": "список усіх імен точок даних, які повинні бути опитані з адаптера. Не додавайте точки даних, які вже опитуються з ebusd. Схема та додатковий параметр необов'язкові.", "zh-cn": "应从适配器轮询的所有数据点名称的列表。"},
|
|
17
|
+
"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", "uk": "історії даних", "zh-cn": "历史数据点"},
|
|
18
|
+
"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", "uk": "максимальна кількість повторів для надсилання команди", "zh-cn": "发送命令的最大重试次数"},
|
|
19
|
+
"name": { "en": "name", "de": "Name", "ru": "имя", "pt": "nome", "nl": "naam", "fr": "Nom", "it": "nome", "es": "nombre", "pl": "Nazwa", "uk": "назва", "zh-cn": "姓名"},
|
|
20
|
+
"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]", "uk": "час очікування завантаження та опитування [секунди]", "zh-cn": "下载和轮询超时[秒]"},
|
|
21
|
+
"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", "uk": "опитувані точки даних", "zh-cn": "轮询数据点"},
|
|
22
|
+
"readInterval": { "en": "interval to read data from ebusd [min]", "de": "Intervall zum Lesen von Daten aus ebusd [min]", "ru": "интервал чтения данных из ebusd [мин]", "pt": "intervalo para ler dados de ebusd [min]", "nl": "interval om gegevens van ebusd te lezen [min]", "fr": "intervalle de lecture des données depuis ebusd [min]", "it": "intervallo per leggere i dati da ebusd [min]", "es": "intervalo para leer datos de ebusd [min]", "pl": "interwał odczytu danych z ebusd [min]", "uk": "інтервал читання даних з ebusd [хв]", "zh-cn": "从 ebusd 读取数据的间隔 [分钟]"},
|
|
23
|
+
"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", "uk": "цільовий порт HTTP для читання даних", "zh-cn": "目标HTTP端口以读取数据"},
|
|
24
|
+
"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", "uk": "цільовий IP", "zh-cn": "目标IP"},
|
|
25
|
+
"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", "uk": "target telnet Порт для запису даних", "zh-cn": "目标telnet用于写入数据的端口"},
|
|
26
|
+
"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", "uk": "використовуйте логічне значення замість рядка для точок даних зі значеннями on/off", "zh-cn": "对具有开/关值的数据点使用布尔值代替字符串"},
|
|
21
27
|
};
|
package/io-package.json
CHANGED
|
@@ -1,208 +1,231 @@
|
|
|
1
|
-
{
|
|
2
|
-
"common": {
|
|
3
|
-
"name": "ebus",
|
|
4
|
-
"version": "3.0
|
|
5
|
-
"news": {
|
|
6
|
-
"3.0
|
|
7
|
-
"en": "
|
|
8
|
-
"de": "
|
|
9
|
-
"ru": "
|
|
10
|
-
"pt": "
|
|
11
|
-
"nl": "
|
|
12
|
-
"fr": "
|
|
13
|
-
"it": "
|
|
14
|
-
"es": "
|
|
15
|
-
"pl": "
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
"
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
"
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
"
|
|
142
|
-
"
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
"
|
|
149
|
-
"
|
|
150
|
-
"
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
"
|
|
178
|
-
"
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
"
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
"
|
|
189
|
-
"
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"common": {
|
|
3
|
+
"name": "ebus",
|
|
4
|
+
"version": "3.1.0",
|
|
5
|
+
"news": {
|
|
6
|
+
"3.1.0": {
|
|
7
|
+
"en": "optimize answer of ebus.0.cmd",
|
|
8
|
+
"de": "Antwort von ebus.0.cmd optimieren",
|
|
9
|
+
"ru": "оптимизировать ответ ebus.0.cmd",
|
|
10
|
+
"pt": "otimizar resposta de ebus.0.cmd",
|
|
11
|
+
"nl": "optimaliseer het antwoord van ebus.0.cmd",
|
|
12
|
+
"fr": "optimiser la réponse de ebus.0.cmd",
|
|
13
|
+
"it": "ottimizzare la risposta di ebus.0.cmd",
|
|
14
|
+
"es": "optimizar la respuesta de ebus.0.cmd",
|
|
15
|
+
"pl": "zoptymalizować odpowiedź ebus.0.cmd",
|
|
16
|
+
"uk": "оптимізувати відповідь ebus.0.cmd",
|
|
17
|
+
"zh-cn": "优化 ebus.0.cmd 的答案"
|
|
18
|
+
},
|
|
19
|
+
"3.0.7": {
|
|
20
|
+
"en": "support of ebusd 22.3",
|
|
21
|
+
"de": "Unterstützung von ebusd 22.3",
|
|
22
|
+
"ru": "поддержка ebusd 22.3",
|
|
23
|
+
"pt": "suporte de ebusd 22.3",
|
|
24
|
+
"nl": "ondersteuning van ebusd 22.3",
|
|
25
|
+
"fr": "prise en charge d'ebusd 22.3",
|
|
26
|
+
"it": "supporto di ebusd 22.3",
|
|
27
|
+
"es": "soporte de ebusd 22.3",
|
|
28
|
+
"pl": "obsługa ebusd 22.3",
|
|
29
|
+
"zh-cn": "支持 ebusd 22.3",
|
|
30
|
+
"uk": "підтримка ebusd 22.3"
|
|
31
|
+
},
|
|
32
|
+
"3.0.6": {
|
|
33
|
+
"en": "widget with tooltip",
|
|
34
|
+
"de": "Widget mit Tooltip",
|
|
35
|
+
"ru": "виджет с подсказкой",
|
|
36
|
+
"pt": "widget com dica de ferramenta",
|
|
37
|
+
"nl": "widget met knopinfo",
|
|
38
|
+
"fr": "widget avec info-bulle",
|
|
39
|
+
"it": "widget con descrizione comando",
|
|
40
|
+
"es": "widget con información sobre herramientas",
|
|
41
|
+
"pl": "widżet z podpowiedź",
|
|
42
|
+
"zh-cn": "带有工具提示的小部件",
|
|
43
|
+
"uk": "віджет із підказкою"
|
|
44
|
+
},
|
|
45
|
+
"3.0.2": {
|
|
46
|
+
"en": "message installation hint added",
|
|
47
|
+
"de": "Nachricht Installationshinweis hinzugefügt",
|
|
48
|
+
"ru": "добавлена подсказка установки сообщения",
|
|
49
|
+
"pt": "dica de instalação de mensagem adicionada",
|
|
50
|
+
"nl": "bericht installatie hint toegevoegd",
|
|
51
|
+
"fr": "astuce d'installation de message ajoutée",
|
|
52
|
+
"it": "suggerimento per l'installazione del messaggio aggiunto",
|
|
53
|
+
"es": "sugerencia de instalación de mensajes agregada",
|
|
54
|
+
"pl": "dodano wskazówkę dotyczącą instalacji wiadomości",
|
|
55
|
+
"zh-cn": "添加了消息安装提示",
|
|
56
|
+
"uk": "додано підказку щодо встановлення повідомлення"
|
|
57
|
+
},
|
|
58
|
+
"3.0.1": {
|
|
59
|
+
"en": "read interval in admin added",
|
|
60
|
+
"de": "Leseintervall im Admin hinzugefügt",
|
|
61
|
+
"ru": "добавлен интервал чтения в админке",
|
|
62
|
+
"pt": "intervalo de leitura no admin adicionado",
|
|
63
|
+
"nl": "leesinterval in admin toegevoegd",
|
|
64
|
+
"fr": "intervalle de lecture ajouté dans l'administrateur",
|
|
65
|
+
"it": "intervallo di lettura in admin aggiunto",
|
|
66
|
+
"es": "Intervalo de lectura en el administrador agregado",
|
|
67
|
+
"pl": "dodano interwał odczytu w admin",
|
|
68
|
+
"zh-cn": "添加了管理员中的读取间隔",
|
|
69
|
+
"uk": "додано інтервал читання в адмінці"
|
|
70
|
+
},
|
|
71
|
+
"3.0.0": {
|
|
72
|
+
"en": "from 'scheduled' to 'daemon' adapter changed",
|
|
73
|
+
"de": "von 'geplant' zu 'daemon' Adapter geändert",
|
|
74
|
+
"ru": "изменен адаптер с «запланированного» на «демон»",
|
|
75
|
+
"pt": "adaptador 'agendado' para 'daemon' alterado",
|
|
76
|
+
"nl": "van 'scheduled' naar 'daemon' adapter gewijzigd",
|
|
77
|
+
"fr": "de l'adaptateur 'scheduled' à 'daemon' changé",
|
|
78
|
+
"it": "adattatore da \"programmato\" a \"demone\" modificato",
|
|
79
|
+
"es": "Se cambió el adaptador de 'programado' a 'daemon'",
|
|
80
|
+
"pl": "Zmieniono adapter z „zaplanowanego” na „demon”",
|
|
81
|
+
"zh-cn": "从 'scheduled' 到 'daemon' 适配器已更改",
|
|
82
|
+
"uk": "змінено адаптер із 'scheduled' на 'daemon'"
|
|
83
|
+
},
|
|
84
|
+
"2.6.0": {
|
|
85
|
+
"en": " 'bent' replaced by 'axios'",
|
|
86
|
+
"de": "'bent' ersetzt durch 'axios'",
|
|
87
|
+
"ru": "«согнутый» заменен на «аксиос»",
|
|
88
|
+
"pt": "'curvado' substituído por 'axios'",
|
|
89
|
+
"nl": "'gebogen' vervangen door 'axios'",
|
|
90
|
+
"fr": "'plié' remplacé par 'axios'",
|
|
91
|
+
"it": "'piegato' sostituito da 'assios'",
|
|
92
|
+
"es": "'doblado' reemplazado por 'axios'",
|
|
93
|
+
"pl": "„wygięty” zastąpiony przez „axios”",
|
|
94
|
+
"zh-cn": "'bent' 替换为 'axios'",
|
|
95
|
+
"uk": "\"bent\" замінено на \"axios\""
|
|
96
|
+
},
|
|
97
|
+
"2.5.1": {
|
|
98
|
+
"en": "maximum retries to send data in case of arbitration error",
|
|
99
|
+
"de": "maximale Wiederholungsversuche zum Senden von Daten im Falle eines Vermittlungsfehlers",
|
|
100
|
+
"ru": "максимальное количество попыток отправки данных в случае ошибки арбитража",
|
|
101
|
+
"pt": "máximo de tentativas para enviar dados em caso de erro de arbitragem",
|
|
102
|
+
"nl": "maximaal aantal pogingen om gegevens te verzenden in geval van arbitragefout",
|
|
103
|
+
"fr": "nombre maximum de tentatives d'envoi de données en cas d'erreur d'arbitrage",
|
|
104
|
+
"it": "numero massimo di tentativi di invio dei dati in caso di errore di arbitrato",
|
|
105
|
+
"es": "reintentos máximos para enviar datos en caso de error de arbitraje",
|
|
106
|
+
"pl": "maksymalna liczba prób wysłania danych w przypadku błędu arbitrażu",
|
|
107
|
+
"zh-cn": "仲裁错误时发送数据的最大重试次数",
|
|
108
|
+
"uk": "максимальна кількість повторних спроб надсилання даних у разі помилки арбітражу"
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"titleLang": {
|
|
112
|
+
"en": "ebus",
|
|
113
|
+
"de": "ebus",
|
|
114
|
+
"ru": "ebus",
|
|
115
|
+
"pt": "ebus",
|
|
116
|
+
"nl": "ebus",
|
|
117
|
+
"fr": "ebus",
|
|
118
|
+
"it": "ebus",
|
|
119
|
+
"es": "ebus",
|
|
120
|
+
"pl": "ebus",
|
|
121
|
+
"zh-cn": "巴士",
|
|
122
|
+
"uk": "ebus"
|
|
123
|
+
},
|
|
124
|
+
"desc": {
|
|
125
|
+
"en": "ebus Adapter; reads data from ebusd Interface",
|
|
126
|
+
"de": "ebus Adapter; liest Daten von der ebusd Schnittstelle",
|
|
127
|
+
"ru": "Адаптер ebus; считывает данные из интерфейса ebusd",
|
|
128
|
+
"pt": "Adaptador ebus; lê dados da interface ebusd",
|
|
129
|
+
"nl": "ebus-adapter; leest gegevens van ebusd Interface",
|
|
130
|
+
"fr": "adaptateur ebus; lit les données de l'interface ebusd",
|
|
131
|
+
"it": "ebus Adapter; legge i dati dall'interfaccia ebusd",
|
|
132
|
+
"es": "adaptador ebus; lee datos de la interfaz ebusd",
|
|
133
|
+
"pl": "Adapter ebus; odczytuje dane z interfejsu ebusd",
|
|
134
|
+
"zh-cn": "ebus适配器;",
|
|
135
|
+
"uk": "адаптер ebus; читає дані з інтерфейсу ebusd"
|
|
136
|
+
},
|
|
137
|
+
"platform": "Javascript/Node.js",
|
|
138
|
+
"mode": "daemon",
|
|
139
|
+
"icon": "ebus.png",
|
|
140
|
+
"enabled": true,
|
|
141
|
+
"messagebox": false,
|
|
142
|
+
"extIcon": "https://raw.githubusercontent.com/rg-engineering/ioBroker.ebus/master/admin/ebus.png",
|
|
143
|
+
"keywords": [
|
|
144
|
+
"ebus"
|
|
145
|
+
],
|
|
146
|
+
"readme": "https://github.com/rg-engineering/ioBroker.ebus/blob/master/README.md",
|
|
147
|
+
"loglevel": "info",
|
|
148
|
+
"stopBeforeUpdate": true,
|
|
149
|
+
"type": "hardware",
|
|
150
|
+
"license": "MIT",
|
|
151
|
+
"materialize": true,
|
|
152
|
+
"dependencies": [
|
|
153
|
+
{
|
|
154
|
+
"js-controller": ">=2.0.0"
|
|
155
|
+
}
|
|
156
|
+
],
|
|
157
|
+
"plugins": {
|
|
158
|
+
"sentry": {
|
|
159
|
+
"dsn": "https://bb7e6f51a1274ced81576d84f82f667e@o390433.ingest.sentry.io/5434784"
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
"compact": true,
|
|
163
|
+
"authors": [
|
|
164
|
+
{
|
|
165
|
+
"name": "René G.",
|
|
166
|
+
"email": "info@rg-engineering.eu"
|
|
167
|
+
}
|
|
168
|
+
],
|
|
169
|
+
"connectionType": "local",
|
|
170
|
+
"dataSource": "push",
|
|
171
|
+
"adminUI": {
|
|
172
|
+
"config": "materialize"
|
|
173
|
+
},
|
|
174
|
+
"messages": [
|
|
175
|
+
{
|
|
176
|
+
"condition": {
|
|
177
|
+
"operand": "and",
|
|
178
|
+
"rules": [
|
|
179
|
+
"oldVersion<3.0.0",
|
|
180
|
+
"newVersion>=3.0.0"
|
|
181
|
+
]
|
|
182
|
+
},
|
|
183
|
+
"title": {
|
|
184
|
+
"en": "from 'scheduled' to 'daemon' adapter changed",
|
|
185
|
+
"de": "von 'geplant' zu 'daemon' Adapter geändert",
|
|
186
|
+
"ru": "изменен адаптер с «запланированного» на «демон»",
|
|
187
|
+
"pt": "adaptador 'agendado' para 'daemon' alterado",
|
|
188
|
+
"nl": "van 'scheduled' naar 'daemon' adapter gewijzigd",
|
|
189
|
+
"fr": "de l'adaptateur 'scheduled' à 'daemon' changé",
|
|
190
|
+
"it": "adattatore da \"programmato\" a \"demone\" modificato",
|
|
191
|
+
"es": "Se cambió el adaptador de 'programado' a 'daemon'",
|
|
192
|
+
"pl": "Zmieniono adapter z „zaplanowanego” na „demon”",
|
|
193
|
+
"zh-cn": "从 'scheduled' 到 'daemon' 适配器已更改",
|
|
194
|
+
"uk": "змінено адаптер із 'scheduled' на 'daemon'"
|
|
195
|
+
},
|
|
196
|
+
"text": {
|
|
197
|
+
"en": "it might be necessary to deinstall old version and then install new version",
|
|
198
|
+
"de": "Es kann erforderlich sein, die alte Version zu deinstallieren und dann die neue Version zu installieren",
|
|
199
|
+
"ru": "может быть необходимо удалить старую версию, а затем установить новую версию",
|
|
200
|
+
"pt": "pode ser necessário desinstalar a versão antiga e depois instalar a nova versão",
|
|
201
|
+
"nl": "het kan nodig zijn om de oude versie te deïnstalleren en vervolgens de nieuwe versie te installeren",
|
|
202
|
+
"fr": "il peut être nécessaire de désinstaller l'ancienne version puis d'installer la nouvelle version",
|
|
203
|
+
"it": "potrebbe essere necessario disinstallare la vecchia versione e quindi installare la nuova versione",
|
|
204
|
+
"es": "puede ser necesario desinstalar la versión anterior y luego instalar la nueva versión",
|
|
205
|
+
"pl": "może być konieczne odinstalowanie starej wersji, a następnie zainstalowanie nowej wersji",
|
|
206
|
+
"zh-cn": "可能需要卸载旧版本,然后安装新版本",
|
|
207
|
+
"uk": "може знадобитися видалити стару версію, а потім встановити нову"
|
|
208
|
+
},
|
|
209
|
+
"level": "warn",
|
|
210
|
+
"buttons": [
|
|
211
|
+
"agree",
|
|
212
|
+
"cancel"
|
|
213
|
+
]
|
|
214
|
+
}
|
|
215
|
+
]
|
|
216
|
+
},
|
|
217
|
+
"native": {
|
|
218
|
+
"targetIP": "192.168.0.1",
|
|
219
|
+
"interfacetype": "ebusd",
|
|
220
|
+
"targetHTTPPort": 8889,
|
|
221
|
+
"targetTelnetPort": 8890,
|
|
222
|
+
"PolledValues": "",
|
|
223
|
+
"HistoryValues": "",
|
|
224
|
+
"parseTimeout": 60,
|
|
225
|
+
"useBoolean4Onoff": false,
|
|
226
|
+
"PolledDPs": [],
|
|
227
|
+
"HistoryDPs": [],
|
|
228
|
+
"maxretries": 5,
|
|
229
|
+
"readInterval": 5
|
|
230
|
+
}
|
|
231
|
+
}
|
package/main.js
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
const utils = require("@iobroker/adapter-core");
|
|
18
|
-
const ebusdMinVersion = [22,
|
|
18
|
+
const ebusdMinVersion = [22, 4];
|
|
19
19
|
let ebusdVersion = [0, 0];
|
|
20
20
|
let ebusdUpdateVersion = [0, 0];
|
|
21
21
|
|
|
@@ -46,24 +46,7 @@ function startAdapter(options) {
|
|
|
46
46
|
callback();
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
|
-
|
|
50
|
-
//
|
|
51
|
-
//SIGINT: function () {
|
|
52
|
-
// clearInterval(intervalID);
|
|
53
|
-
// intervalID = null;
|
|
54
|
-
// adapter && adapter.log && adapter.log.info && adapter.log.info("cleaned everything up...");
|
|
55
|
-
// CronStop();
|
|
56
|
-
//},
|
|
57
|
-
//#######################################
|
|
58
|
-
// is called if a subscribed object changes
|
|
59
|
-
//objectChange: function (id, obj) {
|
|
60
|
-
// adapter.log.debug("[OBJECT CHANGE] ==== " + id + " === " + JSON.stringify(obj));
|
|
61
|
-
//},
|
|
62
|
-
//#######################################
|
|
63
|
-
// is called if a subscribed state changes
|
|
64
|
-
//stateChange: function (id, state) {
|
|
65
|
-
//HandleStateChange(id, state);
|
|
66
|
-
//},
|
|
49
|
+
|
|
67
50
|
stateChange: async (id, state) => {
|
|
68
51
|
await HandleStateChange(id, state);
|
|
69
52
|
},
|
|
@@ -75,37 +58,15 @@ function startAdapter(options) {
|
|
|
75
58
|
return adapter;
|
|
76
59
|
}
|
|
77
60
|
|
|
78
|
-
|
|
79
|
-
//const bent = require("bent");
|
|
61
|
+
|
|
80
62
|
const axios = require('axios');
|
|
81
|
-
//const parseString = require("xml2js").parseString;
|
|
82
63
|
const net = require("net");
|
|
83
64
|
const { PromiseSocket } = require("promise-socket");
|
|
84
65
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
//let killTimer;
|
|
88
66
|
let intervalID;
|
|
89
67
|
|
|
90
|
-
|
|
91
68
|
async function main() {
|
|
92
69
|
|
|
93
|
-
/*
|
|
94
|
-
let nParseTimeout = 60;
|
|
95
|
-
if (adapter.config.parseTimeout > 0) {
|
|
96
|
-
nParseTimeout = adapter.config.parseTimeout;
|
|
97
|
-
}
|
|
98
|
-
adapter.log.debug("set timeout to " + nParseTimeout + " sec");
|
|
99
|
-
nParseTimeout = nParseTimeout * 1000;
|
|
100
|
-
// force terminate after 1min
|
|
101
|
-
// don't know why it does not terminate by itself...
|
|
102
|
-
killTimer = setTimeout(function () {
|
|
103
|
-
adapter.log.warn("force terminate");
|
|
104
|
-
//process.exit(0);
|
|
105
|
-
adapter.terminate ? adapter.terminate(15) : process.exit(15);
|
|
106
|
-
}, nParseTimeout);
|
|
107
|
-
*/
|
|
108
|
-
|
|
109
70
|
adapter.log.debug("start with interface ebusd ");
|
|
110
71
|
|
|
111
72
|
FillPolledVars();
|
|
@@ -115,8 +76,6 @@ async function main() {
|
|
|
115
76
|
|
|
116
77
|
subscribeVars();
|
|
117
78
|
|
|
118
|
-
//await TestFunction();
|
|
119
|
-
|
|
120
79
|
let readInterval = 5;
|
|
121
80
|
if (parseInt(adapter.config.readInterval) > 0) {
|
|
122
81
|
readInterval = adapter.config.readInterval;
|
|
@@ -124,14 +83,7 @@ async function main() {
|
|
|
124
83
|
adapter.log.debug("read every " + readInterval + " minutes");
|
|
125
84
|
intervalID = setInterval(Do, readInterval * 60 * 1000);
|
|
126
85
|
|
|
127
|
-
/*
|
|
128
|
-
if (killTimer) {
|
|
129
|
-
clearTimeout(killTimer);
|
|
130
|
-
adapter.log.debug("timer killed");
|
|
131
|
-
}
|
|
132
86
|
|
|
133
|
-
adapter.terminate ? adapter.terminate(0) : process.exit(0);
|
|
134
|
-
*/
|
|
135
87
|
}
|
|
136
88
|
|
|
137
89
|
async function Do() {
|
|
@@ -155,7 +107,7 @@ async function HandleStateChange(id, state) {
|
|
|
155
107
|
const ids = id.split(".");
|
|
156
108
|
|
|
157
109
|
if (ids[2] === "cmd") {
|
|
158
|
-
await
|
|
110
|
+
await Do();
|
|
159
111
|
}
|
|
160
112
|
else {
|
|
161
113
|
adapter.log.warn("unhandled state change " + id);
|
|
@@ -270,6 +222,10 @@ async function ebusd_Command() {
|
|
|
270
222
|
received += ", ";
|
|
271
223
|
}
|
|
272
224
|
|
|
225
|
+
//see issue #78: remove CR, LF and last comma
|
|
226
|
+
received = received.replace(/\r?\n|\r/g,"");
|
|
227
|
+
received = received.slice(0, -2);
|
|
228
|
+
|
|
273
229
|
//set result to cmdResult
|
|
274
230
|
await adapter.setStateAsync("cmdResult", { ack: true, val: received });
|
|
275
231
|
}
|
|
@@ -459,16 +415,11 @@ async function ebusd_ReceiveData() {
|
|
|
459
415
|
adapter.log.debug("request data from " + sUrl);
|
|
460
416
|
|
|
461
417
|
try {
|
|
462
|
-
/*
|
|
463
|
-
const getBuffer = bent("string");
|
|
464
|
-
const buffer = await getBuffer(sUrl);
|
|
465
|
-
*/
|
|
466
418
|
|
|
467
419
|
const buffer = await axios.get(sUrl);
|
|
468
420
|
|
|
469
421
|
adapter.log.debug("got data " + typeof buffer.data + " " + JSON.stringify(buffer.data));
|
|
470
422
|
|
|
471
|
-
//const oData = JSON.parse(buffer.data);
|
|
472
423
|
const oData = buffer.data;
|
|
473
424
|
|
|
474
425
|
//adapter.log.debug("oData " + oData);
|
|
@@ -1002,22 +953,6 @@ async function ebusd_ReadValues() {
|
|
|
1002
953
|
|
|
1003
954
|
}
|
|
1004
955
|
|
|
1005
|
-
/*
|
|
1006
|
-
async function TestFunction(){
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
const key = "Test.Test";
|
|
1010
|
-
|
|
1011
|
-
await AddObject(key);
|
|
1012
|
-
|
|
1013
|
-
}
|
|
1014
|
-
*/
|
|
1015
|
-
|
|
1016
|
-
/*
|
|
1017
|
-
async function ebusd_StartReceive(options) {
|
|
1018
|
-
await ebusd_ReceiveData(options);
|
|
1019
|
-
}
|
|
1020
|
-
*/
|
|
1021
956
|
|
|
1022
957
|
// If started as allInOne/compact mode => return function to create instance
|
|
1023
958
|
if (module && module.parent) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iobroker.ebus",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "ioBroker ebus Adapter",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "René G.",
|
|
@@ -20,32 +20,33 @@
|
|
|
20
20
|
"url": "https://github.com/rg-engineering/ioBroker.ebus"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@iobroker/adapter-core": "2.6.
|
|
23
|
+
"@iobroker/adapter-core": "2.6.7",
|
|
24
24
|
"flat": "5.0.2",
|
|
25
25
|
"net": "1.0.2",
|
|
26
26
|
"promise-socket": "7.0.0",
|
|
27
27
|
"cron": "2.1.0",
|
|
28
|
-
"axios": "
|
|
28
|
+
"axios": "1.2.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@iobroker/
|
|
32
|
-
"@
|
|
31
|
+
"@iobroker/adapter-dev": "1.2.0",
|
|
32
|
+
"@iobroker/testing": "4.1.0",
|
|
33
|
+
"@types/chai": "4.3.4",
|
|
33
34
|
"@types/chai-as-promised": "7.1.5",
|
|
34
|
-
"@types/gulp": "4.0.
|
|
35
|
-
"@types/mocha": "
|
|
36
|
-
"@types/node": "18.
|
|
35
|
+
"@types/gulp": "4.0.10",
|
|
36
|
+
"@types/mocha": "10.0.0",
|
|
37
|
+
"@types/node": "18.11.9",
|
|
37
38
|
"@types/proxyquire": "1.3.28",
|
|
38
39
|
"@types/request-promise-native": "1.0.18",
|
|
39
40
|
"@types/sinon": "10.0.13",
|
|
40
|
-
"@types/sinon-chai": "3.2.
|
|
41
|
-
"axios": "
|
|
42
|
-
"chai": "4.3.
|
|
41
|
+
"@types/sinon-chai": "3.2.9",
|
|
42
|
+
"axios": "1.2.0",
|
|
43
|
+
"chai": "4.3.7",
|
|
43
44
|
"chai-as-promised": "7.1.1",
|
|
44
|
-
"eslint": "8.
|
|
45
|
+
"eslint": "8.28.0",
|
|
45
46
|
"gulp": "4.0.2",
|
|
46
|
-
"mocha": "10.
|
|
47
|
+
"mocha": "10.1.0",
|
|
47
48
|
"proxyquire": "2.1.3",
|
|
48
|
-
"sinon": "
|
|
49
|
+
"sinon": "15.0.0",
|
|
49
50
|
"sinon-chai": "3.7.0"
|
|
50
51
|
},
|
|
51
52
|
"main": "main.js",
|
|
@@ -58,6 +59,7 @@
|
|
|
58
59
|
"test:package": "mocha test/package --exit",
|
|
59
60
|
"test:unit": "mocha test/unit --exit",
|
|
60
61
|
"test:integration": "mocha test/integration --exit",
|
|
61
|
-
"lint": "eslint"
|
|
62
|
+
"lint": "eslint",
|
|
63
|
+
"translate": "translate-adapter"
|
|
62
64
|
}
|
|
63
65
|
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Bug report
|
|
3
|
-
about: Something is not working as it should
|
|
4
|
-
title: ''
|
|
5
|
-
labels: 'bug'
|
|
6
|
-
assignees: ''
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
**!!! Before you start !!!**
|
|
10
|
-
1. Verify if there is not already an issue requesting the same
|
|
11
|
-
2. Is this realy a bug of current code or an enhancement request ?
|
|
12
|
-
|
|
13
|
-
**Describe the bug**
|
|
14
|
-
A clear and concise description of what the bug is.
|
|
15
|
-
|
|
16
|
-
**To Reproduce**
|
|
17
|
-
Steps to reproduce the behavior:
|
|
18
|
-
1. Go to '...'
|
|
19
|
-
2. Click on '...'
|
|
20
|
-
3. Scroll down to '....'
|
|
21
|
-
4. See error
|
|
22
|
-
|
|
23
|
-
**Expected behavior**
|
|
24
|
-
A clear and concise description of what you expected to happen.
|
|
25
|
-
|
|
26
|
-
**Screenshots & Logfiles**
|
|
27
|
-
If applicable, add screenshots and logfiles to help explain your problem.
|
|
28
|
-
|
|
29
|
-
**Versions:**
|
|
30
|
-
- Adapter version: <adapter-version>
|
|
31
|
-
- JS-Controller version: <js-controller-version> <!-- determine this with `iobroker -v` on the console -->
|
|
32
|
-
- Node version: <node-version> <!-- determine this with `node -v` on the console -->
|
|
33
|
-
- Operating system: <os-name>
|
|
34
|
-
|
|
35
|
-
**Additional context**
|
|
36
|
-
Add any other context about the problem here.
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Enhancement Request
|
|
3
|
-
about: Request new functionality
|
|
4
|
-
title: ''
|
|
5
|
-
labels: 'enhancement'
|
|
6
|
-
assignees: 'DutchmanNL'
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
**!!! Before you start !!!!**
|
|
10
|
-
Verify if there is not already an issue requesting the same Enhancement
|
|
11
|
-
|
|
12
|
-
**Describe wanted Enhancement !**
|
|
13
|
-
A clear description of the wanted functionality
|
|
14
|
-
|
|
15
|
-
**Why should we put effort in it ?**
|
|
16
|
-
Please add some additional information why this Enhancement should be integrated
|
|
17
|
-
|
|
18
|
-
**Additional context**
|
|
19
|
-
Add any other context about the problem here.
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
name: Publish
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
release:
|
|
5
|
-
types: [created]
|
|
6
|
-
|
|
7
|
-
jobs:
|
|
8
|
-
build:
|
|
9
|
-
runs-on: ubuntu-latest
|
|
10
|
-
steps:
|
|
11
|
-
- uses: actions/checkout@v1
|
|
12
|
-
- uses: actions/setup-node@v1
|
|
13
|
-
with:
|
|
14
|
-
node-version: 10
|
|
15
|
-
- run: npm i
|
|
16
|
-
- run: npm test
|
|
17
|
-
|
|
18
|
-
publish-npm:
|
|
19
|
-
needs: build
|
|
20
|
-
runs-on: ubuntu-latest
|
|
21
|
-
steps:
|
|
22
|
-
- uses: actions/checkout@v1
|
|
23
|
-
- uses: actions/setup-node@v1
|
|
24
|
-
with:
|
|
25
|
-
node-version: 10
|
|
26
|
-
registry-url: https://registry.npmjs.org/
|
|
27
|
-
- run: npm i
|
|
28
|
-
- run: npm publish
|
|
29
|
-
env:
|
|
30
|
-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
# This is a composition of lint and test scripts
|
|
2
|
-
# Make sure to update this file along with the others
|
|
3
|
-
|
|
4
|
-
name: Test and Release
|
|
5
|
-
|
|
6
|
-
# Run this job on all pushes and pull requests
|
|
7
|
-
# as well as tags with a semantic version
|
|
8
|
-
on:
|
|
9
|
-
push:
|
|
10
|
-
branches:
|
|
11
|
-
- "*"
|
|
12
|
-
tags:
|
|
13
|
-
# normal versions
|
|
14
|
-
- "v[0-9]+.[0-9]+.[0-9]+"
|
|
15
|
-
# pre-releases
|
|
16
|
-
- "v[0-9]+.[0-9]+.[0-9]+-**"
|
|
17
|
-
pull_request: {}
|
|
18
|
-
|
|
19
|
-
jobs:
|
|
20
|
-
# Performs quick checks before the expensive test runs
|
|
21
|
-
check-and-lint:
|
|
22
|
-
if: contains(github.event.head_commit.message, '[skip ci]') == false
|
|
23
|
-
|
|
24
|
-
runs-on: ubuntu-latest
|
|
25
|
-
|
|
26
|
-
strategy:
|
|
27
|
-
matrix:
|
|
28
|
-
node-version: [12.x]
|
|
29
|
-
|
|
30
|
-
steps:
|
|
31
|
-
- uses: actions/checkout@v2
|
|
32
|
-
- name: Use Node.js ${{ matrix.node-version }}
|
|
33
|
-
uses: actions/setup-node@v1
|
|
34
|
-
with:
|
|
35
|
-
node-version: ${{ matrix.node-version }}
|
|
36
|
-
|
|
37
|
-
- name: Install Dependencies
|
|
38
|
-
run: npm ci
|
|
39
|
-
|
|
40
|
-
- name: Lint source code
|
|
41
|
-
run: npm run lint
|
|
42
|
-
- name: Test package files
|
|
43
|
-
run: npm run test:package
|
|
44
|
-
|
|
45
|
-
# Runs adapter tests on all supported node versions and OSes
|
|
46
|
-
adapter-tests:
|
|
47
|
-
if: contains(github.event.head_commit.message, '[skip ci]') == false
|
|
48
|
-
|
|
49
|
-
needs: [check-and-lint]
|
|
50
|
-
|
|
51
|
-
runs-on: ${{ matrix.os }}
|
|
52
|
-
strategy:
|
|
53
|
-
matrix:
|
|
54
|
-
node-version: [12.x, 14.x, 16.x]
|
|
55
|
-
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
56
|
-
exclude:
|
|
57
|
-
# Don't test Node.js 8 on Windows. npm is weird here
|
|
58
|
-
- os: windows-latest
|
|
59
|
-
node-version: 8.x
|
|
60
|
-
steps:
|
|
61
|
-
- uses: actions/checkout@v2
|
|
62
|
-
- name: Use Node.js ${{ matrix.node-version }}
|
|
63
|
-
uses: actions/setup-node@v1
|
|
64
|
-
with:
|
|
65
|
-
node-version: ${{ matrix.node-version }}
|
|
66
|
-
|
|
67
|
-
- name: Install Dependencies
|
|
68
|
-
run: npm ci
|
|
69
|
-
|
|
70
|
-
- name: Run unit tests
|
|
71
|
-
run: npm run test:unit
|
|
72
|
-
|
|
73
|
-
- name: Run integration tests (unix only)
|
|
74
|
-
if: startsWith(runner.OS, 'windows') == false
|
|
75
|
-
run: DEBUG=testing:* npm run test:integration
|
|
76
|
-
|
|
77
|
-
- name: Run integration tests (windows only)
|
|
78
|
-
if: startsWith(runner.OS, 'windows')
|
|
79
|
-
run: set DEBUG=testing:* & npm run test:integration
|
|
80
|
-
|
|
81
|
-
# TODO: To enable automatic npm releases, create a token on npmjs.org
|
|
82
|
-
# Enter this token as a GitHub secret (with name NPM_TOKEN) in the repository options
|
|
83
|
-
# Then uncomment the following block:
|
|
84
|
-
|
|
85
|
-
# # Deploys the final package to NPM
|
|
86
|
-
# deploy:
|
|
87
|
-
# needs: [adapter-tests]
|
|
88
|
-
#
|
|
89
|
-
# # Trigger this step only when a commit on master is tagged with a version number
|
|
90
|
-
# if: |
|
|
91
|
-
# contains(github.event.head_commit.message, '[skip ci]') == false &&
|
|
92
|
-
# github.event_name == 'push' &&
|
|
93
|
-
# github.event.base_ref == 'refs/heads/master' &&
|
|
94
|
-
# startsWith(github.ref, 'refs/tags/v')
|
|
95
|
-
#
|
|
96
|
-
# runs-on: ubuntu-latest
|
|
97
|
-
# strategy:
|
|
98
|
-
# matrix:
|
|
99
|
-
# node-version: [12.x]
|
|
100
|
-
#
|
|
101
|
-
# steps:
|
|
102
|
-
# - uses: actions/checkout@v2
|
|
103
|
-
# - name: Use Node.js ${{ matrix.node-version }}
|
|
104
|
-
# uses: actions/setup-node@v1
|
|
105
|
-
# with:
|
|
106
|
-
# node-version: ${{ matrix.node-version }}
|
|
107
|
-
#
|
|
108
|
-
# - name: Publish package to npm
|
|
109
|
-
# run: |
|
|
110
|
-
# npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
|
|
111
|
-
# npm whoami
|
|
112
|
-
# npm publish
|
|
113
|
-
|
|
114
|
-
# Dummy job for skipped builds - without this, github reports the build as failed
|
|
115
|
-
skip-ci:
|
|
116
|
-
if: contains(github.event.head_commit.message, '[skip ci]')
|
|
117
|
-
runs-on: ubuntu-latest
|
|
118
|
-
steps:
|
|
119
|
-
- name: Skip build
|
|
120
|
-
run: echo "Build skipped!"
|