iobroker.zigbee2mqtt 3.0.10 → 3.0.14
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/LICENSE +1 -1
- package/README.md +17 -245
- package/io-package.json +54 -42
- package/lib/check.js +6 -0
- package/lib/colors.js +26 -6
- package/lib/deviceController.js +66 -12
- package/lib/exposes.js +61 -50
- package/lib/imageController.js +52 -3
- package/lib/messages.js +10 -0
- package/lib/mqttServerController.js +20 -6
- package/lib/nonGenericDevicesExtension.js +6 -2
- package/lib/rgb.js +75 -30
- package/lib/statesController.js +53 -0
- package/lib/utils.js +54 -7
- package/lib/websocketController.js +29 -0
- package/lib/z2mController.js +19 -0
- package/main.js +8 -10
- package/package.json +3 -7
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2025 Arthur Rupp <arteck@outlook.com>,
|
|
3
|
+
Copyright (c) 2025-2026 Arthur Rupp <arteck@outlook.com>,
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
|
@@ -22,6 +22,19 @@ This adapter allows to control the data points of the devices of a Zigbee2MQTT i
|
|
|
22
22
|
[Adapter Documentation](https://github.com/arteck/ioBroker.zigbee2mqtt/blob/main/docs/wiki.md)
|
|
23
23
|
|
|
24
24
|
## Changelog
|
|
25
|
+
### 3.0.14 (2026-01-27)
|
|
26
|
+
* (arteck) back to sharp 0.33.5
|
|
27
|
+
|
|
28
|
+
### 3.0.13 (2026-01-25)
|
|
29
|
+
* (arteck) add action dp
|
|
30
|
+
|
|
31
|
+
### 3.0.12 (2026-01-05)
|
|
32
|
+
* (arteck) Dependencies have been updated
|
|
33
|
+
* (MMeinhardt1) typo fix
|
|
34
|
+
|
|
35
|
+
### 3.0.11 (2025-12-31)
|
|
36
|
+
- (arteck) fix info.connection
|
|
37
|
+
|
|
25
38
|
### 3.0.10 (2025-12-07)
|
|
26
39
|
- (arteck) Dependencies have been updated
|
|
27
40
|
- (bluefox) Changed role of `color_temp_startup` state to `level` to avoid double `level.temperature` in one device
|
|
@@ -43,250 +56,9 @@ This adapter allows to control the data points of the devices of a Zigbee2MQTT i
|
|
|
43
56
|
- (arteck) settings restructure
|
|
44
57
|
- (arteck) fix icon not found message
|
|
45
58
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
- (arteck) set available State to true if device message include last_seen status
|
|
50
|
-
|
|
51
|
-
### 3.0.4 (2025-05-11)
|
|
52
|
-
- (arteck) update admin
|
|
53
|
-
|
|
54
|
-
### 3.0.3 (2025-02-03)
|
|
55
|
-
- (arteck) corr illuminance (del illuminance_raw)
|
|
56
|
-
- (arteck) indicator.alarm.flood
|
|
57
|
-
|
|
58
|
-
### 3.0.2 (2025-01-06)
|
|
59
|
-
- (simateck) corr WebSocket connection
|
|
60
|
-
|
|
61
|
-
### 3.0.1 (2025-01-04)
|
|
62
|
-
- (arteck) corr icon download
|
|
63
|
-
|
|
64
|
-
### 3.0.0 (2025-01-04)
|
|
65
|
-
- (arteck) adaptation z2m 2.x
|
|
66
|
-
|
|
67
|
-
### 2.13.11 (2024-10-17)
|
|
68
|
-
- (arteck) corr package.json
|
|
69
|
-
|
|
70
|
-
### 2.13.10 (2024-09-05)
|
|
71
|
-
- (arteck) update dependecy
|
|
72
|
-
- (arteck) add available object for groups
|
|
73
|
-
|
|
74
|
-
### 2.13.9 (2024-05-13)
|
|
75
|
-
- (arteck) fix lint
|
|
76
|
-
- (arteck) update dependecy
|
|
77
|
-
|
|
78
|
-
### 2.13.9 (2024-05-13)
|
|
79
|
-
- (arteck) fix lint
|
|
80
|
-
- (arteck) update dependecy
|
|
81
|
-
|
|
82
|
-
### 2.13.8 (2024-05-13)
|
|
83
|
-
- (arteck) fix icon path
|
|
84
|
-
|
|
85
|
-
### 2.13.7 (2024-04-20)
|
|
86
|
-
- (arteck) core dependecy
|
|
87
|
-
- (arteck) update dependecy
|
|
88
|
-
- (pepp86) Enable occupancy to be always updated if true
|
|
89
|
-
|
|
90
|
-
### 2.13.6 (2024-03-11)
|
|
91
|
-
- (arteck) update dependecy
|
|
92
|
-
|
|
93
|
-
### 2.13.5 (2024-02-02)
|
|
94
|
-
- (arteck) fixed mqttClient.end()
|
|
95
|
-
|
|
96
|
-
### 2.13.4 (2023-12-17)
|
|
97
|
-
|
|
98
|
-
- (o0shojo0o) fixed unnecessary warning for special value ([269](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/269))
|
|
99
|
-
|
|
100
|
-
### 2.13.3 (2023-10-10)
|
|
101
|
-
|
|
102
|
-
- (o0shojo0o) fixed devices erroneous offline indication ([#255](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/255))
|
|
103
|
-
|
|
104
|
-
### 2.13.2 (2023-09-30)
|
|
105
|
-
|
|
106
|
-
- (o0shojo0o) fixed NULL values when HASS integration is enabled in zigbee2mqtt
|
|
107
|
-
|
|
108
|
-
### 2.13.1 (2023-09-07)
|
|
109
|
-
|
|
110
|
-
- (o0shojo0o) fixed storage name
|
|
111
|
-
|
|
112
|
-
### 2.13.0 (2023-09-07)
|
|
113
|
-
|
|
114
|
-
- (o0shojo0o) added state `info.coordinator_check` ([#247](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/247))
|
|
115
|
-
- (o0shojo0o) added state `info.missing_routers` ([#247](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/247))
|
|
116
|
-
- (o0shojo0o) added state `info.missing_routers_count` ([#247](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/247))
|
|
117
|
-
- (o0shojo0o) added option `Automatic check for missing routers in the coordinator memory` ([#247](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/247))
|
|
118
|
-
|
|
119
|
-
### 2.12.0 (2023-09-05)
|
|
120
|
-
|
|
121
|
-
- (o0shojo0o) added option `Size of the object icons in pixels`
|
|
122
|
-
|
|
123
|
-
### 2.11.0 (2023-08-24)
|
|
124
|
-
|
|
125
|
-
- (o0shojo0o) added automatic download of device image from zigbee2mqtt to meta-storage
|
|
126
|
-
- (o0shojo0o) device images from Meta-Storage added to the object
|
|
127
|
-
- (o0shojo0o) device images from Meta-Storage auto resize to 28x28 pixel for smaller object
|
|
128
|
-
- (o0shojo0o) added option `Download device images from Zigbee2Mqtt and use them as object icons.`
|
|
129
|
-
- (o0shojo0o) fixed Hue_Move ([#223](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/223))
|
|
130
|
-
- (o0shojo0o) added option `Generate simple 'Hold' and 'Release' states`
|
|
131
|
-
- (o0shojo0o) added option `Generate simple 'Move' and 'Stop' states`
|
|
132
|
-
- (o0shojo0o) added option `Generate simple 'Press' and 'Release' states`
|
|
133
|
-
|
|
134
|
-
### 2.10.1 (2023-08-13)
|
|
135
|
-
|
|
136
|
-
- (o0shojo0o) fixed type definitions (thx @arteck)
|
|
137
|
-
|
|
138
|
-
### 2.10.0 (2023-08-12)
|
|
139
|
-
|
|
140
|
-
- (o0shojo0o) optimisation for the MQTT connection
|
|
141
|
-
- (o0shojo0o) fixed for MQTT output type: attribute_and_json ([#87](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/87))
|
|
142
|
-
- (o0shojo0o) added support for external MQTT-Server credentials ([#148](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/148))
|
|
143
|
-
- *After update, Websocket Auth-Token must be set again, if used.*
|
|
144
|
-
|
|
145
|
-
### 2.9.0 (2023-07-21)
|
|
146
|
-
|
|
147
|
-
- (o0shojo0o) added state `send_payload` to send a raw json payload
|
|
148
|
-
|
|
149
|
-
### 2.8.0 (2023-07-19)
|
|
150
|
-
|
|
151
|
-
- (o0shojo0o) added WSS support for websoket connection ([#191](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/191))
|
|
152
|
-
- (o0shojo0o) small fixes
|
|
153
|
-
|
|
154
|
-
### 2.7.5 (2023-04-08)
|
|
155
|
-
|
|
156
|
-
- (o0shojo0o) added state `last_seen` contains date/time of last Zigbee message ([#131](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/131))
|
|
157
|
-
|
|
158
|
-
### 2.7.4 (2023-03-05)
|
|
159
|
-
|
|
160
|
-
- (o0shojo0o) fixed for Aqara presence detector FP1 `reset_nopresence_status`
|
|
161
|
-
|
|
162
|
-
### 2.7.3 (2023-02-18)
|
|
163
|
-
|
|
164
|
-
- (o0shojo0o) hotfix for Aqara presence detector FP1
|
|
165
|
-
|
|
166
|
-
### 2.7.2 (2023-02-01)
|
|
167
|
-
|
|
168
|
-
- (o0shojo0o) rework of the detection of removed devices
|
|
169
|
-
|
|
170
|
-
### 2.7.1 (2023-01-24)
|
|
171
|
-
|
|
172
|
-
- (arteck) added option for use folder description
|
|
173
|
-
- (arteck) use the iobroker device folder description for device description or events
|
|
174
|
-
|
|
175
|
-
### 2.7.0 (2023-01-18)
|
|
176
|
-
|
|
177
|
-
- (o0shojo0o) added support for wildcard actions (eg. *_single) ([#116](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/116))
|
|
178
|
-
- (o0shojo0o) added error handling optimizations ([more](https://github.com/ioBroker/ioBroker.repositories/pull/1976#issuecomment-1382038679))
|
|
179
|
-
- (o0shojo0o) added option `auth_token` for websocket connection ([#112](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/112))
|
|
180
|
-
- (o0shojo0o) websocket timeout increased
|
|
181
|
-
|
|
182
|
-
### 2.6.0 (2023-01-10)
|
|
183
|
-
|
|
184
|
-
- (o0shojo0o) added state `transition` for transition overwrite (-1 disabled overwrite) ([#101](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/101))
|
|
185
|
-
- (o0shojo0o) consideration of the description when creating the friendly name ([#105](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/105))
|
|
186
|
-
- (o0shojo0o) added state `effect` for groups ([#101](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/101))
|
|
187
|
-
- (o0shojo0o) fixed state contact
|
|
188
|
-
- (o0shojo0o) added handling for disabled devices
|
|
189
|
-
|
|
190
|
-
### 2.5.0 (2023-01-02)
|
|
191
|
-
|
|
192
|
-
- (o0shojo0o) added option `Brightness step should also turn the light on or off`
|
|
193
|
-
- (o0shojo0o) added handling of `brightness_step` ([#96](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/96))
|
|
194
|
-
- (o0shojo0o) states processing more flexible designed ([#94](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/94))
|
|
195
|
-
|
|
196
|
-
### 2.4.5 (2022-12-20)
|
|
197
|
-
|
|
198
|
-
- (o0shojo0o) extend `text` for `action` ([#84](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/84))
|
|
199
|
-
|
|
200
|
-
### 2.4.4 (2022-12-06)
|
|
201
|
-
|
|
202
|
-
- (o0shojo0o) better state identification ([#79](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/79))
|
|
203
|
-
|
|
204
|
-
### 2.4.3 (2022-11-23)
|
|
205
|
-
|
|
206
|
-
- (o0shojo0o) fixed availability when `friendly_name` `/` contains
|
|
207
|
-
|
|
208
|
-
### 2.4.2 (2022-11-20)
|
|
209
|
-
|
|
210
|
-
- (o0shojo0o) added correct handling of `move_to_saturation`, `hue_move` and `brightness_move_to_level` ([#68](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/68))
|
|
211
|
-
- (o0shojo0o) fixed when `friendly_name` `/` contains
|
|
212
|
-
|
|
213
|
-
### 2.4.1 (2022-11-16)
|
|
214
|
-
|
|
215
|
-
- (o0shojo0o) fixed based on [review](https://github.com/ioBroker/ioBroker.repositories/pull/1976#issuecomment-1316656378)
|
|
216
|
-
|
|
217
|
-
### 2.4.0 (2022-11-08)
|
|
218
|
-
|
|
219
|
-
- (o0shojo0o) fixed for devices with multiple endpoints ([#57](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/57)).
|
|
220
|
-
- (o0shojo0o) added option `Brightness move should also turn the light on or off`
|
|
221
|
-
- (o0shojo0o) added state toggle for groups
|
|
222
|
-
- (o0shojo0o) more dynamic during data point creation ([#48](https://github.com/arteck/ioBroker.zigbee2mqtt/issues/48)).
|
|
223
|
-
|
|
224
|
-
### 2.3.0 (2022-10-30)
|
|
225
|
-
|
|
226
|
-
- (o0shojo0o) added support for the `toggle` of states that support this.
|
|
227
|
-
- (o0shojo0o) added correct handling of `color_move` and `color_temperature_move`
|
|
228
|
-
|
|
229
|
-
### 2.2.1 (2022-10-25)
|
|
230
|
-
|
|
231
|
-
- (o0shojo0o) fixed state roles and access
|
|
232
|
-
- (o0shojo0o) fixed state handling
|
|
233
|
-
- (o0shojo0o) fixed createZ2MMessage
|
|
234
|
-
|
|
235
|
-
### 2.2.0 (2022-10-20)
|
|
236
|
-
|
|
237
|
-
- (o0shojo0o) added support for [Lidl HG06467 effects](https://www.zigbee2mqtt.io/devices/HG06467.html#trigger-effects)
|
|
238
|
-
- (o0shojo0o) added support for hs color
|
|
239
|
-
- (o0shojo0o) `simulated_brightness` data point is added only for supported devices
|
|
240
|
-
|
|
241
|
-
### 2.1.1 (2022-10-16)
|
|
242
|
-
|
|
243
|
-
- (o0shojo0o) advanced detection if a device has been removed
|
|
244
|
-
- (o0shojo0o) fixes the design error in the websocket connection
|
|
245
|
-
|
|
246
|
-
### 2.1.0 (2022-10-14)
|
|
247
|
-
|
|
248
|
-
- (o0shojo0o) added option for color temperature sync with color
|
|
249
|
-
- (o0shojo0o) fixed logfilter and debugDevices
|
|
250
|
-
- (o0shojo0o) lots of bugfixes
|
|
251
|
-
- (o0shojo0o) now set the correct min/max at color temp
|
|
252
|
-
- (o0shojo0o) better error handling for the connections
|
|
253
|
-
|
|
254
|
-
### 2.0.0 (2022-10-12)
|
|
255
|
-
|
|
256
|
-
**!!!BREAKING CHANGE!!!**
|
|
257
|
-
|
|
258
|
-
- (o0shojo0o) added configurable connection to Zigbee2MQTT (Settings must be renewed)
|
|
259
|
-
- Websocket
|
|
260
|
-
- External MQTT-Server
|
|
261
|
-
- Internal MQTT-Server
|
|
262
|
-
- (o0shojo0o) optimized state writing performance in ioBroker
|
|
263
|
-
- (o0shojo0o) fixed the correct set of the connection status
|
|
264
|
-
|
|
265
|
-
### 1.0.0 (2022-10-09)
|
|
266
|
-
|
|
267
|
-
**!!!BREAKING CHANGE!!!**
|
|
268
|
-
|
|
269
|
-
- (o0shojo0o) added options for external MQTT-Server
|
|
270
|
-
- (o0shojo0o) connection to zigbee2mqtt completely reworked and changed to MQTT
|
|
271
|
-
- (o0shojo0o) lots of bugfixes
|
|
272
|
-
- (o0shojo0o) automatically set button actions back to false
|
|
273
|
-
- (o0shojo0o) added support for Zigbee2MQTT feature simulated_brightness
|
|
274
|
-
- (o0shojo0o) added config check
|
|
275
|
-
- (o0shojo0o) added log output about coordinator details
|
|
276
|
-
|
|
277
|
-
### 0.2.0 (2022-10-04)
|
|
278
|
-
|
|
279
|
-
- (o0shojo0o) group states corrected
|
|
280
|
-
- (o0shojo0o) added option 'Use Kelvin instead of mired for the color temps'
|
|
281
|
-
- (o0shojo0o) remove available logic, now will use the information from z2m
|
|
282
|
-
- (o0shojo0o) rename noLogDevices to logfilter
|
|
283
|
-
- (o0shojo0o) lots of bugfixes
|
|
284
|
-
- (o0shojo0o) added noLogDevices functionality
|
|
285
|
-
- (o0shojo0o) added debugmessage for specific device functionality
|
|
286
|
-
- (o0shojo0o) added some states are default false
|
|
287
|
-
- (o0shojo0o) added support for scenes defined on a device
|
|
288
|
-
- (o0shojo0o) fixed available state role
|
|
289
|
-
- (o0shojo0o) fixed edsubscribeWritableStates
|
|
59
|
+
.
|
|
60
|
+
.
|
|
61
|
+
.
|
|
290
62
|
|
|
291
63
|
### 0.1.0 (2022-09-29)
|
|
292
64
|
|
|
@@ -296,7 +68,7 @@ This adapter allows to control the data points of the devices of a Zigbee2MQTT i
|
|
|
296
68
|
|
|
297
69
|
MIT License
|
|
298
70
|
|
|
299
|
-
Copyright (c) 2025 Arthur Rupp <arteck@outlook.com>,
|
|
71
|
+
Copyright (c) 2025-2026 Arthur Rupp <arteck@outlook.com>,
|
|
300
72
|
|
|
301
73
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
302
74
|
of this software and associated documentation files (the "Software"), to deal
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,60 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "zigbee2mqtt",
|
|
4
|
-
"version": "3.0.
|
|
4
|
+
"version": "3.0.14",
|
|
5
5
|
"news": {
|
|
6
|
+
"3.0.14": {
|
|
7
|
+
"en": "back to sharp 0.33.5",
|
|
8
|
+
"de": "zurück zu sharp 0,33,5",
|
|
9
|
+
"ru": "вернуться к sharp 0.33.5",
|
|
10
|
+
"pt": "voltar ao valor nítido 0,33,5",
|
|
11
|
+
"nl": "terug naar sharp 0,335",
|
|
12
|
+
"fr": "retour à la version 0.33.5",
|
|
13
|
+
"it": "torna a 0,33,5 tagliente",
|
|
14
|
+
"es": "de nuevo al 0,33,5",
|
|
15
|
+
"pl": "powrót do sharp 0,33,5",
|
|
16
|
+
"uk": "назад до sharp 0.33.5",
|
|
17
|
+
"zh-cn": "回到清晰的 0.33.5"
|
|
18
|
+
},
|
|
19
|
+
"3.0.13": {
|
|
20
|
+
"en": "add action dp",
|
|
21
|
+
"de": "aktion dp hinzufügen",
|
|
22
|
+
"ru": "добавить действие dp",
|
|
23
|
+
"pt": "adicionar ação dp",
|
|
24
|
+
"nl": "actie dp toevoegen",
|
|
25
|
+
"fr": "ajouter action dp",
|
|
26
|
+
"it": "aggiungere azione",
|
|
27
|
+
"es": "añadir acción dp",
|
|
28
|
+
"pl": "dodaj działanie dp",
|
|
29
|
+
"uk": "додати дію dp",
|
|
30
|
+
"zh-cn": "添加动作 dp"
|
|
31
|
+
},
|
|
32
|
+
"3.0.12": {
|
|
33
|
+
"en": "Dependencies have been updated\ntypo fix",
|
|
34
|
+
"de": "Abhängigkeiten wurden aktualisiert\ntypo fix",
|
|
35
|
+
"ru": "Зависимости были обновлены\nисправление опечаток",
|
|
36
|
+
"pt": "As dependências foram atualizadas\nerro de digitação",
|
|
37
|
+
"nl": "Afhankelijkheden zijn bijgewerkt\ntypo-fix",
|
|
38
|
+
"fr": "Les dépendances ont été actualisées\ncorrection du type",
|
|
39
|
+
"it": "Le dipendenze sono state aggiornate\ncorrezione di errore",
|
|
40
|
+
"es": "Se han actualizado las dependencias\ntypo fix",
|
|
41
|
+
"pl": "Zaktualizowano zależności\nfix typo",
|
|
42
|
+
"uk": "Залежність було оновлено\nтипофікс",
|
|
43
|
+
"zh-cn": "依赖关系已更新\n类型修复"
|
|
44
|
+
},
|
|
45
|
+
"3.0.11": {
|
|
46
|
+
"en": "fix info.connection",
|
|
47
|
+
"de": "fix info.connection",
|
|
48
|
+
"ru": "обсуждение fix info.connection",
|
|
49
|
+
"pt": "corrigir info.connection",
|
|
50
|
+
"nl": "fix info.connection",
|
|
51
|
+
"fr": "corriger info.connection",
|
|
52
|
+
"it": "fix info.connection",
|
|
53
|
+
"es": "arreglar info.conexión",
|
|
54
|
+
"pl": "fix info.connection",
|
|
55
|
+
"uk": "фіксувати інформацію.connection",
|
|
56
|
+
"zh-cn": "修复信息.连接"
|
|
57
|
+
},
|
|
6
58
|
"3.0.10": {
|
|
7
59
|
"en": "Dependencies have been updated\nChanged role of `color_temp_startup` state to `level` to avoid double `level.temperature` in one device\nfix ZBMINIR2 inching DP\ndelete DP colortempstartup",
|
|
8
60
|
"de": "Abhängigkeiten wurden aktualisiert\nÄnderung der Rolle von `color_temp_startup` Zustand auf `level`, um Doppel `level.temperature` in einem Gerät zu vermeiden\nzBMINIR2 Inch DP reparieren\nlöschen DP colortempstartup",
|
|
@@ -54,45 +106,6 @@
|
|
|
54
106
|
"pl": "fix jsconconf",
|
|
55
107
|
"uk": "закріпити jsconconf",
|
|
56
108
|
"zh-cn": "修复 jsconconconf"
|
|
57
|
-
},
|
|
58
|
-
"3.0.6": {
|
|
59
|
-
"en": "settings restructure\nfix icon not found message",
|
|
60
|
-
"de": "einstellungen restrukturieren\nsymbol nicht gefunden",
|
|
61
|
-
"ru": "реструктуризация настроек\nисправить иконку не найдено сообщение",
|
|
62
|
-
"pt": "reestruturação de configurações\ncorrigir ícone não encontrado mensagem",
|
|
63
|
-
"nl": "instellingen herstructureren\npictogram niet gevonden bericht herstellen",
|
|
64
|
-
"fr": "restructuration des paramètres\ncorrection icône non trouvée message",
|
|
65
|
-
"it": "installazione\nfix icona non trovato messaggio",
|
|
66
|
-
"es": "configuración de reestructuración\nfijar icono no encontrado mensaje",
|
|
67
|
-
"pl": "restrukturyzacja ustawień\nnie znaleziono ikony",
|
|
68
|
-
"uk": "реструктуризація параметрів\nне знайдено повідомлення",
|
|
69
|
-
"zh-cn": "设置调整\n未找到消息的修复图标"
|
|
70
|
-
},
|
|
71
|
-
"3.0.5": {
|
|
72
|
-
"en": "add additional folder for some devices (like smoke detector)\nstate.js cleanup\nset available State to true if device message include last_seen status",
|
|
73
|
-
"de": "zusätzliche ordner für einige geräte hinzufügen (wie rauchmelder)\nstate.js cleanup\neingestellt verfügbar Zustand, um wahr zu sein, wenn die Gerätenachricht last_seen status enthält",
|
|
74
|
-
"ru": "добавьте дополнительную папку для некоторых устройств (например, детектор дыма)\nочистка state.js\nустановленное состояние истинно, если сообщение устройства включает в себя статус last_seen",
|
|
75
|
-
"pt": "adicionar pasta adicional para alguns dispositivos (como detector de fumaça)\nlimpeza state.js\nset available Estado para true se a mensagem do dispositivo incluir status last_seen",
|
|
76
|
-
"nl": "extra map toevoegen voor sommige apparaten (zoals rookmelder)\nstate.js opruimen\nbeschikbare status instellen op true als apparaatbericht laatste_geziene status bevat",
|
|
77
|
-
"fr": "ajouter un dossier supplémentaire pour certains appareils (comme le détecteur de fumée)\nétat.js nettoyage\ndéfinir l'État disponible à true si le message de périphérique inclut le statut last_seen",
|
|
78
|
-
"it": "aggiungere cartella aggiuntiva per alcuni dispositivi (come rilevatore di fumo)\nstato.js pulizia\nse il messaggio del dispositivo include lo stato di last_seen",
|
|
79
|
-
"es": "añadir carpeta adicional para algunos dispositivos (como detector de humos)\nestado.js limpieza\nestado disponible para ver si el mensaje del dispositivo incluye el estado de último visto",
|
|
80
|
-
"pl": "dodaj dodatkowy folder dla niektórych urządzeń (np. czujnik dymu)\nstan. js cleanup\nustaw dostępny stan na true jeśli wiadomość urządzenia zawiera status last _ seen",
|
|
81
|
-
"uk": "додати додаткову папку для деяких пристроїв (наприклад, детектор диму)\nстан.js cleanup\nвстановити доступну державу, якщо повідомлення про пристрій включають статус останнього_seen",
|
|
82
|
-
"zh-cn": "为一些设备添加额外的文件夹( 如烟雾探测器)\n状态.js 清理\n如果设备消息包含最后的_ Seenn 状态, 将可用状态设定为 true"
|
|
83
|
-
},
|
|
84
|
-
"3.0.4": {
|
|
85
|
-
"en": "update admin",
|
|
86
|
-
"de": "admin",
|
|
87
|
-
"ru": "обновление admin",
|
|
88
|
-
"pt": "atualização admin",
|
|
89
|
-
"nl": "admin bijwerken",
|
|
90
|
-
"fr": "mettre à jour l'administrateur",
|
|
91
|
-
"it": "aggiornamento",
|
|
92
|
-
"es": "actualización admin",
|
|
93
|
-
"pl": "aktualizacja admin",
|
|
94
|
-
"uk": "оновлення адмін",
|
|
95
|
-
"zh-cn": "更新管理员"
|
|
96
109
|
}
|
|
97
110
|
},
|
|
98
111
|
"messages": [
|
|
@@ -211,8 +224,7 @@
|
|
|
211
224
|
"pl": "Zigbee2MQTT",
|
|
212
225
|
"zh-cn": "Zigbee2MQTT"
|
|
213
226
|
},
|
|
214
|
-
"link": "%webUIScheme%://%webUIServer%:%webUIPort%"
|
|
215
|
-
"fa-icon": "</i><img style='width:24px;margin-bottom:-6px;' src='/adapter/zigbee2mqtt/zigbee2mqtt.png'><i>"
|
|
227
|
+
"link": "%webUIScheme%://%webUIServer%:%webUIPort%"
|
|
216
228
|
},
|
|
217
229
|
"localLinks": {
|
|
218
230
|
"_default": {
|
package/lib/check.js
CHANGED
package/lib/colors.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
const namedColors = {
|
|
@@ -424,19 +424,33 @@ const namedColors = {
|
|
|
424
424
|
},
|
|
425
425
|
};
|
|
426
426
|
|
|
427
|
+
/**
|
|
428
|
+
*
|
|
429
|
+
* @param name
|
|
430
|
+
*/
|
|
427
431
|
function NamedColorToRGBstring(name) {
|
|
428
432
|
const lowerName = name.toLowerCase();
|
|
429
|
-
if (namedColors.hasOwnProperty(lowerName))
|
|
433
|
+
if (namedColors.hasOwnProperty(lowerName)) {
|
|
434
|
+
return namedColors[lowerName].rgb;
|
|
435
|
+
}
|
|
430
436
|
return '#0088FF';
|
|
431
437
|
}
|
|
432
438
|
|
|
439
|
+
/**
|
|
440
|
+
*
|
|
441
|
+
* @param rgbstring
|
|
442
|
+
*/
|
|
433
443
|
function ParseColor(rgbstring) {
|
|
434
444
|
if (typeof rgbstring === 'string') {
|
|
435
445
|
const lowerName = rgbstring.toLowerCase();
|
|
436
|
-
if (namedColors.hasOwnProperty(lowerName))
|
|
446
|
+
if (namedColors.hasOwnProperty(lowerName)) {
|
|
447
|
+
rgbstring = namedColors[lowerName].rgb;
|
|
448
|
+
}
|
|
437
449
|
rgbstring = rgbstring.trim();
|
|
438
|
-
if (rgbstring.startsWith('#'))
|
|
439
|
-
|
|
450
|
+
if (rgbstring.startsWith('#')) {
|
|
451
|
+
rgbstring = rgbstring.slice(1);
|
|
452
|
+
}
|
|
453
|
+
const val = parseInt(`0x${ rgbstring}`);
|
|
440
454
|
const oneColor = {};
|
|
441
455
|
oneColor.r = Math.floor(val / (256 * 256));
|
|
442
456
|
oneColor.g = Math.floor((val % (256 * 256)) / 256);
|
|
@@ -446,8 +460,14 @@ function ParseColor(rgbstring) {
|
|
|
446
460
|
return { r: 0, g: 128, b: 255 };
|
|
447
461
|
}
|
|
448
462
|
|
|
463
|
+
/**
|
|
464
|
+
*
|
|
465
|
+
* @param name
|
|
466
|
+
*/
|
|
449
467
|
function NamedColorToRGB(name) {
|
|
450
|
-
if (namedColors.hasOwnProperty(name))
|
|
468
|
+
if (namedColors.hasOwnProperty(name)) {
|
|
469
|
+
return ParseColor(namedColors[name].rgb);
|
|
470
|
+
}
|
|
451
471
|
return { r: 0, g: 128, b: 255 };
|
|
452
472
|
}
|
|
453
473
|
module.exports = {
|
package/lib/deviceController.js
CHANGED
|
@@ -5,7 +5,19 @@ const colors = require('./colors.js');
|
|
|
5
5
|
const rgb = require('./rgb.js');
|
|
6
6
|
const ImageController = require('./imageController').ImageController;
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
8
11
|
class DeviceController {
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @param adapter
|
|
15
|
+
* @param deviceCache
|
|
16
|
+
* @param groupCache
|
|
17
|
+
* @param config
|
|
18
|
+
* @param logCustomizations
|
|
19
|
+
* @param createCache
|
|
20
|
+
*/
|
|
9
21
|
constructor(adapter, deviceCache, groupCache, config, logCustomizations, createCache) {
|
|
10
22
|
this.adapter = adapter;
|
|
11
23
|
this.groupCache = groupCache;
|
|
@@ -16,6 +28,10 @@ class DeviceController {
|
|
|
16
28
|
this.imageController = new ImageController(adapter);
|
|
17
29
|
}
|
|
18
30
|
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @param devicesMessage
|
|
34
|
+
*/
|
|
19
35
|
async createDeviceDefinitions(devicesMessage) {
|
|
20
36
|
utils.clearArray(this.deviceCache);
|
|
21
37
|
for (const devicesMessag of devicesMessage) {
|
|
@@ -44,6 +60,12 @@ class DeviceController {
|
|
|
44
60
|
}
|
|
45
61
|
}
|
|
46
62
|
|
|
63
|
+
/**
|
|
64
|
+
*
|
|
65
|
+
* @param groupID
|
|
66
|
+
* @param ieee_address
|
|
67
|
+
* @param scenes
|
|
68
|
+
*/
|
|
47
69
|
async defineGroupDevice(groupID, ieee_address, scenes) {
|
|
48
70
|
const brmPropName =
|
|
49
71
|
this.adapter.config.brightnessMoveOnOff == true ? 'brightness_move_onoff' : 'brightness_move';
|
|
@@ -126,14 +148,14 @@ class DeviceController {
|
|
|
126
148
|
if (payload.color && payload.color.x && payload.color.y) {
|
|
127
149
|
const colorval = rgb.cie_to_rgb(payload.color.x, payload.color.y);
|
|
128
150
|
return (
|
|
129
|
-
|
|
130
|
-
utils.decimalToHex(colorval[0])
|
|
131
|
-
utils.decimalToHex(colorval[1])
|
|
132
|
-
utils.decimalToHex(colorval[2])
|
|
151
|
+
`#${
|
|
152
|
+
utils.decimalToHex(colorval[0])
|
|
153
|
+
}${utils.decimalToHex(colorval[1])
|
|
154
|
+
}${utils.decimalToHex(colorval[2])}`
|
|
133
155
|
);
|
|
134
|
-
}
|
|
156
|
+
}
|
|
135
157
|
return undefined;
|
|
136
|
-
|
|
158
|
+
|
|
137
159
|
},
|
|
138
160
|
},
|
|
139
161
|
{
|
|
@@ -159,9 +181,9 @@ class DeviceController {
|
|
|
159
181
|
}
|
|
160
182
|
if (this.config.useKelvin == true) {
|
|
161
183
|
return utils.miredKelvinConversion(payload.color_temp);
|
|
162
|
-
}
|
|
184
|
+
}
|
|
163
185
|
return payload.color_temp;
|
|
164
|
-
|
|
186
|
+
|
|
165
187
|
},
|
|
166
188
|
},
|
|
167
189
|
{
|
|
@@ -213,7 +235,6 @@ class DeviceController {
|
|
|
213
235
|
type: 'boolean',
|
|
214
236
|
setter: (value) => (value ? scene.id : undefined),
|
|
215
237
|
};
|
|
216
|
-
// @ts-ignore
|
|
217
238
|
newDevice.states.push(sceneSate);
|
|
218
239
|
}
|
|
219
240
|
|
|
@@ -222,6 +243,10 @@ class DeviceController {
|
|
|
222
243
|
this.groupCache.push(newDevice);
|
|
223
244
|
}
|
|
224
245
|
|
|
246
|
+
/**
|
|
247
|
+
*
|
|
248
|
+
* @param groupsMessage
|
|
249
|
+
*/
|
|
225
250
|
async createGroupDefinitions(groupsMessage) {
|
|
226
251
|
utils.clearArray(this.groupCache);
|
|
227
252
|
for (const groupMessage of groupsMessage) {
|
|
@@ -232,6 +257,9 @@ class DeviceController {
|
|
|
232
257
|
}
|
|
233
258
|
}
|
|
234
259
|
|
|
260
|
+
/**
|
|
261
|
+
*
|
|
262
|
+
*/
|
|
235
263
|
async createOrUpdateDevices() {
|
|
236
264
|
for (const device of this.groupCache.concat(this.deviceCache)) {
|
|
237
265
|
let deviceName = await this.getDeviceName(device);
|
|
@@ -278,9 +306,7 @@ class DeviceController {
|
|
|
278
306
|
// Only the onlineId is set if the device is not disabled
|
|
279
307
|
else {
|
|
280
308
|
deviceObj.common.statusStates.onlineId = `${this.adapter.name}.${this.adapter.instance}.${device.ieee_address}.available`;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
//@ts-ignore
|
|
309
|
+
}
|
|
284
310
|
await this.adapter.extendObjectAsync(device.ieee_address, deviceObj);
|
|
285
311
|
this.createCache[device.ieee_address] = { name: deviceName, description: description };
|
|
286
312
|
}
|
|
@@ -313,6 +339,10 @@ class DeviceController {
|
|
|
313
339
|
}
|
|
314
340
|
}
|
|
315
341
|
|
|
342
|
+
/**
|
|
343
|
+
*
|
|
344
|
+
* @param messageObj
|
|
345
|
+
*/
|
|
316
346
|
async renameDeviceInCache(messageObj) {
|
|
317
347
|
const renamedDevice = this.groupCache
|
|
318
348
|
.concat(this.deviceCache)
|
|
@@ -322,6 +352,9 @@ class DeviceController {
|
|
|
322
352
|
}
|
|
323
353
|
}
|
|
324
354
|
|
|
355
|
+
/**
|
|
356
|
+
*
|
|
357
|
+
*/
|
|
325
358
|
async checkAndProgressDeviceRemove() {
|
|
326
359
|
let description = '';
|
|
327
360
|
let deviceName = '';
|
|
@@ -359,6 +392,11 @@ class DeviceController {
|
|
|
359
392
|
}
|
|
360
393
|
}
|
|
361
394
|
|
|
395
|
+
/**
|
|
396
|
+
*
|
|
397
|
+
* @param devices
|
|
398
|
+
* @param ieee_address
|
|
399
|
+
*/
|
|
362
400
|
removeDeviceByIeee(devices, ieee_address) {
|
|
363
401
|
const idx = devices.findIndex((x) => x.ieee_address == ieee_address);
|
|
364
402
|
if (idx > -1) {
|
|
@@ -366,6 +404,10 @@ class DeviceController {
|
|
|
366
404
|
}
|
|
367
405
|
}
|
|
368
406
|
|
|
407
|
+
/**
|
|
408
|
+
*
|
|
409
|
+
* @param state
|
|
410
|
+
*/
|
|
369
411
|
async copyAndCleanStateObj(state) {
|
|
370
412
|
const iobState = { ...state };
|
|
371
413
|
const blacklistedKeys = [
|
|
@@ -387,14 +429,26 @@ class DeviceController {
|
|
|
387
429
|
return iobState;
|
|
388
430
|
}
|
|
389
431
|
|
|
432
|
+
/**
|
|
433
|
+
*
|
|
434
|
+
* @param device
|
|
435
|
+
*/
|
|
390
436
|
getDeviceName(device) {
|
|
391
437
|
return device.id == device.ieee_address ? '' : device.id;
|
|
392
438
|
}
|
|
393
439
|
|
|
440
|
+
/**
|
|
441
|
+
*
|
|
442
|
+
* @param device
|
|
443
|
+
*/
|
|
394
444
|
getDeviceDescription(device) {
|
|
395
445
|
return device.description ? device.description : '';
|
|
396
446
|
}
|
|
397
447
|
|
|
448
|
+
/**
|
|
449
|
+
*
|
|
450
|
+
* @param payload
|
|
451
|
+
*/
|
|
398
452
|
processCoordinatorCheck(payload) {
|
|
399
453
|
if (payload && payload.data && payload.data.missing_routers) {
|
|
400
454
|
const missingRoutersCount = payload.data.missing_routers.length;
|