iobroker.zigbee 1.6.15 → 1.6.18
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 +7 -26
- package/admin/admin.js +1 -1
- package/admin/index_m.html +8 -5
- package/admin/tab_m.html +1 -1
- package/admin/words.js +2 -1
- package/io-package.json +31 -7
- package/lib/commands.js +1 -1
- package/lib/devices.js +14 -13
- package/lib/exposes.js +11 -3
- package/lib/states.js +9 -0
- package/lib/zbBaseExtension.js +5 -1
- package/lib/zbDeviceAvailability.js +3 -0
- package/main.js +48 -3
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -126,14 +126,19 @@ You can thank the authors by these links:
|
|
|
126
126
|
npm run release patch -- --all 0.9.8 -> 0.9.9
|
|
127
127
|
npm run release prerelease beta -- --all v0.2.1 -> v0.2.2-beta.0
|
|
128
128
|
Placeholder for the next version (at the beginning of the line):
|
|
129
|
-
|
|
129
|
+
|
|
130
130
|
-->
|
|
131
131
|
|
|
132
|
+
|
|
132
133
|
## Changelog
|
|
134
|
+
### 1.6.16 (2022-02-16)
|
|
135
|
+
* (arteck) admin dep fix
|
|
136
|
+
* (arteck) colored objects for online/offline state
|
|
137
|
+
|
|
133
138
|
|
|
134
139
|
### 1.6.15 (2022-02-08)
|
|
135
140
|
* (arteck) Battery status % calculation was changed for xiaomi devices
|
|
136
|
-
|
|
141
|
+
|
|
137
142
|
|
|
138
143
|
### 1.6.14 (2022-01)
|
|
139
144
|
* (asgothian) OTA limitation
|
|
@@ -159,12 +164,10 @@ You can thank the authors by these links:
|
|
|
159
164
|
|
|
160
165
|
* (kirovilya) update to Zigbee-Herdsman 0.14
|
|
161
166
|
|
|
162
|
-
|
|
163
167
|
### 1.6.12 (2022-01)
|
|
164
168
|
* (asgothian) Groups were newly revised (read [here](https://github.com/ioBroker/ioBroker.zigbee/pull/1327) )
|
|
165
169
|
- object device.groups is obsolet..the old one is no longer up to date
|
|
166
170
|
|
|
167
|
-
|
|
168
171
|
### 1.6.9 (2021-12)
|
|
169
172
|
* (simatec) fix admin Dark-Mode
|
|
170
173
|
* (asgothian) Expose Access Handling
|
|
@@ -176,21 +179,6 @@ You can thank the authors by these links:
|
|
|
176
179
|
* (kirovilya) herdsman compatibility
|
|
177
180
|
|
|
178
181
|
### 1.6.0 (2021-08-09)
|
|
179
|
-
## Attention! Attention! Attention! Attention! Attention! Attention! Attention!
|
|
180
|
-
|
|
181
|
-
After introducing a new z-stack startup procedure into zigbee-herdsman, we got some problems with our adapter in version 1.5.6.
|
|
182
|
-
This was discussed [here](https://github.com/ioBroker/ioBroker.zigbee/issues/1110) and [here](https://github.com/Koenkk/zigbee-herdsman/issues/376)
|
|
183
|
-
|
|
184
|
-
Unfortunately, not all user sticks were able to work successfully with this new init routine. This mainly affected the TI cc2538 based sticks with the 2019 year's firmware. All subsequent firmwares and sticks have no problems when starting the adapter or they can be fixed.
|
|
185
|
-
|
|
186
|
-
At the moment, there is no working solution to this problem, except for updating the firmware of such sticks to a newer one.
|
|
187
|
-
As a fallback, it is proposed to use the old version of zigbee-herdsman 0.13.93, but some of the devices and functionality may not work.
|
|
188
|
-
Therefore, we made a separate version 1.6.0o especially for this case. It can be installed from github at https://github.com/ioBroker/ioBroker.zigbee/tarball/old_herdsman
|
|
189
|
-
|
|
190
|
-
* Update to latest zigbee-herdsman and zigbee-herdsman-converters
|
|
191
|
-
* (PeterVoronov) Update support composite exposes
|
|
192
|
-
* (kirovilya) UI fixes
|
|
193
|
-
* (kirovilya) Sentry support
|
|
194
182
|
|
|
195
183
|
### 1.5.6 (2021-05-26)
|
|
196
184
|
* (kirovilya) new UI add
|
|
@@ -205,13 +193,11 @@ Therefore, we made a separate version 1.6.0o especially for this case. It can be
|
|
|
205
193
|
### 1.5.2 (2021-04-29)
|
|
206
194
|
* (asgothian) Groups on dashboard
|
|
207
195
|
|
|
208
|
-
|
|
209
196
|
### 1.5.1 (2021-04-14)
|
|
210
197
|
* (kirovilya) Dashboard
|
|
211
198
|
* (asgothian) Groups (reworked)
|
|
212
199
|
* [Experimental support EZSP protocol for EFR32 chips](https://github.com/Koenkk/zigbee-herdsman/issues/319) (zigbee-herdsman)
|
|
213
200
|
|
|
214
|
-
|
|
215
201
|
### 1.4.4 (2021-02-14)
|
|
216
202
|
* (kirovilya) External converters https://www.zigbee2mqtt.io/information/configuration.html#external-converters-configuration
|
|
217
203
|
* (asgothian) Enhancement ping process
|
|
@@ -219,7 +205,6 @@ Therefore, we made a separate version 1.6.0o especially for this case. It can be
|
|
|
219
205
|
* (asgothian) State Cleanup button
|
|
220
206
|
* (arteck) Setting to use exposes instead of internal device description
|
|
221
207
|
|
|
222
|
-
|
|
223
208
|
### 1.4.1 (2020-12)
|
|
224
209
|
* (o0shojo0o) added a kelvin posibility into colortemp
|
|
225
210
|
* (asgothian) Hue_calibration for exposed devices (Use requires PR on zigbee-herdsman-converters, PR is being worked on)
|
|
@@ -233,7 +218,6 @@ Therefore, we made a separate version 1.6.0o especially for this case. It can be
|
|
|
233
218
|
* (asgothian) change in OTA: Message that a device does not respond for OTA query downgraded to "info" from "error"
|
|
234
219
|
* (asgothian) new coordinator card
|
|
235
220
|
|
|
236
|
-
|
|
237
221
|
### 1.4.0 (2020-12)
|
|
238
222
|
* Many new devices available
|
|
239
223
|
|
|
@@ -327,7 +311,6 @@ New devices:
|
|
|
327
311
|
* (mar565) GUNNARP panel round
|
|
328
312
|
* (Erdnuss3003) 4090531P7
|
|
329
313
|
|
|
330
|
-
|
|
331
314
|
### 1.1.1 (2020-04-17)
|
|
332
315
|
* (kirovilya) Critical. Fixed error starting adapter if cc-chip was only flashed
|
|
333
316
|
* (kirovilya) Nue/3A FNB56-ZSW02LX2.0
|
|
@@ -418,8 +401,6 @@ new Zigbee-herdsman features:
|
|
|
418
401
|
* Some design update
|
|
419
402
|
* Binding
|
|
420
403
|
|
|
421
|
-
|
|
422
|
-
|
|
423
404
|
## License
|
|
424
405
|
The MIT License (MIT)
|
|
425
406
|
|
package/admin/admin.js
CHANGED
|
@@ -31,7 +31,7 @@ const updateCardInterval = setInterval(updateCardTimer, 6000);
|
|
|
31
31
|
|
|
32
32
|
const savedSettings = [
|
|
33
33
|
'port', 'panID', 'channel', 'disableLed', 'countDown', 'groups', 'extPanID', 'precfgkey', 'transmitPower',
|
|
34
|
-
'adapterType', 'debugHerdsman', 'disablePing', 'external', 'startWithInconsistent',
|
|
34
|
+
'adapterType', 'debugHerdsman', 'colorize', 'disablePing', 'external', 'startWithInconsistent',
|
|
35
35
|
];
|
|
36
36
|
|
|
37
37
|
function getDeviceByID(ID) {
|
package/admin/index_m.html
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
<script type="text/javascript" src="../../js/adapter-settings.js"></script>
|
|
18
18
|
<script type="text/javascript" src="words.js"></script>
|
|
19
19
|
|
|
20
|
+
|
|
20
21
|
<script type="text/javascript" src="admin.js"></script>
|
|
21
22
|
<script type="text/javascript" src="shuffle.min.js"></script>
|
|
22
23
|
<script type="text/javascript" src="moment.min.js"></script>
|
|
@@ -55,11 +56,9 @@
|
|
|
55
56
|
top: 0px;
|
|
56
57
|
right: 0px;
|
|
57
58
|
}
|
|
58
|
-
|
|
59
59
|
.input-field.suffix a.active {
|
|
60
60
|
color: #26a69a;
|
|
61
61
|
}
|
|
62
|
-
|
|
63
62
|
.input-field.suffix .select-wrapper {
|
|
64
63
|
margin-right: 3rem;
|
|
65
64
|
width: 92%;
|
|
@@ -576,10 +575,14 @@
|
|
|
576
575
|
<label class="translate" for="disablePing">Disable active availability check</label>
|
|
577
576
|
</div>
|
|
578
577
|
|
|
579
|
-
<div class="input-field col s12 m6 l4 col-
|
|
578
|
+
<div class="input-field col s12 m6 l4 col-debugHerdsman">
|
|
580
579
|
<input id="debugHerdsman" type="checkbox" class="value" />
|
|
581
580
|
<label class="translate" for="debugHerdsman">Zigbee-herdsman debug info</label>
|
|
582
581
|
</div>
|
|
582
|
+
<div class="input-field col s12 m6 l4 col-colorize">
|
|
583
|
+
<input id="colorize" type="checkbox" class="value" />
|
|
584
|
+
<label class="translate" for="colorize">color available state</label>
|
|
585
|
+
</div>
|
|
583
586
|
<div class="input-field col s12 m6 l6">
|
|
584
587
|
<a id="reset-btn" class="waves-effect waves-light white-text btn-large translate">Reset...</a>
|
|
585
588
|
</div>
|
|
@@ -591,7 +594,7 @@
|
|
|
591
594
|
<label class="translate" for="external">Paths to files, semicolon (;) splitted</label>
|
|
592
595
|
</div>
|
|
593
596
|
</div>
|
|
594
|
-
<div class="input-field col s12 m12 l12 col-
|
|
597
|
+
<div class="input-field col s12 m12 l12 col-startWithInconsistent">
|
|
595
598
|
<input id="startWithInconsistent" type="checkbox" class="value" />
|
|
596
599
|
<label class="translate" for="startWithInconsistent">SettingsExclude</label>
|
|
597
600
|
</div>
|
|
@@ -1067,7 +1070,7 @@
|
|
|
1067
1070
|
<div class="row">
|
|
1068
1071
|
<div class="col s9 input-field">
|
|
1069
1072
|
<input id="unbind_from_coordinator" type="checkbox" class="value" />
|
|
1070
|
-
<label class="translate" for="unbind_from_coordinator">Unbind remote from
|
|
1073
|
+
<label class="translate" for="unbind_from_coordinator">Unbind remote from Coordinator (necessary for some remotes like HUE Dimmer Switch)</label>
|
|
1071
1074
|
</div>
|
|
1072
1075
|
</div>
|
|
1073
1076
|
</div>
|
package/admin/tab_m.html
CHANGED
|
@@ -868,7 +868,7 @@
|
|
|
868
868
|
<div class="col s9 input-field">
|
|
869
869
|
<label>
|
|
870
870
|
<input id="unbind_from_coordinator" type="checkbox" class="value" />
|
|
871
|
-
<span class="translate" for="unbind_from_coordinator">Unbind remote from
|
|
871
|
+
<span class="translate" for="unbind_from_coordinator">Unbind remote from Coordinator (necessary for some remotes like HUE Dimmer Switch)</span>
|
|
872
872
|
</label>
|
|
873
873
|
</div>
|
|
874
874
|
</div>
|
package/admin/words.js
CHANGED
|
@@ -87,7 +87,7 @@ systemDictionary = {
|
|
|
87
87
|
"Transport Key Text": { "en": "Transport Key is the network encryption key. Please choose a random key sequence <b>before</b> you pair your devices. Just enter 32 random hex character (a-f and 0-9). If you change the key later, you will have to repair your devices.", "de": "Transportschlüssel ist der Netzwerkverschlüsselungsschlüssel. Bitte wähle eine zufällige Schlüsselsequenz <b>bevor</b> du Geräte koppelst. Gib einfach 32 zufällige Hex-Zeichen ein (a-f und 0-9). Wenn du den Schlüssel später änderst, musst du alle Geräte neu koppeln.", "ru": "Транспортный ключ - это сетевой ключ шифрования. Пожалуйста, выберите случайную последовательность <b>перед</b> подключением устройств. Просто введите 32 случайных шестнадцатеричных символа (a-f и 0-9). Если вы поменяете ключ позже, вам придется снова спаривать свои устройства.", "pt": "Chave de transporte é a chave de criptografia da rede. ", "nl": "Transportsleutel is de netwerkversleutelingssleutel. Kies een willekeurige toetsenreeks <b> voordat </b> u uw apparaten koppelt. Voer gewoon 32 willekeurige hexadecimale tekens in (a-f en 0-9). Als u de sleutel later wijzigt, moet u alle apparaten opnieuw aanleren.", "fr": "La clé de transport est la clé de chiffrement du réseau. Choisissez s.v.p. une chaîne <b>avant</b> de coupler vos dispositifs. Entrez simplement 32 caractères hexadécimaux aléatoires (a-f et 0-9). Si vous changez la clé plus tard, vous devez re-coupler vos dispositifs.", "it": "La chiave di trasporto è la chiave di crittografia della rete. ", "es": "Transport Key es la clave de cifrado de red. ", "pl": "Klucz transportowy to sieciowy klucz szyfrowania.", "zh-cn": "传输密钥是网络加密密钥。"},
|
|
88
88
|
"Transport Key": { "en": "Transport Key", "de": "Transportschlüssel", "ru": "Транспортный ключ", "pt": "Chave de transporte", "nl": "Transport sleutel", "fr": "Clé de transport", "it": "Chiave di trasporto", "es": "Transporte clave", "pl": "Klucz transportowy", "zh-cn": "运输钥匙"},
|
|
89
89
|
"Type": { "en": "Type", "de": "Typ", "ru": "Тип", "pt": "Tipo", "nl": "Type", "fr": "Type", "it": "genere", "es": "Tipo", "pl": "Rodzaj", "zh-cn": "类型"},
|
|
90
|
-
"Unbind remote from
|
|
90
|
+
"Unbind remote from Coordinator (necessary for some remotes like HUE Dimmer Switch)": {"en": "Unbind remote from coordinator (necessary for some remotes like HUE Dimmer Switch)", "de": "Entkoppele die Fernbedienung vom Koordinator (erforderlich für einige Fernbedienungen wie HUE Dimmer Switch)", "ru": "Отсоедините пульт от Coordinator (необходим для некоторых пультов, таких как HUE Dimmer Switch)", "pt": "Desconecte o controle remoto do Coordinator (necessário para alguns controles remotos, como o HUE Dimmer Switch)", "nl": "Ontkoppel afstandsbediening van Coordinator (noodzakelijk voor sommige afstandsbedieningen zoals HUE Dimmer Switch)", "fr": "Dissocier la télécommande de coordination (nécessaire pour certaines télécommandes comme HUE Dimmer Switch)", "it": "Sblocca il telecomando da Coordinator (necessario per alcuni telecomandi come HUE Dimmer Switch)", "es": "Desvincule el control remoto del Coordinador (necesario para algunos controles remotos como HUE Dimmer Switch)", "pl": "Odłącz pilota od Coordinatora (niezbędny do niektórych pilotów, takich jak HUE Dimmer Switch)", "zh-cn": "从Coordinator取消绑定遥控器(对于某些遥控器,例如HUE Dimmer Switch,这是必需的)"},
|
|
91
91
|
"View config": { "en": "View config", "de": "Konfiguration anzeigen", "ru": "Посмотреть конфигурацию", "pt": "Ver configuração", "nl": "Bekijk configuratie", "fr": "Afficher la configuration", "it": "Visualizza config", "es": "Ver configuración", "pl": "Wyświetl config", "zh-cn": "查看配置"},
|
|
92
92
|
"Waiting": { "en": "Waiting", "de": "Warten", "ru": "Ожидание", "pt": "Esperando", "nl": "Wachtende", "fr": "Attendre", "it": "In attesa", "es": "Esperando", "pl": "Czekaj", "zh-cn": "等候"},
|
|
93
93
|
"Write Attribute": { "en": "Write attribute", "de": "Attribut schreiben", "ru": "Запись атрибута", "pt": "Gravar Atributo", "nl": "Schrijf attribuut", "fr": "Ecrire attribut", "it": "Scrivi attributo", "es": "Escribir atributo", "pl": "Napisz atrybut", "zh-cn": "写属性"},
|
|
@@ -105,4 +105,5 @@ systemDictionary = {
|
|
|
105
105
|
"Excludes": { "en": "to exclude", "de": "ausschließen", "ru": "Исключить", "pl": "wyklucz"},
|
|
106
106
|
"ExcludeTextTranslation": { "en": "Here you can add some devices that should be excluded from our description. They only use \"exposes\" from zigbee-herdsman-converter. After adding, please restart the adapter.", "de": "Sie können hier einige Geräte hinzufügen, die von unserer Verarbeitungausgeschlossen werden sollten. Sie verwenden dann nur exposes vom ZigBee-Herdsman-Converter. Nach dem Hinzufügen starten Sie bitte den Adapter neu.", "ru": "Здесь вы можете добавить устройства, для которых надо исключить представление заданное адаптером (iobroker.zigbee). В этом случае они будут использовать \"exposes\" из zigbee-herdsman-converter. После добавления перезапустите адаптер.", "pl": "Możesz dodać tutaj kilka urządzeń, które powinny zostać wyłączone z naszego opisu. Używasz tylko ekspozycji z zigbee-herdsman-converter. Po dodaniu zrestartuj adapter"},
|
|
107
107
|
"SettingsExclude": { "en": "Force start adapter with inconsistent configuration (not recommended). Please update the adapter to compatible firmware and recreate your network as soon as possible.", "de": "Erzwingen Sie den Start des Adapters mit inkonsistenter Konfiguration (nicht empfohlen). Bitte aktualisieren Sie den Adapter auf kompatible Firmware und erstellen Sie Ihr Netzwerk so schnell wie möglich neu.", "pl": "Wystaruj Adapter bez zgodnej konfiguracji (uwaga). Zaktualizuj adapter i jak najszybciej odtwórz sieć."},
|
|
108
|
+
"color available state": { "en": "color available state", "de": "Farbe verfügbarer Zustand", "ru": "состояние доступности цвета", "pt": "estado de cor disponível", "nl": "kleur beschikbaar staat", "fr": "état de couleur disponible", "it": "stato disponibile colore", "es": "estado disponible del color", "pl": "kolor stanu", "zh-cn": "颜色可用状态"},
|
|
108
109
|
};
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "zigbee",
|
|
4
|
-
"version": "1.6.
|
|
4
|
+
"version": "1.6.18",
|
|
5
5
|
"news": {
|
|
6
|
+
"1.6.18": {
|
|
7
|
+
"de": "fix pairing mode",
|
|
8
|
+
"en": "fix pairing mode",
|
|
9
|
+
"ru": "fix pairing mode"
|
|
10
|
+
},
|
|
11
|
+
"1.6.16": {
|
|
12
|
+
"de": "admin dep fix",
|
|
13
|
+
"en": "admin dep fix",
|
|
14
|
+
"ru": "admin dep fix"
|
|
15
|
+
},
|
|
6
16
|
"1.6.15": {
|
|
7
17
|
"de": "Batterie Status wurde geändert",
|
|
8
18
|
"en": "Battery status was changed",
|
|
@@ -231,13 +241,15 @@
|
|
|
231
241
|
"dsn": "https://c829e2ad996d45d1bdb2247805699883@o831057.ingest.sentry.io/5812498"
|
|
232
242
|
}
|
|
233
243
|
},
|
|
244
|
+
"globalDependencies": [
|
|
245
|
+
{
|
|
246
|
+
"admin": ">=5.1.25"
|
|
247
|
+
}
|
|
248
|
+
],
|
|
234
249
|
"dependencies": [
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
{
|
|
239
|
-
"js-controller": ">=1.4.2"
|
|
240
|
-
}
|
|
250
|
+
{
|
|
251
|
+
"js-controller": ">=3.3.0"
|
|
252
|
+
}
|
|
241
253
|
]
|
|
242
254
|
},
|
|
243
255
|
"native": {
|
|
@@ -343,6 +355,18 @@
|
|
|
343
355
|
"def": ""
|
|
344
356
|
},
|
|
345
357
|
"native": {}
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"_id": "info.undefinedDevices",
|
|
361
|
+
"type": "state",
|
|
362
|
+
"common": {
|
|
363
|
+
"name": "Recorded undefined devices",
|
|
364
|
+
"type": "string",
|
|
365
|
+
"read": true,
|
|
366
|
+
"write": false,
|
|
367
|
+
"def": ""
|
|
368
|
+
},
|
|
369
|
+
"native": {}
|
|
346
370
|
}
|
|
347
371
|
]
|
|
348
372
|
}
|
package/lib/commands.js
CHANGED
|
@@ -5,7 +5,7 @@ const statesMapping = require('./devices');
|
|
|
5
5
|
const disallowedDashStates = [
|
|
6
6
|
'link_quality', 'available', 'battery', 'groups', 'device_query',
|
|
7
7
|
'hue_move', 'color_temp_move', 'satuation_move', 'brightness_move', 'brightness_step', 'hue_calibration',
|
|
8
|
-
'msg_from_zigbee',
|
|
8
|
+
'msg_from_zigbee','send_payload'
|
|
9
9
|
];
|
|
10
10
|
|
|
11
11
|
class Commands {
|
package/lib/devices.js
CHANGED
|
@@ -118,9 +118,9 @@ const sync = {
|
|
|
118
118
|
},
|
|
119
119
|
};
|
|
120
120
|
|
|
121
|
-
const lightStatesWithColortemp = [states.state, states.brightness, states.colortemp,states.brightness_move, states.transition_time];
|
|
122
|
-
const lightStatesWithColor = [states.state, states.brightness, states.colortemp, states.color,states.brightness_move, states.transition_time];
|
|
123
|
-
const lightStatesWithColor_hue = [states.state, states.brightness, states.colortemp, states.color,states.brightness_move, states.transition_time, states.effect_type_hue];
|
|
121
|
+
const lightStatesWithColortemp = [states.state, states.brightness, states.colortemp,states.brightness_move, states.colortemp_move, states.transition_time];
|
|
122
|
+
const lightStatesWithColor = [states.state, states.brightness, states.colortemp, states.color,states.brightness_move, states.colortemp_move, states.transition_time];
|
|
123
|
+
const lightStatesWithColor_hue = [states.state, states.brightness, states.colortemp, states.color,states.brightness_move, states.colortemp_move, states.hue_move, states.transition_time, states.effect_type_hue];
|
|
124
124
|
const lightStatesWithColorNoTemp = [states.state, states.brightness, states.color, states.brightness_move, states.transition_time];
|
|
125
125
|
const lightStates = [states.state, states.brightness, states.brightness_move, states.transition_time];
|
|
126
126
|
|
|
@@ -3043,29 +3043,29 @@ const devices = [
|
|
|
3043
3043
|
icon: 'img/ICZB-RM11S.png',
|
|
3044
3044
|
states: generator.icasa_remote,
|
|
3045
3045
|
},
|
|
3046
|
-
|
|
3047
|
-
/* images only for admin */
|
|
3046
|
+
|
|
3047
|
+
/* images only for admin */
|
|
3048
3048
|
{
|
|
3049
3049
|
models: ['E1812'],
|
|
3050
3050
|
icon: 'img/ikea_E1812.png',
|
|
3051
|
-
},
|
|
3052
|
-
{
|
|
3051
|
+
},
|
|
3052
|
+
{
|
|
3053
3053
|
models: ['WHD02'],
|
|
3054
3054
|
icon: 'img/WHD02.png',
|
|
3055
3055
|
},
|
|
3056
|
-
{
|
|
3056
|
+
{
|
|
3057
3057
|
models: ['R7060'],
|
|
3058
3058
|
icon: 'img/R7060.png',
|
|
3059
3059
|
},
|
|
3060
|
-
{
|
|
3060
|
+
{
|
|
3061
3061
|
models: ['929001821618'],
|
|
3062
3062
|
icon: 'img/philips_hue_ambiance.png',
|
|
3063
3063
|
},
|
|
3064
|
-
{
|
|
3064
|
+
{
|
|
3065
3065
|
models: ['14153905L'],
|
|
3066
3066
|
icon: 'img/14153905L.png',
|
|
3067
3067
|
},
|
|
3068
|
-
{
|
|
3068
|
+
{
|
|
3069
3069
|
models: ['HG06338'],
|
|
3070
3070
|
icon: 'img/HG06338.png',
|
|
3071
3071
|
},
|
|
@@ -3077,11 +3077,11 @@ const devices = [
|
|
|
3077
3077
|
models: ['TI0001-cover'],
|
|
3078
3078
|
icon: 'img/TI0001-cover.png',
|
|
3079
3079
|
},
|
|
3080
|
-
{
|
|
3080
|
+
{
|
|
3081
3081
|
models: ['E1603/E1702/E1708'],
|
|
3082
3082
|
icon: 'img/ikea_control_outlet.png',
|
|
3083
3083
|
},
|
|
3084
|
-
|
|
3084
|
+
|
|
3085
3085
|
];
|
|
3086
3086
|
|
|
3087
3087
|
const commonStates = [
|
|
@@ -3089,6 +3089,7 @@ const commonStates = [
|
|
|
3089
3089
|
states.available,
|
|
3090
3090
|
states.device_query,
|
|
3091
3091
|
states.from_zigbee,
|
|
3092
|
+
states.send_payload,
|
|
3092
3093
|
];
|
|
3093
3094
|
|
|
3094
3095
|
const groupStates = [states.brightness_step].concat(lightStatesWithColor);
|
package/lib/exposes.js
CHANGED
|
@@ -302,6 +302,7 @@ function createFromExposes(model, def) {
|
|
|
302
302
|
return {...options, transition: transitionTime};
|
|
303
303
|
},
|
|
304
304
|
epname: expose.endpoint,
|
|
305
|
+
setattr: 'color_temp',
|
|
305
306
|
}, prop.access);
|
|
306
307
|
pushToStates(statesDefs.colortemp_move, prop.access);
|
|
307
308
|
break;
|
|
@@ -585,6 +586,13 @@ function createFromExposes(model, def) {
|
|
|
585
586
|
case 'enum':
|
|
586
587
|
switch (expose.name) {
|
|
587
588
|
case 'action': {
|
|
589
|
+
|
|
590
|
+
// Ansatz:
|
|
591
|
+
|
|
592
|
+
// Action aufspalten in 2 Blöcke:
|
|
593
|
+
// Action (bekommt text ausser hold und release, auto reset nach 250 ms)
|
|
594
|
+
// Hold: wird gesetzt bei hold, gelöscht bei passendem Release
|
|
595
|
+
|
|
588
596
|
if (!Array.isArray(expose.values)) break;
|
|
589
597
|
const hasHold = expose.values.find((actionName) => actionName.includes('hold'));
|
|
590
598
|
const hasRelease = expose.values.find((actionName) => actionName.includes('release'));
|
|
@@ -772,7 +780,7 @@ function applyExposes(mappedDevices, byModel, allExcludesObj) {
|
|
|
772
780
|
const strippedModel = (deviceDef.model) ? deviceDef.model.replace(/\0.*$/g, '').trim() : '';
|
|
773
781
|
// check if device is mapped
|
|
774
782
|
const existsMap = byModel.get(strippedModel);
|
|
775
|
-
|
|
783
|
+
|
|
776
784
|
if ((deviceDef.hasOwnProperty('exposes') && (!existsMap || !existsMap.hasOwnProperty('states'))) || allExcludesStr.indexOf(strippedModel) > 0) {
|
|
777
785
|
try {
|
|
778
786
|
const newDevice = createFromExposes(strippedModel, deviceDef);
|
|
@@ -785,11 +793,11 @@ function applyExposes(mappedDevices, byModel, allExcludesObj) {
|
|
|
785
793
|
}
|
|
786
794
|
} catch (e) {
|
|
787
795
|
console.log(`Wrong expose devicedefinition ${deviceDef.vendor} ${deviceDef.model}` );
|
|
788
|
-
}
|
|
796
|
+
}
|
|
789
797
|
}
|
|
790
798
|
}
|
|
791
799
|
}
|
|
792
800
|
|
|
793
801
|
module.exports = {
|
|
794
802
|
applyExposes: applyExposes,
|
|
795
|
-
};
|
|
803
|
+
};
|
package/lib/states.js
CHANGED
|
@@ -113,6 +113,15 @@ const states = {
|
|
|
113
113
|
read: true,
|
|
114
114
|
type: 'string',
|
|
115
115
|
},
|
|
116
|
+
send_payload: {
|
|
117
|
+
id: 'send_payload',
|
|
118
|
+
name: 'Send to Device',
|
|
119
|
+
icon: undefined,
|
|
120
|
+
role: 'state',
|
|
121
|
+
write: true,
|
|
122
|
+
read: true,
|
|
123
|
+
type: 'string',
|
|
124
|
+
},
|
|
116
125
|
checking: { // press button for checking
|
|
117
126
|
id: 'checking',
|
|
118
127
|
name: 'Start checking process',
|
package/lib/zbBaseExtension.js
CHANGED
|
@@ -6,6 +6,7 @@ class BaseExtension {
|
|
|
6
6
|
constructor(zigbee, options) {
|
|
7
7
|
this.zigbee = zigbee;
|
|
8
8
|
this.name = 'BaseExtension';
|
|
9
|
+
this.elevate_debug = false;
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
info(message, data) {
|
|
@@ -21,7 +22,10 @@ class BaseExtension {
|
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
debug(message, data) {
|
|
24
|
-
|
|
25
|
+
if (this.elevate_debug)
|
|
26
|
+
this.zigbee.warn('DE ' + this.name + ':' + message, data);
|
|
27
|
+
else
|
|
28
|
+
this.zigbee.debug(this.name + ':' + message, data);
|
|
25
29
|
}
|
|
26
30
|
|
|
27
31
|
sendError(error, message) {
|
|
@@ -52,6 +52,7 @@ class DeviceAvailability extends BaseExtension {
|
|
|
52
52
|
this.startDevicePingTimeout = null; // handle for the timeout which empties the queue
|
|
53
53
|
this.startDevicePingDelay = 200; // 200 ms delay between starting the ping timeout
|
|
54
54
|
this.name = "DeviceAvailability";
|
|
55
|
+
this.elevate_debug = false;
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
setOptions(options) {
|
|
@@ -270,6 +271,8 @@ class DeviceAvailability extends BaseExtension {
|
|
|
270
271
|
this.zigbee.emit('publish', ieeeAddr.substr(2), entity.mapped.model, payload);
|
|
271
272
|
this.debug(`Publish LQ for ${ieeeAddr} = ${(available ? 10: 0)}`);
|
|
272
273
|
this.zigbee.emit('publish', ieeeAddr.substr(2), entity.mapped.model, { linkquality: (available ? 10: 0) });
|
|
274
|
+
|
|
275
|
+
this.zigbee.emit('deviceStatusUpdate', ieeeAddr.substr(2), available);
|
|
273
276
|
}
|
|
274
277
|
// if (!available) {
|
|
275
278
|
// this.debug(`Publish LQ for ${ieeeAddr} = 0`);
|
package/main.js
CHANGED
|
@@ -45,6 +45,8 @@ const E_DEBUG=2;
|
|
|
45
45
|
const E_WARN=3;
|
|
46
46
|
const E_ERROR=4;
|
|
47
47
|
|
|
48
|
+
let _pairingMode = false;
|
|
49
|
+
|
|
48
50
|
const errorCodes = {
|
|
49
51
|
9999: { severity:E_INFO, message:'No response'},
|
|
50
52
|
233: { severity:E_DEBUG, message:'MAC NO ACK'},
|
|
@@ -197,6 +199,7 @@ class Zigbee extends utils.Adapter {
|
|
|
197
199
|
this.zbController.on('event', this.onZigbeeEvent.bind(this));
|
|
198
200
|
this.zbController.on('msg', this.onZigbeeEvent.bind(this));
|
|
199
201
|
this.zbController.on('publish', this.publishToState.bind(this));
|
|
202
|
+
this.zbController.on('deviceStatusUpdate', this.onDeviceStatusUpdate.bind(this));
|
|
200
203
|
this.zbController.configure(zigbeeOptions);
|
|
201
204
|
await this.callPluginMethod('configure', [zigbeeOptions]);
|
|
202
205
|
|
|
@@ -507,6 +510,21 @@ class Zigbee extends utils.Adapter {
|
|
|
507
510
|
const stateDesc = changedState.stateDesc;
|
|
508
511
|
const value = changedState.value;
|
|
509
512
|
|
|
513
|
+
if (stateDesc.id == 'send_payload') {
|
|
514
|
+
try {
|
|
515
|
+
const json_value = JSON.parse(value);
|
|
516
|
+
const payload = { device:deviceId.replace('0x', ''), payload:json_value };
|
|
517
|
+
const result = await(this.SendPayload(payload));
|
|
518
|
+
if (result.hasOwnProperty('success') && result.success) {
|
|
519
|
+
this.acknowledgeState(deviceId, model, stateDesc, value);
|
|
520
|
+
}
|
|
521
|
+
} catch (error) {
|
|
522
|
+
this.log.warn(`send_payload: ${value} does not parse as JSON Object : ${error.message}`);
|
|
523
|
+
return;
|
|
524
|
+
}
|
|
525
|
+
return;
|
|
526
|
+
}
|
|
527
|
+
|
|
510
528
|
if (stateDesc.isOption) {
|
|
511
529
|
// acknowledge state with given value
|
|
512
530
|
this.acknowledgeState(deviceId, model, stateDesc, value);
|
|
@@ -530,6 +548,7 @@ class Zigbee extends utils.Adapter {
|
|
|
530
548
|
await converter.convertGet(entity.device.endpoints[0], ckey, {});
|
|
531
549
|
} catch (error) {
|
|
532
550
|
this.log.warn(`Failed to read state '${JSON.stringify(ckey)}'of '${entity.device.ieeeAddr}' after query with '${JSON.stringify(error)}'`);
|
|
551
|
+
|
|
533
552
|
}
|
|
534
553
|
}
|
|
535
554
|
}
|
|
@@ -615,8 +634,6 @@ class Zigbee extends utils.Adapter {
|
|
|
615
634
|
// not exposed as states. It serves as a wrapper function for "publishFromState" with
|
|
616
635
|
// extended parameter checking
|
|
617
636
|
//
|
|
618
|
-
// This function is NEVER called from within the adapter itself. The entire structure
|
|
619
|
-
// is built for end user use.
|
|
620
637
|
// The payload can either be a JSON object or the string representation of a JSON object
|
|
621
638
|
// The following keys are supported in the object:
|
|
622
639
|
// device: name of the device. For a device zigbee.0.0011223344556677 this would be 0011223344556677
|
|
@@ -643,7 +660,6 @@ class Zigbee extends utils.Adapter {
|
|
|
643
660
|
const isDevice = payload.device.indexOf('group_') == -1;
|
|
644
661
|
const stateList = [];
|
|
645
662
|
const devID = (isDevice ? `0x${payload.device}`:parseInt(payload.device.replace('group_', '')));
|
|
646
|
-
this.log.warn(`A ${payload.device} ${devID}`);
|
|
647
663
|
|
|
648
664
|
const entity = await this.zbController.resolveEntity(devID);
|
|
649
665
|
if (!entity) {
|
|
@@ -741,6 +757,33 @@ class Zigbee extends utils.Adapter {
|
|
|
741
757
|
}
|
|
742
758
|
}
|
|
743
759
|
}
|
|
760
|
+
async onDeviceStatusUpdate(deviceId, status) {
|
|
761
|
+
if (!deviceId) return;
|
|
762
|
+
|
|
763
|
+
this.log.debug(`onDeviceStatusUpdate: ${deviceId}: ${status}`);
|
|
764
|
+
|
|
765
|
+
if (_pairingMode) return;
|
|
766
|
+
|
|
767
|
+
try {
|
|
768
|
+
let colorIeee = '#46a100ff';
|
|
769
|
+
|
|
770
|
+
if (!status) {
|
|
771
|
+
colorIeee = '#ff0400ff'; // dev is offline
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
if (!this.config.colorize) {
|
|
775
|
+
colorIeee = null;
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
await this.extendObjectAsync(deviceId, {
|
|
779
|
+
common: {
|
|
780
|
+
color: colorIeee
|
|
781
|
+
}
|
|
782
|
+
});
|
|
783
|
+
} catch (e) {
|
|
784
|
+
this.log.error(e.toString());
|
|
785
|
+
}
|
|
786
|
+
}
|
|
744
787
|
|
|
745
788
|
/**
|
|
746
789
|
* @param {() => void} callback
|
|
@@ -821,10 +864,12 @@ class Zigbee extends utils.Adapter {
|
|
|
821
864
|
onPairing(message, data) {
|
|
822
865
|
if (Number.isInteger(data)) {
|
|
823
866
|
this.setState('info.pairingCountdown', data, true);
|
|
867
|
+
_pairingMode = true;
|
|
824
868
|
}
|
|
825
869
|
if (data === 0) {
|
|
826
870
|
// set pairing mode off
|
|
827
871
|
this.setState('info.pairingMode', false,true);
|
|
872
|
+
_pairingMode = false;
|
|
828
873
|
}
|
|
829
874
|
if (data) {
|
|
830
875
|
this.logToPairing(`${message}: ${data.toString()}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iobroker.zigbee",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.18",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "Kirov Ilya",
|
|
6
6
|
"email": "kirovilya@gmail.com"
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"node": ">=10"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"zigbee-herdsman": "0.14.
|
|
22
|
-
"zigbee-herdsman-converters": "14.0.
|
|
21
|
+
"zigbee-herdsman": "0.14.26",
|
|
22
|
+
"zigbee-herdsman-converters": "14.0.494",
|
|
23
23
|
"@iobroker/adapter-core": "^2.4.0",
|
|
24
24
|
"tar": "^6.0.5",
|
|
25
25
|
"typescript": "^4.0.5"
|