iobroker.autodarts 0.3.3 → 0.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
@@ -16,7 +16,7 @@
16
16
  - Exposes ioBroker states and events so you can:
17
17
  - Turn on lights when a game starts.
18
18
  - Play a sound on a bullseye.
19
- - Announce the current player via TTS.
19
+ - The next throw will be announced via text-to-speech (TTS).
20
20
  - Trigger other automations in ioBroker.
21
21
 
22
22
  It also provides:
@@ -25,11 +25,11 @@ It also provides:
25
25
  - `throw.current`: Numeric score of the last thrown dart.
26
26
  - `throw.isTriple`: Boolean flag that turns true for triple hits within a configurable segment range (e.g. 1–20)
27
27
  - `throw.isBullseye`: Boolean flag that only turns true for bullseye hits.
28
- - `system.boardVersion`: Reported Board Manager version.
29
- - `system.cam0/1/2`: JSON with camera settings (width, height, fps).
28
+ - `system.cams.cam0/1/2`: JSON with camera settings (width, height, fps).
30
29
  - `status.trafficLightColor`: HEX color of the current board status.
31
30
  - `status.trafficLightState`: `green` (player may throw), `yellow` (remove darts), `red` (board error).
32
-
31
+ - `system.software.*`: OS and Autodarts host details (incl. boardVersion & desktopVersion).
32
+ - `system.hardware.*`: CPU, architecture and hostname information.
33
33
 
34
34
  ## What this adapter does NOT do
35
35
 
@@ -46,7 +46,7 @@ In the adapter settings, enter:
46
46
 
47
47
  - **Board Manager IP**: IP address of your Autodarts Board Manager (e.g. `192.168.178.50`).
48
48
  - **Port**: Usually `3180` (default for Board Manager).
49
- - **Polling interval (ms)**: (default for 2000ms)
49
+ - **Polling interval (s)**: (default for 1s)
50
50
 
51
51
  ## Privacy & Data Handling
52
52
 
@@ -59,6 +59,13 @@ In the adapter settings, enter:
59
59
  <!--
60
60
  ### **WORK IN PROGRESS**
61
61
  -->
62
+ ### 0.4.0 (2025-12-28)
63
+ - Changed: Restructured system information into dedicated `system.hardware`, `system.software` and `system.cams` channels.
64
+ - Added: New software info states (`desktopVersion`, `boardVersion`, `platform`, `os`) and hardware info states (`kernelArch`, `cpuModel`, `hostname`).
65
+ - Added: Camera configuration states `system.cams.cam0/1/2` containing JSON with width, height and fps.
66
+ - Changed: Adapter configuration for polling interval and triple trigger thresholds is now fully driven via jsonConfig (dropdowns and number fields).
67
+ - Removed: Experimental light/power alias mapping from internal logic (no user-visible feature was released).
68
+
62
69
  ### 0.3.3 (2025-12-27)
63
70
  - Changed: Configuration fields interval and triggerReset now use seconds instead of milliseconds in the admin UI.
64
71
 
@@ -3,34 +3,34 @@
3
3
  "type": "panel",
4
4
  "items": {
5
5
  "intro": {
6
- "type": "staticText",
7
- "text": "intro_txt",
8
- "newLine": true,
9
- "sm": 12,
10
- "xs": 12,
11
- "md": 12,
12
- "lg": 12,
13
- "xl": 12,
14
- "style": {
15
- "border": "1px solid",
16
- "borderRadius": "0px",
17
- "padding": "8px",
18
- "marginTop": "10px",
19
- "marginBottom": "10px",
20
- "textAlign": "center",
21
- "font-size": "20px"
22
- }
23
- },
6
+ "type": "staticText",
7
+ "text": "intro_txt",
8
+ "newLine": true,
9
+ "sm": 12,
10
+ "xs": 12,
11
+ "md": 12,
12
+ "lg": 12,
13
+ "xl": 12,
14
+ "style": {
15
+ "border": "1px solid",
16
+ "borderRadius": "0px",
17
+ "padding": "8px",
18
+ "marginTop": "10px",
19
+ "marginBottom": "10px",
20
+ "textAlign": "center",
21
+ "font-size": "20px"
22
+ }
23
+ },
24
24
  "host": {
25
25
  "type": "text",
26
26
  "label": "host_ip",
27
27
  "help": "host_ip_help",
28
28
  "newLine": true,
29
- "sm": 12,
30
- "xs": 12,
31
- "md": 6,
32
- "lg": 6,
33
- "xl": 6,
29
+ "sm": 12,
30
+ "xs": 12,
31
+ "md": 6,
32
+ "lg": 6,
33
+ "xl": 6,
34
34
  "style": {
35
35
  "marginTop": "10px",
36
36
  "marginBottom": "10px"
@@ -40,11 +40,11 @@
40
40
  "type": "number",
41
41
  "label": "host_port",
42
42
  "newLine": false,
43
- "sm": 12,
44
- "xs": 12,
45
- "md": 6,
46
- "lg": 6,
47
- "xl": 6,
43
+ "sm": 12,
44
+ "xs": 12,
45
+ "md": 6,
46
+ "lg": 6,
47
+ "xl": 6,
48
48
  "style": {
49
49
  "marginTop": "10px",
50
50
  "marginBottom": "10px"
@@ -56,33 +56,93 @@
56
56
  "help": "triple_flag_help",
57
57
  "default": 1,
58
58
  "options": [
59
- { "label": "1", "value": 1 },
60
- { "label": "2", "value": 2 },
61
- { "label": "3", "value": 3 },
62
- { "label": "4", "value": 4 },
63
- { "label": "5", "value": 5 },
64
- { "label": "6", "value": 6 },
65
- { "label": "7", "value": 7 },
66
- { "label": "8", "value": 8 },
67
- { "label": "9", "value": 9 },
68
- { "label": "10", "value": 10 },
69
- { "label": "11", "value": 11 },
70
- { "label": "12", "value": 12 },
71
- { "label": "13", "value": 13 },
72
- { "label": "14", "value": 14 },
73
- { "label": "15", "value": 15 },
74
- { "label": "16", "value": 16 },
75
- { "label": "17", "value": 17 },
76
- { "label": "18", "value": 18 },
77
- { "label": "19", "value": 19 },
78
- { "label": "20", "value": 20 }
79
- ],
59
+ {
60
+ "label": "1",
61
+ "value": 1
62
+ },
63
+ {
64
+ "label": "2",
65
+ "value": 2
66
+ },
67
+ {
68
+ "label": "3",
69
+ "value": 3
70
+ },
71
+ {
72
+ "label": "4",
73
+ "value": 4
74
+ },
75
+ {
76
+ "label": "5",
77
+ "value": 5
78
+ },
79
+ {
80
+ "label": "6",
81
+ "value": 6
82
+ },
83
+ {
84
+ "label": "7",
85
+ "value": 7
86
+ },
87
+ {
88
+ "label": "8",
89
+ "value": 8
90
+ },
91
+ {
92
+ "label": "9",
93
+ "value": 9
94
+ },
95
+ {
96
+ "label": "10",
97
+ "value": 10
98
+ },
99
+ {
100
+ "label": "11",
101
+ "value": 11
102
+ },
103
+ {
104
+ "label": "12",
105
+ "value": 12
106
+ },
107
+ {
108
+ "label": "13",
109
+ "value": 13
110
+ },
111
+ {
112
+ "label": "14",
113
+ "value": 14
114
+ },
115
+ {
116
+ "label": "15",
117
+ "value": 15
118
+ },
119
+ {
120
+ "label": "16",
121
+ "value": 16
122
+ },
123
+ {
124
+ "label": "17",
125
+ "value": 17
126
+ },
127
+ {
128
+ "label": "18",
129
+ "value": 18
130
+ },
131
+ {
132
+ "label": "19",
133
+ "value": 19
134
+ },
135
+ {
136
+ "label": "20",
137
+ "value": 20
138
+ }
139
+ ],
80
140
  "newLine": true,
81
- "sm": 12,
82
- "xs": 12,
83
- "md": 6,
84
- "lg": 6,
85
- "xl": 6,
141
+ "sm": 12,
142
+ "xs": 12,
143
+ "md": 6,
144
+ "lg": 6,
145
+ "xl": 6,
86
146
  "style": {
87
147
  "marginTop": "10px",
88
148
  "marginBottom": "10px"
@@ -94,33 +154,93 @@
94
154
  "help": "triple_flag2_help",
95
155
  "default": 20,
96
156
  "options": [
97
- { "label": "1", "value": 1 },
98
- { "label": "2", "value": 2 },
99
- { "label": "3", "value": 3 },
100
- { "label": "4", "value": 4 },
101
- { "label": "5", "value": 5 },
102
- { "label": "6", "value": 6 },
103
- { "label": "7", "value": 7 },
104
- { "label": "8", "value": 8 },
105
- { "label": "9", "value": 9 },
106
- { "label": "10", "value": 10 },
107
- { "label": "11", "value": 11 },
108
- { "label": "12", "value": 12 },
109
- { "label": "13", "value": 13 },
110
- { "label": "14", "value": 14 },
111
- { "label": "15", "value": 15 },
112
- { "label": "16", "value": 16 },
113
- { "label": "17", "value": 17 },
114
- { "label": "18", "value": 18 },
115
- { "label": "19", "value": 19 },
116
- { "label": "20", "value": 20 }
117
- ],
157
+ {
158
+ "label": "1",
159
+ "value": 1
160
+ },
161
+ {
162
+ "label": "2",
163
+ "value": 2
164
+ },
165
+ {
166
+ "label": "3",
167
+ "value": 3
168
+ },
169
+ {
170
+ "label": "4",
171
+ "value": 4
172
+ },
173
+ {
174
+ "label": "5",
175
+ "value": 5
176
+ },
177
+ {
178
+ "label": "6",
179
+ "value": 6
180
+ },
181
+ {
182
+ "label": "7",
183
+ "value": 7
184
+ },
185
+ {
186
+ "label": "8",
187
+ "value": 8
188
+ },
189
+ {
190
+ "label": "9",
191
+ "value": 9
192
+ },
193
+ {
194
+ "label": "10",
195
+ "value": 10
196
+ },
197
+ {
198
+ "label": "11",
199
+ "value": 11
200
+ },
201
+ {
202
+ "label": "12",
203
+ "value": 12
204
+ },
205
+ {
206
+ "label": "13",
207
+ "value": 13
208
+ },
209
+ {
210
+ "label": "14",
211
+ "value": 14
212
+ },
213
+ {
214
+ "label": "15",
215
+ "value": 15
216
+ },
217
+ {
218
+ "label": "16",
219
+ "value": 16
220
+ },
221
+ {
222
+ "label": "17",
223
+ "value": 17
224
+ },
225
+ {
226
+ "label": "18",
227
+ "value": 18
228
+ },
229
+ {
230
+ "label": "19",
231
+ "value": 19
232
+ },
233
+ {
234
+ "label": "20",
235
+ "value": 20
236
+ }
237
+ ],
118
238
  "newLine": false,
119
- "sm": 12,
120
- "xs": 12,
121
- "md": 6,
122
- "lg": 6,
123
- "xl": 6,
239
+ "sm": 12,
240
+ "xs": 12,
241
+ "md": 6,
242
+ "lg": 6,
243
+ "xl": 6,
124
244
  "style": {
125
245
  "marginTop": "10px",
126
246
  "marginBottom": "10px"
@@ -132,50 +252,80 @@
132
252
  "help": "reset_help",
133
253
  "default": 0,
134
254
  "newLine": true,
135
- "sm": 12,
136
- "xs": 12,
137
- "md": 12,
138
- "lg": 12,
139
- "xl": 12,
255
+ "sm": 12,
256
+ "xs": 12,
257
+ "md": 12,
258
+ "lg": 12,
259
+ "xl": 12,
140
260
  "style": {
141
261
  "marginTop": "10px",
142
262
  "marginBottom": "10px"
143
263
  }
144
264
  },
145
265
  "intervalSec": {
146
- "type": "number",
266
+ "type": "select",
147
267
  "label": "polling",
148
268
  "help": "polling_help",
149
269
  "default": 1,
270
+ "options": [
271
+ {
272
+ "label": "0.5 s",
273
+ "value": 0.5
274
+ },
275
+ {
276
+ "label": "0.75 s",
277
+ "value": 0.75
278
+ },
279
+ {
280
+ "label": "1 s",
281
+ "value": 1
282
+ },
283
+ {
284
+ "label": "1.5 s",
285
+ "value": 1.5
286
+ },
287
+ {
288
+ "label": "2 s",
289
+ "value": 2
290
+ },
291
+ {
292
+ "label": "2.5 s",
293
+ "value": 2.5
294
+ },
295
+ {
296
+ "label": "3 s",
297
+ "value": 3
298
+ }
299
+ ],
150
300
  "newLine": true,
151
- "sm": 12,
152
- "xs": 12,
153
- "md": 12,
154
- "lg": 12,
155
- "xl": 12,
301
+ "sm": 12,
302
+ "xs": 12,
303
+ "md": 12,
304
+ "lg": 12,
305
+ "xl": 12,
156
306
  "style": {
157
307
  "marginTop": "10px",
158
308
  "marginBottom": "10px"
159
309
  }
160
310
  },
161
311
  "outro": {
162
- "type": "staticText",
163
- "text": "Team inventwo • <a href=\"https://github.com/inventwo\">https://github.com/inventwo</a> • by skvarel",
164
- "newLine": true,
165
- "sm": 12,
166
- "xs": 12,
167
- "md": 12,
168
- "lg": 12,
169
- "xl": 12,
170
- "style": {
171
- "border": "1px solid",
172
- "borderRadius": "0px",
173
- "padding": "8px",
174
- "marginTop": "10px",
175
- "marginBottom": "10px",
176
- "textAlign": "center",
177
- "font-size": "larger"
178
- }
179
- }
312
+ "type": "staticText",
313
+ "text": "Team inventwo • <a href=\"https://github.com/inventwo\">https://github.com/inventwo</a> • by skvarel",
314
+ "newLine": true,
315
+ "sm": 12,
316
+ "xs": 12,
317
+ "md": 12,
318
+ "lg": 12,
319
+ "xl": 12,
320
+ "style": {
321
+ "border": "1px solid",
322
+ "borderRadius": "0px",
323
+ "padding": "8px",
324
+ "marginTop": "10px",
325
+ "marginBottom": "10px",
326
+ "textAlign": "center",
327
+ "font-size": "larger"
328
+ }
329
+ }
180
330
  }
181
- }
331
+ }
package/io-package.json CHANGED
@@ -1,8 +1,21 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "autodarts",
4
- "version": "0.3.3",
4
+ "version": "0.4.0",
5
5
  "news": {
6
+ "0.4.0": {
7
+ "en": "Changed: Restructured system information into dedicated `system.hardware`, `system.software` and `system.cams` channels.\nAdded: New software info states (`desktopVersion`, `boardVersion`, `platform`, `os`) and hardware info states (`kernelArch`, `cpuModel`, `hostname`).\nAdded: Camera configuration states `system.cams.cam0/1/2` containing JSON with width, height and fps.\nChanged: Adapter configuration for polling interval and triple trigger thresholds is now fully driven via jsonConfig (dropdowns and number fields).\nRemoved: Experimental light/power alias mapping from internal logic (no user-visible feature was released).",
8
+ "de": "Geändert: Restrukturierte Systeminformationen in dedizierte `system.hardware`, `system.software` und `system.cams` Kanäle.\nHinzugefügt: Neue Software-Info-Zustände (`desktopVersion`, `boardVersion`, `platform`, `os`) und Hardware-Info-Zustände (`kernelArch`, `cpuModel`, `hostname`).\nHinzugefügt: Kamera-Konfigurationszustände `system.cams.cam0/1/2` mit JSON mit Breite, Höhe und fps.\nGeändert: Adapterkonfiguration für das Abfrageintervall und die dreifachen Triggerschwellen werden nun über jsonConfig (Dropdowns und Nummernfelder) voll angesteuert.\nEntfernt: Experimentelles Licht/Power Alias Mapping aus interner Logik (keine Benutzersichtbarkeit wurde freigegeben).",
9
+ "ru": "Изменение: реструктурированная системная информация в выделенные каналы «system.hardware», «system.software» и «system.cams».\nДобавлено: Новые состояния информации о программном обеспечении («desktopVersion», «boardVersion», «платформа», «os») и состояния информации о аппаратном обеспечении («kernelArch», «cpuModel», «hostname»).\nДобавлено: В конфигурации камеры указано \"system.cams.cam0/1/2\", содержащее JSON с шириной, высотой и fps.\nИзмененная конфигурация адаптера для интервала опроса и тройных триггерных порогов теперь полностью приводится в действие через jsonConfig (выпадения и числовые поля).\nУдалено: Экспериментальное отображение света/мощности по внутренней логике (не было выпущено никаких видимых пользователем функций).",
10
+ "pt": "Modificado: Informações do sistema reestruturadas em `system.hardware` dedicado, `system.software' e `system.cams' canais.\nAdicionado: Novos estados de informação de software (`desktopVersion`, `boardVersion`, `platform`, `os`) e estados de informação de hardware (`kernelArch`, `cpuModel`, `hostname`).\nAdicionado: Os estados de configuração da câmera `system.cams.cam0/1/2` contendo JSON com largura, altura e fps.\nModificado: A configuração do adaptador para o intervalo de votação e limiares triplos de gatilho é agora totalmente conduzida através do jsonConfig (dropdowns e campos numéricos).\nRemovido: Mapeamento de alias de luz/potência experimental da lógica interna (nenhum recurso visível pelo usuário foi lançado).",
11
+ "nl": "Veranderd: Gestructureerde systeeminformatie in dedicated .\nToegevoegd: Nieuwe software info states (.\nToegevoegd: Camera-configuratie staat voor \"system.cams.cam0/1/2.\nGewijzigd: Adapterconfiguratie voor polling interval en triple trigger drempels is nu volledig gedreven via jsonConfig (dropdowns en nummervelden).\nVerwijderd: Experimenteel licht/kracht alias mapping van interne logica (er werd geen gebruikerszichtbare functie vrijgegeven).",
12
+ "fr": "Changed: Restructuration des informations système en canaux dédiés `system.hardware`, `system.software` et `system.cams`.\nAjouté : Nouveaux états d'information logicielle (`desktopVersion`, `boardVersion`, `platform`, `os`) et états d'information matérielle (`kernelArch`, `cpuModel`, `hostname`).\nAjouté: La configuration de la caméra indique `system.cams.cam0/1/2` contenant JSON avec largeur, hauteur et fps.\nChanged: La configuration de l'adaptateur pour l'intervalle de vote et les seuils de triple déclenchement est maintenant entièrement pilotée via jsonConfig (champs déroulants et nombres).\nSupprimé: Carte expérimentale alias lumière/puissance à partir de la logique interne (aucune fonctionnalité visible par l'utilisateur n'a été publiée).",
13
+ "it": "Modificato: informazioni di sistema ristrutturate nei canali `system.hardware` dedicati, `system.software` e `system.cams`.\nAggiunto: Nuovo software info stati (`desktopVersion`, `boardVersion`, `platform`, `os`) e dati hardware stati (`kernelArch`, `cpuModel`, `hostname`).\nAggiunto: Configurazione della fotocamera stati `system.cams.cams.cam0/1/2` contenente JSON con larghezza, altezza e fps.\nModificato: la configurazione dell'adattatore per l'intervallo di polling e le soglie di trigger triple è ora completamente guidata tramite jsonConfig (dropdown e campi numerici).\nRimuoveto: Sperimentale mappatura alias della luce dalla logica interna (non è stata rilasciata alcuna funzione visibile dall'utente).",
14
+ "es": "Cambio: información reestructurada del sistema en canales dedicados `system.hardware`, `system.software` y `system.cams`.\nAñadido: New software info states (`desktopVersion`, `boardVersion`, `platform`, `os`) and hardware info states (`kernelArch`, `cpuModel`, `hostname`).\nAñadido: configuración de la cámara estados `system.cams.cam0/1/2` que contienen JSON con ancho, altura y fps.\nCambio: la configuración del adaptador para intervalos de votación y los umbrales de triple disparador ahora se conduzcan completamente a través de jsonConfig (dropdowns y campos de números).\nEliminado: Experimental light/power alias mapping from internal logic (no user-visible feature was released).",
15
+ "pl": "Zmienione: Przekształcone informacje systemowe na dedykowane kanały \"system.hardware\", \"system.software\" i \"system.cams\".\nDodano: nowe stany informatyczne oprogramowania ('desktopVersion', 'boardVersion', 'platform', 'os') oraz stany informacyjne sprzętu ('kernelArch', 'cpuModel', 'hostname').\nDodano: Konfiguracja kamery stanowi system.cams.cam0 / 1 / 2 'zawierający JSON o szerokości, wysokości i fps.\nZmieniona: Konfiguracja adaptera dla interwałów wyborczych i potrójnych progów wyzwalających jest teraz w pełni napędzana przez jsonConfig (zrzuty i pola liczbowe).\nUsunięty: Experimental light / power alias mapowanie z wewnętrznej logiki (nie została wydana żadna widoczna funkcja użytkownika).",
16
+ "uk": "Змінено: Реструктуризація інформації про систему у виділених `system.hardware`, `system.software` та `system.cams`.\nДодано: Нові інформаційні стани програмного забезпечення (`desktopVersion`, `boardVersion`, `platform`, `os`) та апаратні засоби (`kernelArch`, `cpuModel`, `hostname`).\nДодано: Налаштування камери стани `system.cams.cam0/1/2`, що містять JSON з шириною, висотою і fps.\nЗмінено: Налаштування адаптера для інтервалу опитування та потрійних порогів тригера тепер повністю керована за допомогою jsonConfig (розгортання та кількість полів).\nВидалено: Експериментальні джерела світла/power alias з внутрішньої логіки (без функції користувача).",
17
+ "zh-cn": "更改:将系统信息结构改为专用的`系统.硬件'、`系统.软件'和`系统.摄像头'频道.\n添加:新的软件信息状态(`台式计算机Version'、`boardVersion'、`平台'、`os')和硬件信息状态(`内核Arch'、`cpuModel'、`hostname').\n添加:相机配置为`system.cams.cam0/1/2',内含JSON,宽度,高度和fps.\n更改:用于投票间隔和三重触发阈值的适配器配置现在通过jsonConfig(滴落和数字字段)完全驱动.\n删除:实验光/功率别名从内部逻辑映射(没有发布用户可见特性)."
18
+ },
6
19
  "0.3.3": {
7
20
  "en": "Changed: Configuration fields interval and triggerReset now use seconds instead of milliseconds in the admin UI.",
8
21
  "de": "Geändert: Konfiguration Felder Intervall und TriggerReset verwenden jetzt Sekunden statt Millisekunden im Admin UI.",
@@ -80,19 +93,6 @@
80
93
  "pl": "Reset dla triple i bulseye wyzwalacz dodany",
81
94
  "uk": "Зміщено переадресацію для тридцятого і буклесу",
82
95
  "zh-cn": "重置三重和牛眼触发器"
83
- },
84
- "0.2.0": {
85
- "en": "Added datapoint for bulls-hit\nAdded maximun triple-hit flag score\nUpdate config\nWarning in log cleared",
86
- "de": "Datenpunkt für Bullen-Hit hinzugefügt\nZusätzlich maximun triple-hit flag score\nUpdate config\nWarnung im Protokoll gelöscht",
87
- "ru": "Добавлена точка данных для быков-хит\nДобавлена тройная оценка Maximun\nОбновление конфигурации\nПредупреждение в журнале очищено",
88
- "pt": "Ponto de dados adicionado para bulls-hit\nPontuação da bandeira máxima de três hit\nActualizar a configuração\nAviso no log apagado",
89
- "nl": "Toegevoegd datapoint voor bulls-hit\nToegevoegd maximiun triple-hit vlag score\nConfiguratie bijwerken\nWaarschuwing in log gewist",
90
- "fr": "Ajout du point de données pour bulls-hit\nAjout de maximun triple-hit drapeau score\nMettre à jour la configuration\nAvertissement dans le journal effacé",
91
- "it": "Datapoint aggiunto per bulls-hit\nAggiunto maximun triple-hit flag punteggio\nAggiornamento configurazione\nAvviso in log sgomberato",
92
- "es": "Punto de datos añadido para los toros\nAgregado maximun triple marca de bandera\nActualizar configuración\nAdvertencia en el registro despejado",
93
- "pl": "Dodano punkt danych dla byków\nDodano wynik flagi maximun triplehit\nAktualizuj konfigurację\nOstrzeżenie w dzienniku wyczyszczonym",
94
- "uk": "Додано точку даних для биків-хіт\nДодано максимальний потрійний-hit прапорець бал\nНалаштування оновлення\nПопередження в журналі",
95
- "zh-cn": "给 bull- hit 添加数据点\n增加最大值的三重旗分\n更新配置\n清除日志中的警告"
96
96
  }
97
97
  },
98
98
  "titleLang": {
package/main.js CHANGED
@@ -68,7 +68,6 @@ class Autodarts extends utils.Adapter {
68
68
  },
69
69
  native: {},
70
70
  });
71
-
72
71
  // System-Channel und BoardVersion-Datenpunkt anlegen
73
72
  await this.extendObjectAsync("system", {
74
73
  type: "channel",
@@ -80,8 +79,60 @@ class Autodarts extends utils.Adapter {
80
79
  },
81
80
  native: {},
82
81
  });
82
+ // NEU: Unter-Channels für Hardware und Software
83
+ await this.extendObjectAsync("system.hardware", {
84
+ type: "channel",
85
+ common: {
86
+ name: {
87
+ en: "Hardware",
88
+ de: "Hardware",
89
+ },
90
+ },
91
+ native: {},
92
+ });
93
+
94
+ await this.extendObjectAsync("system.software", {
95
+ type: "channel",
96
+ common: {
97
+ name: {
98
+ en: "Software",
99
+ de: "Software",
100
+ },
101
+ },
102
+ native: {},
103
+ });
104
+ await this.extendObjectAsync("system.cams", {
105
+ type: "channel",
106
+ common: {
107
+ name: {
108
+ en: "Camera configuration",
109
+ de: "Kamera-Konfiguration",
110
+ },
111
+ },
112
+ native: {},
113
+ });
114
+
115
+ // Software-Infos
116
+ await this.extendObjectAsync("system.software.desktopVersion", {
117
+ type: "state",
118
+ common: {
119
+ name: {
120
+ en: "Desktop version",
121
+ de: "Desktop-Version",
122
+ },
123
+ type: "string",
124
+ role: "info.version",
125
+ read: true,
126
+ write: false,
127
+ desc: {
128
+ en: "Version of the Autodarts desktop application",
129
+ de: "Version der Autodarts Desktop-Anwendung",
130
+ },
131
+ },
132
+ native: {},
133
+ });
83
134
 
84
- await this.extendObjectAsync("system.boardVersion", {
135
+ await this.extendObjectAsync("system.software.boardVersion", {
85
136
  type: "state",
86
137
  common: {
87
138
  name: {
@@ -100,8 +151,103 @@ class Autodarts extends utils.Adapter {
100
151
  native: {},
101
152
  });
102
153
 
154
+ await this.extendObjectAsync("system.software.platform", {
155
+ type: "state",
156
+ common: {
157
+ name: {
158
+ en: "Platform",
159
+ de: "Plattform",
160
+ },
161
+ type: "string",
162
+ role: "info.name",
163
+ read: true,
164
+ write: false,
165
+ desc: {
166
+ en: "Operating system platform",
167
+ de: "Betriebssystem-Plattform",
168
+ },
169
+ },
170
+ native: {},
171
+ });
172
+ await this.extendObjectAsync("system.software.os", {
173
+ type: "state",
174
+ common: {
175
+ name: {
176
+ en: "Operating system",
177
+ de: "Betriebssystem",
178
+ },
179
+ type: "string",
180
+ role: "info.name",
181
+ read: true,
182
+ write: false,
183
+ desc: {
184
+ en: "Operating system name as reported by Autodarts host",
185
+ de: "Vom Autodarts-Host gemeldetes Betriebssystem",
186
+ },
187
+ },
188
+ native: {},
189
+ });
190
+
191
+ // Hardware-Infos
192
+ await this.extendObjectAsync("system.hardware.kernelArch", {
193
+ type: "state",
194
+ common: {
195
+ name: {
196
+ en: "Kernel architecture",
197
+ de: "Kernel-Architektur",
198
+ },
199
+ type: "string",
200
+ role: "info.name",
201
+ read: true,
202
+ write: false,
203
+ desc: {
204
+ en: "System kernel architecture (e.g., x86_64, arm64)",
205
+ de: "System-Kernel-Architektur (z.B. x86_64, arm64)",
206
+ },
207
+ },
208
+ native: {},
209
+ });
210
+
211
+ await this.extendObjectAsync("system.hardware.cpuModel", {
212
+ type: "state",
213
+ common: {
214
+ name: {
215
+ en: "CPU model",
216
+ de: "CPU-Modell",
217
+ },
218
+ type: "string",
219
+ role: "info.name",
220
+ read: true,
221
+ write: false,
222
+ desc: {
223
+ en: "CPU model name",
224
+ de: "CPU-Modellbezeichnung",
225
+ },
226
+ },
227
+ native: {},
228
+ });
229
+
230
+ await this.extendObjectAsync("system.hardware.hostname", {
231
+ type: "state",
232
+ common: {
233
+ name: {
234
+ en: "Hostname",
235
+ de: "Hostname",
236
+ },
237
+ type: "string",
238
+ role: "info.name",
239
+ read: true,
240
+ write: false,
241
+ desc: {
242
+ en: "Hostname of the Autodarts system",
243
+ de: "Hostname des Autodarts-Systems",
244
+ },
245
+ },
246
+ native: {},
247
+ });
248
+
103
249
  // Kamera-Infos als JSON-States
104
- await this.extendObjectAsync("system.cam0", {
250
+ await this.extendObjectAsync("system.cams.cam0", {
105
251
  type: "state",
106
252
  common: {
107
253
  name: {
@@ -120,7 +266,7 @@ class Autodarts extends utils.Adapter {
120
266
  native: {},
121
267
  });
122
268
 
123
- await this.extendObjectAsync("system.cam1", {
269
+ await this.extendObjectAsync("system.cams.cam1", {
124
270
  type: "state",
125
271
  common: {
126
272
  name: {
@@ -139,7 +285,7 @@ class Autodarts extends utils.Adapter {
139
285
  native: {},
140
286
  });
141
287
 
142
- await this.extendObjectAsync("system.cam2", {
288
+ await this.extendObjectAsync("system.cams.cam2", {
143
289
  type: "state",
144
290
  common: {
145
291
  name: {
@@ -265,12 +411,12 @@ class Autodarts extends utils.Adapter {
265
411
  this.pollTimer = setInterval(() => this.fetchState(), pollIntervalMs);
266
412
  this.fetchState();
267
413
 
268
- // Boardmanager-Version und Kameras abfragen und alle 5 Minuten aktualisieren
269
- this.fetchVersion();
414
+ // Host-Informationen und Kameras abfragen und alle 5 Minuten aktualisieren
415
+ this.fetchHost();
270
416
  this.fetchConfig();
271
417
  this.versionTimer = setInterval(
272
418
  () => {
273
- this.fetchVersion();
419
+ this.fetchHost();
274
420
  this.fetchConfig();
275
421
  },
276
422
  5 * 60 * 1000,
@@ -330,7 +476,6 @@ class Autodarts extends utils.Adapter {
330
476
  this.tripleMaxScoreRuntime = val;
331
477
  this.log.info(`Runtime tripleMaxScore updated to ${val}`);
332
478
 
333
- // Wert mit ack bestätigen
334
479
  await this.setStateAsync("config.tripleMaxScore", { val, ack: true });
335
480
  } else if (idShort === "config.triggerResetSec") {
336
481
  const val = Number(state.val);
@@ -342,7 +487,6 @@ class Autodarts extends utils.Adapter {
342
487
  this.triggerResetSecRuntime = val;
343
488
  this.log.info(`Runtime triggerResetSec updated to ${val} s`);
344
489
 
345
- // Wert mit ack bestätigen
346
490
  await this.setStateAsync("config.triggerResetSec", { val, ack: true });
347
491
  }
348
492
  }
@@ -412,20 +556,6 @@ class Autodarts extends utils.Adapter {
412
556
  }
413
557
  }
414
558
 
415
- /**
416
- * Boardmanager Version abfragen
417
- */
418
- async fetchVersion() {
419
- try {
420
- const data = await httpHelper.makeRequest(this, "/api/version");
421
- const version = data.trim();
422
- await this.setStateAsync("system.boardVersion", { val: version, ack: true });
423
- } catch {
424
- // Bei Fehler State leeren (keine Log-Warnung)
425
- await this.setStateAsync("system.boardVersion", { val: "", ack: true });
426
- }
427
- }
428
-
429
559
  /**
430
560
  * Board-Konfiguration abfragen (Kameras)
431
561
  */
@@ -443,9 +573,9 @@ class Autodarts extends utils.Adapter {
443
573
 
444
574
  const json = JSON.stringify(camInfo);
445
575
 
446
- await this.setStateAsync("system.cam0", { val: json, ack: true });
447
- await this.setStateAsync("system.cam1", { val: json, ack: true });
448
- await this.setStateAsync("system.cam2", { val: json, ack: true });
576
+ await this.setStateAsync("system.cams.cam0", { val: json, ack: true });
577
+ await this.setStateAsync("system.cams.cam1", { val: json, ack: true });
578
+ await this.setStateAsync("system.cams.cam2", { val: json, ack: true });
449
579
  } catch (error) {
450
580
  // Bei Fehler keine Log-Warnung
451
581
  if (
@@ -458,6 +588,61 @@ class Autodarts extends utils.Adapter {
458
588
  }
459
589
  }
460
590
  }
591
+ /**
592
+ * Host-Informationen abfragen
593
+ */
594
+ async fetchHost() {
595
+ try {
596
+ const data = await httpHelper.makeRequest(this, "/api/host");
597
+ const host = JSON.parse(data);
598
+
599
+ // clientVersion als boardVersion schreiben
600
+ await this.setStateAsync("system.software.boardVersion", {
601
+ val: host.clientVersion || "",
602
+ ack: true,
603
+ });
604
+ // desktopVersion
605
+ await this.setStateAsync("system.software.desktopVersion", {
606
+ val: host.desktopVersion || "",
607
+ ack: true,
608
+ });
609
+ // platform
610
+ await this.setStateAsync("system.software.platform", {
611
+ val: host.platform || "",
612
+ ack: true,
613
+ });
614
+ // os (Software)
615
+ await this.setStateAsync("system.software.os", {
616
+ val: host.os || "",
617
+ ack: true,
618
+ });
619
+ // kernelArch
620
+ await this.setStateAsync("system.hardware.kernelArch", {
621
+ val: host.kernelArch || "",
622
+ ack: true,
623
+ });
624
+ // cpuModel (aus cpu.model)
625
+ await this.setStateAsync("system.hardware.cpuModel", {
626
+ val: host.cpu?.model || "",
627
+ ack: true,
628
+ });
629
+ // hostname (Hardware)
630
+ await this.setStateAsync("system.hardware.hostname", {
631
+ val: host.hostname || "",
632
+ ack: true,
633
+ });
634
+ } catch (error) {
635
+ // Bei Fehler keine Log-Warnung
636
+ if (
637
+ error &&
638
+ typeof error === "object" &&
639
+ typeof error.message === "string" &&
640
+ error.message.includes("JSON")
641
+ ) {
642
+ this.log.debug(`Could not parse host info: ${error.message}`);
643
+ }
644
+ }
645
+ }
461
646
 
462
647
  onUnload(callback) {
463
648
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.autodarts",
3
- "version": "0.3.3",
3
+ "version": "0.4.0",
4
4
  "description": "Autodarts Autoscoring",
5
5
  "author": "skvarel <skvarel@inventwo.com>",
6
6
  "contributors": [