iobroker.hue 3.12.0 → 3.13.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 +3 -0
- package/admin/i18n/de/translations.json +7 -5
- package/admin/i18n/en/translations.json +4 -3
- package/admin/i18n/es/translations.json +1 -1
- package/admin/i18n/fr/translations.json +1 -1
- package/admin/i18n/it/translations.json +1 -1
- package/admin/i18n/nl/translations.json +1 -1
- package/admin/i18n/pl/translations.json +1 -1
- package/admin/i18n/pt/translations.json +1 -1
- package/admin/i18n/ru/translations.json +1 -1
- package/admin/i18n/zh-cn/translations.json +1 -1
- package/admin/jsonConfig.json +170 -0
- package/build/main.js +21 -8
- package/build/main.js.map +1 -1
- package/io-package.json +22 -17
- package/package.json +7 -7
- package/admin/index.html +0 -211
- package/admin/index_m.html +0 -296
- package/admin/instruction.png +0 -0
package/README.md
CHANGED
|
@@ -74,6 +74,9 @@ In den Adapter-Settings muss die IP der Hue Bridge sowie ein Username konfigurie
|
|
|
74
74
|
Placeholder for the next version (at the beginning of the line):
|
|
75
75
|
### __WORK IN PROGRESS__
|
|
76
76
|
-->
|
|
77
|
+
### 3.13.0 (2024-10-16)
|
|
78
|
+
* (@Jey-Cee) optimized settings page for mobile devices (ported to json-config)
|
|
79
|
+
|
|
77
80
|
### 3.12.0 (2024-07-14)
|
|
78
81
|
* (foxriver76) `level` and `bri` states of groups are now updated via push API
|
|
79
82
|
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
"\"Legacy\" structure": "\"Legacy\"-Struktur",
|
|
3
3
|
"Auto setup": "Automatisches Setup",
|
|
4
4
|
"Bridge Address": "Bridge-Adresse",
|
|
5
|
+
"Help bridge address": "Es wird automatisch nach einer Bridge gesucht, dieser Vorgang dauert etwa 5-10 Sekunden. Der Adapter muss dafür gestartet sein.",
|
|
5
6
|
"Bridge User": "Bridge-Benutzer",
|
|
6
7
|
"Bridge port": "Bridge-Port",
|
|
7
8
|
"Cannot find bridge": "Kann keine Bridge finden",
|
|
@@ -11,20 +12,21 @@
|
|
|
11
12
|
"Find Bridge": "Bridge suchen",
|
|
12
13
|
"Ignore groups": "Gruppen ignorieren",
|
|
13
14
|
"Ignore scenes": "Szenen ignorieren",
|
|
14
|
-
"Instruction": "Bitte Link-
|
|
15
|
+
"Instruction": "Bitte drücken Sie den Link-Button der Brücke, bevor Sie einen neuen Benutzer anlegen!",
|
|
15
16
|
"Minimal polling interval is 2 seconds": "Das minimale Abfrageintervall beträgt 2 Sekunden",
|
|
16
17
|
"Native turn off/on behaviour": "Natives Ein- und Ausschaltverhalten",
|
|
17
18
|
"Ok": "Ok",
|
|
18
19
|
"Philips HUE adapter settings": "Philips HUE Adaptereinstellungen",
|
|
19
20
|
"Please wait, searching for bridge.": "Bitte warten, suche nach Bridge.",
|
|
20
21
|
"Polling": "Polling",
|
|
21
|
-
"Polling interval (sec)": "Abfrageintervall (
|
|
22
|
+
"Polling interval (sec)": "Abfrageintervall (Sek.)",
|
|
22
23
|
"Select a bridge:": "Wähle eine Bridge aus:",
|
|
23
24
|
"Settings": "Einstellungen",
|
|
24
25
|
"Sync software sensors": "Software-Sensoren synchronisieren",
|
|
25
|
-
"error creating user: ": "Fehler beim Erzeugen des Benutzers:
|
|
26
|
-
"error finding bridge": "Fehler beim Finden der
|
|
26
|
+
"error creating user: ": "Fehler beim Erzeugen des Benutzers:",
|
|
27
|
+
"error finding bridge": "Fehler beim Finden der Bridge",
|
|
27
28
|
"ignoreOsram": "ignoriere Osram",
|
|
28
29
|
"link button not pressed": "Link-Knopf nicht gedrückt",
|
|
29
|
-
"polling_warning": "Hinweis: Der Adapter kann nur 10 Befehle in 1 Sekunde senden."
|
|
30
|
+
"polling_warning": "Hinweis: Der Adapter kann nur 10 Befehle in 1 Sekunde senden.",
|
|
31
|
+
"Turn on with others": "Schaltet das Gerät mit anderen Funktionen als Leistung und Helligkeit ein"
|
|
30
32
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
"\"Legacy\" structure": "\"Legacy\" structure",
|
|
3
3
|
"Auto setup": "Auto setup",
|
|
4
4
|
"Bridge Address": "Bridge Address",
|
|
5
|
+
"Help bridge address": "It will automatically search for a bridge, this process takes about 5-10 seconds. The adapter must be started for this.",
|
|
5
6
|
"Bridge User": "Bridge User",
|
|
6
7
|
"Bridge port": "Bridge port",
|
|
7
8
|
"Cannot find bridge": "Cannot find bridge",
|
|
@@ -11,7 +12,7 @@
|
|
|
11
12
|
"Find Bridge": "Find Bridge",
|
|
12
13
|
"Ignore groups": "Ignore groups",
|
|
13
14
|
"Ignore scenes": "Ignore scenes",
|
|
14
|
-
"Instruction": "Please press link button
|
|
15
|
+
"Instruction": "Please press the link button of the bridge before create a new user!",
|
|
15
16
|
"Minimal polling interval is 2 seconds": "Minimal polling interval is 2 seconds",
|
|
16
17
|
"Native turn off/on behaviour": "Native turn off/on behaviour",
|
|
17
18
|
"Ok": "Ok",
|
|
@@ -22,10 +23,10 @@
|
|
|
22
23
|
"Select a bridge:": "Select a bridge:",
|
|
23
24
|
"Settings": "Settings",
|
|
24
25
|
"Sync software sensors": "Sync software sensors",
|
|
25
|
-
"error creating user: ": "error creating user:
|
|
26
|
+
"error creating user: ": "error creating user:",
|
|
26
27
|
"error finding bridge": "error finding bridge",
|
|
27
28
|
"ignoreOsram": "ignore Osram",
|
|
28
29
|
"link button not pressed": "link button not pressed",
|
|
29
30
|
"polling_warning": "Notice: Adapter may send only 10 commands in 1 second.",
|
|
30
31
|
"Turn on with others": "Turn on with others than power and brightness"
|
|
31
|
-
}
|
|
32
|
+
}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"Find Bridge": "Find Bridge",
|
|
12
12
|
"Ignore groups": "Ignorar grupos",
|
|
13
13
|
"Ignore scenes": "Ignorar escenas",
|
|
14
|
-
"Instruction": "
|
|
14
|
+
"Instruction": "Pulse el botón de enlace del puente antes de crear un nuevo usuario.",
|
|
15
15
|
"Minimal polling interval is 2 seconds": "El intervalo mínimo de sondeo es de 2 segundos.",
|
|
16
16
|
"Native turn off/on behaviour": "Comportamiento nativo de apagado / encendido",
|
|
17
17
|
"Ok": "Ok",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"Find Bridge": "Find Bridge",
|
|
12
12
|
"Ignore groups": "Ignorer les groupes",
|
|
13
13
|
"Ignore scenes": "Ignorer les scènes",
|
|
14
|
-
"Instruction": "
|
|
14
|
+
"Instruction": "Veuillez appuyer sur le bouton de liaison du pont avant de créer un nouvel utilisateur !",
|
|
15
15
|
"Minimal polling interval is 2 seconds": "L'intervalle d'interrogation minimal est de 2 secondes",
|
|
16
16
|
"Native turn off/on behaviour": "Comportement natif d'activation / désactivation",
|
|
17
17
|
"Ok": "Ok",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"Find Bridge": "Find Bridge",
|
|
12
12
|
"Ignore groups": "Ignora gruppi",
|
|
13
13
|
"Ignore scenes": "Ignora le scene",
|
|
14
|
-
"Instruction": "
|
|
14
|
+
"Instruction": "Prima di creare un nuovo utente, premere il pulsante di collegamento del ponte!",
|
|
15
15
|
"Minimal polling interval is 2 seconds": "L'intervallo di polling minimo è di 2 secondi",
|
|
16
16
|
"Native turn off/on behaviour": "Disattivazione / attivazione nativa del comportamento",
|
|
17
17
|
"Ok": "Ok",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"Find Bridge": "Find Bridge",
|
|
12
12
|
"Ignore groups": "Negeer groepen",
|
|
13
13
|
"Ignore scenes": "Negeer scènes",
|
|
14
|
-
"Instruction": "
|
|
14
|
+
"Instruction": "Druk op de linkknop van de brug voordat je een nieuwe gebruiker aanmaakt!",
|
|
15
15
|
"Minimal polling interval is 2 seconds": "Minimaal polling-interval is 2 seconden",
|
|
16
16
|
"Native turn off/on behaviour": "Eigen in- / uitschakelgedrag",
|
|
17
17
|
"Ok": "Ok",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"Find Bridge": "Find Bridge",
|
|
12
12
|
"Ignore groups": "Ignoruj grupy",
|
|
13
13
|
"Ignore scenes": "Ignoruj sceny",
|
|
14
|
-
"Instruction": "
|
|
14
|
+
"Instruction": "Przed utworzeniem nowego użytkownika należy nacisnąć przycisk łącza mostu!",
|
|
15
15
|
"Minimal polling interval is 2 seconds": "Minimalny interwał odpytywania wynosi 2 sekundy",
|
|
16
16
|
"Native turn off/on behaviour": "Natywne zachowanie wyłączania / włączania",
|
|
17
17
|
"Ok": "Ok",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"Find Bridge": "Procurar Bridge",
|
|
12
12
|
"Ignore groups": "Ignorar grupos",
|
|
13
13
|
"Ignore scenes": "Ignorar cenas",
|
|
14
|
-
"Instruction": "
|
|
14
|
+
"Instruction": "Por favor, prima o botão de ligação da ponte antes de criar um novo utilizador!",
|
|
15
15
|
"Minimal polling interval is 2 seconds": "O intervalo mínimo de pesquisa é de 2 segundos",
|
|
16
16
|
"Native turn off/on behaviour": "Comportamento de ativação / desativação nativo",
|
|
17
17
|
"Ok": "Ok",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"Find Bridge": "Найти HUE bridge",
|
|
12
12
|
"Ignore groups": "Игнорировать группы",
|
|
13
13
|
"Ignore scenes": "Игнорировать сцены",
|
|
14
|
-
"Instruction": "
|
|
14
|
+
"Instruction": "Перед созданием нового пользователя нажмите кнопку ссылки на мост!",
|
|
15
15
|
"Minimal polling interval is 2 seconds": "Минимальный интервал опроса составляет 2 секунды",
|
|
16
16
|
"Native turn off/on behaviour": "Родное поведение включения / выключения",
|
|
17
17
|
"Ok": "Ok",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"Find Bridge": "找桥",
|
|
12
12
|
"Ignore groups": "忽略组",
|
|
13
13
|
"Ignore scenes": "忽略场景",
|
|
14
|
-
"Instruction": "
|
|
14
|
+
"Instruction": "在创建新用户之前,请按下网桥的链接按钮!",
|
|
15
15
|
"Minimal polling interval is 2 seconds": "最小轮询间隔为2秒",
|
|
16
16
|
"Native turn off/on behaviour": "本机关闭/打开行为",
|
|
17
17
|
"Ok": "确定",
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "panel",
|
|
3
|
+
"i18n": true,
|
|
4
|
+
"items": {
|
|
5
|
+
"bridge": {
|
|
6
|
+
"type": "autocompleteSendTo",
|
|
7
|
+
"command": "browse",
|
|
8
|
+
"jsonData": "{\"timeout\": 5000}",
|
|
9
|
+
"freeSolo": true,
|
|
10
|
+
"label": "Bridge Address",
|
|
11
|
+
"help": "Help bridge address",
|
|
12
|
+
"xs": 12,
|
|
13
|
+
"sm": 8,
|
|
14
|
+
"md": 6,
|
|
15
|
+
"lg": 4,
|
|
16
|
+
"xl": 4
|
|
17
|
+
},
|
|
18
|
+
"port": {
|
|
19
|
+
"type": "number",
|
|
20
|
+
"label": "Bridge Port",
|
|
21
|
+
"xs": 12,
|
|
22
|
+
"sm": 4,
|
|
23
|
+
"md": 2,
|
|
24
|
+
"lg": 2,
|
|
25
|
+
"xl": 2
|
|
26
|
+
},
|
|
27
|
+
"user": {
|
|
28
|
+
"type": "text",
|
|
29
|
+
"label": "Bridge User",
|
|
30
|
+
"xs": 12,
|
|
31
|
+
"sm": 12,
|
|
32
|
+
"md": 8,
|
|
33
|
+
"lg": 6,
|
|
34
|
+
"xl": 6,
|
|
35
|
+
"newLine": true
|
|
36
|
+
},
|
|
37
|
+
"_instructionText": {
|
|
38
|
+
"type": "staticText",
|
|
39
|
+
"text": "Instruction",
|
|
40
|
+
"style": {
|
|
41
|
+
"fontWeight": "bold",
|
|
42
|
+
"fontSize": "larger",
|
|
43
|
+
"color": "red"
|
|
44
|
+
},
|
|
45
|
+
"xs": 12,
|
|
46
|
+
"sm": 12,
|
|
47
|
+
"md": 4,
|
|
48
|
+
"lg": 3,
|
|
49
|
+
"xl": 4,
|
|
50
|
+
"newLine": true
|
|
51
|
+
},
|
|
52
|
+
"createUserButton": {
|
|
53
|
+
"type": "sendTo",
|
|
54
|
+
"command": "createUser",
|
|
55
|
+
"jsonData": "{\"ip\": \"${data.bridge}\", \"port\": \"${data.port}\"}",
|
|
56
|
+
"error": {
|
|
57
|
+
"Not open": "link button not pressed",
|
|
58
|
+
"Unknown error": "Unknown error"
|
|
59
|
+
},
|
|
60
|
+
"label": "Create User",
|
|
61
|
+
"icon": "add",
|
|
62
|
+
"variant": "contained",
|
|
63
|
+
"showProcess": true,
|
|
64
|
+
"useNative": true,
|
|
65
|
+
"timeout": 15000,
|
|
66
|
+
"help": "Instructions",
|
|
67
|
+
"xs": 12,
|
|
68
|
+
"sm": 12,
|
|
69
|
+
"md": 4,
|
|
70
|
+
"lg": 3,
|
|
71
|
+
"xl": 2
|
|
72
|
+
},
|
|
73
|
+
"_divider": {
|
|
74
|
+
"type": "divider",
|
|
75
|
+
"height": 2
|
|
76
|
+
},
|
|
77
|
+
"ignoreOsram": {
|
|
78
|
+
"type": "checkbox",
|
|
79
|
+
"label": "ignoreOsram",
|
|
80
|
+
"xs": 12,
|
|
81
|
+
"sm": 10,
|
|
82
|
+
"md": 4,
|
|
83
|
+
"lg": 4,
|
|
84
|
+
"xl": 4,
|
|
85
|
+
"newLine": true
|
|
86
|
+
},
|
|
87
|
+
"ignoreGroups": {
|
|
88
|
+
"type": "checkbox",
|
|
89
|
+
"label": "Ignore groups",
|
|
90
|
+
"xs": 12,
|
|
91
|
+
"sm": 10,
|
|
92
|
+
"md": 4,
|
|
93
|
+
"lg": 4,
|
|
94
|
+
"xl": 4
|
|
95
|
+
},
|
|
96
|
+
"ignoreScenes": {
|
|
97
|
+
"type": "checkbox",
|
|
98
|
+
"label": "Ignore scenes",
|
|
99
|
+
"xs": 12,
|
|
100
|
+
"sm": 10,
|
|
101
|
+
"md": 4,
|
|
102
|
+
"lg": 4,
|
|
103
|
+
"xl": 4
|
|
104
|
+
},
|
|
105
|
+
"useLegacyStructure": {
|
|
106
|
+
"type": "checkbox",
|
|
107
|
+
"label": "Legacy structure",
|
|
108
|
+
"xs": 12,
|
|
109
|
+
"sm": 10,
|
|
110
|
+
"md": 4,
|
|
111
|
+
"lg": 4,
|
|
112
|
+
"xl": 4
|
|
113
|
+
},
|
|
114
|
+
"ssl": {
|
|
115
|
+
"type": "checkbox",
|
|
116
|
+
"label": "SSL",
|
|
117
|
+
"xs": 12,
|
|
118
|
+
"sm": 10,
|
|
119
|
+
"md": 4,
|
|
120
|
+
"lg": 4,
|
|
121
|
+
"xl": 4
|
|
122
|
+
},
|
|
123
|
+
"nativeTurnOffBehaviour": {
|
|
124
|
+
"type": "checkbox",
|
|
125
|
+
"label": "Native turn off/on behaviour",
|
|
126
|
+
"xs": 12,
|
|
127
|
+
"sm": 10,
|
|
128
|
+
"md": 4,
|
|
129
|
+
"lg": 4,
|
|
130
|
+
"xl": 4
|
|
131
|
+
},
|
|
132
|
+
"syncSoftwareSensors": {
|
|
133
|
+
"type": "checkbox",
|
|
134
|
+
"label": "Sync software sensors",
|
|
135
|
+
"xs": 12,
|
|
136
|
+
"sm": 10,
|
|
137
|
+
"md": 4,
|
|
138
|
+
"lg": 4,
|
|
139
|
+
"xl": 4
|
|
140
|
+
},
|
|
141
|
+
"turnOnWithOthers": {
|
|
142
|
+
"type": "checkbox",
|
|
143
|
+
"label": "Turn On with Others",
|
|
144
|
+
"xs": 12,
|
|
145
|
+
"sm": 10,
|
|
146
|
+
"md": 4,
|
|
147
|
+
"lg": 4,
|
|
148
|
+
"xl": 4
|
|
149
|
+
},
|
|
150
|
+
"polling": {
|
|
151
|
+
"type": "checkbox",
|
|
152
|
+
"label": "Polling",
|
|
153
|
+
"xs": 12,
|
|
154
|
+
"sm": 10,
|
|
155
|
+
"md": 4,
|
|
156
|
+
"lg": 4,
|
|
157
|
+
"xl": 4
|
|
158
|
+
},
|
|
159
|
+
"pollingInterval": {
|
|
160
|
+
"type": "number",
|
|
161
|
+
"label": "Polling interval (sec)",
|
|
162
|
+
"min": 2,
|
|
163
|
+
"xs": 12,
|
|
164
|
+
"sm": 4,
|
|
165
|
+
"md": 3,
|
|
166
|
+
"lg": 2,
|
|
167
|
+
"xl": 2
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
package/build/main.js
CHANGED
|
@@ -131,17 +131,25 @@ class Hue extends utils.Adapter {
|
|
|
131
131
|
if (obj) {
|
|
132
132
|
switch (obj.command) {
|
|
133
133
|
case 'browse': {
|
|
134
|
-
const
|
|
135
|
-
this.
|
|
134
|
+
const timeout = obj.message.timeout;
|
|
135
|
+
const res = await this.browse(timeout);
|
|
136
136
|
if (obj.callback) {
|
|
137
137
|
this.sendTo(obj.from, obj.command, res, obj.callback);
|
|
138
138
|
}
|
|
139
139
|
break;
|
|
140
140
|
}
|
|
141
141
|
case 'createUser': {
|
|
142
|
-
const res = await this.createUser(obj.message);
|
|
142
|
+
const res = await this.createUser(obj.message.ip, obj.message.port);
|
|
143
143
|
if (obj.callback) {
|
|
144
|
-
|
|
144
|
+
if (res.error === 0) {
|
|
145
|
+
this.sendTo(obj.from, obj.command, { user: res.message }, obj.callback);
|
|
146
|
+
}
|
|
147
|
+
else if (res.error === 403) {
|
|
148
|
+
this.sendTo(obj.from, obj.command, { error: 'Not open' }, obj.callback);
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
this.sendTo(obj.from, obj.command, { error: 'Unknown error' }, obj.callback);
|
|
152
|
+
}
|
|
145
153
|
}
|
|
146
154
|
break;
|
|
147
155
|
}
|
|
@@ -771,20 +779,25 @@ class Hue extends utils.Adapter {
|
|
|
771
779
|
ips.push(bridges[i].ipaddress);
|
|
772
780
|
}
|
|
773
781
|
}
|
|
774
|
-
|
|
782
|
+
const ipsWithLabels = ips.map(ip => ({
|
|
783
|
+
value: ip,
|
|
784
|
+
label: ip
|
|
785
|
+
}));
|
|
786
|
+
return ipsWithLabels;
|
|
775
787
|
}
|
|
776
788
|
/**
|
|
777
789
|
* Create user on the bridge by given Ip
|
|
778
790
|
*
|
|
779
791
|
* @param ip - ip address of the bridge
|
|
792
|
+
* @param port - port of the bridge
|
|
780
793
|
*/
|
|
781
|
-
async createUser(ip) {
|
|
794
|
+
async createUser(ip, port) {
|
|
782
795
|
const deviceName = 'ioBroker.hue';
|
|
783
796
|
try {
|
|
784
797
|
const api = this.config.ssl
|
|
785
|
-
? await node_hue_api_1.v3.api.createLocal(ip,
|
|
798
|
+
? await node_hue_api_1.v3.api.createLocal(ip, port).connect()
|
|
786
799
|
: // @ts-expect-error third party types are incorrect
|
|
787
|
-
await node_hue_api_1.v3.api.createInsecureLocal(ip,
|
|
800
|
+
await node_hue_api_1.v3.api.createInsecureLocal(ip, port).connect();
|
|
788
801
|
const newUser = await api.users.createUser(ip, deviceName);
|
|
789
802
|
this.log.info(`created new User: ${newUser.username}`);
|
|
790
803
|
return { error: 0, message: newUser.username };
|