iobroker.autodarts 0.3.3 → 0.5.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 +79 -76
- package/admin/i18n/de.json +4 -0
- package/admin/i18n/en.json +5 -1
- package/admin/i18n/es.json +4 -0
- package/admin/i18n/fr.json +4 -0
- package/admin/i18n/it.json +4 -0
- package/admin/i18n/nl.json +4 -0
- package/admin/i18n/pl.json +4 -0
- package/admin/i18n/pt.json +4 -0
- package/admin/i18n/ru.json +4 -0
- package/admin/i18n/uk.json +4 -0
- package/admin/i18n/zh-cn.json +4 -0
- package/admin/jsonConfig.json +280 -110
- package/io-package.json +30 -28
- package/main.js +264 -27
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,42 +11,68 @@
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
## What this adapter does
|
|
14
|
-
<!-- - Reads current game state, active player, and dart throws (e.g. `T20`, `D1`, `S19`). -->
|
|
15
|
-
- Connects to your local Autodarts Board Manager (via IP and port, e.g. `192.168.x.x:3180`).
|
|
16
|
-
- Exposes ioBroker states and events so you can:
|
|
17
|
-
- Turn on lights when a game starts.
|
|
18
|
-
- Play a sound on a bullseye.
|
|
19
|
-
- Announce the current player via TTS.
|
|
20
|
-
- Trigger other automations in ioBroker.
|
|
21
|
-
|
|
22
|
-
It also provides:
|
|
23
|
-
|
|
24
|
-
- `visit.score`: Total score of the last complete visit (3 darts).
|
|
25
|
-
- `throw.current`: Numeric score of the last thrown dart.
|
|
26
|
-
- `throw.isTriple`: Boolean flag that turns true for triple hits within a configurable segment range (e.g. 1–20)
|
|
27
|
-
- `throw.isBullseye`: Boolean flag that only turns true for bullseye hits.
|
|
28
|
-
- `system.boardVersion`: Reported Board Manager version.
|
|
29
|
-
- `system.cam0/1/2`: JSON with camera settings (width, height, fps).
|
|
30
|
-
- `status.trafficLightColor`: HEX color of the current board status.
|
|
31
|
-
- `status.trafficLightState`: `green` (player may throw), `yellow` (remove darts), `red` (board error).
|
|
32
14
|
|
|
15
|
+
Connects to your local Autodarts Board Manager (via IP and port, e.g. `192.168.x.x:3180`) and exposes ioBroker states for home automation:
|
|
16
|
+
|
|
17
|
+
- Turn on lights when a game starts
|
|
18
|
+
- Play a sound on a bullseye
|
|
19
|
+
- Announce the next throw via text-to-speech (TTS)
|
|
20
|
+
- Control board hardware (lighting, power)
|
|
21
|
+
- Trigger any other ioBroker automation based on dart events
|
|
22
|
+
|
|
23
|
+
## Features
|
|
24
|
+
|
|
25
|
+
### Game State & Throws
|
|
26
|
+
- **`visit.score`**: Total score of the last complete visit (3 darts)
|
|
27
|
+
- **`throw.current`**: Numeric score of the last thrown dart
|
|
28
|
+
- **`throw.isTriple`**: Boolean flag for triple hits within configurable segment range (default: 1–20)
|
|
29
|
+
- **`throw.isBullseye`**: Boolean flag for bullseye hits only
|
|
30
|
+
|
|
31
|
+
### Board Status
|
|
32
|
+
- **`status.trafficLightColor`**: HEX color of current board status
|
|
33
|
+
- **`status.trafficLightState`**: Status indicator
|
|
34
|
+
- `green` = Player may throw
|
|
35
|
+
- `yellow` = Remove darts
|
|
36
|
+
- `red` = Board offline/error
|
|
37
|
+
|
|
38
|
+
### System Information
|
|
39
|
+
- **`system.software.*`**: Autodarts versions (boardVersion, desktopVersion), OS and platform details
|
|
40
|
+
- **`system.hardware.*`**: CPU model, kernel architecture, hostname
|
|
41
|
+
- **`system.cams.cam0/1/2`**: Camera configuration (width, height, fps) as JSON
|
|
42
|
+
|
|
43
|
+
### Hardware Control
|
|
44
|
+
- **`system.hardware.light`**: Control board lighting (bidirectional with external states)
|
|
45
|
+
- **`system.hardware.power`**: Control board power (bidirectional with external states)
|
|
46
|
+
|
|
47
|
+
### Runtime Configuration
|
|
48
|
+
- **`config.tripleMinScore/tripleMaxScore`**: Adjust triple trigger thresholds during runtime
|
|
49
|
+
- **`config.triggerResetSec`**: Auto-reset time for triple/bullseye flags
|
|
33
50
|
|
|
34
51
|
## What this adapter does NOT do
|
|
35
52
|
|
|
36
|
-
- ❌ No data is sent to the internet or to third-party servers
|
|
37
|
-
- ❌ No history, statistics, or personal data is stored or shared
|
|
38
|
-
- ❌ No access to other people
|
|
39
|
-
- ❌ No cloud features or analytics
|
|
53
|
+
- ❌ No data is sent to the internet or to third-party servers
|
|
54
|
+
- ❌ No history, statistics, or personal data is stored or shared
|
|
55
|
+
- ❌ No access to other people's boards or remote boards over the internet
|
|
56
|
+
- ❌ No cloud features or analytics
|
|
40
57
|
|
|
41
58
|
All data stays local on your ioBroker system.
|
|
42
59
|
|
|
43
60
|
## Configuration
|
|
44
61
|
|
|
62
|
+

|
|
63
|
+
|
|
45
64
|
In the adapter settings, enter:
|
|
46
65
|
|
|
47
|
-
- **Board Manager IP**: IP address of your Autodarts Board Manager (e.g. `192.168.178.50`)
|
|
48
|
-
- **Port**: Usually `3180` (default for Board Manager)
|
|
49
|
-
- **Polling interval (
|
|
66
|
+
- **Board Manager IP**: IP address of your Autodarts Board Manager (e.g. `192.168.178.50`)
|
|
67
|
+
- **Port**: Usually `3180` (default for Board Manager)
|
|
68
|
+
- **Polling interval (s)**: How often to check for new throws (default: 1s)
|
|
69
|
+
|
|
70
|
+
### Optional: Hardware Control Mapping
|
|
71
|
+
- **Light Target ID**: ioBroker state ID to sync with `system.hardware.light` (e.g., `0_userdata.0.LIGHT`)
|
|
72
|
+
- **Power Target ID**: ioBroker state ID to sync with `system.hardware.power` (e.g., `0_userdata.0.POWER`)
|
|
73
|
+
|
|
74
|
+
When configured, changes to either the adapter states or external states are synchronized bidirectionally.
|
|
75
|
+
|
|
50
76
|
|
|
51
77
|
## Privacy & Data Handling
|
|
52
78
|
|
|
@@ -59,8 +85,20 @@ In the adapter settings, enter:
|
|
|
59
85
|
<!--
|
|
60
86
|
### **WORK IN PROGRESS**
|
|
61
87
|
-->
|
|
88
|
+
### 0.5.0 (2025-12-28)
|
|
89
|
+
- (skvarel) Added: Bidirectional hardware control states `system.hardware.light` and `system.hardware.power`
|
|
90
|
+
- (skvarel) Added: Configuration options to map light/power states to external ioBroker states (e.g., 0_userdata)
|
|
91
|
+
- (skvarel) Changed: Hardware states now support read/write operations for full automation integration
|
|
92
|
+
|
|
93
|
+
### 0.4.0 (2025-12-28)
|
|
94
|
+
- (skvarel) Changed: Restructured system information into dedicated `system.hardware`, `system.software` and `system.cams` channels.
|
|
95
|
+
- (skvarel) Added: New software info states (`desktopVersion`, `boardVersion`, `platform`, `os`) and hardware info states (`kernelArch`, `cpuModel`, `hostname`).
|
|
96
|
+
- (skvarel) Added: Camera configuration states `system.cams.cam0/1/2` containing JSON with width, height and fps.
|
|
97
|
+
- (skvarel) Changed: Adapter configuration for polling interval and triple trigger thresholds is now fully driven via jsonConfig (dropdowns and number fields).
|
|
98
|
+
- (skvarel) Removed: Experimental light/power alias mapping from internal logic (no user-visible feature was released).
|
|
99
|
+
|
|
62
100
|
### 0.3.3 (2025-12-27)
|
|
63
|
-
- Changed: Configuration fields interval and triggerReset now use seconds instead of milliseconds in the admin UI.
|
|
101
|
+
- (skvarel) Changed: Configuration fields interval and triggerReset now use seconds instead of milliseconds in the admin UI.
|
|
64
102
|
|
|
65
103
|
### 0.3.2 (2025-12-27)
|
|
66
104
|
- (DrozmotiX) **ENHANCED**: Fixed all TypeScript type errors by adding proper type definitions for config properties
|
|
@@ -73,67 +111,32 @@ In the adapter settings, enter:
|
|
|
73
111
|
- (DrozmotiX) **TESTING**: Added comprehensive unit tests for httpHelper module covering success, timeout, and error scenarios
|
|
74
112
|
|
|
75
113
|
### 0.3.1 (2025-12-27)
|
|
76
|
-
- Changed: Object creation now uses extendObjectAsync with proper roles and types instead of setObjectNotExistsAsync.
|
|
114
|
+
- (skvarel) Changed: Object creation now uses extendObjectAsync with proper roles and types instead of setObjectNotExistsAsync.
|
|
77
115
|
|
|
78
116
|
### 0.3.0 (2025-12-26)
|
|
79
|
-
- Added traffic light datapoints (`status.trafficLightColor`, `status.trafficLightState`) mapped from Board Manager status (`Throw` / `Takeout` / connection errors).
|
|
80
|
-
- Refactored code: visit handling, throw handling (triple / bull) and traffic light logic moved to separate modules.
|
|
117
|
+
- (skvarel) Added traffic light datapoints (`status.trafficLightColor`, `status.trafficLightState`) mapped from Board Manager status (`Throw` / `Takeout` / connection errors).
|
|
118
|
+
- (skvarel) Refactored code: visit handling, throw handling (triple / bull) and traffic light logic moved to separate modules.
|
|
81
119
|
|
|
82
120
|
### 0.2.2 (2025-12-25)
|
|
83
|
-
- bugfix
|
|
121
|
+
- (skvarel) bugfix
|
|
84
122
|
|
|
85
123
|
### 0.2.1 (2025-12-25)
|
|
86
|
-
- Reset for triple and bullseye trigger added
|
|
124
|
+
- (skvarel) Reset for triple and bullseye trigger added
|
|
87
125
|
|
|
88
126
|
### 0.2.0 (2025-12-25)
|
|
89
|
-
- Added datapoint for bulls-hit
|
|
90
|
-
- Added maximun triple-hit flag score
|
|
91
|
-
- Update config
|
|
92
|
-
- Warning in log cleared
|
|
127
|
+
- (skvarel) Added datapoint for bulls-hit
|
|
128
|
+
- (skvarel) Added maximun triple-hit flag score
|
|
129
|
+
- (skvarel) Update config
|
|
130
|
+
- (skvarel) Warning in log cleared
|
|
93
131
|
|
|
94
132
|
### 0.1.0 (2025-12-23)
|
|
95
|
-
- Added
|
|
96
|
-
-
|
|
97
|
-
-
|
|
98
|
-
|
|
99
|
-
### 0.0.14 (2025-12-22)
|
|
100
|
-
- fix
|
|
101
|
-
|
|
102
|
-
### 0.0.13 (2025-12-22)
|
|
103
|
-
- translate
|
|
104
|
-
|
|
105
|
-
### 0.0.12 (2025-12-22)
|
|
106
|
-
- fix
|
|
107
|
-
|
|
108
|
-
### 0.0.11 (2025-12-22)
|
|
109
|
-
- fix
|
|
110
|
-
|
|
111
|
-
### 0.0.10 (2025-12-22)
|
|
112
|
-
- fix
|
|
113
|
-
|
|
114
|
-
### 0.0.9 (2025-12-22)
|
|
115
|
-
- fix
|
|
116
|
-
|
|
117
|
-
### 0.0.8 (2025-12-21)
|
|
118
|
-
- fix - Adapter Checker
|
|
119
|
-
|
|
120
|
-
### 0.0.7 (2025-12-21)
|
|
121
|
-
- fix - Adapter Checker
|
|
122
|
-
|
|
123
|
-
### 0.0.6 (2025-12-21)
|
|
124
|
-
- fix - Adapter Checker
|
|
125
|
-
|
|
126
|
-
### 0.0.5 (2025-12-21)
|
|
127
|
-
- Update Description
|
|
128
|
-
|
|
129
|
-
### 0.0.4 (2025-12-21)
|
|
130
|
-
- Privacy & Data Handling
|
|
131
|
-
|
|
132
|
-
### 0.0.3 (2025-12-21)
|
|
133
|
-
- init
|
|
133
|
+
- (skvarel) Added: Datapoints for visit score, current dart score, triple-hit flag with configurable minimum score
|
|
134
|
+
- (skvarel) Added: Camera configuration states (cam0–cam2)
|
|
135
|
+
- (skvarel) Changed: Cleaned up adapter logic and internal polling/timing
|
|
136
|
+
- (skvarel) Changed: Updated translations
|
|
134
137
|
|
|
135
|
-
### 0.0.2 (2025-12-21)
|
|
136
|
-
-
|
|
138
|
+
### 0.0.14 - 0.0.2 (2025-12-21 - 2025-12-22)
|
|
139
|
+
- (skvarel) Initial release with multiple fixes for adapter checker compliance and documentation improvements
|
|
137
140
|
|
|
138
141
|
## License
|
|
139
142
|
MIT License
|
package/admin/i18n/de.json
CHANGED
|
@@ -4,8 +4,12 @@
|
|
|
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
|
+
"light_target": "LED-Ring Datenpunkt",
|
|
8
|
+
"light_target_help": "Datenpunkt des LED-Ring zur Steuerung innerhalb des Autodarts-Adapters. Lasse das Feld leer, um die Lichtsteuerung zu deaktivieren.",
|
|
7
9
|
"polling": "Abfrageintervall (s)",
|
|
8
10
|
"polling_help": "Abfrageintervall in Sekunden zum Abrufen von Daten vom Autodarts Boardmanager.",
|
|
11
|
+
"power_target": "Power-Datenpunkt",
|
|
12
|
+
"power_target_help": "Datenpunkt der Server- oder Bildschirm-Steckdose zur Steuerung innerhalb des Autodarts-Adapters. Lasse das Feld leer, um die Leistungssteuerung zu deaktivieren.",
|
|
9
13
|
"reset": "Trigger-Reset (s)",
|
|
10
14
|
"reset_help": "Setzt den Triple- und Bullseye-Trigger nach x Sekunden zurück (0 = kein Reset).",
|
|
11
15
|
"triple_flag": "Minimales Feld für den Triple-Trigger",
|
package/admin/i18n/en.json
CHANGED
|
@@ -11,5 +11,9 @@
|
|
|
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
13
|
"reset": "Trigger-Reset (s)",
|
|
14
|
-
"reset_help": "Reset the triple and bullseye trigger after x seconds (0 = no reset)."
|
|
14
|
+
"reset_help": "Reset the triple and bullseye trigger after x seconds (0 = no reset).",
|
|
15
|
+
"light_target": "Light Target ID",
|
|
16
|
+
"light_target_help": "ID of the light target to control lights via Autodarts (e.g., 'light.living_room'). Leave empty to disable light control.",
|
|
17
|
+
"power_target": "Power Target ID",
|
|
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."
|
|
15
19
|
}
|
package/admin/i18n/es.json
CHANGED
|
@@ -4,8 +4,12 @@
|
|
|
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
|
+
"light_target": "ID de objetivo ligero",
|
|
8
|
+
"light_target_help": "ID del objetivo de luz para controlar las luces a través de Autodarts (por ejemplo, 'light.living_room'). Déjelo vacío para desactivar el control de luces.",
|
|
7
9
|
"polling": "Intervalo(s) de sondeo",
|
|
8
10
|
"polling_help": "Intervalo de sondeo en segundos para recuperar datos del Autodarts Boardmanager.",
|
|
11
|
+
"power_target": "ID de objetivo de potencia",
|
|
12
|
+
"power_target_help": "ID del objetivo de energía para controlar la energía a través de Autodarts (por ejemplo, 'switch.darts_socket'). Déjelo vacío para desactivar el control de energía.",
|
|
9
13
|
"reset": "Restablecimiento de disparador (s)",
|
|
10
14
|
"reset_help": "Restablezca el disparador triple y de diana después de x segundos (0 = sin reinicio).",
|
|
11
15
|
"triple_flag": "Campo mínimo para el triple disparador",
|
package/admin/i18n/fr.json
CHANGED
|
@@ -4,8 +4,12 @@
|
|
|
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
|
+
"light_target": "ID de cible lumineuse",
|
|
8
|
+
"light_target_help": "ID de la cible lumineuse pour contrôler les lumières via Autodarts (par exemple, « light.living_room »). Laissez vide pour désactiver le contrôle de la lumière.",
|
|
7
9
|
"polling": "Intervalle(s) d'interrogation",
|
|
8
10
|
"polling_help": "Intervalle d'interrogation en secondes pour récupérer les données de l'Autodarts Boardmanager.",
|
|
11
|
+
"power_target": "ID de cible de puissance",
|
|
12
|
+
"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.",
|
|
9
13
|
"reset": "Déclencheur-Réinitialisation(s)",
|
|
10
14
|
"reset_help": "Réinitialisez le déclencheur triple et bullseye après x secondes (0 = pas de réinitialisation).",
|
|
11
15
|
"triple_flag": "Champ minimum pour le triple déclencheur",
|
package/admin/i18n/it.json
CHANGED
|
@@ -4,8 +4,12 @@
|
|
|
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
|
+
"light_target": "ID del bersaglio luminoso",
|
|
8
|
+
"light_target_help": "ID del target luminoso per controllare le luci tramite Autodarts (ad esempio, \"light.living_room\"). Lasciare vuoto per disabilitare il controllo della luce.",
|
|
7
9
|
"polling": "Intervallo di polling (s)",
|
|
8
10
|
"polling_help": "Intervallo di polling in secondi per recuperare i dati da Autodarts Boardmanager.",
|
|
11
|
+
"power_target": "ID del target di potenza",
|
|
12
|
+
"power_target_help": "ID del target di potenza per controllare l'energia tramite Autodarts (ad esempio, \"switch.darts_socket\"). Lasciare vuoto per disabilitare il controllo dell'alimentazione.",
|
|
9
13
|
"reset": "Trigger-Reset(s)",
|
|
10
14
|
"reset_help": "Ripristina il grilletto triplo e bullseye dopo x secondi (0 = nessun ripristino).",
|
|
11
15
|
"triple_flag": "Campo minimo per il triplo trigger",
|
package/admin/i18n/nl.json
CHANGED
|
@@ -4,8 +4,12 @@
|
|
|
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
|
+
"light_target": "Lichtdoel-ID",
|
|
8
|
+
"light_target_help": "ID van het lichtdoel om lampen te bedienen via Autodarts (bijvoorbeeld 'light.living_room'). Laat dit leeg om de lichtregeling uit te schakelen.",
|
|
7
9
|
"polling": "Polling-interval (s)",
|
|
8
10
|
"polling_help": "Polling-interval in seconden om gegevens uit de Autodarts Boardmanager op te halen.",
|
|
11
|
+
"power_target": "Power Target-ID",
|
|
12
|
+
"power_target_help": "ID van het powertarget om de power te regelen via Autodarts (bijvoorbeeld 'switch.darts_socket'). Laat dit leeg om de stroomregeling uit te schakelen.",
|
|
9
13
|
"reset": "Trigger-reset (s)",
|
|
10
14
|
"reset_help": "Reset de drievoudige en bullseye-trigger na x seconden (0 = geen reset).",
|
|
11
15
|
"triple_flag": "Minimumveld voor de drievoudige trigger",
|
package/admin/i18n/pl.json
CHANGED
|
@@ -4,8 +4,12 @@
|
|
|
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
|
+
"light_target": "Identyfikator lekkiego celu",
|
|
8
|
+
"light_target_help": "Identyfikator celu świetlnego do sterowania światłami za pomocą Autodarts (np. „light.living_room”). Pozostaw puste, aby wyłączyć kontrolę oświetlenia.",
|
|
7
9
|
"polling": "Interwał odpytywania (s)",
|
|
8
10
|
"polling_help": "Interwał odpytywania w sekundach w celu pobrania danych z menedżera Autodarts Boardmanager.",
|
|
11
|
+
"power_target": "Identyfikator celu mocy",
|
|
12
|
+
"power_target_help": "Identyfikator celu mocy do kontrolowania mocy za pomocą Autodarts (np. „switch.darts_socket”). Pozostaw puste, aby wyłączyć kontrolę mocy.",
|
|
9
13
|
"reset": "Reset wyzwalacza (s)",
|
|
10
14
|
"reset_help": "Zresetuj wyzwalacz potrójny i tarczy po x sekundach (0 = brak resetu).",
|
|
11
15
|
"triple_flag": "Minimalne pole dla potrójnego wyzwalacza",
|
package/admin/i18n/pt.json
CHANGED
|
@@ -4,8 +4,12 @@
|
|
|
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
|
+
"light_target": "ID do alvo claro",
|
|
8
|
+
"light_target_help": "ID do alvo de luz para controlar luzes via Autodarts (por exemplo, 'light.living_room'). Deixe em branco para desativar o controle de luz.",
|
|
7
9
|
"polling": "Intervalo(s) de pesquisa",
|
|
8
10
|
"polling_help": "Intervalo de pesquisa em segundos para recuperar dados do Autodarts Boardmanager.",
|
|
11
|
+
"power_target": "ID do alvo avançado",
|
|
12
|
+
"power_target_help": "ID do alvo de potência para controlar a potência por meio de Autodarts (por exemplo, 'switch.darts_socket'). Deixe em branco para desativar o controle de energia.",
|
|
9
13
|
"reset": "Redefinição(ões) de gatilho",
|
|
10
14
|
"reset_help": "Redefina o gatilho triplo e alvo após x segundos (0 = sem reinicialização).",
|
|
11
15
|
"triple_flag": "Campo mínimo para o disparo triplo",
|
package/admin/i18n/ru.json
CHANGED
|
@@ -4,8 +4,12 @@
|
|
|
4
4
|
"host_port": "Порт Autodarts (Boardmanager)",
|
|
5
5
|
"host_port_help": "Номер порта местного Autodarts Boardmanager.",
|
|
6
6
|
"intro_txt": "Конфигурация адаптера Autodarts.",
|
|
7
|
+
"light_target": "Идентификатор легкой цели",
|
|
8
|
+
"light_target_help": "Идентификатор световой цели для управления освещением через Autodarts (например, «light.living_room»). Оставьте пустым, чтобы отключить управление освещением.",
|
|
7
9
|
"polling": "Интервал опроса (с)",
|
|
8
10
|
"polling_help": "Интервал опроса в секундах для получения данных из Autodarts Boardmanager.",
|
|
11
|
+
"power_target": "Идентификатор цели по мощности",
|
|
12
|
+
"power_target_help": "Идентификатор цели мощности для управления мощностью через Autodarts (например, «switch.darts_socket»). Оставьте пустым, чтобы отключить управление питанием.",
|
|
9
13
|
"reset": "Триггер-Сброс (ы)",
|
|
10
14
|
"reset_help": "Сбросьте триггер и триггер «яблочко» через x секунд (0 = сброса нет).",
|
|
11
15
|
"triple_flag": "Минимальное поле для тройного триггера",
|
package/admin/i18n/uk.json
CHANGED
|
@@ -4,8 +4,12 @@
|
|
|
4
4
|
"host_port": "Autodarts (Boardmanager) Порт",
|
|
5
5
|
"host_port_help": "Номер порту місцевого менеджера Autodarts Board.",
|
|
6
6
|
"intro_txt": "Конфігурація адаптера Autodarts.",
|
|
7
|
+
"light_target": "Ідентифікатор легкої цілі",
|
|
8
|
+
"light_target_help": "Ідентифікатор цільового освітлення для керування освітленням через Autodarts (наприклад, \"light.living_room\"). Залиште пустим, щоб вимкнути керування світлом.",
|
|
7
9
|
"polling": "Інтервал опитування (с)",
|
|
8
10
|
"polling_help": "Інтервал опитування в секундах для отримання даних із Autodarts Boardmanager.",
|
|
11
|
+
"power_target": "Power Target ID",
|
|
12
|
+
"power_target_help": "Ідентифікатор цільової потужності для керування живленням через Autodarts (наприклад, 'switch.darts_socket'). Залиште пустим, щоб вимкнути керування живленням.",
|
|
9
13
|
"reset": "Тригер-Скидання (s)",
|
|
10
14
|
"reset_help": "Скинути потрійний тригер і тригер «яблочко» через x секунд (0 = без скидання).",
|
|
11
15
|
"triple_flag": "Мінімальне поле для потрійного тригера",
|
package/admin/i18n/zh-cn.json
CHANGED
|
@@ -4,8 +4,12 @@
|
|
|
4
4
|
"host_port": "Autodarts(Boardmanager)端口",
|
|
5
5
|
"host_port_help": "本地 Autodarts Boardmanager 的端口号。",
|
|
6
6
|
"intro_txt": "Autodarts 适配器配置。",
|
|
7
|
+
"light_target": "光目标ID",
|
|
8
|
+
"light_target_help": "通过 Autodarts 控制灯光的灯光目标的 ID(例如“light.living_room”)。留空以禁用灯光控制。",
|
|
7
9
|
"polling": "轮询间隔(秒)",
|
|
8
10
|
"polling_help": "从 Autodarts Boardmanager 检索数据的轮询间隔(以秒为单位)。",
|
|
11
|
+
"power_target": "功率目标 ID",
|
|
12
|
+
"power_target_help": "通过 Autodarts 控制电源的电源目标的 ID(例如“switch.darts_socket”)。留空以禁用电源控制。",
|
|
9
13
|
"reset": "触发-复位",
|
|
10
14
|
"reset_help": "x 秒后重置三重触发器和靶心触发器(0 = 不重置)。",
|
|
11
15
|
"triple_flag": "三重触发器的最小字段",
|
package/admin/jsonConfig.json
CHANGED
|
@@ -3,34 +3,33 @@
|
|
|
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-bottom": "1px solid",
|
|
16
|
+
"borderRadius": "0px",
|
|
17
|
+
"padding": "8px",
|
|
18
|
+
"marginBottom": "10px",
|
|
19
|
+
"textAlign": "center",
|
|
20
|
+
"font-size": "24px"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
24
23
|
"host": {
|
|
25
24
|
"type": "text",
|
|
26
25
|
"label": "host_ip",
|
|
27
26
|
"help": "host_ip_help",
|
|
28
27
|
"newLine": true,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
"sm": 12,
|
|
29
|
+
"xs": 12,
|
|
30
|
+
"md": 6,
|
|
31
|
+
"lg": 6,
|
|
32
|
+
"xl": 6,
|
|
34
33
|
"style": {
|
|
35
34
|
"marginTop": "10px",
|
|
36
35
|
"marginBottom": "10px"
|
|
@@ -40,11 +39,11 @@
|
|
|
40
39
|
"type": "number",
|
|
41
40
|
"label": "host_port",
|
|
42
41
|
"newLine": false,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
42
|
+
"sm": 12,
|
|
43
|
+
"xs": 12,
|
|
44
|
+
"md": 6,
|
|
45
|
+
"lg": 6,
|
|
46
|
+
"xl": 6,
|
|
48
47
|
"style": {
|
|
49
48
|
"marginTop": "10px",
|
|
50
49
|
"marginBottom": "10px"
|
|
@@ -56,33 +55,93 @@
|
|
|
56
55
|
"help": "triple_flag_help",
|
|
57
56
|
"default": 1,
|
|
58
57
|
"options": [
|
|
59
|
-
{
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
{
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
{
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
{
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
{
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
58
|
+
{
|
|
59
|
+
"label": "1",
|
|
60
|
+
"value": 1
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"label": "2",
|
|
64
|
+
"value": 2
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"label": "3",
|
|
68
|
+
"value": 3
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"label": "4",
|
|
72
|
+
"value": 4
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"label": "5",
|
|
76
|
+
"value": 5
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"label": "6",
|
|
80
|
+
"value": 6
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"label": "7",
|
|
84
|
+
"value": 7
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"label": "8",
|
|
88
|
+
"value": 8
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"label": "9",
|
|
92
|
+
"value": 9
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"label": "10",
|
|
96
|
+
"value": 10
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"label": "11",
|
|
100
|
+
"value": 11
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"label": "12",
|
|
104
|
+
"value": 12
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"label": "13",
|
|
108
|
+
"value": 13
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"label": "14",
|
|
112
|
+
"value": 14
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"label": "15",
|
|
116
|
+
"value": 15
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"label": "16",
|
|
120
|
+
"value": 16
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"label": "17",
|
|
124
|
+
"value": 17
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"label": "18",
|
|
128
|
+
"value": 18
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"label": "19",
|
|
132
|
+
"value": 19
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"label": "20",
|
|
136
|
+
"value": 20
|
|
137
|
+
}
|
|
138
|
+
],
|
|
80
139
|
"newLine": true,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
140
|
+
"sm": 12,
|
|
141
|
+
"xs": 12,
|
|
142
|
+
"md": 6,
|
|
143
|
+
"lg": 6,
|
|
144
|
+
"xl": 6,
|
|
86
145
|
"style": {
|
|
87
146
|
"marginTop": "10px",
|
|
88
147
|
"marginBottom": "10px"
|
|
@@ -94,33 +153,93 @@
|
|
|
94
153
|
"help": "triple_flag2_help",
|
|
95
154
|
"default": 20,
|
|
96
155
|
"options": [
|
|
97
|
-
{
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
{
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
{
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
{
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
{
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
156
|
+
{
|
|
157
|
+
"label": "1",
|
|
158
|
+
"value": 1
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"label": "2",
|
|
162
|
+
"value": 2
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"label": "3",
|
|
166
|
+
"value": 3
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"label": "4",
|
|
170
|
+
"value": 4
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"label": "5",
|
|
174
|
+
"value": 5
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"label": "6",
|
|
178
|
+
"value": 6
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"label": "7",
|
|
182
|
+
"value": 7
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"label": "8",
|
|
186
|
+
"value": 8
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"label": "9",
|
|
190
|
+
"value": 9
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"label": "10",
|
|
194
|
+
"value": 10
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"label": "11",
|
|
198
|
+
"value": 11
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"label": "12",
|
|
202
|
+
"value": 12
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"label": "13",
|
|
206
|
+
"value": 13
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"label": "14",
|
|
210
|
+
"value": 14
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"label": "15",
|
|
214
|
+
"value": 15
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"label": "16",
|
|
218
|
+
"value": 16
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"label": "17",
|
|
222
|
+
"value": 17
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"label": "18",
|
|
226
|
+
"value": 18
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"label": "19",
|
|
230
|
+
"value": 19
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"label": "20",
|
|
234
|
+
"value": 20
|
|
235
|
+
}
|
|
236
|
+
],
|
|
118
237
|
"newLine": false,
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
238
|
+
"sm": 12,
|
|
239
|
+
"xs": 12,
|
|
240
|
+
"md": 6,
|
|
241
|
+
"lg": 6,
|
|
242
|
+
"xl": 6,
|
|
124
243
|
"style": {
|
|
125
244
|
"marginTop": "10px",
|
|
126
245
|
"marginBottom": "10px"
|
|
@@ -132,50 +251,101 @@
|
|
|
132
251
|
"help": "reset_help",
|
|
133
252
|
"default": 0,
|
|
134
253
|
"newLine": true,
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
254
|
+
"sm": 12,
|
|
255
|
+
"xs": 12,
|
|
256
|
+
"md": 12,
|
|
257
|
+
"lg": 12,
|
|
258
|
+
"xl": 12,
|
|
140
259
|
"style": {
|
|
141
260
|
"marginTop": "10px",
|
|
142
261
|
"marginBottom": "10px"
|
|
143
262
|
}
|
|
144
263
|
},
|
|
145
264
|
"intervalSec": {
|
|
146
|
-
"type": "
|
|
265
|
+
"type": "select",
|
|
147
266
|
"label": "polling",
|
|
148
267
|
"help": "polling_help",
|
|
149
268
|
"default": 1,
|
|
269
|
+
"options": [
|
|
270
|
+
{
|
|
271
|
+
"label": "0.5 s",
|
|
272
|
+
"value": 0.5
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"label": "0.75 s",
|
|
276
|
+
"value": 0.75
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"label": "1 s",
|
|
280
|
+
"value": 1
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"label": "1.5 s",
|
|
284
|
+
"value": 1.5
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"label": "2 s",
|
|
288
|
+
"value": 2
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"label": "2.5 s",
|
|
292
|
+
"value": 2.5
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"label": "3 s",
|
|
296
|
+
"value": 3
|
|
297
|
+
}
|
|
298
|
+
],
|
|
150
299
|
"newLine": true,
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
300
|
+
"sm": 12,
|
|
301
|
+
"xs": 12,
|
|
302
|
+
"md": 12,
|
|
303
|
+
"lg": 12,
|
|
304
|
+
"xl": 12,
|
|
156
305
|
"style": {
|
|
157
306
|
"marginTop": "10px",
|
|
158
307
|
"marginBottom": "10px"
|
|
159
308
|
}
|
|
160
309
|
},
|
|
310
|
+
"lightTargetId": {
|
|
311
|
+
"type": "objectId",
|
|
312
|
+
"label": "light_target",
|
|
313
|
+
"help": "light_target_help",
|
|
314
|
+
"newLine": true,
|
|
315
|
+
"sm": 12,
|
|
316
|
+
"xs": 12,
|
|
317
|
+
"md": 6,
|
|
318
|
+
"lg": 6,
|
|
319
|
+
"xl": 6
|
|
320
|
+
},
|
|
321
|
+
"powerTargetId": {
|
|
322
|
+
"type": "objectId",
|
|
323
|
+
"label": "power_target",
|
|
324
|
+
"help": "power_target_help",
|
|
325
|
+
"newLine": false,
|
|
326
|
+
"sm": 12,
|
|
327
|
+
"xs": 12,
|
|
328
|
+
"md": 6,
|
|
329
|
+
"lg": 6,
|
|
330
|
+
"xl": 6
|
|
331
|
+
},
|
|
161
332
|
"outro": {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
}
|
|
333
|
+
"type": "staticText",
|
|
334
|
+
"text": "Team inventwo • <a href=\"https://github.com/inventwo\">https://github.com/inventwo</a> • by skvarel",
|
|
335
|
+
"newLine": true,
|
|
336
|
+
"sm": 12,
|
|
337
|
+
"xs": 12,
|
|
338
|
+
"md": 12,
|
|
339
|
+
"lg": 12,
|
|
340
|
+
"xl": 12,
|
|
341
|
+
"style": {
|
|
342
|
+
"border-top": "1px solid",
|
|
343
|
+
"borderRadius": "0px",
|
|
344
|
+
"padding": "8px",
|
|
345
|
+
"marginTop": "10px",
|
|
346
|
+
"textAlign": "center",
|
|
347
|
+
"font-size": "larger"
|
|
348
|
+
}
|
|
349
|
+
}
|
|
180
350
|
}
|
|
181
|
-
}
|
|
351
|
+
}
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "autodarts",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.5.0",
|
|
5
5
|
"news": {
|
|
6
|
+
"0.5.0": {
|
|
7
|
+
"en": "Added: Bidirectional hardware control states `system.hardware.light` and `system.hardware.power`\nAdded: Configuration options to map light/power states to external ioBroker states (e.g., 0_userdata)\nChanged: Hardware states now support read/write operations for full automation integration",
|
|
8
|
+
"de": "Hinzugefügt: Bidirektionale Hardware-Steuerzustände `system.hardware.light` und `system.hardware.power `\nHinzugefügt: Konfigurationsoptionen zur Abbildung von Licht/Leistungszuständen zu externen ioBroker Zuständen (z.B. 0_userdata)\nGeändert: Hardware-Staaten unterstützen nun Lese- und Schreibvorgänge für die vollständige Automatisierungsintegration",
|
|
9
|
+
"ru": "Добавлено: Двунаправленное аппаратное управление состояниями «system.hardware.light» и «system.hardware.power» пункт\nДобавлено: Варианты конфигурации для отображения состояний света/мощности на внешние состояния ioBroker (например, 0_userdata)\nИзменены: штаты оборудования теперь поддерживают операции чтения / записи для полной интеграции автоматизации",
|
|
10
|
+
"pt": "Adicionado: estados de controle de hardware bidirecional `system.hardware.light' e `system.hardware.power `\nAdicionado: Opções de configuração para mapear estados de luz/poder para estados de ioBroker externos (por exemplo, 0_userdata)\nModificado: Os estados de hardware agora suportam operações de leitura/escrita para integração completa de automação",
|
|
11
|
+
"nl": "Toegevoegd: Bidirectionele hardware-besturing staat voor Wat\nToegevoegd: Configuratie-opties voor het in kaart brengen van licht/krachttoestanden naar externe ioBroker-toestanden (bijv. 0_userdata)\nGewijzigd: Hardware toestanden ondersteunen nu lezen/schrijven bewerkingen voor volledige automatisering integratie",
|
|
12
|
+
"fr": "Ajouté : Les états de contrôle du matériel bidirectionnel `system.hardware.light` et `system.hardware.power \"\nAjouté: Options de configuration pour cartographier les états de lumière/puissance vers les états externes ioBroker (par exemple, 0_userdata)\nChanged: Les états matériels prennent désormais en charge les opérations de lecture/écriture pour l'intégration complète de l'automatisation",
|
|
13
|
+
"it": "Aggiunto: Bidirectional hardware control stati `system.hardware.light` e `system.hardware.power #\nAggiunto: Opzioni di configurazione per mappare gli stati di luce/potenza agli stati ioBroker esterni (ad esempio, 0_userdata)\nCambiato: gli stati hardware ora supportano le operazioni di lettura/scrittura per l'integrazione completa dell'automazione",
|
|
14
|
+
"es": "Añadido: Bidirectional hardware control states `system.hardware.light` y `system.hardware.power `\nAñadido: Opciones de configuración para mapear estados de luz/poder a estados de yoBroker externos (por ejemplo, 0_userdata)\nCambio: Los estados de Hardware ahora apoyan operaciones de lectura/escritura para la integración de la automatización completa",
|
|
15
|
+
"pl": "Dodano: dwukierunkowa kontrola sprzętowa stanów 'system.hardware.light' i 'system.hardware.power'\nDodano: Opcje konfiguracji do mapowania stanów światła / mocy do zewnętrznych stanów jOBroker (np. 0 _ userdata)\nZmiana: Stan sprzętu obsługuje teraz operacje odczytu / zapisu dla pełnej automatyzacji integracji",
|
|
16
|
+
"uk": "Додано: Двосторонні стани керування обладнанням `system.hardware.light` і `system.hardware.power й\nДодано: Параметри конфігурації для мапи світло/потужних станів на зовнішні стани ioBroker (наприклад, 0_userdata)\nЗмінено: Апаратні стани, які зараз підтримують операції читання/запису для повної інтеграції автоматизації",
|
|
17
|
+
"zh-cn": "添加:双向硬件控制状态为‘system.hardware.light'和‘system.hardware.power. `\n添加: 将光/ 电状态映射到外部 ioBroker 状态的配置选项( 如 0_ userdata)\n更改: 硬件状态现在支持读/写操作,以便完全自动化集成"
|
|
18
|
+
},
|
|
19
|
+
"0.4.0": {
|
|
20
|
+
"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).",
|
|
21
|
+
"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).",
|
|
22
|
+
"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Удалено: Экспериментальное отображение света/мощности по внутренней логике (не было выпущено никаких видимых пользователем функций).",
|
|
23
|
+
"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).",
|
|
24
|
+
"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).",
|
|
25
|
+
"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).",
|
|
26
|
+
"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).",
|
|
27
|
+
"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).",
|
|
28
|
+
"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).",
|
|
29
|
+
"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 з внутрішньої логіки (без функції користувача).",
|
|
30
|
+
"zh-cn": "更改:将系统信息结构改为专用的`系统.硬件'、`系统.软件'和`系统.摄像头'频道.\n添加:新的软件信息状态(`台式计算机Version'、`boardVersion'、`平台'、`os')和硬件信息状态(`内核Arch'、`cpuModel'、`hostname').\n添加:相机配置为`system.cams.cam0/1/2',内含JSON,宽度,高度和fps.\n更改:用于投票间隔和三重触发阈值的适配器配置现在通过jsonConfig(滴落和数字字段)完全驱动.\n删除:实验光/功率别名从内部逻辑映射(没有发布用户可见特性)."
|
|
31
|
+
},
|
|
6
32
|
"0.3.3": {
|
|
7
33
|
"en": "Changed: Configuration fields interval and triggerReset now use seconds instead of milliseconds in the admin UI.",
|
|
8
34
|
"de": "Geändert: Konfiguration Felder Intervall und TriggerReset verwenden jetzt Sekunden statt Millisekunden im Admin UI.",
|
|
@@ -67,32 +93,6 @@
|
|
|
67
93
|
"pl": "bugfix",
|
|
68
94
|
"uk": "панчохи",
|
|
69
95
|
"zh-cn": "错误修正"
|
|
70
|
-
},
|
|
71
|
-
"0.2.1": {
|
|
72
|
-
"en": "Reset for triple and bullseye trigger added",
|
|
73
|
-
"de": "Zurücksetzen für Triple und Bullseye Trigger hinzugefügt",
|
|
74
|
-
"ru": "Сброс тройного и бычьего триггера добавлен",
|
|
75
|
-
"pt": "Reiniciar para gatilho triplo e bullseye adicionado",
|
|
76
|
-
"nl": "Reset voor drievoudige en bullseye trigger toegevoegd",
|
|
77
|
-
"fr": "Réinitialiser pour triple et bullseye déclencheur ajouté",
|
|
78
|
-
"it": "Reset per trigger triple e bullseye aggiunto",
|
|
79
|
-
"es": "Reiniciar para triple y disparador de toros",
|
|
80
|
-
"pl": "Reset dla triple i bulseye wyzwalacz dodany",
|
|
81
|
-
"uk": "Зміщено переадресацію для тридцятого і буклесу",
|
|
82
|
-
"zh-cn": "重置三重和牛眼触发器"
|
|
83
|
-
},
|
|
84
|
-
"0.2.0": {
|
|
85
|
-
"en": "Added datapoint for bulls-hit\nAdded maximun triple-hit flag score\nUpdate config\nWarning in log cleared",
|
|
86
|
-
"de": "Datenpunkt für Bullen-Hit hinzugefügt\nZusätzlich maximun triple-hit flag score\nUpdate config\nWarnung im Protokoll gelöscht",
|
|
87
|
-
"ru": "Добавлена точка данных для быков-хит\nДобавлена тройная оценка Maximun\nОбновление конфигурации\nПредупреждение в журнале очищено",
|
|
88
|
-
"pt": "Ponto de dados adicionado para bulls-hit\nPontuação da bandeira máxima de três hit\nActualizar a configuração\nAviso no log apagado",
|
|
89
|
-
"nl": "Toegevoegd datapoint voor bulls-hit\nToegevoegd maximiun triple-hit vlag score\nConfiguratie bijwerken\nWaarschuwing in log gewist",
|
|
90
|
-
"fr": "Ajout du point de données pour bulls-hit\nAjout de maximun triple-hit drapeau score\nMettre à jour la configuration\nAvertissement dans le journal effacé",
|
|
91
|
-
"it": "Datapoint aggiunto per bulls-hit\nAggiunto maximun triple-hit flag punteggio\nAggiornamento configurazione\nAvviso in log sgomberato",
|
|
92
|
-
"es": "Punto de datos añadido para los toros\nAgregado maximun triple marca de bandera\nActualizar configuración\nAdvertencia en el registro despejado",
|
|
93
|
-
"pl": "Dodano punkt danych dla byków\nDodano wynik flagi maximun triplehit\nAktualizuj konfigurację\nOstrzeżenie w dzienniku wyczyszczonym",
|
|
94
|
-
"uk": "Додано точку даних для биків-хіт\nДодано максимальний потрійний-hit прапорець бал\nНалаштування оновлення\nПопередження в журналі",
|
|
95
|
-
"zh-cn": "给 bull- hit 添加数据点\n增加最大值的三重旗分\n更新配置\n清除日志中的警告"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"titleLang": {
|
|
@@ -167,7 +167,9 @@
|
|
|
167
167
|
"intervalSec": 1,
|
|
168
168
|
"triggerResetSec": 0,
|
|
169
169
|
"tripleMinScore": 1,
|
|
170
|
-
"tripleMaxScore": 20
|
|
170
|
+
"tripleMaxScore": 20,
|
|
171
|
+
"lightTargetId": "",
|
|
172
|
+
"powerTargetId": ""
|
|
171
173
|
},
|
|
172
174
|
"objects": [],
|
|
173
175
|
"instanceObjects": []
|
package/main.js
CHANGED
|
@@ -68,7 +68,6 @@ class Autodarts extends utils.Adapter {
|
|
|
68
68
|
},
|
|
69
69
|
native: {},
|
|
70
70
|
});
|
|
71
|
-
|
|
72
71
|
// System-Channel und BoardVersion-Datenpunkt anlegen
|
|
73
72
|
await this.extendObjectAsync("system", {
|
|
74
73
|
type: "channel",
|
|
@@ -80,8 +79,60 @@ class Autodarts extends utils.Adapter {
|
|
|
80
79
|
},
|
|
81
80
|
native: {},
|
|
82
81
|
});
|
|
82
|
+
// NEU: Unter-Channels für Hardware und Software
|
|
83
|
+
await this.extendObjectAsync("system.hardware", {
|
|
84
|
+
type: "channel",
|
|
85
|
+
common: {
|
|
86
|
+
name: {
|
|
87
|
+
en: "Hardware",
|
|
88
|
+
de: "Hardware",
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
native: {},
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
await this.extendObjectAsync("system.software", {
|
|
95
|
+
type: "channel",
|
|
96
|
+
common: {
|
|
97
|
+
name: {
|
|
98
|
+
en: "Software",
|
|
99
|
+
de: "Software",
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
native: {},
|
|
103
|
+
});
|
|
104
|
+
await this.extendObjectAsync("system.cams", {
|
|
105
|
+
type: "channel",
|
|
106
|
+
common: {
|
|
107
|
+
name: {
|
|
108
|
+
en: "Camera configuration",
|
|
109
|
+
de: "Kamera-Konfiguration",
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
native: {},
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
// Software-Infos
|
|
116
|
+
await this.extendObjectAsync("system.software.desktopVersion", {
|
|
117
|
+
type: "state",
|
|
118
|
+
common: {
|
|
119
|
+
name: {
|
|
120
|
+
en: "Desktop version",
|
|
121
|
+
de: "Desktop-Version",
|
|
122
|
+
},
|
|
123
|
+
type: "string",
|
|
124
|
+
role: "info.version",
|
|
125
|
+
read: true,
|
|
126
|
+
write: false,
|
|
127
|
+
desc: {
|
|
128
|
+
en: "Version of the Autodarts desktop application",
|
|
129
|
+
de: "Version der Autodarts Desktop-Anwendung",
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
native: {},
|
|
133
|
+
});
|
|
83
134
|
|
|
84
|
-
await this.extendObjectAsync("system.boardVersion", {
|
|
135
|
+
await this.extendObjectAsync("system.software.boardVersion", {
|
|
85
136
|
type: "state",
|
|
86
137
|
common: {
|
|
87
138
|
name: {
|
|
@@ -100,8 +151,127 @@ 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
|
+
// LED State anlegen
|
|
249
|
+
await this.extendObjectAsync("system.hardware.light", {
|
|
250
|
+
type: "state",
|
|
251
|
+
common: {
|
|
252
|
+
name: { en: "Board light", de: "Board-Beleuchtung" },
|
|
253
|
+
type: "boolean",
|
|
254
|
+
role: "switch.light",
|
|
255
|
+
read: true,
|
|
256
|
+
write: true,
|
|
257
|
+
},
|
|
258
|
+
native: {},
|
|
259
|
+
});
|
|
260
|
+
// POWER State anlegen
|
|
261
|
+
await this.extendObjectAsync("system.hardware.power", {
|
|
262
|
+
type: "state",
|
|
263
|
+
common: {
|
|
264
|
+
name: { en: "Board power", de: "Board-Strom" },
|
|
265
|
+
type: "boolean",
|
|
266
|
+
role: "switch.power",
|
|
267
|
+
read: true,
|
|
268
|
+
write: true,
|
|
269
|
+
},
|
|
270
|
+
native: {},
|
|
271
|
+
});
|
|
272
|
+
|
|
103
273
|
// Kamera-Infos als JSON-States
|
|
104
|
-
await this.extendObjectAsync("system.cam0", {
|
|
274
|
+
await this.extendObjectAsync("system.cams.cam0", {
|
|
105
275
|
type: "state",
|
|
106
276
|
common: {
|
|
107
277
|
name: {
|
|
@@ -120,7 +290,7 @@ class Autodarts extends utils.Adapter {
|
|
|
120
290
|
native: {},
|
|
121
291
|
});
|
|
122
292
|
|
|
123
|
-
await this.extendObjectAsync("system.cam1", {
|
|
293
|
+
await this.extendObjectAsync("system.cams.cam1", {
|
|
124
294
|
type: "state",
|
|
125
295
|
common: {
|
|
126
296
|
name: {
|
|
@@ -139,7 +309,7 @@ class Autodarts extends utils.Adapter {
|
|
|
139
309
|
native: {},
|
|
140
310
|
});
|
|
141
311
|
|
|
142
|
-
await this.extendObjectAsync("system.cam2", {
|
|
312
|
+
await this.extendObjectAsync("system.cams.cam2", {
|
|
143
313
|
type: "state",
|
|
144
314
|
common: {
|
|
145
315
|
name: {
|
|
@@ -254,6 +424,14 @@ class Autodarts extends utils.Adapter {
|
|
|
254
424
|
this.subscribeStates("config.tripleMaxScore");
|
|
255
425
|
this.subscribeStates("config.triggerResetSec");
|
|
256
426
|
|
|
427
|
+
// Auf Hardware-Schalter hören
|
|
428
|
+
this.subscribeStates("system.hardware.light");
|
|
429
|
+
this.subscribeStates("system.hardware.power");
|
|
430
|
+
|
|
431
|
+
// Ziel-States (0_userdata) ebenfalls beobachten
|
|
432
|
+
this.subscribeForeignStates("0_userdata.0.LICHT");
|
|
433
|
+
this.subscribeForeignStates("0_userdata.0.STROM");
|
|
434
|
+
|
|
257
435
|
// Zustand zurücksetzen
|
|
258
436
|
this.lastThrowsCount = 0;
|
|
259
437
|
this.lastSignature = "";
|
|
@@ -265,12 +443,12 @@ class Autodarts extends utils.Adapter {
|
|
|
265
443
|
this.pollTimer = setInterval(() => this.fetchState(), pollIntervalMs);
|
|
266
444
|
this.fetchState();
|
|
267
445
|
|
|
268
|
-
//
|
|
269
|
-
this.
|
|
446
|
+
// Host-Informationen und Kameras abfragen und alle 5 Minuten aktualisieren
|
|
447
|
+
this.fetchHost();
|
|
270
448
|
this.fetchConfig();
|
|
271
449
|
this.versionTimer = setInterval(
|
|
272
450
|
() => {
|
|
273
|
-
this.
|
|
451
|
+
this.fetchHost();
|
|
274
452
|
this.fetchConfig();
|
|
275
453
|
},
|
|
276
454
|
5 * 60 * 1000,
|
|
@@ -330,7 +508,6 @@ class Autodarts extends utils.Adapter {
|
|
|
330
508
|
this.tripleMaxScoreRuntime = val;
|
|
331
509
|
this.log.info(`Runtime tripleMaxScore updated to ${val}`);
|
|
332
510
|
|
|
333
|
-
// Wert mit ack bestätigen
|
|
334
511
|
await this.setStateAsync("config.tripleMaxScore", { val, ack: true });
|
|
335
512
|
} else if (idShort === "config.triggerResetSec") {
|
|
336
513
|
const val = Number(state.val);
|
|
@@ -342,8 +519,27 @@ class Autodarts extends utils.Adapter {
|
|
|
342
519
|
this.triggerResetSecRuntime = val;
|
|
343
520
|
this.log.info(`Runtime triggerResetSec updated to ${val} s`);
|
|
344
521
|
|
|
345
|
-
// Wert mit ack bestätigen
|
|
346
522
|
await this.setStateAsync("config.triggerResetSec", { val, ack: true });
|
|
523
|
+
|
|
524
|
+
// Weiterleitung für Licht und Power
|
|
525
|
+
} else if (idShort === "system.hardware.light") {
|
|
526
|
+
if (this.config.lightTargetId) {
|
|
527
|
+
await this.setForeignStateAsync(this.config.lightTargetId, state.val, false);
|
|
528
|
+
} else {
|
|
529
|
+
this.log.warn("Light state changed, but no lightTargetId configured");
|
|
530
|
+
}
|
|
531
|
+
} else if (idShort === "system.hardware.power") {
|
|
532
|
+
if (this.config.powerTargetId) {
|
|
533
|
+
await this.setForeignStateAsync(this.config.powerTargetId, state.val, false);
|
|
534
|
+
} else {
|
|
535
|
+
this.log.warn("Power state changed, but no powerTargetId configured");
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
// Rückrichtung: 0_userdata -> eigene Schalter
|
|
539
|
+
} else if (id === "0_userdata.0.LICHT") {
|
|
540
|
+
await this.setStateAsync("system.hardware.light", { val: state.val, ack: true });
|
|
541
|
+
} else if (id === "0_userdata.0.STROM") {
|
|
542
|
+
await this.setStateAsync("system.hardware.power", { val: state.val, ack: true });
|
|
347
543
|
}
|
|
348
544
|
}
|
|
349
545
|
|
|
@@ -412,20 +608,6 @@ class Autodarts extends utils.Adapter {
|
|
|
412
608
|
}
|
|
413
609
|
}
|
|
414
610
|
|
|
415
|
-
/**
|
|
416
|
-
* Boardmanager Version abfragen
|
|
417
|
-
*/
|
|
418
|
-
async fetchVersion() {
|
|
419
|
-
try {
|
|
420
|
-
const data = await httpHelper.makeRequest(this, "/api/version");
|
|
421
|
-
const version = data.trim();
|
|
422
|
-
await this.setStateAsync("system.boardVersion", { val: version, ack: true });
|
|
423
|
-
} catch {
|
|
424
|
-
// Bei Fehler State leeren (keine Log-Warnung)
|
|
425
|
-
await this.setStateAsync("system.boardVersion", { val: "", ack: true });
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
|
-
|
|
429
611
|
/**
|
|
430
612
|
* Board-Konfiguration abfragen (Kameras)
|
|
431
613
|
*/
|
|
@@ -443,9 +625,9 @@ class Autodarts extends utils.Adapter {
|
|
|
443
625
|
|
|
444
626
|
const json = JSON.stringify(camInfo);
|
|
445
627
|
|
|
446
|
-
await this.setStateAsync("system.cam0", { val: json, ack: true });
|
|
447
|
-
await this.setStateAsync("system.cam1", { val: json, ack: true });
|
|
448
|
-
await this.setStateAsync("system.cam2", { val: json, ack: true });
|
|
628
|
+
await this.setStateAsync("system.cams.cam0", { val: json, ack: true });
|
|
629
|
+
await this.setStateAsync("system.cams.cam1", { val: json, ack: true });
|
|
630
|
+
await this.setStateAsync("system.cams.cam2", { val: json, ack: true });
|
|
449
631
|
} catch (error) {
|
|
450
632
|
// Bei Fehler keine Log-Warnung
|
|
451
633
|
if (
|
|
@@ -458,6 +640,61 @@ class Autodarts extends utils.Adapter {
|
|
|
458
640
|
}
|
|
459
641
|
}
|
|
460
642
|
}
|
|
643
|
+
/**
|
|
644
|
+
* Host-Informationen abfragen
|
|
645
|
+
*/
|
|
646
|
+
async fetchHost() {
|
|
647
|
+
try {
|
|
648
|
+
const data = await httpHelper.makeRequest(this, "/api/host");
|
|
649
|
+
const host = JSON.parse(data);
|
|
650
|
+
|
|
651
|
+
// clientVersion als boardVersion schreiben
|
|
652
|
+
await this.setStateAsync("system.software.boardVersion", {
|
|
653
|
+
val: host.clientVersion || "",
|
|
654
|
+
ack: true,
|
|
655
|
+
});
|
|
656
|
+
// desktopVersion
|
|
657
|
+
await this.setStateAsync("system.software.desktopVersion", {
|
|
658
|
+
val: host.desktopVersion || "",
|
|
659
|
+
ack: true,
|
|
660
|
+
});
|
|
661
|
+
// platform
|
|
662
|
+
await this.setStateAsync("system.software.platform", {
|
|
663
|
+
val: host.platform || "",
|
|
664
|
+
ack: true,
|
|
665
|
+
});
|
|
666
|
+
// os (Software)
|
|
667
|
+
await this.setStateAsync("system.software.os", {
|
|
668
|
+
val: host.os || "",
|
|
669
|
+
ack: true,
|
|
670
|
+
});
|
|
671
|
+
// kernelArch
|
|
672
|
+
await this.setStateAsync("system.hardware.kernelArch", {
|
|
673
|
+
val: host.kernelArch || "",
|
|
674
|
+
ack: true,
|
|
675
|
+
});
|
|
676
|
+
// cpuModel (aus cpu.model)
|
|
677
|
+
await this.setStateAsync("system.hardware.cpuModel", {
|
|
678
|
+
val: host.cpu?.model || "",
|
|
679
|
+
ack: true,
|
|
680
|
+
});
|
|
681
|
+
// hostname (Hardware)
|
|
682
|
+
await this.setStateAsync("system.hardware.hostname", {
|
|
683
|
+
val: host.hostname || "",
|
|
684
|
+
ack: true,
|
|
685
|
+
});
|
|
686
|
+
} catch (error) {
|
|
687
|
+
// Bei Fehler keine Log-Warnung
|
|
688
|
+
if (
|
|
689
|
+
error &&
|
|
690
|
+
typeof error === "object" &&
|
|
691
|
+
typeof error.message === "string" &&
|
|
692
|
+
error.message.includes("JSON")
|
|
693
|
+
) {
|
|
694
|
+
this.log.debug(`Could not parse host info: ${error.message}`);
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
}
|
|
461
698
|
|
|
462
699
|
onUnload(callback) {
|
|
463
700
|
try {
|