iobroker.autodarts 0.7.2 → 0.8.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 +20 -5
- package/admin/i18n/de.json +10 -1
- package/admin/i18n/en.json +12 -3
- package/admin/i18n/es.json +11 -2
- package/admin/i18n/fr.json +13 -4
- package/admin/i18n/it.json +11 -2
- package/admin/i18n/nl.json +12 -3
- package/admin/i18n/pl.json +11 -2
- package/admin/i18n/pt.json +12 -3
- package/admin/i18n/ru.json +11 -2
- package/admin/i18n/uk.json +12 -3
- package/admin/i18n/zh-cn.json +11 -2
- package/admin/jsonConfig.json +78 -6
- package/io-package.json +34 -28
- package/lib/tools.js +77 -0
- package/main.js +219 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|

|
|
2
2
|
## Adapter for Autodarts Integration
|
|
3
3
|
|
|
4
|
-

|
|
5
|
-

|
|
4
|
+
<!---->
|
|
6
5
|
[](https://www.npmjs.com/package/iobroker.autodarts)
|
|
7
|
-
|
|
8
|
-
[](https://www.npmjs.com/package/iobroker.autodarts)
|
|
6
|
+
<!--[](https://www.npmjs.com/package/iobroker.autodarts)-->
|
|
9
7
|
|
|
10
8
|
[](https://www.paypal.com/donate/?hosted_button_id=7W6M3TFZ4W9LW)
|
|
11
9
|
|
|
@@ -51,6 +49,11 @@ Connects to your local Autodarts Board Manager (via IP and port, e.g. `192.168.x
|
|
|
51
49
|
- **`config.tripleMinScore/tripleMaxScore`**: Adjust triple trigger thresholds during runtime
|
|
52
50
|
- **`config.triggerResetSec`**: Auto-reset time for triple/double/bullseye/miss flags
|
|
53
51
|
|
|
52
|
+
### Tools Addon Integration
|
|
53
|
+
- **`tools.RAW`**: Input state used to receive events from browser tools (e.g. busted, gameon, gameshot).
|
|
54
|
+
- **`tools.busted/tools.gameon/tools.gameshot`**: Read-only trigger flags that are set when the corresponding event is received via tools.RAW.
|
|
55
|
+
- **`tools.config.urlBusted/urlGameon/urlGameshot`**: Pre-generated HTTP URLs (simple-api calls) that can be copied into the Tools for Autodarts browser extension.
|
|
56
|
+
|
|
54
57
|
## What this adapter does NOT do
|
|
55
58
|
|
|
56
59
|
- ❌ No data is sent to the internet or to third-party servers
|
|
@@ -64,7 +67,7 @@ All data stays local on your ioBroker system.
|
|
|
64
67
|
|
|
65
68
|

|
|
66
69
|
|
|
67
|
-
The adapter settings are split into
|
|
70
|
+
### The adapter settings are split into four tabs: **OPTIONS**, **MAPPINGS**, **TOOLS ADDON INTEGRATION** and **HELPS**.
|
|
68
71
|
|
|
69
72
|
### Tab: OPTIONS
|
|
70
73
|
|
|
@@ -99,8 +102,14 @@ In **MAPPINGS** you can link existing ioBroker states to the hardware related ad
|
|
|
99
102
|
ioBroker state ID that is synchronized with `system.hardware.power`
|
|
100
103
|
(e.g. `0_userdata.0.Autodarts.POWER` or a state of a smart plug).
|
|
101
104
|
|
|
105
|
+
|
|
102
106
|
When configured, changes on either side (adapter state or external state) are synchronized bidirectionally so you can both control the board from ioBroker and react on board events.
|
|
103
107
|
|
|
108
|
+
### Tab: TOOLS ADDON INTEGRATION
|
|
109
|
+
- Configure IP, port and instance so the adapter can generate HTTP URLs that point to your ioBroker simple-api endpoint.
|
|
110
|
+
|
|
111
|
+
- The final URLs for Busted, Game On and Gameshot are exposed as states under autodarts.X.tools.config.urlBusted/urlGameon/urlGameshot and can be copied into the Tools for Autodarts browser extension.
|
|
112
|
+
|
|
104
113
|
### Tab: HELP & FAQ
|
|
105
114
|
|
|
106
115
|
In **HELP & FAQ** you will find general information and help about the adapter and its configuration.
|
|
@@ -117,6 +126,12 @@ In **HELP & FAQ** you will find general information and help about the adapter a
|
|
|
117
126
|
<!--
|
|
118
127
|
### **WORK IN PROGRESS**
|
|
119
128
|
-->
|
|
129
|
+
### 0.8.0 (2026-01-04)
|
|
130
|
+
- (skvarel) Added: New **TOOLS ADDON INTEGRATION** tab and runtime-generated URL states under `tools.config.*` for browser-based integrations (e.g. Tools for Autodarts).
|
|
131
|
+
|
|
132
|
+
### 0.7.3 (2026-01-03)
|
|
133
|
+
- (skvarel) Fix Adapter Checker Warnings
|
|
134
|
+
|
|
120
135
|
### 0.7.2 (2026-01-03)
|
|
121
136
|
- (skvarel) Fix Copyright Year
|
|
122
137
|
|
package/admin/i18n/de.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"light_target_help": "Datenpunkt des LED-Ring zur Steuerung innerhalb des Autodarts-Adapters. Lasse das Feld leer, um die Lichtsteuerung zu deaktivieren.",
|
|
12
12
|
"light_txt": "Zuweisungen der Lichtsteuerung (optional)",
|
|
13
13
|
"light_txt_desc": "Verknüpfe deine Beleuchtung-Datenpunkte in die Autodarts-Objekte.",
|
|
14
|
-
"mappings": "Zuweisungen",
|
|
14
|
+
"mappings": "Hardware-Zuweisungen",
|
|
15
15
|
"options": "Optionen",
|
|
16
16
|
"options_connection": "Verbindungsoptionen",
|
|
17
17
|
"options_logic": "Logikoptionen",
|
|
@@ -24,10 +24,19 @@
|
|
|
24
24
|
"power_txt_desc": "Verknüpfe deine Power-Datenpunkte in die Autodarts-Objekte.",
|
|
25
25
|
"reset": "Trigger-Reset (s)",
|
|
26
26
|
"reset_help": "Setzt den Triple-, Doppel-, Bullseye und Miss-Trigger nach x Sekunden zurück (0 = kein Reset).",
|
|
27
|
+
"tools_instance": "Autodarts-Instanznummer",
|
|
28
|
+
"tools_instance_help": "0 für autodarts.0, 1 für autodarts.1 usw.",
|
|
29
|
+
"tools_ip": "IP-Adresse von ioBroker",
|
|
30
|
+
"tools_ip_help": "IP oder Hostname, unter dem Ihr ioBroker/Simple-API-Adapter erreichbar ist.",
|
|
31
|
+
"tools_port": "Port des Simple-API-Adapters",
|
|
32
|
+
"tools_port_help": "Standard: 8087",
|
|
33
|
+
"tools_tab": "Tools-Addon-Integration",
|
|
34
|
+
"tools_urls_info": "Die fertigen Aufruf-URLs für Busted, Game on und Gameshot findest du in den Datenpunkten unter autodarts.X.tools.config.* im Objektbaum.<br><br>Die URLs werden dann der WLED Integration (im Browser Addon) eingetragen",
|
|
27
35
|
"triple_flag": "Minimales Feld für den Triple-Trigger",
|
|
28
36
|
"triple_flag2": "Maximales Feld für den Triple-Trigger",
|
|
29
37
|
"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.",
|
|
30
38
|
"triple_flag_help": "Feld „Mindestpunktzahl“ für den Triple-Trigger. Darts mit einer Punktzahl unter diesem Wert lösen den Triple-Trigger-Datenpunkt nicht aus.",
|
|
31
39
|
"txt_one": "<b>Dieser Adapter verbindet den lokalen Autodarts Board-Manager mit dem ioBroker.</b><br><br>1) Konfiguriere die Verbindung unter <b>OPTIONEN</b> (Host, Port, Intervall, Triple Range).<br>2) Ordne Licht- und Powerziele unter <b>ZUWEISUNGEN</b> zu.<br>3) Nutze die erstellten Zustände (Würfe, Ampel, Hardware) in der Visualisierungen, den Skripten und Szenen.",
|
|
40
|
+
"txt_tools": "Auf dieser Registerkarte wird die Integration mit der Browsererweiterung „Tools for Autodarts“ konfiguriert.<br><br>Um sie verwenden zu können, muss die Browsererweiterung installiert sein und der ioBroker Simple-API-Adapter ausgeführt und über deinen Browser erreichbar sein.",
|
|
32
41
|
"txt_two": "... weitere Informationen folgen in Kürze!"
|
|
33
42
|
}
|
package/admin/i18n/en.json
CHANGED
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
"power_target": "LED-Target Power ID",
|
|
18
18
|
"power_target_help": "ID of the power target to control power via Autodarts (e.g., 'switch.darts_socket'). Leave empty to disable power control.",
|
|
19
19
|
"options": "Options",
|
|
20
|
-
"mappings":"Mappings",
|
|
20
|
+
"mappings": "Hardware Mappings",
|
|
21
21
|
"options_connection": "Connection Options",
|
|
22
22
|
"options_logic": "Logic Options",
|
|
23
|
-
"txt_one": "This adapter connects your local Autodarts Board Manager to ioBroker
|
|
23
|
+
"txt_one": "<b>This adapter connects your local Autodarts Board Manager to ioBroker.</b><br><br>1) Configure the connection under OPTIONS (host, port, polling, triple range).<br>2) Map light and power targets under MAPPINGS.<br>3) Use the created states (throws, traffic light, hardware) in your visualizations, scripts and scenes.",
|
|
24
24
|
"light_txt": "Light Control Mapping (optional)",
|
|
25
25
|
"light_txt_desc": "Get your lighting data points into the adapter objects.",
|
|
26
26
|
"power_txt": "Power Control Mapping (optional)",
|
|
@@ -29,5 +29,14 @@
|
|
|
29
29
|
"txt_two": "... more information coming soon!",
|
|
30
30
|
"light_target_brightness": "LED-Target Brightness ID",
|
|
31
31
|
"light_target_color": "LED-Target Color ID",
|
|
32
|
-
"paypal_donate": "Donate with PayPal"
|
|
32
|
+
"paypal_donate": "Donate with PayPal",
|
|
33
|
+
"tools_ip": "IP address of ioBroker",
|
|
34
|
+
"tools_ip_help": "IP or hostname where your ioBroker / simple-api adapter is reachable.",
|
|
35
|
+
"tools_port": "Port of the simple-api adapter",
|
|
36
|
+
"tools_port_help": "Default: 8087",
|
|
37
|
+
"tools_instance": "Autodarts instance number",
|
|
38
|
+
"tools_instance_help": "0 for autodarts.0, 1 for autodarts.1, etc.",
|
|
39
|
+
"tools_urls_info": "The final call URLs for Busted, Game on and Gameshot can be found in the states under autodarts.X.tools.config.* in the objects tree.<br><br>The URLs are then entered into the WLED integration (in the browser add-on)",
|
|
40
|
+
"tools_tab": "Tools Addon Integration",
|
|
41
|
+
"txt_tools": "This tab configures the integration with the “Tools for Autodarts” browser extension.<br><br>To use it, you must have the browser extension installed and the ioBroker simple-api adapter running and reachable from your browser."
|
|
33
42
|
}
|
package/admin/i18n/es.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"light_target_help": "ID del objetivo de luz para controlar las luces a través de Autodarts (por ejemplo, 'light.dartring'). Déjelo vacío para desactivar el control de luces.",
|
|
12
12
|
"light_txt": "Mapeo de control de iluminación (opcional)",
|
|
13
13
|
"light_txt_desc": "Introduzca sus puntos de datos de iluminación en los objetos del adaptador.",
|
|
14
|
-
"mappings": "
|
|
14
|
+
"mappings": "Asignaciones de hardware",
|
|
15
15
|
"options": "Opciones",
|
|
16
16
|
"options_connection": "Opciones de conexión",
|
|
17
17
|
"options_logic": "Opciones lógicas",
|
|
@@ -24,10 +24,19 @@
|
|
|
24
24
|
"power_txt_desc": "Introduzca sus puntos de datos de energía en los objetos del adaptador.",
|
|
25
25
|
"reset": "Restablecimiento de disparador (s)",
|
|
26
26
|
"reset_help": "Restablezca el disparador triple, doble, diana y fallido después de x segundos (0 = sin reinicio).",
|
|
27
|
+
"tools_instance": "Número de instancia de Autodarts",
|
|
28
|
+
"tools_instance_help": "0 para autodarts.0, 1 para autodarts.1, etc.",
|
|
29
|
+
"tools_ip": "Dirección IP de ioBroker",
|
|
30
|
+
"tools_ip_help": "IP o nombre de host donde se puede acceder a su adaptador ioBroker/simple-api.",
|
|
31
|
+
"tools_port": "Puerto del adaptador simple-api",
|
|
32
|
+
"tools_port_help": "Predeterminado: 8087",
|
|
33
|
+
"tools_tab": "Integración de complementos de herramientas",
|
|
34
|
+
"tools_urls_info": "Las URL de llamada final para Busted, Game on y Gameshot se pueden encontrar en los estados bajo autodarts.X.tools.config.* en el árbol de objetos.<br><br>Las URL luego se ingresan en la integración WLED (en el complemento del navegador)",
|
|
27
35
|
"triple_flag": "Campo mínimo para el triple disparador",
|
|
28
36
|
"triple_flag2": "Campo máximo para el triple disparador",
|
|
29
37
|
"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.",
|
|
30
38
|
"triple_flag_help": "Campo de puntuación mínima para el triple disparador. Los dardos con una puntuación inferior a este valor no activarán el punto de datos Triple-Trigger.",
|
|
31
|
-
"txt_one": "Este adaptador conecta su
|
|
39
|
+
"txt_one": "<b>Este adaptador conecta su Autodarts Board Manager local a ioBroker.</b><br><br>1) Configure la conexión en OPCIONES (host, puerto, sondeo, rango triple).<br>2) Asigne objetivos de luz y energía en MAPAS.<br>3) Utilice los estados creados (tiros, semáforo, hardware) en sus visualizaciones, scripts y escenas.",
|
|
40
|
+
"txt_tools": "Esta pestaña configura la integración con la extensión del navegador “Herramientas para Autodarts”.<br>Para usarla, debe tener la extensión del navegador instalada y el adaptador ioBroker simple-api ejecutándose y accesible desde su navegador.",
|
|
32
41
|
"txt_two": "... ¡más información próximamente!"
|
|
33
42
|
}
|
package/admin/i18n/fr.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"helps": "Aide et FAQ",
|
|
3
3
|
"host_ip": "Autodarts (Boardmanager) Hôte/IP",
|
|
4
|
-
"host_ip_help": "Adresse IP
|
|
4
|
+
"host_ip_help": "Adresse IP de l'Autodarts Boardmanager local.",
|
|
5
5
|
"host_port": "Port Autodarts (Boardmanager)",
|
|
6
6
|
"host_port_help": "Numéro de port du Boardmanager Autodarts local.",
|
|
7
7
|
"intro_txt": "Aide et FAQ.",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"light_target_help": "ID de la cible lumineuse pour contrôler les lumières via Autodarts (par exemple, « light.dartring »). Laissez vide pour désactiver le contrôle de la lumière.",
|
|
12
12
|
"light_txt": "Cartographie du contrôle de la lumière (facultatif)",
|
|
13
13
|
"light_txt_desc": "Obtenez vos points de données d'éclairage dans les objets adaptateur.",
|
|
14
|
-
"mappings": "Mappages",
|
|
14
|
+
"mappings": "Mappages matériels",
|
|
15
15
|
"options": "Possibilités",
|
|
16
16
|
"options_connection": "Options de connexion",
|
|
17
17
|
"options_logic": "Options logiques",
|
|
@@ -19,15 +19,24 @@
|
|
|
19
19
|
"polling": "Intervalle(s) d'interrogation",
|
|
20
20
|
"polling_help": "Intervalle d'interrogation en secondes pour récupérer les données de l'Autodarts Boardmanager.",
|
|
21
21
|
"power_target": "ID de puissance cible LED",
|
|
22
|
-
"power_target_help": "ID de la cible d'alimentation pour contrôler l'alimentation via Autodarts (par exemple, «
|
|
22
|
+
"power_target_help": "ID de la cible d'alimentation pour contrôler l'alimentation via Autodarts (par exemple, « switch.darts_socket »). Laissez vide pour désactiver le contrôle de l’alimentation.",
|
|
23
23
|
"power_txt": "Cartographie du contrôle de puissance (facultatif)",
|
|
24
24
|
"power_txt_desc": "Obtenez vos points de données d'alimentation dans les objets adaptateur.",
|
|
25
25
|
"reset": "Déclencheur-Réinitialisation(s)",
|
|
26
26
|
"reset_help": "Réinitialisez les déclencheurs triple, double, bullseye et miss après x secondes (0 = pas de réinitialisation).",
|
|
27
|
+
"tools_instance": "Numéro d'instance Autodarts",
|
|
28
|
+
"tools_instance_help": "0 pour autodarts.0, 1 pour autodarts.1, etc.",
|
|
29
|
+
"tools_ip": "Adresse IP d'ioBroker",
|
|
30
|
+
"tools_ip_help": "IP ou nom d'hôte où votre adaptateur ioBroker / simple-api est accessible.",
|
|
31
|
+
"tools_port": "Port de l'adaptateur simple-api",
|
|
32
|
+
"tools_port_help": "Par défaut : 8087",
|
|
33
|
+
"tools_tab": "Intégration des modules complémentaires d'outils",
|
|
34
|
+
"tools_urls_info": "Les URL d'appel finales pour Busted, Game on et Gameshot se trouvent dans les états sous autodarts.X.tools.config.* dans l'arborescence des objets.<br><br>Les URL sont ensuite saisies dans l'intégration WLED (dans le module complémentaire du navigateur).",
|
|
27
35
|
"triple_flag": "Champ minimum pour le triple déclencheur",
|
|
28
36
|
"triple_flag2": "Champ maximum pour le triple déclencheur",
|
|
29
37
|
"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.",
|
|
30
38
|
"triple_flag_help": "Champ de score minimum pour le triple déclencheur. Les fléchettes avec un score inférieur à cette valeur ne déclencheront pas le point de données Triple-Trigger.",
|
|
31
|
-
"txt_one": "Cet adaptateur connecte votre Autodarts Board Manager local à ioBroker
|
|
39
|
+
"txt_one": "<b>Cet adaptateur connecte votre Autodarts Board Manager local à ioBroker.</b><br><br>1) Configurez la connexion sous OPTIONS (hôte, port, sondage, triple plage).<br>2) Cartographiez les cibles lumineuses et électriques sous MAPPINGS.<br>3) Utilisez les états créés (lancements, feux de circulation, matériel) dans vos visualisations, scripts et scènes.",
|
|
40
|
+
"txt_tools": "Cet onglet configure l'intégration avec l'extension de navigateur « Outils pour Autodarts ».<br>Pour l'utiliser, vous devez avoir installé l'extension de navigateur et l'adaptateur simple-api ioBroker exécuté et accessible depuis votre navigateur.",
|
|
32
41
|
"txt_two": "... plus d'informations à venir !"
|
|
33
42
|
}
|
package/admin/i18n/it.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"light_target_help": "ID del bersaglio luminoso per controllare le luci tramite Autodarts (ad esempio, \"light.dartring\"). Lasciare vuoto per disabilitare il controllo della luce.",
|
|
12
12
|
"light_txt": "Mappatura del controllo della luce (opzionale)",
|
|
13
13
|
"light_txt_desc": "Inserisci i tuoi punti dati di illuminazione negli oggetti adattatore.",
|
|
14
|
-
"mappings": "Mappature",
|
|
14
|
+
"mappings": "Mappature hardware",
|
|
15
15
|
"options": "Opzioni",
|
|
16
16
|
"options_connection": "Opzioni di connessione",
|
|
17
17
|
"options_logic": "Opzioni logiche",
|
|
@@ -24,10 +24,19 @@
|
|
|
24
24
|
"power_txt_desc": "Inserisci i tuoi punti dati di alimentazione negli oggetti adattatore.",
|
|
25
25
|
"reset": "Trigger-Reset(s)",
|
|
26
26
|
"reset_help": "Resetta il trigger triplo, doppio, bullseye e mancato dopo x secondi (0 = nessun reset).",
|
|
27
|
+
"tools_instance": "Numero di istanza di Autodarts",
|
|
28
|
+
"tools_instance_help": "0 per autodarts.0, 1 per autodarts.1, ecc.",
|
|
29
|
+
"tools_ip": "Indirizzo IP di ioBroker",
|
|
30
|
+
"tools_ip_help": "IP o nome host in cui è raggiungibile il tuo ioBroker/adattatore simple-api.",
|
|
31
|
+
"tools_port": "Porta dell'adattatore API semplice",
|
|
32
|
+
"tools_port_help": "Predefinito: 8087",
|
|
33
|
+
"tools_tab": "Integrazione dei componenti aggiuntivi degli strumenti",
|
|
34
|
+
"tools_urls_info": "Gli URL di chiamata finali per Busted, Game on e Gameshot possono essere trovati negli stati in autodarts.X.tools.config.* nell'albero degli oggetti.<br><br>Gli URL vengono quindi inseriti nell'integrazione WLED (nel componente aggiuntivo del browser)",
|
|
27
35
|
"triple_flag": "Campo minimo per il triplo trigger",
|
|
28
36
|
"triple_flag2": "Campo massimo per il triplo trigger",
|
|
29
37
|
"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.",
|
|
30
38
|
"triple_flag_help": "Campo del punteggio minimo per il triplo trigger. Le freccette con un punteggio inferiore a questo valore non attiveranno il punto dati Triple-Trigger.",
|
|
31
|
-
"txt_one": "Questo adattatore collega il tuo Autodarts Board Manager locale a ioBroker
|
|
39
|
+
"txt_one": "<b>Questo adattatore collega il tuo Autodarts Board Manager locale a ioBroker.</b><br><br>1) Configura la connessione in OPZIONI (host, porta, polling, tripla portata).<br>2) Mappa gli obiettivi di luce e potenza in MAPPINGS.<br>3) Utilizza gli stati creati (lanci, semaforo, hardware) nelle tue visualizzazioni, script e scene.",
|
|
40
|
+
"txt_tools": "Questa scheda configura l'integrazione con l'estensione del browser \"Strumenti per Autodarts\".<br>Per utilizzarla, è necessario avere l'estensione del browser installata e l'adattatore ioBroker simple-api in esecuzione e raggiungibile dal browser.",
|
|
32
41
|
"txt_two": "...maggiori informazioni in arrivo!"
|
|
33
42
|
}
|
package/admin/i18n/nl.json
CHANGED
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
"light_target_brightness": "LED-doelhelderheid ID",
|
|
10
10
|
"light_target_color": "LED-doelkleur-ID",
|
|
11
11
|
"light_target_help": "ID van het lichtdoel om lichten via Autodarts te besturen (bijvoorbeeld 'light.dartring'). Laat dit leeg om de lichtregeling uit te schakelen.",
|
|
12
|
-
"light_txt": "
|
|
12
|
+
"light_txt": "Lichtregelingstoewijzing (optioneel)",
|
|
13
13
|
"light_txt_desc": "Haal uw verlichtingsgegevenspunten op in de adapterobjecten.",
|
|
14
|
-
"mappings": "
|
|
14
|
+
"mappings": "Hardwaretoewijzingen",
|
|
15
15
|
"options": "Opties",
|
|
16
16
|
"options_connection": "Verbindingsopties",
|
|
17
17
|
"options_logic": "Logische opties",
|
|
@@ -24,10 +24,19 @@
|
|
|
24
24
|
"power_txt_desc": "Haal uw stroomgegevenspunten op in de adapterobjecten.",
|
|
25
25
|
"reset": "Trigger-reset (s)",
|
|
26
26
|
"reset_help": "Reset de drievoudige, dubbele, bullseye- en miss-trigger na x seconden (0 = geen reset).",
|
|
27
|
+
"tools_instance": "Autodarts-instantienummer",
|
|
28
|
+
"tools_instance_help": "0 voor autodarts.0, 1 voor autodarts.1, etc.",
|
|
29
|
+
"tools_ip": "IP-adres van ioBroker",
|
|
30
|
+
"tools_ip_help": "IP- of hostnaam waar uw ioBroker / simple-api-adapter bereikbaar is.",
|
|
31
|
+
"tools_port": "Poort van de Simple-API-adapter",
|
|
32
|
+
"tools_port_help": "Standaard: 8087",
|
|
33
|
+
"tools_tab": "Tools Add-on-integratie",
|
|
34
|
+
"tools_urls_info": "De uiteindelijke oproep-URL's voor Busted, Game on en Gameshot zijn te vinden in de statussen onder autodarts.X.tools.config.* in de objectenboom.<br><br>De URL's worden vervolgens ingevoerd in de WLED-integratie (in de browseradd-on)",
|
|
27
35
|
"triple_flag": "Minimumveld voor de drievoudige trigger",
|
|
28
36
|
"triple_flag2": "Maximaal veld voor de drievoudige trigger",
|
|
29
37
|
"triple_flag2_help": "Maximaal scoreveld voor de drievoudige trigger. Darten met een score boven deze waarde activeren het Triple-Trigger-datapunt niet.",
|
|
30
38
|
"triple_flag_help": "Minimumscoreveld voor de drievoudige trigger. Darten met een score onder deze waarde activeren het Triple-Trigger-datapunt niet.",
|
|
31
|
-
"txt_one": "Deze adapter verbindt uw lokale Autodarts Board Manager met ioBroker
|
|
39
|
+
"txt_one": "<b>Deze adapter verbindt uw lokale Autodarts Board Manager met ioBroker.</b><br><br>1) Configureer de verbinding onder OPTIES (host, poort, polling, drievoudig bereik).<br>2) Breng licht- en stroomdoelen in kaart onder MAPPINGS.<br>3) Gebruik de gemaakte statussen (worpen, verkeerslicht, hardware) in uw visualisaties, scripts en scènes.",
|
|
40
|
+
"txt_tools": "Op dit tabblad wordt de integratie met de browserextensie 'Tools for Autodarts' geconfigureerd.<br>Om deze te gebruiken, moet de browserextensie zijn geïnstalleerd en moet de ioBroker simple-api-adapter actief zijn en bereikbaar zijn vanuit uw browser.",
|
|
32
41
|
"txt_two": "... binnenkort meer informatie!"
|
|
33
42
|
}
|
package/admin/i18n/pl.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"light_target_help": "Identyfikator celu świetlnego do sterowania światłami za pomocą Autodarts (np. „light.dartring”). Pozostaw puste, aby wyłączyć kontrolę oświetlenia.",
|
|
12
12
|
"light_txt": "Mapowanie kontroli oświetlenia (opcjonalnie)",
|
|
13
13
|
"light_txt_desc": "Umieść punkty danych oświetlenia w obiektach adaptera.",
|
|
14
|
-
"mappings": "Mapowania",
|
|
14
|
+
"mappings": "Mapowania sprzętu",
|
|
15
15
|
"options": "Opcje",
|
|
16
16
|
"options_connection": "Opcje połączenia",
|
|
17
17
|
"options_logic": "Opcje logiczne",
|
|
@@ -24,10 +24,19 @@
|
|
|
24
24
|
"power_txt_desc": "Umieść punkty danych mocy w obiektach adaptera.",
|
|
25
25
|
"reset": "Reset wyzwalacza (s)",
|
|
26
26
|
"reset_help": "Zresetuj wyzwalacz potrójny, podwójny, strzał w dziesiątkę i spudłowanie po x sekundach (0 = brak resetu).",
|
|
27
|
+
"tools_instance": "Numer instancji Autodarts",
|
|
28
|
+
"tools_instance_help": "0 dla autodarts.0, 1 dla autodarts.1 itd.",
|
|
29
|
+
"tools_ip": "Adres IP ioBrokera",
|
|
30
|
+
"tools_ip_help": "Adres IP lub nazwa hosta, pod którym dostępny jest adapter ioBroker/simple-api.",
|
|
31
|
+
"tools_port": "Port adaptera Simple-API",
|
|
32
|
+
"tools_port_help": "Wartość domyślna: 8087",
|
|
33
|
+
"tools_tab": "Narzędzia Integracja dodatków",
|
|
34
|
+
"tools_urls_info": "Ostateczne adresy URL połączeń dla Busted, Game on i Gameshot można znaleźć w stanach w autodarts.X.tools.config.* w drzewie obiektów.<br><br>Adresy URL są następnie wprowadzane do integracji WLED (w dodatku do przeglądarki)",
|
|
27
35
|
"triple_flag": "Minimalne pole dla potrójnego wyzwalacza",
|
|
28
36
|
"triple_flag2": "Maksymalne pole dla potrójnego wyzwalacza",
|
|
29
37
|
"triple_flag2_help": "Pole maksymalnego wyniku dla potrójnego wyzwalacza. Rzutki z wynikiem powyżej tej wartości nie uruchomią punktu danych Triple-Trigger.",
|
|
30
38
|
"triple_flag_help": "Pole minimalnego wyniku dla potrójnego wyzwalacza. Rzutki z wynikiem poniżej tej wartości nie uruchomią punktu danych Triple-Trigger.",
|
|
31
|
-
"txt_one": "Ten adapter łączy lokalnego menedżera tablicy Autodarts z ioBrokerem
|
|
39
|
+
"txt_one": "<b>Ten adapter łączy lokalnego menedżera tablicy Autodarts z ioBrokerem.</b><br><br>1) Skonfiguruj połączenie w OPCJACH (host, port, odpytywanie, potrójny zasięg).<br>2) Mapuj cele świetlne i energetyczne w sekcji MAPPINGS.<br>3) Wykorzystaj utworzone stany (rzuty, sygnalizacja świetlna, sprzęt) w swoich wizualizacjach, skryptach i scenach.",
|
|
40
|
+
"txt_tools": "Ta zakładka umożliwia skonfigurowanie integracji z rozszerzeniem przeglądarki „Narzędzia dla Autodarts”.<br>Aby z niego skorzystać, musisz mieć zainstalowane rozszerzenie przeglądarki oraz działający adapter prostego interfejsu API ioBroker, dostępny z poziomu przeglądarki.",
|
|
32
41
|
"txt_two": "...więcej informacji już wkrótce!"
|
|
33
42
|
}
|
package/admin/i18n/pt.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"light_target_help": "ID do alvo de luz para controlar luzes via Autodarts (por exemplo, 'light.dartring'). Deixe em branco para desativar o controle de luz.",
|
|
12
12
|
"light_txt": "Mapeamento de controle de luz (opcional)",
|
|
13
13
|
"light_txt_desc": "Coloque seus pontos de dados de iluminação nos objetos do adaptador.",
|
|
14
|
-
"mappings": "Mapeamentos",
|
|
14
|
+
"mappings": "Mapeamentos de hardware",
|
|
15
15
|
"options": "Opções",
|
|
16
16
|
"options_connection": "Opções de conexão",
|
|
17
17
|
"options_logic": "Opções lógicas",
|
|
@@ -24,10 +24,19 @@
|
|
|
24
24
|
"power_txt_desc": "Coloque seus pontos de dados de energia nos objetos do adaptador.",
|
|
25
25
|
"reset": "Redefinição(ões) de gatilho",
|
|
26
26
|
"reset_help": "Redefina o disparo triplo, duplo, alvo e erro após x segundos (0 = sem reinicialização).",
|
|
27
|
+
"tools_instance": "Número da instância do Autodarts",
|
|
28
|
+
"tools_instance_help": "0 para autodarts.0, 1 para autodarts.1, etc.",
|
|
29
|
+
"tools_ip": "Endereço IP do ioBroker",
|
|
30
|
+
"tools_ip_help": "IP ou nome de host onde seu adaptador ioBroker/simple-api pode ser acessado.",
|
|
31
|
+
"tools_port": "Porta do adaptador simple-api",
|
|
32
|
+
"tools_port_help": "Padrão: 8087",
|
|
33
|
+
"tools_tab": "Integração de complementos de ferramentas",
|
|
34
|
+
"tools_urls_info": "Os URLs de chamada final para Busted, Game on e Gameshot podem ser encontrados nos estados em autodarts.X.tools.config.* na árvore de objetos.<br><br>Os URLs são então inseridos na integração WLED (no complemento do navegador)",
|
|
27
35
|
"triple_flag": "Campo mínimo para o disparo triplo",
|
|
28
36
|
"triple_flag2": "Campo máximo para o disparo triplo",
|
|
29
37
|
"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.",
|
|
30
38
|
"triple_flag_help": "Campo de pontuação mínima para o disparo triplo. Dardos com pontuação abaixo deste valor não acionarão o ponto de dados Triple-Trigger.",
|
|
31
|
-
"txt_one": "Este adaptador conecta seu Autodarts Board Manager local ao ioBroker
|
|
32
|
-
"
|
|
39
|
+
"txt_one": "<b>Este adaptador conecta seu Autodarts Board Manager local ao ioBroker.</b><br><br>1) Configure a conexão em OPÇÕES (host, porta, polling, alcance triplo).<br>2) Mapeie alvos de luz e energia em MAPEAMENTOS.<br>3) Use os estados criados (throws, semáforos, hardware) em suas visualizações, scripts e cenas.",
|
|
40
|
+
"txt_tools": "Esta aba configura a integração com a extensão do navegador “Tools for Autodarts”.<br>Para utilizá-la, você deve ter a extensão do navegador instalada e o adaptador ioBroker simple-api em execução e acessível a partir do seu navegador.",
|
|
41
|
+
"txt_two": "...mais informações em breve!"
|
|
33
42
|
}
|
package/admin/i18n/ru.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"light_target_help": "Идентификатор световой цели для управления огнями через Autodarts (например, «light.dartring»). Оставьте пустым, чтобы отключить управление освещением.",
|
|
12
12
|
"light_txt": "Отображение управления освещением (опционально)",
|
|
13
13
|
"light_txt_desc": "Перенесите точки данных освещения в объекты адаптера.",
|
|
14
|
-
"mappings": "Сопоставления",
|
|
14
|
+
"mappings": "Сопоставления оборудования",
|
|
15
15
|
"options": "Параметры",
|
|
16
16
|
"options_connection": "Варианты подключения",
|
|
17
17
|
"options_logic": "Логические параметры",
|
|
@@ -24,10 +24,19 @@
|
|
|
24
24
|
"power_txt_desc": "Перенесите точки данных о мощности в объекты адаптера.",
|
|
25
25
|
"reset": "Триггер-Сброс (ы)",
|
|
26
26
|
"reset_help": "Сбросьте триггер тройного, двойного, яблочко и промаха через x секунд (0 = сброса нет).",
|
|
27
|
+
"tools_instance": "Номер экземпляра автодартс",
|
|
28
|
+
"tools_instance_help": "0 для autodarts.0, 1 для autodarts.1 и т. д.",
|
|
29
|
+
"tools_ip": "IP-адрес ioBroker",
|
|
30
|
+
"tools_ip_help": "IP-адрес или имя хоста, по которому доступен ваш адаптер ioBroker/simple-api.",
|
|
31
|
+
"tools_port": "Порт адаптера simple-api",
|
|
32
|
+
"tools_port_help": "По умолчанию: 8087",
|
|
33
|
+
"tools_tab": "Интеграция дополнений инструментов",
|
|
34
|
+
"tools_urls_info": "URL-адреса окончательного вызова для Busted, Game on и Gameshot можно найти в состояниях в разделе autodarts.X.tools.config.* в дереве объектов.<br><br>Затем URL-адреса вводятся в интеграцию WLED (в надстройке браузера).",
|
|
27
35
|
"triple_flag": "Минимальное поле для тройного триггера",
|
|
28
36
|
"triple_flag2": "Максимальное поле для тройного триггера",
|
|
29
37
|
"triple_flag2_help": "Поле максимального результата для тройного триггера. Дартс с результатом выше этого значения не будет активировать точку данных тройного триггера.",
|
|
30
38
|
"triple_flag_help": "Поле минимального балла для тройного триггера. Дартс со счетом ниже этого значения не будет активировать точку данных тройного триггера.",
|
|
31
|
-
"txt_one": "
|
|
39
|
+
"txt_one": "<b>Этот адаптер подключает ваш локальный менеджер Autodarts Board к ioBroker.</b><br><br>1) Настройте соединение в разделе ОПЦИИ (хост, порт, опрос, тройной диапазон).<br>2) Сопоставьте цели освещения и мощности в разделе MAPPINGS.<br>3) Используйте созданные состояния (броски, светофор, оборудование) в ваших визуализациях, сценариях и сценах.",
|
|
40
|
+
"txt_tools": "На этой вкладке настраивается интеграция с расширением браузера «Инструменты для Autodarts».<br>Чтобы использовать его, у вас должно быть установлено расширение браузера и адаптер ioBroker simple-api, работающий и доступный из вашего браузера.",
|
|
32
41
|
"txt_two": "... дополнительная информация скоро появится!"
|
|
33
42
|
}
|
package/admin/i18n/uk.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"light_target_help": "Ідентифікатор світлової цілі для керування вогнями через Autodarts (наприклад, \"light.dartring\"). Залиште пустим, щоб вимкнути керування світлом.",
|
|
12
12
|
"light_txt": "Відображення керування світлом (опціонально)",
|
|
13
13
|
"light_txt_desc": "Перемістіть свої точки даних освітлення в об’єкти адаптера.",
|
|
14
|
-
"mappings": "Відображення",
|
|
14
|
+
"mappings": "Відображення обладнання",
|
|
15
15
|
"options": "Опції",
|
|
16
16
|
"options_connection": "Параметри підключення",
|
|
17
17
|
"options_logic": "Параметри логіки",
|
|
@@ -23,11 +23,20 @@
|
|
|
23
23
|
"power_txt": "Відображення керування живленням (опціонально)",
|
|
24
24
|
"power_txt_desc": "Перемістіть свої точки даних про потужність в об’єкти адаптера.",
|
|
25
25
|
"reset": "Тригер-Скидання (s)",
|
|
26
|
-
"reset_help": "
|
|
26
|
+
"reset_help": "Скидання тригера потрійного, подвійного, яблучного та промаху через x секунд (0 = без скидання).",
|
|
27
|
+
"tools_instance": "Номер екземпляра Autodarts",
|
|
28
|
+
"tools_instance_help": "0 для autodarts.0, 1 для autodarts.1 тощо.",
|
|
29
|
+
"tools_ip": "IP-адреса ioBroker",
|
|
30
|
+
"tools_ip_help": "IP-адреса або ім’я хоста, де доступний ваш адаптер ioBroker / Simple-API.",
|
|
31
|
+
"tools_port": "Порт адаптера Simple-API",
|
|
32
|
+
"tools_port_help": "Типове значення: 8087",
|
|
33
|
+
"tools_tab": "Інтеграція надбудови інструментів",
|
|
34
|
+
"tools_urls_info": "Остаточні URL-адреси викликів для Busted, Game on і Gameshot можна знайти в станах у autodarts.X.tools.config.* дерева об’єктів.<br><br>Потім URL-адреси вводяться в інтеграцію WLED (у надбудові браузера)",
|
|
27
35
|
"triple_flag": "Мінімальне поле для потрійного тригера",
|
|
28
36
|
"triple_flag2": "Максимальне поле для потрійного тригера",
|
|
29
37
|
"triple_flag2_help": "Поле максимального балу для потрійного тригера. Дартс із результатом вище цього значення не активує точку даних Triple-Trigger.",
|
|
30
38
|
"triple_flag_help": "Мінімальне поле для потрійного тригера. Дартс із результатом, нижчим за це значення, не активує точку даних Triple-Trigger.",
|
|
31
|
-
"txt_one": "
|
|
39
|
+
"txt_one": "<b>Цей адаптер підключає ваш локальний менеджер дошки Autodarts до ioBroker.</b><br><br>1) Налаштуйте з’єднання в OPTIONS (хост, порт, опитування, потрійний діапазон).<br>2) Зіставте світлові й потужні цілі в MAPPINGS.<br>3) Використовуйте створені стани (кидки, світлофор, апаратне забезпечення) у своїх візуалізаціях, сценаріях і сценах.",
|
|
40
|
+
"txt_tools": "На цій вкладці налаштовується інтеграція з розширенням для браузера «Інструменти для Autodarts».<br>Щоб використовувати його, у вас має бути встановлено розширення для веб-переглядача та запущений адаптер ioBroker із простим API, доступний із вашого браузера.",
|
|
32
41
|
"txt_two": "... більше інформації буде незабаром!"
|
|
33
42
|
}
|
package/admin/i18n/zh-cn.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"light_target_help": "通过 Autodarts 控制灯光的灯光目标的 ID(例如“light.dartring”)。留空以禁用灯光控制。",
|
|
12
12
|
"light_txt": "灯光控制映射(可选)",
|
|
13
13
|
"light_txt_desc": "将照明数据点放入适配器对象中。",
|
|
14
|
-
"mappings": "
|
|
14
|
+
"mappings": "硬件映射",
|
|
15
15
|
"options": "选项",
|
|
16
16
|
"options_connection": "连接选项",
|
|
17
17
|
"options_logic": "逻辑选项",
|
|
@@ -24,10 +24,19 @@
|
|
|
24
24
|
"power_txt_desc": "将电源数据点放入适配器对象中。",
|
|
25
25
|
"reset": "触发-复位",
|
|
26
26
|
"reset_help": "x 秒后重置三重、双重、靶心和错过触发(0 = 不重置)。",
|
|
27
|
+
"tools_instance": "Autodarts 实例数量",
|
|
28
|
+
"tools_instance_help": "0 表示 autodarts.0,1 表示 autodarts.1,等等。",
|
|
29
|
+
"tools_ip": "ioBroker的IP地址",
|
|
30
|
+
"tools_ip_help": "可访问 ioBroker / simple-api 适配器的 IP 或主机名。",
|
|
31
|
+
"tools_port": "simple-api 适配器的端口",
|
|
32
|
+
"tools_port_help": "默认值:8087",
|
|
33
|
+
"tools_tab": "工具插件集成",
|
|
34
|
+
"tools_urls_info": "Busted、Game on 和 Gameshot 的最终调用 URL 可以在对象树中 autodarts.X.tools.config.* 下的状态中找到。<br><br>然后将 URL 输入到 WLED 集成中(在浏览器插件中)",
|
|
27
35
|
"triple_flag": "三重触发器的最小字段",
|
|
28
36
|
"triple_flag2": "三重触发器的最大字段",
|
|
29
37
|
"triple_flag2_help": "三重触发器的最大分数字段。分数高于此值的飞镖将不会触发三重触发数据点。",
|
|
30
38
|
"triple_flag_help": "三重触发器的最低分数字段。分数低于此值的飞镖将不会触发三重触发数据点。",
|
|
31
|
-
"txt_one": "
|
|
39
|
+
"txt_one": "<b>此适配器将您本地的 Autodarts Board Manager 连接到 ioBroker。</b><br><br>1) 在“选项”(主机、端口、轮询、三重范围)下配置连接。<br>2) 在“映射”下映射灯光和功率目标。<br>3) 在可视化、脚本和场景中使用创建的状态(投掷、红绿灯、硬件)。",
|
|
40
|
+
"txt_tools": "此选项卡配置与“Tools for Autodarts”浏览器扩展的集成。<br>要使用它,您必须安装浏览器扩展,并且 ioBroker simple-api 适配器正在运行并可通过浏览器访问。",
|
|
32
41
|
"txt_two": "...更多信息即将推出!"
|
|
33
42
|
}
|
package/admin/jsonConfig.json
CHANGED
|
@@ -408,6 +408,78 @@
|
|
|
408
408
|
}
|
|
409
409
|
}
|
|
410
410
|
},
|
|
411
|
+
"_tools": {
|
|
412
|
+
"type": "panel",
|
|
413
|
+
"label": "tools_tab",
|
|
414
|
+
"icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJNMjAsN0g5VjVoMTFWN00yMCw5SDlWN0gyMFY5TTE1LDExSDEyVjEzSDE1VjExTTE5LDEwSDZ2MTBoMTNWMTBaTTEwLDE2SDhWMTlIMTBWMTZaIiAvPjwvc3ZnPg==",
|
|
415
|
+
"items": {
|
|
416
|
+
"txtTools": {
|
|
417
|
+
"type": "staticText",
|
|
418
|
+
"text": "txt_tools",
|
|
419
|
+
"newLine": true,
|
|
420
|
+
"xs": 12,
|
|
421
|
+
"sm": 12,
|
|
422
|
+
"md": 6,
|
|
423
|
+
"lg": 6,
|
|
424
|
+
"xl": 6,
|
|
425
|
+
"style": {
|
|
426
|
+
"marginTop": "0px",
|
|
427
|
+
"marginBottom": "20px",
|
|
428
|
+
"fontSize": "14px"
|
|
429
|
+
}
|
|
430
|
+
},
|
|
431
|
+
"toolsIp": {
|
|
432
|
+
"type": "text",
|
|
433
|
+
"label": "tools_ip",
|
|
434
|
+
"help": "tools_ip_help",
|
|
435
|
+
"default": "",
|
|
436
|
+
"newLine": true,
|
|
437
|
+
"xs": 12,
|
|
438
|
+
"sm": 12,
|
|
439
|
+
"md": 4,
|
|
440
|
+
"lg": 4,
|
|
441
|
+
"xl": 4
|
|
442
|
+
},
|
|
443
|
+
"toolsPort": {
|
|
444
|
+
"type": "number",
|
|
445
|
+
"label": "tools_port",
|
|
446
|
+
"help": "tools_port_help",
|
|
447
|
+
"default": 8087,
|
|
448
|
+
"newLine": false,
|
|
449
|
+
"xs": 12,
|
|
450
|
+
"sm": 12,
|
|
451
|
+
"md": 4,
|
|
452
|
+
"lg": 4,
|
|
453
|
+
"xl": 4
|
|
454
|
+
},
|
|
455
|
+
"toolsInstance": {
|
|
456
|
+
"type": "number",
|
|
457
|
+
"label": "tools_instance",
|
|
458
|
+
"help": "tools_instance_help",
|
|
459
|
+
"default": 0,
|
|
460
|
+
"newLine": false,
|
|
461
|
+
"xs": 12,
|
|
462
|
+
"sm": 12,
|
|
463
|
+
"md": 4,
|
|
464
|
+
"lg": 4,
|
|
465
|
+
"xl": 4
|
|
466
|
+
},
|
|
467
|
+
"toolsUrlsInfo": {
|
|
468
|
+
"type": "staticText",
|
|
469
|
+
"text": "tools_urls_info",
|
|
470
|
+
"newLine": true,
|
|
471
|
+
"xs": 12,
|
|
472
|
+
"sm": 12,
|
|
473
|
+
"md": 12,
|
|
474
|
+
"lg": 12,
|
|
475
|
+
"xl": 12,
|
|
476
|
+
"style": {
|
|
477
|
+
"marginTop": "30px",
|
|
478
|
+
"fontSize": "13px"
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
},
|
|
411
483
|
"_help": {
|
|
412
484
|
"type": "panel",
|
|
413
485
|
"label": "helps",
|
|
@@ -417,8 +489,8 @@
|
|
|
417
489
|
"type": "staticText",
|
|
418
490
|
"text": "intro_txt",
|
|
419
491
|
"newLine": true,
|
|
420
|
-
"sm":
|
|
421
|
-
"xs":
|
|
492
|
+
"sm": 12,
|
|
493
|
+
"xs": 12,
|
|
422
494
|
"md": 10,
|
|
423
495
|
"lg": 10,
|
|
424
496
|
"xl": 10,
|
|
@@ -472,8 +544,8 @@
|
|
|
472
544
|
"type": "staticText",
|
|
473
545
|
"text": "Team inventwo • <a href=\"https://github.com/inventwo\">https://github.com/inventwo</a> • by skvarel",
|
|
474
546
|
"newLine": true,
|
|
475
|
-
"sm":
|
|
476
|
-
"xs":
|
|
547
|
+
"sm": 12,
|
|
548
|
+
"xs": 12,
|
|
477
549
|
"md": 3,
|
|
478
550
|
"lg": 3,
|
|
479
551
|
"xl": 3,
|
|
@@ -495,8 +567,8 @@
|
|
|
495
567
|
"button": true,
|
|
496
568
|
"icon": "https://www.paypalobjects.com/marketing/web/logos/paypal-mark-color_new.svg",
|
|
497
569
|
"newLine": true,
|
|
498
|
-
"sm":
|
|
499
|
-
"xs":
|
|
570
|
+
"sm": 12,
|
|
571
|
+
"xs": 12,
|
|
500
572
|
"md": 3,
|
|
501
573
|
"lg": 3,
|
|
502
574
|
"xl": 3,
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "autodarts",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.8.0",
|
|
5
5
|
"news": {
|
|
6
|
+
"0.8.0": {
|
|
7
|
+
"en": "Added: New **TOOLS ADDON INTEGRATION** tab and runtime-generated URL states under `tools.config.*` for browser-based integrations (e.g. Tools for Autodarts).",
|
|
8
|
+
"de": "Hinzugefügt: Neue **TOOLS ADDON INTEGRATION** und Runtime-generierte URL-Staaten unter `tools.config.* für Browser-basierte Integrationen (z.B. Tools for Autodarts).",
|
|
9
|
+
"ru": "Добавлено: новая вкладка **TOOLS ADDON INTEGRATION** и URL-адреса, генерируемые во время выполнения, в разделе «tools.config.*» для интеграций на основе браузера (например, Tools for Autodarts).",
|
|
10
|
+
"pt": "Adicionado: Novo **TOOLS ADDON INTEGRATION** aba e estados de URL gerados em tempo de execução em `tools.config.*` para integrações baseadas em navegador (por exemplo, Ferramentas para Autodarts).",
|
|
11
|
+
"nl": "Toegevoegd: Nieuwe **TOOLS ADDON INTEGRATION** tabblad en runtime-gegenereerde URL-toestanden onder .",
|
|
12
|
+
"fr": "Ajouté : nouvel onglet **TOOLS ADDON INTEGRATION** et états d'URL générés par l'exécution sous `tools.config.*` pour les intégrations basées sur le navigateur (par exemple Outils pour Autodarts).",
|
|
13
|
+
"it": "Aggiunto: New **TOOLS ADDON INTEGRATION** tab and runtime-generated URL stati sotto `tools.config.*` per le integrazioni basate sul browser (ad esempio Strumenti per Autodarts).",
|
|
14
|
+
"es": "Añadido: Nuevo **TOOLS ADDON INTEGRATION** pestaña y estados URL generados por tiempo de ejecución bajo `tools.config.*` para integraciones basadas en el navegador (por ejemplo, Herramientas para Autodarts).",
|
|
15
|
+
"pl": "Dodano: New ** TOOLS ADDON INTEGRATION* * tab and runtime- genered URL states under 'tools.config.*' for browser- based integrations (np. Tools for Autodarts). ",
|
|
16
|
+
"uk": "Додано: New **TOOLS ADDON INTEGRATION*** вкладка та пускові дегенеровані стани URL під `tools.config.*` для інтеграції браузера (наприклад, Інструменти для Autodarts).",
|
|
17
|
+
"zh-cn": "添加:在“tools.config.QQ”下新建 **TOOLS ADDON INTEGINation**标签和运行时间生成的URL状态,用于基于浏览器的集成(例如,用于自动化的工具)."
|
|
18
|
+
},
|
|
19
|
+
"0.7.3": {
|
|
20
|
+
"en": "Fix Adapter Checker Warnings",
|
|
21
|
+
"de": "Fix Adapter Checker Warnungen",
|
|
22
|
+
"ru": "Fix Adapter Checker Предупреждения",
|
|
23
|
+
"pt": "Corrigir avisos de verificação do adaptador",
|
|
24
|
+
"nl": "Waarschuwingen voor adaptercontrole herstellen",
|
|
25
|
+
"fr": "Correction des avertissements du vérificateur d'adaptateur",
|
|
26
|
+
"it": "Risolvere le avvertenze dell'adattatore",
|
|
27
|
+
"es": "Advertencias de adaptador de fijación",
|
|
28
|
+
"pl": "Napraw ostrzeżenia dotyczące kontroli adaptera",
|
|
29
|
+
"uk": "Перевірити попередження адаптера",
|
|
30
|
+
"zh-cn": "修正适配器检查器警告"
|
|
31
|
+
},
|
|
6
32
|
"0.7.2": {
|
|
7
33
|
"en": "Fix Copyright Year",
|
|
8
34
|
"de": "Urheberrecht Jahr",
|
|
@@ -67,32 +93,6 @@
|
|
|
67
93
|
"pl": "Ulepszone: Strona ustawień przepracowała użycie trzech kart (\"OPTIONS\", \"MAPPINGS\" i \"HELP & FAQ\") dla większej jasności.",
|
|
68
94
|
"uk": "Удосконалено: Настроювання сторінки, що перетворюються на використання трьох вкладок (`OPTIONS`, `MAPPINGS` та `HELP & FAQ`) для кращої чіткості.",
|
|
69
95
|
"zh-cn": "改进:重新编译了设置页,以使用三个标签(`OPTIONS ' 、`MAPPINGS ' 和`HELP & FAQ` ' ),以便更加清晰."
|
|
70
|
-
},
|
|
71
|
-
"0.6.1": {
|
|
72
|
-
"en": "New: Settings page reworked to use two tabs (`OPTIONS` and `MAPPINGS`) for better clarity.\nNew: Mapping of ioBroker objects for board light and board power in the **MAPPINGS** tab.\nImproved: Layout of the configuration page (field widths, spacing, texts) for a more symmetric and clean UI.\nImproved: Updated option descriptions in the admin UI.",
|
|
73
|
-
"de": "Neu: Einstellungen Seite neu bearbeitet, um zwei Registerkarten (`OPTIONS` und `MAPPINGS`) für bessere Klarheit zu verwenden.\nNeu: Mapping von ioBroker Objekten für Board-Licht und Board-Power im **MAPPINGS** Tab.\nVerbessert: Layout der Konfigurationsseite (Feldbreiten, Abstand, Texte) für eine symmetrischere und sauberere UI.\nVerbessert: Aktualisierte Optionsbeschreibungen im Admin UI.",
|
|
74
|
-
"ru": "Новая страница настроек, переработанная для использования двух вкладок («ВЫБОРЫ» и «МАППИНГЫ») для большей ясности.\nНовое: Картирование объектов ioBroker для освещения доски и питания доски во вкладке **MAPPINGS**.\nУлучшено: Раскладка страницы конфигурации (ширина поля, интервал, тексты) для более симметричного и чистого пользовательского интерфейса.\nУлучшенный: Обновленные описания опций в пользовательском интерфейсе администратора.",
|
|
75
|
-
"pt": "Novo: Página de configurações retrabalhou para usar duas abas (`OPTIONS' e `APPPINGS`) para melhor clareza.\nNovo: Mapeamento de objetos ioBroker para luz de placa e poder de placa na aba ** MAPPINGS**.\nMelhorado: Disposição da página de configuração (larguras de campo, espaçamento, textos) para uma interface mais simétrica e limpa.\nMelhorado: Descrições atualizadas da opção na interface de administração.",
|
|
76
|
-
"nl": "Nieuw: De pagina Instellingen herwerkt om twee tabbladen te gebruiken voor een betere helderheid.\nNieuw: Mapping van ioBroker objecten voor board licht en board power in de **MAPPINGS** tab.\nVerbeterd: Indeling van de configuratiepagina (veldbreedtes, afstand, teksten) voor een meer symmetrische en schone UI.\nVerbeterd: Bijgewerkte optiebeschrijvingen in de admin UI.",
|
|
77
|
-
"fr": "Nouveau : la page Paramètres a été retravaillée pour utiliser deux onglets (`OPTIONS` et `MAPPINGS`) pour une meilleure clarté.\nNouveau : Cartographie des objets ioBroker pour la lumière et la puissance de la planche dans l'onglet **MAPPINGS**.\nAmélioration : Mise en page de configuration (largeurs de champs, espacement, textes) pour une interface utilisateur plus symétrique et propre.\nAmélioration : Mise à jour des descriptions des options dans l'interface utilisateur admin.",
|
|
78
|
-
"it": "Nuovo: Impostazioni pagina rielaborata per utilizzare due schede (`OPTIONS` e `MAPPINGS`) per una migliore chiarezza.\nNuovo: mappatura di oggetti ioBroker per luce di bordo e alimentazione di bordo nella scheda **MAPPINGS**.\nMigliorato: Layout della pagina di configurazione (larghezza campo, spaziatura, testi) per un'interfaccia utente più simmetrica e pulita.\nMigliorato: le descrizioni delle opzioni aggiornate nell'interfaccia utente di admin.",
|
|
79
|
-
"es": "Nuevo: página Ajustes reelaborado para utilizar dos pestañas (`OPTIONS` y `MAPPINGS') para una mejor claridad.\nNuevo: Mapping of ioBroker objects for board light and board power in the **MAPPINGS** tab.\nMejorado: Diseño de la página de configuración (ancho de campo, espaciado, textos) para una interfaz de usuario más simétrica y limpia.\nMejorado: Actualización de las descripciones de opciones en la interfaz de usuario del administrador.",
|
|
80
|
-
"pl": "Nowy: Strona Ustawienia przepracowała, aby użyć dwóch kart (\"OPTIONS\" i \"MAPPINGS\") dla większej jasności.\nNowy: Mapowanie obiektów jOBroker dla oświetlenia planszy i mocy planszy w zakładce ** MAPPINGS* *. \nUlepszony: Układ strony konfiguracji (szerokość pola, odstępy, teksty) dla bardziej symetrycznego i czystego interfejsu użytkownika.\nUlepszone: Aktualizacja opisów opcji w Interfejsie administracyjnym.",
|
|
81
|
-
"uk": "Новинка: Настроювання сторінки, що перетворюються на використання двох вкладок (`OPTIONS` і `MAPPINGS`) для кращої чіткості.\nНовий: Mapping of ioBroker об'єктів для плати світла і потужності дошки в вкладці **MAPPINGS***.\nПокращується: Схема розміщення сторінки конфігурації (ширині поля, інтервали, тексти) для більш симетричного і чистого інтерфейсу.\nПокращено: Оновлено описи опцій в адмін UI.",
|
|
82
|
-
"zh-cn": "新建: 设置页面重修, 使用两个标签( \" OPTIONS \" 和 \" MAPPINGS \" ) , 以便更加清晰.\nNew:在**MAPPINGS**标签中绘制用于板光和板电的ioBroker对象的映射.\n改进:配置页面的布局(字段宽度,间距,文本),用于更加对称和干净的UI.\n改进:更新了管理员UI中的选项描述."
|
|
83
|
-
},
|
|
84
|
-
"0.6.0": {
|
|
85
|
-
"en": "Added: New throw.isMiss state to detect and trigger automations on missed darts (including auto-reset via triggerResetSec).\nAdded: New throw.isDouble state to detect and trigger automations on double segments (including auto-reset via triggerResetSec).",
|
|
86
|
-
"de": "Hinzugefügt: Neue Wurf. isMiss-Zustand zu erkennen und Automatisierungen auf verpassten Darts auszulösen (einschließlich Auto-Reset über triggerResetSec).\nHinzugefügt: Neue Wurf. ist doppelter Zustand, um Automatisierungen auf Doppelsegmenten zu erkennen und auszulösen (einschließlich Auto-Reset über triggerResetSec).",
|
|
87
|
-
"ru": "Добавлено: Новый бросок. состояние Мисс для обнаружения и запуска автоматизации на пропущенных дротиках (включая автоматическое сброс через триггерResetSec).\nДобавлено: Новый бросок. Двойное состояние для обнаружения и запуска автоматизации в двойных сегментах (включая автоперезагрузку через триггерResetSec).",
|
|
88
|
-
"pt": "Adicionado: Novo lançamento. isMiss estado para detectar e ativar automações em dardos perdidos (incluindo auto-reset via triggerResetSec).\nAdicionado: Novo lançamento. isDouble state to detect and active automations in double segments (incluindo auto-reset via triggerResetSec).",
|
|
89
|
-
"nl": "Toegevoegd: Nieuwe worp. isMiss staat te detecteren en te triggeren automatisering op gemiste darts (inclusief auto-reset via triggerResetSec).\nToegevoegd: Nieuwe worp. isDubbele toestand te detecteren en te triggeren automatiseringen op dubbele segmenten (inclusief auto-reset via triggerResetSec).",
|
|
90
|
-
"fr": "Ajouté : Nouveau lancer. isMiss state pour détecter et déclencher les automatismes sur les fléchettes oubliées (y compris auto-reset via triggerResetSec).\nAjouté : Nouveau lancer. est l'état double pour détecter et déclencher les automatismes sur les doubles segments (y compris auto-reset via triggerResetSec).",
|
|
91
|
-
"it": "Aggiunto: Nuovo tiro. isMiss stato per rilevare e attivare le automazioni sulle freccette mancate (compreso il ripristino automatico tramite triggerResetSec).\nAggiunto: Nuovo tiro. isDouble state per rilevare e attivare le automazioni su due segmenti (compreso il ripristino automatico tramite triggerResetSec).",
|
|
92
|
-
"es": "Añadido: Nuevo lanzamiento. isMiss state para detectar y desencadenar automatizaciones en dardos perdidos (incluyendo el ajuste automático a través de triggerResetSec).\nAñadido: Nuevo lanzamiento. isDoble estado para detectar y desencadenar automatizaciones en segmentos dobles (incluyendo el ajuste automático a través de triggerResetSec).",
|
|
93
|
-
"pl": "Dodano: nowy rzut. isMiss stan do wykrywania i uruchamiania automatyzacji na nieodebranych rzutki (w tym auto- reset poprzez triggerResetSec).\nDodano: nowy rzut. isDouble state do wykrywania i uruchamiania automatyzacji na podwójnych segmentach (w tym auto- reset poprzez triggerResetSec).",
|
|
94
|
-
"uk": "Доданий: Новий кицька. isMiss держава для виявлення та запуску автоматизації на пропущених darts (включаючи автозавантаження через тригерResetSec).\nДоданий: Новий кицька. єподвійним станом для виявлення та запуску автоматизації на подвійних сегментах (включаючи автозавантаження через тригерResetSec).",
|
|
95
|
-
"zh-cn": "添加:新掷. 是Miss State,用于检测和触发对丢失的飞镖的自动化(包括通过触发器ResetSec自动重置).\n添加:新掷. isDouble状态在双片段上检测和触发自动化(包括通过触发ResetSec自动重置)."
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"titleLang": {
|
|
@@ -169,7 +169,13 @@
|
|
|
169
169
|
"tripleMinScore": 1,
|
|
170
170
|
"tripleMaxScore": 20,
|
|
171
171
|
"lightTargetId": "",
|
|
172
|
-
"powerTargetId": ""
|
|
172
|
+
"powerTargetId": "",
|
|
173
|
+
"toolsIp": "",
|
|
174
|
+
"toolsPort": 8087,
|
|
175
|
+
"toolsInstance": 0,
|
|
176
|
+
"toolsUrlBusted": "",
|
|
177
|
+
"toolsUrlGameon": "",
|
|
178
|
+
"toolsUrlGameshot": ""
|
|
173
179
|
},
|
|
174
180
|
"objects": [],
|
|
175
181
|
"instanceObjects": []
|
package/lib/tools.js
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/* eslint-disable jsdoc/require-param-description */
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Init für Tools-Integration.
|
|
6
|
+
* Legt Startwerte und Subscription für tools.RAW an.
|
|
7
|
+
*
|
|
8
|
+
* @param {import("@iobroker/adapter-core").AdapterInstance} adapter
|
|
9
|
+
*/
|
|
10
|
+
async function init(adapter) {
|
|
11
|
+
// Initialzustand setzen
|
|
12
|
+
await adapter.setStateAsync("tools.RAW", { val: "", ack: true });
|
|
13
|
+
await adapter.setStateAsync("tools.busted", { val: false, ack: true });
|
|
14
|
+
await adapter.setStateAsync("tools.gameon", { val: false, ack: true });
|
|
15
|
+
await adapter.setStateAsync("tools.gameshot", { val: false, ack: true });
|
|
16
|
+
|
|
17
|
+
// Auf Änderungen von tools.RAW hören
|
|
18
|
+
adapter.subscribeStates("tools.RAW");
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Verarbeitet Änderungen an tools.* States.
|
|
23
|
+
* Wird aus main.js:onStateChange aufgerufen.
|
|
24
|
+
*
|
|
25
|
+
* @param {import("@iobroker/adapter-core").AdapterInstance} adapter
|
|
26
|
+
* @param {string} idShort State-ID ohne Namespace (z.B. "tools.RAW")
|
|
27
|
+
* @param {ioBroker.State} state Neuer State (ack=false auf User/HTTP-Schreibzugriff)
|
|
28
|
+
*/
|
|
29
|
+
async function handleStateChange(adapter, idShort, state) {
|
|
30
|
+
if (idShort !== "tools.RAW") {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const val = String(state.val || "").toLowerCase();
|
|
35
|
+
const timeoutMs = (adapter.triggerResetSecRuntime || 0) * 1000;
|
|
36
|
+
|
|
37
|
+
// Alle Trigger zuerst zurücksetzen
|
|
38
|
+
await adapter.setStateAsync("tools.busted", { val: false, ack: true });
|
|
39
|
+
await adapter.setStateAsync("tools.gameon", { val: false, ack: true });
|
|
40
|
+
await adapter.setStateAsync("tools.gameshot", { val: false, ack: true });
|
|
41
|
+
|
|
42
|
+
if (val === "busted") {
|
|
43
|
+
await setPulse(adapter, "tools.busted", timeoutMs);
|
|
44
|
+
} else if (val === "gameon") {
|
|
45
|
+
await setPulse(adapter, "tools.gameon", timeoutMs);
|
|
46
|
+
} else if (val === "gameshot") {
|
|
47
|
+
await setPulse(adapter, "tools.gameshot", timeoutMs);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Hilfsfunktion: setzt einen Bool-State kurz auf true und ggf. per Timeout wieder auf false.
|
|
53
|
+
*
|
|
54
|
+
* // eslint-disable-next-line jsdoc/require-param-description
|
|
55
|
+
*
|
|
56
|
+
* @param {import("@iobroker/adapter-core").AdapterInstance} adapter
|
|
57
|
+
* @param {string} id
|
|
58
|
+
* @param {number} timeoutMs
|
|
59
|
+
*/
|
|
60
|
+
async function setPulse(adapter, id, timeoutMs) {
|
|
61
|
+
await adapter.setStateAsync(id, { val: true, ack: true });
|
|
62
|
+
|
|
63
|
+
if (timeoutMs > 0) {
|
|
64
|
+
if (adapter.resetTimer) {
|
|
65
|
+
clearTimeout(adapter.resetTimer);
|
|
66
|
+
}
|
|
67
|
+
adapter.resetTimer = setTimeout(() => {
|
|
68
|
+
adapter.setState(id, { val: false, ack: true });
|
|
69
|
+
adapter.resetTimer = null;
|
|
70
|
+
}, timeoutMs);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
module.exports = {
|
|
75
|
+
init,
|
|
76
|
+
handleStateChange,
|
|
77
|
+
};
|
package/main.js
CHANGED
|
@@ -5,6 +5,7 @@ const utils = require("@iobroker/adapter-core");
|
|
|
5
5
|
const throwLogic = require("./lib/throw");
|
|
6
6
|
const visit = require("./lib/visit");
|
|
7
7
|
const trafficLight = require("./lib/trafficLight");
|
|
8
|
+
const tools = require("./lib/tools");
|
|
8
9
|
const httpHelper = require("./lib/httpHelper");
|
|
9
10
|
|
|
10
11
|
class Autodarts extends utils.Adapter {
|
|
@@ -60,6 +61,12 @@ class Autodarts extends utils.Adapter {
|
|
|
60
61
|
this.config.tripleMinScore ??= 1;
|
|
61
62
|
this.config.tripleMaxScore ??= 20;
|
|
62
63
|
this.config.triggerResetSec ??= 0; // 0 = kein Auto-Reset
|
|
64
|
+
|
|
65
|
+
// NEU: Defaults für Tools-URLs
|
|
66
|
+
this.config.toolsIp ??= "";
|
|
67
|
+
this.config.toolsPort ??= 8087;
|
|
68
|
+
this.config.toolsInstance ??= 0;
|
|
69
|
+
|
|
63
70
|
// Polling-Intervall aus Sekunden in Millisekunden berechnen
|
|
64
71
|
this.onlineIntervalMs = (Number(this.config.intervalSec) || 1) * 1000;
|
|
65
72
|
|
|
@@ -88,6 +95,7 @@ class Autodarts extends utils.Adapter {
|
|
|
88
95
|
},
|
|
89
96
|
native: {},
|
|
90
97
|
});
|
|
98
|
+
|
|
91
99
|
// status.board als String-Datenpunkt im bestehenden status-Channel anlegen
|
|
92
100
|
await this.extendObjectAsync("status.boardStatus", {
|
|
93
101
|
type: "state",
|
|
@@ -107,7 +115,13 @@ class Autodarts extends utils.Adapter {
|
|
|
107
115
|
},
|
|
108
116
|
native: {},
|
|
109
117
|
});
|
|
110
|
-
|
|
118
|
+
|
|
119
|
+
// WICHTIG: Grundzustand setzen, bevor Polling startet
|
|
120
|
+
await this.setStateAsync("online", false, true);
|
|
121
|
+
await this.setStateAsync("info.connection", false, true);
|
|
122
|
+
await this.setStateAsync("status.boardStatus", { val: "offline", ack: true });
|
|
123
|
+
|
|
124
|
+
// System-Channel und Unter-Channels
|
|
111
125
|
await this.extendObjectAsync("system", {
|
|
112
126
|
type: "channel",
|
|
113
127
|
common: {
|
|
@@ -118,7 +132,7 @@ class Autodarts extends utils.Adapter {
|
|
|
118
132
|
},
|
|
119
133
|
native: {},
|
|
120
134
|
});
|
|
121
|
-
|
|
135
|
+
|
|
122
136
|
await this.extendObjectAsync("system.hardware", {
|
|
123
137
|
type: "channel",
|
|
124
138
|
common: {
|
|
@@ -140,6 +154,7 @@ class Autodarts extends utils.Adapter {
|
|
|
140
154
|
},
|
|
141
155
|
native: {},
|
|
142
156
|
});
|
|
157
|
+
|
|
143
158
|
await this.extendObjectAsync("system.cams", {
|
|
144
159
|
type: "channel",
|
|
145
160
|
common: {
|
|
@@ -208,6 +223,7 @@ class Autodarts extends utils.Adapter {
|
|
|
208
223
|
},
|
|
209
224
|
native: {},
|
|
210
225
|
});
|
|
226
|
+
|
|
211
227
|
await this.extendObjectAsync("system.software.os", {
|
|
212
228
|
type: "state",
|
|
213
229
|
common: {
|
|
@@ -284,6 +300,7 @@ class Autodarts extends utils.Adapter {
|
|
|
284
300
|
},
|
|
285
301
|
native: {},
|
|
286
302
|
});
|
|
303
|
+
|
|
287
304
|
// LED State anlegen
|
|
288
305
|
await this.extendObjectAsync("system.hardware.light", {
|
|
289
306
|
type: "state",
|
|
@@ -296,6 +313,7 @@ class Autodarts extends utils.Adapter {
|
|
|
296
313
|
},
|
|
297
314
|
native: {},
|
|
298
315
|
});
|
|
316
|
+
|
|
299
317
|
// POWER State anlegen
|
|
300
318
|
await this.extendObjectAsync("system.hardware.power", {
|
|
301
319
|
type: "state",
|
|
@@ -367,7 +385,7 @@ class Autodarts extends utils.Adapter {
|
|
|
367
385
|
native: {},
|
|
368
386
|
});
|
|
369
387
|
|
|
370
|
-
// Config-Channel und States für tripleMinScore / tripleMaxScore / triggerResetSec
|
|
388
|
+
// Config-Channel und States für tripleMinScore / tripleMaxScore / triggerResetSec
|
|
371
389
|
await this.extendObjectAsync("config", {
|
|
372
390
|
type: "channel",
|
|
373
391
|
common: {
|
|
@@ -436,6 +454,145 @@ class Autodarts extends utils.Adapter {
|
|
|
436
454
|
native: {},
|
|
437
455
|
});
|
|
438
456
|
|
|
457
|
+
// tools-Channel und States anlegen
|
|
458
|
+
const toolsIpTrimmed = (this.config.toolsIp || "").trim();
|
|
459
|
+
if (toolsIpTrimmed) {
|
|
460
|
+
await this.extendObjectAsync("tools", {
|
|
461
|
+
type: "channel",
|
|
462
|
+
common: {
|
|
463
|
+
name: {
|
|
464
|
+
en: "Tools for Autodarts integration",
|
|
465
|
+
de: "Tools for Autodarts Integration",
|
|
466
|
+
},
|
|
467
|
+
},
|
|
468
|
+
native: {},
|
|
469
|
+
});
|
|
470
|
+
|
|
471
|
+
await this.extendObjectAsync("tools.RAW", {
|
|
472
|
+
type: "state",
|
|
473
|
+
common: {
|
|
474
|
+
name: {
|
|
475
|
+
en: "RAW event from Tools for Autodarts",
|
|
476
|
+
de: "RAW-Ereignis von Tools for Autodarts",
|
|
477
|
+
},
|
|
478
|
+
type: "string",
|
|
479
|
+
role: "text",
|
|
480
|
+
read: true,
|
|
481
|
+
write: true,
|
|
482
|
+
},
|
|
483
|
+
native: {},
|
|
484
|
+
});
|
|
485
|
+
|
|
486
|
+
await this.extendObjectAsync("tools.busted", {
|
|
487
|
+
type: "state",
|
|
488
|
+
common: {
|
|
489
|
+
name: {
|
|
490
|
+
en: "Busted (trigger)",
|
|
491
|
+
de: "Busted (Trigger)",
|
|
492
|
+
},
|
|
493
|
+
type: "boolean",
|
|
494
|
+
role: "indicator",
|
|
495
|
+
read: true,
|
|
496
|
+
write: false,
|
|
497
|
+
},
|
|
498
|
+
native: {},
|
|
499
|
+
});
|
|
500
|
+
|
|
501
|
+
await this.extendObjectAsync("tools.gameon", {
|
|
502
|
+
type: "state",
|
|
503
|
+
common: {
|
|
504
|
+
name: {
|
|
505
|
+
en: "Game on (trigger)",
|
|
506
|
+
de: "Game on (Trigger)",
|
|
507
|
+
},
|
|
508
|
+
type: "boolean",
|
|
509
|
+
role: "indicator",
|
|
510
|
+
read: true,
|
|
511
|
+
write: false,
|
|
512
|
+
},
|
|
513
|
+
native: {},
|
|
514
|
+
});
|
|
515
|
+
|
|
516
|
+
await this.extendObjectAsync("tools.gameshot", {
|
|
517
|
+
type: "state",
|
|
518
|
+
common: {
|
|
519
|
+
name: {
|
|
520
|
+
en: "Gameshot (trigger)",
|
|
521
|
+
de: "Gameshot (Trigger)",
|
|
522
|
+
},
|
|
523
|
+
type: "boolean",
|
|
524
|
+
role: "indicator",
|
|
525
|
+
read: true,
|
|
526
|
+
write: false,
|
|
527
|
+
},
|
|
528
|
+
native: {},
|
|
529
|
+
});
|
|
530
|
+
// NEU: Unter-Channel für URL-Infos
|
|
531
|
+
await this.extendObjectAsync("tools.config", {
|
|
532
|
+
type: "channel",
|
|
533
|
+
common: {
|
|
534
|
+
name: {
|
|
535
|
+
en: "Tools configuration",
|
|
536
|
+
de: "Tools-Konfiguration",
|
|
537
|
+
},
|
|
538
|
+
},
|
|
539
|
+
native: {},
|
|
540
|
+
});
|
|
541
|
+
|
|
542
|
+
await this.extendObjectAsync("tools.config.urlBusted", {
|
|
543
|
+
type: "state",
|
|
544
|
+
common: {
|
|
545
|
+
name: {
|
|
546
|
+
en: "URL for Busted",
|
|
547
|
+
de: "URL für Busted",
|
|
548
|
+
},
|
|
549
|
+
type: "string",
|
|
550
|
+
role: "text.url",
|
|
551
|
+
read: true,
|
|
552
|
+
write: false,
|
|
553
|
+
},
|
|
554
|
+
native: {},
|
|
555
|
+
});
|
|
556
|
+
|
|
557
|
+
await this.extendObjectAsync("tools.config.urlGameon", {
|
|
558
|
+
type: "state",
|
|
559
|
+
common: {
|
|
560
|
+
name: {
|
|
561
|
+
en: "URL for Game on",
|
|
562
|
+
de: "URL für Game on",
|
|
563
|
+
},
|
|
564
|
+
type: "string",
|
|
565
|
+
role: "text.url",
|
|
566
|
+
read: true,
|
|
567
|
+
write: false,
|
|
568
|
+
},
|
|
569
|
+
native: {},
|
|
570
|
+
});
|
|
571
|
+
|
|
572
|
+
await this.extendObjectAsync("tools.config.urlGameshot", {
|
|
573
|
+
type: "state",
|
|
574
|
+
common: {
|
|
575
|
+
name: {
|
|
576
|
+
en: "URL for Gameshot",
|
|
577
|
+
de: "URL für Gameshot",
|
|
578
|
+
},
|
|
579
|
+
type: "string",
|
|
580
|
+
role: "text.url",
|
|
581
|
+
read: true,
|
|
582
|
+
write: false,
|
|
583
|
+
},
|
|
584
|
+
native: {},
|
|
585
|
+
});
|
|
586
|
+
|
|
587
|
+
// Tools-Integration initialisieren
|
|
588
|
+
await tools.init(this);
|
|
589
|
+
|
|
590
|
+
// Tools-URLs aus Config generieren (für Admin-Tab)
|
|
591
|
+
await this.updateToolsUrls();
|
|
592
|
+
} else {
|
|
593
|
+
this.log.info("Tools integration disabled: no toolsIp configured");
|
|
594
|
+
}
|
|
595
|
+
|
|
439
596
|
// Laufzeitwerte initial aus Adapter-Config setzen
|
|
440
597
|
this.tripleMinScoreRuntime = Number(this.config.tripleMinScore) || 1;
|
|
441
598
|
this.tripleMaxScoreRuntime = Number(this.config.tripleMaxScore) || 20;
|
|
@@ -449,7 +606,6 @@ class Autodarts extends utils.Adapter {
|
|
|
449
606
|
val: this.tripleMaxScoreRuntime,
|
|
450
607
|
ack: true,
|
|
451
608
|
});
|
|
452
|
-
|
|
453
609
|
await this.setStateAsync("config.triggerResetSec", {
|
|
454
610
|
val: this.triggerResetSecRuntime,
|
|
455
611
|
ack: true,
|
|
@@ -508,7 +664,7 @@ class Autodarts extends utils.Adapter {
|
|
|
508
664
|
}
|
|
509
665
|
|
|
510
666
|
/**
|
|
511
|
-
* Reaktion auf State-Änderungen
|
|
667
|
+
* Reaktion auf State-Änderungen
|
|
512
668
|
*
|
|
513
669
|
* @param {string} id Full state id
|
|
514
670
|
* @param {ioBroker.State | null | undefined} state New state value (ack=false on user write)
|
|
@@ -520,6 +676,12 @@ class Autodarts extends utils.Adapter {
|
|
|
520
676
|
|
|
521
677
|
const idShort = id.replace(`${this.namespace}.`, "");
|
|
522
678
|
|
|
679
|
+
// Tools-RAW zuerst behandeln (nur eigene States, nur bei ack=false)
|
|
680
|
+
if (!state.ack && idShort.startsWith("tools.")) {
|
|
681
|
+
await tools.handleStateChange(this, idShort, state);
|
|
682
|
+
return;
|
|
683
|
+
}
|
|
684
|
+
|
|
523
685
|
// 1) Rückrichtung: Foreign-States -> eigene Schalter (immer reagieren)
|
|
524
686
|
if (this.config.lightTargetId && id === this.config.lightTargetId) {
|
|
525
687
|
await this.setStateAsync("system.hardware.light", { val: state.val, ack: true });
|
|
@@ -535,6 +697,22 @@ class Autodarts extends utils.Adapter {
|
|
|
535
697
|
return;
|
|
536
698
|
}
|
|
537
699
|
|
|
700
|
+
// Tools-Config (IP/Port/Instanz)
|
|
701
|
+
if (idShort === "toolsIp" || idShort === "toolsPort" || idShort === "toolsInstance") {
|
|
702
|
+
const val = state.val;
|
|
703
|
+
|
|
704
|
+
if (idShort === "toolsIp") {
|
|
705
|
+
this.config.toolsIp = String(val || "");
|
|
706
|
+
} else if (idShort === "toolsPort") {
|
|
707
|
+
this.config.toolsPort = Number(val) || 8087;
|
|
708
|
+
} else if (idShort === "toolsInstance") {
|
|
709
|
+
this.config.toolsInstance = Number(val) || 0;
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
await this.updateToolsUrls();
|
|
713
|
+
return;
|
|
714
|
+
}
|
|
715
|
+
|
|
538
716
|
if (idShort === "config.tripleMinScore") {
|
|
539
717
|
const val = Number(state.val);
|
|
540
718
|
if (!Number.isFinite(val) || val <= 0) {
|
|
@@ -580,6 +758,41 @@ class Autodarts extends utils.Adapter {
|
|
|
580
758
|
}
|
|
581
759
|
}
|
|
582
760
|
|
|
761
|
+
/**
|
|
762
|
+
* Aus toolsIp/toolsPort/toolsInstance drei fertige URLs erzeugen
|
|
763
|
+
* und in native.toolsUrl* schreiben (für die Admin-Config-Anzeige).
|
|
764
|
+
*/
|
|
765
|
+
/**
|
|
766
|
+
* Aus toolsIp/toolsPort/toolsInstance drei fertige URLs erzeugen
|
|
767
|
+
* und in tools.config.url* schreiben.
|
|
768
|
+
*/
|
|
769
|
+
async updateToolsUrls() {
|
|
770
|
+
const ip = (this.config.toolsIp || "").trim();
|
|
771
|
+
const port = Number(this.config.toolsPort) || 8087;
|
|
772
|
+
const inst = Number(this.config.toolsInstance) || 0;
|
|
773
|
+
|
|
774
|
+
// Wenn keine IP gesetzt ist: URLs leeren
|
|
775
|
+
if (!ip) {
|
|
776
|
+
await this.setStateAsync("tools.config.urlBusted", { val: "", ack: true });
|
|
777
|
+
await this.setStateAsync("tools.config.urlGameon", { val: "", ack: true });
|
|
778
|
+
await this.setStateAsync("tools.config.urlGameshot", { val: "", ack: true });
|
|
779
|
+
return;
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
const base = `http://${ip}:${port}`;
|
|
783
|
+
const id = `autodarts.${inst}`;
|
|
784
|
+
|
|
785
|
+
const urlBusted = `${base}/set/${id}.tools.RAW?value=busted`;
|
|
786
|
+
const urlGameon = `${base}/set/${id}.tools.RAW?value=gameon`;
|
|
787
|
+
const urlGameshot = `${base}/set/${id}.tools.RAW?value=gameshot`;
|
|
788
|
+
|
|
789
|
+
await this.setStateAsync("tools.config.urlBusted", { val: urlBusted, ack: true });
|
|
790
|
+
await this.setStateAsync("tools.config.urlGameon", { val: urlGameon, ack: true });
|
|
791
|
+
await this.setStateAsync("tools.config.urlGameshot", { val: urlGameshot, ack: true });
|
|
792
|
+
|
|
793
|
+
this.log.debug(`Updated Tools URLs: ${urlBusted}, ${urlGameon}, ${urlGameshot}`);
|
|
794
|
+
}
|
|
795
|
+
|
|
583
796
|
/**
|
|
584
797
|
* Autodarts API abfragen und Visit-Summe schreiben
|
|
585
798
|
*/
|
|
@@ -675,8 +888,6 @@ class Autodarts extends utils.Adapter {
|
|
|
675
888
|
});
|
|
676
889
|
} else {
|
|
677
890
|
this.log.error(`Autodarts request failed: ${msg}`);
|
|
678
|
-
// Bei anderen Fehlern (z.B. Syntax) nicht auf "offline" setzen
|
|
679
|
-
// Optional: hier trotzdem online = false setzen, wenn gewünscht
|
|
680
891
|
}
|
|
681
892
|
}
|
|
682
893
|
}
|
|
@@ -714,7 +925,6 @@ class Autodarts extends utils.Adapter {
|
|
|
714
925
|
await this.setStateAsync("system.cams.cam1", { val: json, ack: true });
|
|
715
926
|
await this.setStateAsync("system.cams.cam2", { val: json, ack: true });
|
|
716
927
|
} catch (error) {
|
|
717
|
-
// Bei Fehler keine Log-Warnung
|
|
718
928
|
if (
|
|
719
929
|
error &&
|
|
720
930
|
typeof error === "object" &&
|
|
@@ -725,6 +935,7 @@ class Autodarts extends utils.Adapter {
|
|
|
725
935
|
}
|
|
726
936
|
}
|
|
727
937
|
}
|
|
938
|
+
|
|
728
939
|
/**
|
|
729
940
|
* Host-Informationen abfragen
|
|
730
941
|
*/
|
|
@@ -769,7 +980,6 @@ class Autodarts extends utils.Adapter {
|
|
|
769
980
|
ack: true,
|
|
770
981
|
});
|
|
771
982
|
} catch (error) {
|
|
772
|
-
// Bei Fehler keine Log-Warnung
|
|
773
983
|
if (
|
|
774
984
|
error &&
|
|
775
985
|
typeof error === "object" &&
|