iobroker.autodarts 0.3.2 → 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 +15 -5
- package/admin/i18n/de.json +4 -4
- package/admin/i18n/en.json +4 -4
- package/admin/i18n/es.json +4 -4
- package/admin/i18n/fr.json +5 -5
- package/admin/i18n/it.json +4 -4
- package/admin/i18n/nl.json +4 -4
- package/admin/i18n/pl.json +4 -4
- package/admin/i18n/pt.json +4 -4
- package/admin/i18n/ru.json +4 -4
- package/admin/i18n/uk.json +4 -4
- package/admin/i18n/zh-cn.json +4 -4
- package/admin/jsonConfig.json +263 -113
- package/io-package.json +31 -28
- package/lib/throw.js +2 -2
- package/lib/trafficLight.js +1 -0
- package/main.js +237 -49
- package/package.json +1 -1
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
|
-
-
|
|
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.
|
|
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 (
|
|
49
|
+
- **Polling interval (s)**: (default for 1s)
|
|
50
50
|
|
|
51
51
|
## Privacy & Data Handling
|
|
52
52
|
|
|
@@ -59,6 +59,16 @@ 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
|
+
|
|
69
|
+
### 0.3.3 (2025-12-27)
|
|
70
|
+
- Changed: Configuration fields interval and triggerReset now use seconds instead of milliseconds in the admin UI.
|
|
71
|
+
|
|
62
72
|
### 0.3.2 (2025-12-27)
|
|
63
73
|
- (DrozmotiX) **ENHANCED**: Fixed all TypeScript type errors by adding proper type definitions for config properties
|
|
64
74
|
- (DrozmotiX) **ENHANCED**: Refactored HTTP request handling - created reusable httpHelper module to eliminate code duplication
|
package/admin/i18n/de.json
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
"host_port": "Autodarts (Boardmanager) Port",
|
|
5
5
|
"host_port_help": "Portnummer des lokalen Autodarts Boardmanagers.",
|
|
6
6
|
"intro_txt": "Konfiguration des Autodarts-Adapters.",
|
|
7
|
-
"polling": "Abfrageintervall (
|
|
8
|
-
"polling_help": "Abfrageintervall in
|
|
9
|
-
"reset": "Trigger-Reset (
|
|
10
|
-
"reset_help": "Setzt den Triple- und Bullseye-Trigger nach x
|
|
7
|
+
"polling": "Abfrageintervall (s)",
|
|
8
|
+
"polling_help": "Abfrageintervall in Sekunden zum Abrufen von Daten vom Autodarts Boardmanager.",
|
|
9
|
+
"reset": "Trigger-Reset (s)",
|
|
10
|
+
"reset_help": "Setzt den Triple- und Bullseye-Trigger nach x Sekunden zurück (0 = kein Reset).",
|
|
11
11
|
"triple_flag": "Minimales Feld für den Triple-Trigger",
|
|
12
12
|
"triple_flag2": "Maximales Feld für den Triple-Trigger",
|
|
13
13
|
"triple_flag2_help": "Feld „Maximale Punktzahl“ für den Triple-Trigger. Darts mit einer Punktzahl über diesem Wert lösen den Triple-Trigger-Datenpunkt nicht aus.",
|
package/admin/i18n/en.json
CHANGED
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
"host_port": "Autodarts (Boardmanager) Port",
|
|
5
5
|
"host_port_help": "Port number of the local Autodarts Boardmanager.",
|
|
6
6
|
"intro_txt": "Autodarts adapter configuration.",
|
|
7
|
-
"polling": "Polling interval (
|
|
8
|
-
"polling_help": "Polling interval in
|
|
7
|
+
"polling": "Polling interval (s)",
|
|
8
|
+
"polling_help": "Polling interval in seconds to retrieve data from the Autodarts Boardmanager.",
|
|
9
9
|
"triple_flag": "Minimum field for the triple trigger",
|
|
10
10
|
"triple_flag2": "Maximum field for the triple trigger",
|
|
11
11
|
"triple_flag2_help": "Maximum score field for the triple trigger. Darts with a score above this value will not trigger the Triple-Trigger datapoint.",
|
|
12
12
|
"triple_flag_help": "Minimum score field for the triple trigger. Darts with a score below this value will not trigger the Triple-Trigger datapoint.",
|
|
13
|
-
"reset": "Trigger-Reset (
|
|
14
|
-
"reset_help": "Reset the triple and bullseye trigger after x
|
|
13
|
+
"reset": "Trigger-Reset (s)",
|
|
14
|
+
"reset_help": "Reset the triple and bullseye trigger after x seconds (0 = no reset)."
|
|
15
15
|
}
|
package/admin/i18n/es.json
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
"host_port": "Puerto Autodarts (Boardmanager)",
|
|
5
5
|
"host_port_help": "Número de puerto del administrador local de Autodarts Boardmanager.",
|
|
6
6
|
"intro_txt": "Configuración del adaptador Autodarts.",
|
|
7
|
-
"polling": "Intervalo de sondeo
|
|
8
|
-
"polling_help": "Intervalo de sondeo en
|
|
9
|
-
"reset": "Restablecimiento
|
|
10
|
-
"reset_help": "Restablezca el disparador triple y de diana después de x
|
|
7
|
+
"polling": "Intervalo(s) de sondeo",
|
|
8
|
+
"polling_help": "Intervalo de sondeo en segundos para recuperar datos del Autodarts Boardmanager.",
|
|
9
|
+
"reset": "Restablecimiento de disparador (s)",
|
|
10
|
+
"reset_help": "Restablezca el disparador triple y de diana después de x segundos (0 = sin reinicio).",
|
|
11
11
|
"triple_flag": "Campo mínimo para el triple disparador",
|
|
12
12
|
"triple_flag2": "Campo máximo para el triple disparador",
|
|
13
13
|
"triple_flag2_help": "Campo de puntuación máxima para el triple disparador. Los dardos con una puntuación superior a este valor no activarán el punto de datos Triple-Trigger.",
|
package/admin/i18n/fr.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"host_ip": "Autodarts (Boardmanager) Hôte/IP",
|
|
3
|
-
"host_ip_help": "Adresse IP
|
|
3
|
+
"host_ip_help": "Adresse IP du Boardmanager Autodarts local.",
|
|
4
4
|
"host_port": "Port Autodarts (Boardmanager)",
|
|
5
5
|
"host_port_help": "Numéro de port du Boardmanager Autodarts local.",
|
|
6
6
|
"intro_txt": "Configuration de l'adaptateur Autodarts.",
|
|
7
|
-
"polling": "Intervalle d'interrogation
|
|
8
|
-
"polling_help": "Intervalle d'interrogation en
|
|
9
|
-
"reset": "Déclencheur-
|
|
10
|
-
"reset_help": "Réinitialisez le déclencheur triple et bullseye après x
|
|
7
|
+
"polling": "Intervalle(s) d'interrogation",
|
|
8
|
+
"polling_help": "Intervalle d'interrogation en secondes pour récupérer les données de l'Autodarts Boardmanager.",
|
|
9
|
+
"reset": "Déclencheur-Réinitialisation(s)",
|
|
10
|
+
"reset_help": "Réinitialisez le déclencheur triple et bullseye après x secondes (0 = pas de réinitialisation).",
|
|
11
11
|
"triple_flag": "Champ minimum pour le triple déclencheur",
|
|
12
12
|
"triple_flag2": "Champ maximum pour le triple déclencheur",
|
|
13
13
|
"triple_flag2_help": "Champ de score maximum pour le triple déclencheur. Les fléchettes avec un score supérieur à cette valeur ne déclencheront pas le point de données Triple-Trigger.",
|
package/admin/i18n/it.json
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
"host_port": "Porta Autodarts (Boardmanager).",
|
|
5
5
|
"host_port_help": "Numero di porta del Boardmanager Autodarts locale.",
|
|
6
6
|
"intro_txt": "Configurazione dell'adattatore Autodarts.",
|
|
7
|
-
"polling": "Intervallo di polling (
|
|
8
|
-
"polling_help": "Intervallo di polling in
|
|
9
|
-
"reset": "
|
|
10
|
-
"reset_help": "Ripristina il
|
|
7
|
+
"polling": "Intervallo di polling (s)",
|
|
8
|
+
"polling_help": "Intervallo di polling in secondi per recuperare i dati da Autodarts Boardmanager.",
|
|
9
|
+
"reset": "Trigger-Reset(s)",
|
|
10
|
+
"reset_help": "Ripristina il grilletto triplo e bullseye dopo x secondi (0 = nessun ripristino).",
|
|
11
11
|
"triple_flag": "Campo minimo per il triplo trigger",
|
|
12
12
|
"triple_flag2": "Campo massimo per il triplo trigger",
|
|
13
13
|
"triple_flag2_help": "Campo del punteggio massimo per il triplo trigger. Le freccette con un punteggio superiore a questo valore non attiveranno il punto dati Triple-Trigger.",
|
package/admin/i18n/nl.json
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
"host_port": "Autodarts (Bestuursmanager) Port",
|
|
5
5
|
"host_port_help": "Poortnummer van de lokale Autodarts Boardmanager.",
|
|
6
6
|
"intro_txt": "Autodarts-adapterconfiguratie.",
|
|
7
|
-
"polling": "Polling-interval (
|
|
8
|
-
"polling_help": "Polling-interval in
|
|
9
|
-
"reset": "Trigger-reset (
|
|
10
|
-
"reset_help": "Reset de drievoudige en bullseye-trigger na x
|
|
7
|
+
"polling": "Polling-interval (s)",
|
|
8
|
+
"polling_help": "Polling-interval in seconden om gegevens uit de Autodarts Boardmanager op te halen.",
|
|
9
|
+
"reset": "Trigger-reset (s)",
|
|
10
|
+
"reset_help": "Reset de drievoudige en bullseye-trigger na x seconden (0 = geen reset).",
|
|
11
11
|
"triple_flag": "Minimumveld voor de drievoudige trigger",
|
|
12
12
|
"triple_flag2": "Maximaal veld voor de drievoudige trigger",
|
|
13
13
|
"triple_flag2_help": "Maximaal scoreveld voor de drievoudige trigger. Darten met een score boven deze waarde activeren het Triple-Trigger-datapunt niet.",
|
package/admin/i18n/pl.json
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
"host_port": "Port Autodarts (Boardmanager).",
|
|
5
5
|
"host_port_help": "Numer portu lokalnego zarządcy Autodarts.",
|
|
6
6
|
"intro_txt": "Konfiguracja adaptera Autodarts.",
|
|
7
|
-
"polling": "Interwał odpytywania (
|
|
8
|
-
"polling_help": "Interwał odpytywania w
|
|
9
|
-
"reset": "Reset wyzwalacza (
|
|
10
|
-
"reset_help": "Zresetuj wyzwalacz potrójny i tarczy po x
|
|
7
|
+
"polling": "Interwał odpytywania (s)",
|
|
8
|
+
"polling_help": "Interwał odpytywania w sekundach w celu pobrania danych z menedżera Autodarts Boardmanager.",
|
|
9
|
+
"reset": "Reset wyzwalacza (s)",
|
|
10
|
+
"reset_help": "Zresetuj wyzwalacz potrójny i tarczy po x sekundach (0 = brak resetu).",
|
|
11
11
|
"triple_flag": "Minimalne pole dla potrójnego wyzwalacza",
|
|
12
12
|
"triple_flag2": "Maksymalne pole dla potrójnego wyzwalacza",
|
|
13
13
|
"triple_flag2_help": "Pole maksymalnego wyniku dla potrójnego wyzwalacza. Rzutki z wynikiem powyżej tej wartości nie uruchomią punktu danych Triple-Trigger.",
|
package/admin/i18n/pt.json
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
"host_port": "Porto Autodarts (Boardmanager)",
|
|
5
5
|
"host_port_help": "Número da porta do Autodarts Boardmanager local.",
|
|
6
6
|
"intro_txt": "Configuração do adaptador Autodarts.",
|
|
7
|
-
"polling": "Intervalo de pesquisa
|
|
8
|
-
"polling_help": "Intervalo de pesquisa em
|
|
9
|
-
"reset": "
|
|
10
|
-
"reset_help": "Redefina o gatilho triplo e alvo após x
|
|
7
|
+
"polling": "Intervalo(s) de pesquisa",
|
|
8
|
+
"polling_help": "Intervalo de pesquisa em segundos para recuperar dados do Autodarts Boardmanager.",
|
|
9
|
+
"reset": "Redefinição(ões) de gatilho",
|
|
10
|
+
"reset_help": "Redefina o gatilho triplo e alvo após x segundos (0 = sem reinicialização).",
|
|
11
11
|
"triple_flag": "Campo mínimo para o disparo triplo",
|
|
12
12
|
"triple_flag2": "Campo máximo para o disparo triplo",
|
|
13
13
|
"triple_flag2_help": "Campo de pontuação máxima para o disparo triplo. Dardos com pontuação acima deste valor não acionarão o ponto de dados Triple-Trigger.",
|
package/admin/i18n/ru.json
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
"host_port": "Порт Autodarts (Boardmanager)",
|
|
5
5
|
"host_port_help": "Номер порта местного Autodarts Boardmanager.",
|
|
6
6
|
"intro_txt": "Конфигурация адаптера Autodarts.",
|
|
7
|
-
"polling": "Интервал опроса (
|
|
8
|
-
"polling_help": "Интервал опроса в
|
|
9
|
-
"reset": "
|
|
10
|
-
"reset_help": "Сбросьте триггер и триггер «яблочко» через x
|
|
7
|
+
"polling": "Интервал опроса (с)",
|
|
8
|
+
"polling_help": "Интервал опроса в секундах для получения данных из Autodarts Boardmanager.",
|
|
9
|
+
"reset": "Триггер-Сброс (ы)",
|
|
10
|
+
"reset_help": "Сбросьте триггер и триггер «яблочко» через x секунд (0 = сброса нет).",
|
|
11
11
|
"triple_flag": "Минимальное поле для тройного триггера",
|
|
12
12
|
"triple_flag2": "Максимальное поле для тройного триггера",
|
|
13
13
|
"triple_flag2_help": "Поле максимального результата для тройного триггера. Дартс с результатом выше этого значения не будет активировать точку данных тройного триггера.",
|
package/admin/i18n/uk.json
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
"host_port": "Autodarts (Boardmanager) Порт",
|
|
5
5
|
"host_port_help": "Номер порту місцевого менеджера Autodarts Board.",
|
|
6
6
|
"intro_txt": "Конфігурація адаптера Autodarts.",
|
|
7
|
-
"polling": "Інтервал опитування (
|
|
8
|
-
"polling_help": "Інтервал опитування в
|
|
9
|
-
"reset": "
|
|
10
|
-
"reset_help": "Скинути потрійний тригер і тригер
|
|
7
|
+
"polling": "Інтервал опитування (с)",
|
|
8
|
+
"polling_help": "Інтервал опитування в секундах для отримання даних із Autodarts Boardmanager.",
|
|
9
|
+
"reset": "Тригер-Скидання (s)",
|
|
10
|
+
"reset_help": "Скинути потрійний тригер і тригер «яблочко» через x секунд (0 = без скидання).",
|
|
11
11
|
"triple_flag": "Мінімальне поле для потрійного тригера",
|
|
12
12
|
"triple_flag2": "Максимальне поле для потрійного тригера",
|
|
13
13
|
"triple_flag2_help": "Поле максимального балу для потрійного тригера. Дартс із результатом вище цього значення не активує точку даних Triple-Trigger.",
|
package/admin/i18n/zh-cn.json
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
"host_port": "Autodarts(Boardmanager)端口",
|
|
5
5
|
"host_port_help": "本地 Autodarts Boardmanager 的端口号。",
|
|
6
6
|
"intro_txt": "Autodarts 适配器配置。",
|
|
7
|
-
"polling": "
|
|
8
|
-
"polling_help": "从 Autodarts Boardmanager
|
|
9
|
-
"reset": "
|
|
10
|
-
"reset_help": "x
|
|
7
|
+
"polling": "轮询间隔(秒)",
|
|
8
|
+
"polling_help": "从 Autodarts Boardmanager 检索数据的轮询间隔(以秒为单位)。",
|
|
9
|
+
"reset": "触发-复位",
|
|
10
|
+
"reset_help": "x 秒后重置三重触发器和靶心触发器(0 = 不重置)。",
|
|
11
11
|
"triple_flag": "三重触发器的最小字段",
|
|
12
12
|
"triple_flag2": "三重触发器的最大字段",
|
|
13
13
|
"triple_flag2_help": "三重触发器的最大分数字段。分数高于此值的飞镖将不会触发三重触发数据点。",
|
package/admin/jsonConfig.json
CHANGED
|
@@ -3,34 +3,34 @@
|
|
|
3
3
|
"type": "panel",
|
|
4
4
|
"items": {
|
|
5
5
|
"intro": {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
-
{
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
{
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
{
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
{
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
{
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
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
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
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,88 +154,178 @@
|
|
|
94
154
|
"help": "triple_flag2_help",
|
|
95
155
|
"default": 20,
|
|
96
156
|
"options": [
|
|
97
|
-
{
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
{
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
{
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
{
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
{
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
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
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
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"
|
|
127
247
|
}
|
|
128
248
|
},
|
|
129
|
-
"
|
|
249
|
+
"triggerResetSec": {
|
|
130
250
|
"type": "number",
|
|
131
251
|
"label": "reset",
|
|
132
252
|
"help": "reset_help",
|
|
133
253
|
"default": 0,
|
|
134
254
|
"newLine": true,
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
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
|
-
"
|
|
146
|
-
"type": "
|
|
265
|
+
"intervalSec": {
|
|
266
|
+
"type": "select",
|
|
147
267
|
"label": "polling",
|
|
148
268
|
"help": "polling_help",
|
|
149
|
-
"default":
|
|
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
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
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
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
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,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "autodarts",
|
|
4
|
-
"version": "0.
|
|
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
|
+
},
|
|
19
|
+
"0.3.3": {
|
|
20
|
+
"en": "Changed: Configuration fields interval and triggerReset now use seconds instead of milliseconds in the admin UI.",
|
|
21
|
+
"de": "Geändert: Konfiguration Felder Intervall und TriggerReset verwenden jetzt Sekunden statt Millisekunden im Admin UI.",
|
|
22
|
+
"ru": "Изменение: интервалы полей конфигурации и триггер сброс теперь используют секунды вместо миллисекунд в пользовательском интерфейсе администратора.",
|
|
23
|
+
"pt": "Modificado: Intervalo de campos de configuração e gatilhoReset agora use segundos em vez de milissegundos na interface de administração.",
|
|
24
|
+
"nl": "Gewijzigd: Configuratievelden interval en triggerReset gebruikt nu seconden in plaats van milliseconden in de admin UI.",
|
|
25
|
+
"fr": "Changed: Champs de configuration intervalle et triggerReset maintenant utiliser secondes au lieu de millisecondes dans l'interface utilisateur admin.",
|
|
26
|
+
"it": "Modificato: intervallo di campi di configurazione e triggerReset ora utilizzare secondi invece di millisecondi nell'interfaccia utente di amministrazione.",
|
|
27
|
+
"es": "Cambio: intervalo de campos de configuración y gatilloReset ahora use segundos en lugar de milisegundos en la interfaz de administración.",
|
|
28
|
+
"pl": "Zmieniony: Przedział pól konfiguracyjnych i tryggerReset używają teraz sekund zamiast milisekund w interfejsu administratora.",
|
|
29
|
+
"uk": "Змінено: інтервал конфігураційних полів і тригерЗмінити зараз за допомогою секунд замість мілісекундів в адмін UI.",
|
|
30
|
+
"zh-cn": "已更改: 配置字段间隔和触发 Reset 现在在管理员UI中使用秒而不是毫秒 ."
|
|
31
|
+
},
|
|
6
32
|
"0.3.2": {
|
|
7
33
|
"en": "**ENHANCED**: Fixed all TypeScript type errors by adding proper type definitions for config properties\n**ENHANCED**: Refactored HTTP request handling - created reusable httpHelper module to eliminate code duplication\n**ENHANCED**: Converted HTTP callback-based requests to async/await pattern for better error handling\n**ENHANCED**: Improved connection state logging - now logs when connection is restored after being offline\n**ENHANCED**: Standardized async/await usage across all state change handlers for consistency\n**FIXED**: Removed unused error variable in fetchVersion method\n**FIXED**: Added proper error type checking in fetchConfig to prevent runtime errors\n**TESTING**: Added comprehensive unit tests for httpHelper module covering success, timeout, and error scenarios",
|
|
8
34
|
"de": "**ENHANCED**: Alle TypeScript-Typfehler behoben, indem richtige Typendefinitionen für config-Eigenschaften hinzugefügt wurden\n**ENHANCED**: Refactored HTTP Request Handling - erstelltes wiederverwendbares httpHelper Modul zur Beseitigung der Codevervielfachung\n**ENHANCED**: Konvertierte HTTP-Requests auf async/await-Muster für eine bessere Fehlerbehandlung\n**ENHANCED**: Verbesserte Verbindungszustandsprotokollierung - protokolliert nun, wenn die Verbindung nach Offline wiederhergestellt wird\n**ENHANCED**: Standardisierte async/await Nutzung über alle State Change-Handler für Konsistenz\n**FIXED**: Ungenutzte Fehlervariable in fetchVersion Methode entfernt\n**FIXED**: Es wurde eine ordnungsgemäße Fehlersuche im fetchConfig hinzugefügt, um Laufzeitfehler zu verhindern\n**TESTING**: Ergänzende Unit-Tests für das httpHelper-Modul für Erfolgs-, Timeout- und Fehlerszenarien",
|
|
@@ -67,32 +93,6 @@
|
|
|
67
93
|
"pl": "Reset dla triple i bulseye wyzwalacz dodany",
|
|
68
94
|
"uk": "Зміщено переадресацію для тридцятого і буклесу",
|
|
69
95
|
"zh-cn": "重置三重和牛眼触发器"
|
|
70
|
-
},
|
|
71
|
-
"0.2.0": {
|
|
72
|
-
"en": "Added datapoint for bulls-hit\nAdded maximun triple-hit flag score\nUpdate config\nWarning in log cleared",
|
|
73
|
-
"de": "Datenpunkt für Bullen-Hit hinzugefügt\nZusätzlich maximun triple-hit flag score\nUpdate config\nWarnung im Protokoll gelöscht",
|
|
74
|
-
"ru": "Добавлена точка данных для быков-хит\nДобавлена тройная оценка Maximun\nОбновление конфигурации\nПредупреждение в журнале очищено",
|
|
75
|
-
"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",
|
|
76
|
-
"nl": "Toegevoegd datapoint voor bulls-hit\nToegevoegd maximiun triple-hit vlag score\nConfiguratie bijwerken\nWaarschuwing in log gewist",
|
|
77
|
-
"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é",
|
|
78
|
-
"it": "Datapoint aggiunto per bulls-hit\nAggiunto maximun triple-hit flag punteggio\nAggiornamento configurazione\nAvviso in log sgomberato",
|
|
79
|
-
"es": "Punto de datos añadido para los toros\nAgregado maximun triple marca de bandera\nActualizar configuración\nAdvertencia en el registro despejado",
|
|
80
|
-
"pl": "Dodano punkt danych dla byków\nDodano wynik flagi maximun triplehit\nAktualizuj konfigurację\nOstrzeżenie w dzienniku wyczyszczonym",
|
|
81
|
-
"uk": "Додано точку даних для биків-хіт\nДодано максимальний потрійний-hit прапорець бал\nНалаштування оновлення\nПопередження в журналі",
|
|
82
|
-
"zh-cn": "给 bull- hit 添加数据点\n增加最大值的三重旗分\n更新配置\n清除日志中的警告"
|
|
83
|
-
},
|
|
84
|
-
"0.1.0": {
|
|
85
|
-
"en": "Added datapoints for visit score, current dart score, triple-hit flag with configurable minimum score, and camera configuration (cam0–cam2).\nCleaned up adapter logic and internal polling/timing.\nUpdated translations.",
|
|
86
|
-
"de": "Weitere Datenpunkte für Besuchscore, aktuelle Dart-Score, Tripel-hit-Flag mit konfigurierbaren minimalen Punktzahl und Kamerakonfiguration (cam0–cam2).\nAufgereinigte Adapterlogik und interne Abfrage/timing.\nAktualisierte Übersetzungen.",
|
|
87
|
-
"ru": "Добавлены точки данных для оценки посещений, текущая оценка дарта, флаг тройного удара с настраиваемым минимальным баллом и конфигурация камеры (cam0-cam2).\nОчищена адаптерная логика и внутренний опрос/настройка.\nОбновленные переводы.",
|
|
88
|
-
"pt": "Adicionados pontos de dados para a pontuação de visita, pontuação de dardo atual, bandeira de triplo hit com pontuação mínima configurável, e configuração da câmera (cam0–cam2).\nLimpei a lógica do adaptador e as pesquisas internas.\nTradução atualizada.",
|
|
89
|
-
"nl": "Toegevoegd datapoints voor bezoek score, huidige dart score, triple-hit vlag met configureerbare minimum score, en camera configuratie (cam0.\nOpgeruimd adapter logica en interne peiling / timing.\nBijgewerkte vertalingen.",
|
|
90
|
-
"fr": "Ajout de points de données pour le score de visite, le score de fléchette actuel, le drapeau triple-hit avec le score minimum configurable et la configuration de la caméra (cam0–cam2).\nNettoyer la logique de l'adaptateur et effectuer des sondages internes/timing.\nTraductions actualisées.",
|
|
91
|
-
"it": "Aggiunti i datapoint per il punteggio di visita, il punteggio di freccette corrente, la bandiera a triplo punto con il punteggio minimo configurabile e la configurazione della fotocamera (cam0–cam2).\nPulito logica adattatore e polling/timing interno.\nTraduzione aggiornata.",
|
|
92
|
-
"es": "Puntos de datos añadidos para la puntuación de la visita, puntaje del dardo actual, bandera triple con puntaje mínimo configurable, y configuración de la cámara (cam0–cam2).\nLógica del adaptador limpiado y polinización interna / estimulación.\nTraducciones actualizadas.",
|
|
93
|
-
"pl": "Dodano punkty datapointowe dla wyniku odwiedzin, aktualny wynik dart, flagę trójuderzeniową z konfigurowalnym minimalnym wynikiem oraz konfigurację kamery (cam0- cam2).\nOczyszczona logika adaptera i wewnętrzny sondaż / czas.\nAktualizacja tłumaczeń.",
|
|
94
|
-
"uk": "Додано точки даних для облікового запису, поточний запис dart, потрійний прапор з налаштуванням мінімального балу та конфігурації камери (cam0–cam2).\nЗнімання логіки адаптера та внутрішнього опитування / термінів.\nОновлені переклади.",
|
|
95
|
-
"zh-cn": "添加了访问分数的数据点,当前飞镖分数,三重击旗可配置最小分数,以及相机配置(cam0–cam2).\n清理适配器逻辑和内部投票/计时.\n最新译名."
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"titleLang": {
|
|
@@ -164,7 +164,10 @@
|
|
|
164
164
|
"native": {
|
|
165
165
|
"host": "127.0.0.1",
|
|
166
166
|
"port": 3180,
|
|
167
|
-
"
|
|
167
|
+
"intervalSec": 1,
|
|
168
|
+
"triggerResetSec": 0,
|
|
169
|
+
"tripleMinScore": 1,
|
|
170
|
+
"tripleMaxScore": 20
|
|
168
171
|
},
|
|
169
172
|
"objects": [],
|
|
170
173
|
"instanceObjects": []
|
package/lib/throw.js
CHANGED
|
@@ -133,8 +133,8 @@ async function updateThrow(adapter, lastDart) {
|
|
|
133
133
|
await adapter.setStateAsync("throw.isTriple", { val: isTriple, ack: true });
|
|
134
134
|
await adapter.setStateAsync("throw.isBullseye", { val: isBullseye, ack: true });
|
|
135
135
|
|
|
136
|
-
// @ts-expect-error -
|
|
137
|
-
const timeoutMs = Number(adapter.
|
|
136
|
+
// @ts-expect-error - triggerResetSecRuntime is a custom property in the Autodarts adapter class
|
|
137
|
+
const timeoutMs = (Number(adapter.triggerResetSecRuntime) || 0) * 1000;
|
|
138
138
|
if (timeoutMs > 0) {
|
|
139
139
|
if (isTriple) {
|
|
140
140
|
// @ts-expect-error - tripleResetTimer is a custom property in the Autodarts adapter class
|
package/lib/trafficLight.js
CHANGED
package/main.js
CHANGED
|
@@ -27,7 +27,7 @@ class Autodarts extends utils.Adapter {
|
|
|
27
27
|
this.tripleMaxScoreRuntime = null; // Laufzeitwert für Triple-Maxschwelle
|
|
28
28
|
|
|
29
29
|
// NEU: Reset-Timeout + Timer für isTriple/isBullseye
|
|
30
|
-
this.
|
|
30
|
+
this.triggerResetSecRuntime = null;
|
|
31
31
|
this.tripleResetTimer = null;
|
|
32
32
|
this.bullResetTimer = null;
|
|
33
33
|
}
|
|
@@ -38,10 +38,10 @@ class Autodarts extends utils.Adapter {
|
|
|
38
38
|
// Defaults aus io-package.json absichern
|
|
39
39
|
this.config.host ??= "127.0.0.1";
|
|
40
40
|
this.config.port ??= 3180;
|
|
41
|
-
this.config.
|
|
42
|
-
this.config.tripleMinScore ??= 1;
|
|
43
|
-
this.config.tripleMaxScore ??= 20;
|
|
44
|
-
this.config.
|
|
41
|
+
this.config.intervalSec ??= 1; // Sekunden
|
|
42
|
+
this.config.tripleMinScore ??= 1;
|
|
43
|
+
this.config.tripleMaxScore ??= 20;
|
|
44
|
+
this.config.triggerResetSec ??= 0; // 0 = kein Auto-Reset
|
|
45
45
|
|
|
46
46
|
// Visit-Struktur anlegen (ausgelagert)
|
|
47
47
|
await visit.init(this);
|
|
@@ -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
|
+
});
|
|
83
114
|
|
|
84
|
-
|
|
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
|
+
});
|
|
134
|
+
|
|
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: {
|
|
@@ -158,7 +304,7 @@ class Autodarts extends utils.Adapter {
|
|
|
158
304
|
native: {},
|
|
159
305
|
});
|
|
160
306
|
|
|
161
|
-
// Config-Channel und States für tripleMinScore / tripleMaxScore /
|
|
307
|
+
// Config-Channel und States für tripleMinScore / tripleMaxScore / triggerResetSec (zur Laufzeit änderbar)
|
|
162
308
|
await this.extendObjectAsync("config", {
|
|
163
309
|
type: "channel",
|
|
164
310
|
common: {
|
|
@@ -208,20 +354,20 @@ class Autodarts extends utils.Adapter {
|
|
|
208
354
|
native: {},
|
|
209
355
|
});
|
|
210
356
|
|
|
211
|
-
await this.extendObjectAsync("config.
|
|
357
|
+
await this.extendObjectAsync("config.triggerResetSec", {
|
|
212
358
|
type: "state",
|
|
213
359
|
common: {
|
|
214
360
|
name: {
|
|
215
|
-
en: "Triple/Bull reset (
|
|
216
|
-
de: "Triple/Bull Reset (
|
|
361
|
+
en: "Triple/Bull reset (s)",
|
|
362
|
+
de: "Triple/Bull Reset (s)",
|
|
217
363
|
},
|
|
218
364
|
type: "number",
|
|
219
365
|
role: "value",
|
|
220
366
|
read: true,
|
|
221
367
|
write: true,
|
|
222
368
|
desc: {
|
|
223
|
-
en: "Time in
|
|
224
|
-
de: "Zeit in
|
|
369
|
+
en: "Time in seconds after which isTriple and isBullseye are reset to false",
|
|
370
|
+
de: "Zeit in Sekunden, nach der isTriple und isBullseye wieder auf false gesetzt werden",
|
|
225
371
|
},
|
|
226
372
|
},
|
|
227
373
|
native: {},
|
|
@@ -230,7 +376,7 @@ class Autodarts extends utils.Adapter {
|
|
|
230
376
|
// Laufzeitwerte initial aus Adapter-Config setzen
|
|
231
377
|
this.tripleMinScoreRuntime = Number(this.config.tripleMinScore) || 1;
|
|
232
378
|
this.tripleMaxScoreRuntime = Number(this.config.tripleMaxScore) || 20;
|
|
233
|
-
this.
|
|
379
|
+
this.triggerResetSecRuntime = Number(this.config.triggerResetSec) || 0; // 0 = kein Auto-Reset
|
|
234
380
|
|
|
235
381
|
await this.setStateAsync("config.tripleMinScore", {
|
|
236
382
|
val: this.tripleMinScoreRuntime,
|
|
@@ -241,8 +387,8 @@ class Autodarts extends utils.Adapter {
|
|
|
241
387
|
ack: true,
|
|
242
388
|
});
|
|
243
389
|
|
|
244
|
-
await this.setStateAsync("config.
|
|
245
|
-
val: this.
|
|
390
|
+
await this.setStateAsync("config.triggerResetSec", {
|
|
391
|
+
val: this.triggerResetSecRuntime,
|
|
246
392
|
ack: true,
|
|
247
393
|
});
|
|
248
394
|
|
|
@@ -252,22 +398,25 @@ class Autodarts extends utils.Adapter {
|
|
|
252
398
|
// Auf Änderungen am Config-State hören
|
|
253
399
|
this.subscribeStates("config.tripleMinScore");
|
|
254
400
|
this.subscribeStates("config.tripleMaxScore");
|
|
255
|
-
this.subscribeStates("config.
|
|
401
|
+
this.subscribeStates("config.triggerResetSec");
|
|
256
402
|
|
|
257
403
|
// Zustand zurücksetzen
|
|
258
404
|
this.lastThrowsCount = 0;
|
|
259
405
|
this.lastSignature = "";
|
|
260
406
|
|
|
407
|
+
// Polling-Intervall aus Sekunden in Millisekunden umrechnen
|
|
408
|
+
const pollIntervalMs = (Number(this.config.intervalSec) || 1) * 1000;
|
|
409
|
+
|
|
261
410
|
// Polling starten
|
|
262
|
-
this.pollTimer = setInterval(() => this.fetchState(),
|
|
411
|
+
this.pollTimer = setInterval(() => this.fetchState(), pollIntervalMs);
|
|
263
412
|
this.fetchState();
|
|
264
413
|
|
|
265
|
-
//
|
|
266
|
-
this.
|
|
414
|
+
// Host-Informationen und Kameras abfragen und alle 5 Minuten aktualisieren
|
|
415
|
+
this.fetchHost();
|
|
267
416
|
this.fetchConfig();
|
|
268
417
|
this.versionTimer = setInterval(
|
|
269
418
|
() => {
|
|
270
|
-
this.
|
|
419
|
+
this.fetchHost();
|
|
271
420
|
this.fetchConfig();
|
|
272
421
|
},
|
|
273
422
|
5 * 60 * 1000,
|
|
@@ -288,7 +437,7 @@ class Autodarts extends utils.Adapter {
|
|
|
288
437
|
}
|
|
289
438
|
|
|
290
439
|
/**
|
|
291
|
-
* Reaktion auf State-Änderungen (z. B. config.tripleMinScore / config.tripleMaxScore / config.
|
|
440
|
+
* Reaktion auf State-Änderungen (z. B. config.tripleMinScore / config.tripleMaxScore / config.triggerResetSec)
|
|
292
441
|
*
|
|
293
442
|
* @param {string} id Full state id
|
|
294
443
|
* @param {ioBroker.State | null | undefined} state New state value (ack=false on user write)
|
|
@@ -327,20 +476,18 @@ class Autodarts extends utils.Adapter {
|
|
|
327
476
|
this.tripleMaxScoreRuntime = val;
|
|
328
477
|
this.log.info(`Runtime tripleMaxScore updated to ${val}`);
|
|
329
478
|
|
|
330
|
-
// Wert mit ack bestätigen
|
|
331
479
|
await this.setStateAsync("config.tripleMaxScore", { val, ack: true });
|
|
332
|
-
} else if (idShort === "config.
|
|
480
|
+
} else if (idShort === "config.triggerResetSec") {
|
|
333
481
|
const val = Number(state.val);
|
|
334
482
|
if (!Number.isFinite(val) || val < 0) {
|
|
335
|
-
this.log.warn(`Invalid
|
|
483
|
+
this.log.warn(`Invalid triggerResetSec value: ${state.val}`);
|
|
336
484
|
return;
|
|
337
485
|
}
|
|
338
486
|
|
|
339
|
-
this.
|
|
340
|
-
this.log.info(`Runtime
|
|
487
|
+
this.triggerResetSecRuntime = val;
|
|
488
|
+
this.log.info(`Runtime triggerResetSec updated to ${val} s`);
|
|
341
489
|
|
|
342
|
-
|
|
343
|
-
await this.setStateAsync("config.triggerResetMs", { val, ack: true });
|
|
490
|
+
await this.setStateAsync("config.triggerResetSec", { val, ack: true });
|
|
344
491
|
}
|
|
345
492
|
}
|
|
346
493
|
|
|
@@ -409,20 +556,6 @@ class Autodarts extends utils.Adapter {
|
|
|
409
556
|
}
|
|
410
557
|
}
|
|
411
558
|
|
|
412
|
-
/**
|
|
413
|
-
* Boardmanager Version abfragen
|
|
414
|
-
*/
|
|
415
|
-
async fetchVersion() {
|
|
416
|
-
try {
|
|
417
|
-
const data = await httpHelper.makeRequest(this, "/api/version");
|
|
418
|
-
const version = data.trim();
|
|
419
|
-
await this.setStateAsync("system.boardVersion", { val: version, ack: true });
|
|
420
|
-
} catch {
|
|
421
|
-
// Bei Fehler State leeren (keine Log-Warnung)
|
|
422
|
-
await this.setStateAsync("system.boardVersion", { val: "", ack: true });
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
|
|
426
559
|
/**
|
|
427
560
|
* Board-Konfiguration abfragen (Kameras)
|
|
428
561
|
*/
|
|
@@ -440,9 +573,9 @@ class Autodarts extends utils.Adapter {
|
|
|
440
573
|
|
|
441
574
|
const json = JSON.stringify(camInfo);
|
|
442
575
|
|
|
443
|
-
await this.setStateAsync("system.cam0", { val: json, ack: true });
|
|
444
|
-
await this.setStateAsync("system.cam1", { val: json, ack: true });
|
|
445
|
-
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 });
|
|
446
579
|
} catch (error) {
|
|
447
580
|
// Bei Fehler keine Log-Warnung
|
|
448
581
|
if (
|
|
@@ -455,6 +588,61 @@ class Autodarts extends utils.Adapter {
|
|
|
455
588
|
}
|
|
456
589
|
}
|
|
457
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
|
+
}
|
|
458
646
|
|
|
459
647
|
onUnload(callback) {
|
|
460
648
|
try {
|