iobroker.zigbee2mqtt 2.8.0 → 2.9.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 +5 -1
- package/io-package.json +14 -14
- package/lib/exposes.js +1 -0
- package/lib/states.js +11 -9
- package/lib/z2mController.js +13 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -32,9 +32,13 @@ This adapter allows to control the data points of the devices of a Zigbee2MQTT i
|
|
|
32
32
|
Placeholder for the next version (at the beginning of the line):
|
|
33
33
|
### **WORK IN PROGRESS**
|
|
34
34
|
-->
|
|
35
|
+
### 2.9.0 (2023-07-21)
|
|
36
|
+
|
|
37
|
+
- (o0shojo0o) added state `send_payload` to send a raw json payload
|
|
38
|
+
|
|
35
39
|
### 2.8.0 (2023-07-19)
|
|
36
40
|
|
|
37
|
-
- (o0shojo0o) added WSS support for websoket connection([#191](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/191))
|
|
41
|
+
- (o0shojo0o) added WSS support for websoket connection ([#191](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/191))
|
|
38
42
|
- (o0shojo0o) small fixes
|
|
39
43
|
|
|
40
44
|
### 2.7.5 (2023-04-08)
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "zigbee2mqtt",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.9.0",
|
|
5
5
|
"news": {
|
|
6
|
+
"2.9.0": {
|
|
7
|
+
"en": "added state `send_payload` to send a raw json payload",
|
|
8
|
+
"de": "add state send_payload to send a roh json payload",
|
|
9
|
+
"ru": "добавленное государство send_payload для отправки сырья json payload",
|
|
10
|
+
"pt": "adicionado estado send_payload para enviar uma carga de json cru",
|
|
11
|
+
"nl": "vertaling:",
|
|
12
|
+
"fr": "add state send_payload pour envoyer une charge utile json brute",
|
|
13
|
+
"it": "aggiunto stato send_payload per inviare un grezzo json payload",
|
|
14
|
+
"es": "añadir estado send_payload para enviar una carga de pago json cruda",
|
|
15
|
+
"pl": "wtedy dodane państwo przesyłają ładunek surowy json",
|
|
16
|
+
"uk": "додано державне відправлення_payload для відправки сировини json",
|
|
17
|
+
"zh-cn": "增派国家派遣国:缴交会费"
|
|
18
|
+
},
|
|
6
19
|
"2.8.0": {
|
|
7
20
|
"en": "added WSS support for websoket connection([#191](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/191))\nsmall fixes",
|
|
8
21
|
"de": "wSS-Unterstützung für Websoket-Verbindung([#191](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/191)\nkleine fixierungen",
|
|
@@ -80,19 +93,6 @@
|
|
|
80
93
|
"pl": "dodać opcję do opisu folder\nużywanie iobrokerowego opisu danych dla opisu urządzenia lub zdarzeń",
|
|
81
94
|
"uk": "доданий варіант для опису папок\nвикористовувати опис папки іоброкера для опису пристрою або подій",
|
|
82
95
|
"zh-cn": "增加使用时说明的选择\n对装置说明或事件使用零散器装置的描述"
|
|
83
|
-
},
|
|
84
|
-
"2.7.0": {
|
|
85
|
-
"en": "added support for wildcard actions (eg. *_single) ([#116](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/116))\nadded error handling optimizations ([more](https://github.com/ioBroker/ioBroker.repositories/pull/1976#issuecomment-1382038679))\nadded option `auth_token` for websocket connection ([#112](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/112))\nwebsocket timeout increased",
|
|
86
|
-
"de": "unterstützung für Wildcard-Aktionen (z.B. *_single) [#116](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/116)\nfehlerbehandlungsoptimierungen [mehr](https://github.com/ioBroker/ioBroker.repositories/pull/1976#issuecomment-1382038679)\nzusatzoption auth_token für Websocket-Verbindung [#112](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/112)\nwebsocket timeout erhöht",
|
|
87
|
-
"ru": "добавлена поддержка действий дикой карты (например *_один) [#116](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/116)\nдобавлены оптимизации обработки ошибок [more](https://github.com/ioBroker/ioBroker.repositories/pull/1976#issuecomment-1382038679)\nдобавлена опция auth_token для подключения к сети [#112](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/112)\ntimeout websocket увеличился",
|
|
88
|
-
"pt": "apoio adicional para ações curingas (por exemplo: *_single) [#116](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/116)\notimizações adicionais de manuseio de erros [mais](https://github.com/ioBroker/ioBroker.repositories/pull/1976#comment-1382038679)\nadicionado opção auth_token para conexão websocket [#112](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/112)\ntimeout do websocket aumentou",
|
|
89
|
-
"nl": "voegde ondersteuning toe voor wilde kaarten\nerror toegevoegd aan het omgaan met optimisaties / 1976 #isscombentub.comioBroker /ioBroker / iProker / 1976 3896 389\nvoegde optie toegevoegd voor websocket connectie [Ghtub.com/oshoo/ioBroker\nwebsocket time-out verhoogd",
|
|
90
|
-
"fr": "ajout d ' un appui aux actions de wildcard (par exemple *_single) [#116](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/116)\noptimisation de la gestion des erreurs [plus](https://github.com/ioBroker/ioBroker.repositories/pull/1976#issuecomment-1382038679)\noption ajoutée auth_token for websocket connection [#112](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/112)\nwebsocket timeout augmenté",
|
|
91
|
-
"it": "[#116](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/116)\n[continua](https://github.com/ioBroker/ioBroker.repositories/pull/1976#issuecomment-1382038679)\nopzione aggiunta auth_token per collegamento websocket [#112](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/112)\nwebsocket timeout aumentato",
|
|
92
|
-
"es": "[#116](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/116)\n[más](https://github.com/ioBroker/ioBroker.repositories/pull/1976#issuecomment-1382038679)\nañadida la opción auth_token para la conexión websocket [#112](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/112)\ntiempo de websocket aumentó",
|
|
93
|
-
"pl": "dodano wsparcie dla działań na rzecz dzikich kart (eg. *_single) #116(https:/github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/116)\ndodano optymalizację błędów (https:/github.com/ioBroker/ioBroker.repositories/pull/1976#issuecomment-1382038679)\nauth_token for websocket connection #112(https:/github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/112)\nczas dostępu do stron internetowych wzrastał",
|
|
94
|
-
"uk": "додана підтримка дій дикої картки (наприклад, *_single) [#116](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/116)\nдодано оптимізацію обробки помилок [більше](https://github.com/ioBroker/ioBroker.repositories/pull/1976#productcomment-1382038679)\nдодано опцію auth_token для підключення websocket [#112](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/112)\nwebsocket час",
|
|
95
|
-
"zh-cn": "对野生卡行动(第 *_single)[第116](http://github.com/oshojo0o/ioBroker.zigbee2mqt/issues/116))的支持\n新增的错误处理优化[(http://github.com/ioBroker/ioBroker.reories/pull/1976#issuement-1382038679)\n添加以下选择:网站联系(第112号)(http://github.com/oshojo0o/ioBroker.zigbee2mqt/issues/112)\n网页"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"titleLang": {
|
package/lib/exposes.js
CHANGED
|
@@ -1033,6 +1033,7 @@ function createDeviceFromExposes(devicesMessag, config) {
|
|
|
1033
1033
|
// Add default states
|
|
1034
1034
|
pushToStates(statesDefs.available, z2mAccess.STATE);
|
|
1035
1035
|
pushToStates(statesDefs.last_seen, z2mAccess.STATE);
|
|
1036
|
+
pushToStates(statesDefs.send_payload, z2mAccess.SET);
|
|
1036
1037
|
|
|
1037
1038
|
// Create buttons for scenes
|
|
1038
1039
|
for (const scene of scenes) {
|
package/lib/states.js
CHANGED
|
@@ -221,6 +221,17 @@ const states = {
|
|
|
221
221
|
isOption: true
|
|
222
222
|
},
|
|
223
223
|
|
|
224
|
+
send_payload: {
|
|
225
|
+
id: 'send_payload',
|
|
226
|
+
name: 'Send a raw json payload',
|
|
227
|
+
icon: undefined,
|
|
228
|
+
role: 'json',
|
|
229
|
+
write: true,
|
|
230
|
+
read: false,
|
|
231
|
+
type: 'string',
|
|
232
|
+
def: '{}',
|
|
233
|
+
},
|
|
234
|
+
|
|
224
235
|
//#################################################################
|
|
225
236
|
device_query: { // button to trigger device read
|
|
226
237
|
id: 'device_query',
|
|
@@ -242,15 +253,6 @@ const states = {
|
|
|
242
253
|
read: true,
|
|
243
254
|
type: 'string',
|
|
244
255
|
},
|
|
245
|
-
send_payload: {
|
|
246
|
-
id: 'send_payload',
|
|
247
|
-
name: 'Send to Device',
|
|
248
|
-
icon: undefined,
|
|
249
|
-
role: 'state',
|
|
250
|
-
write: true,
|
|
251
|
-
read: true,
|
|
252
|
-
type: 'string',
|
|
253
|
-
},
|
|
254
256
|
checking: { // press button for checking
|
|
255
257
|
id: 'checking',
|
|
256
258
|
name: 'Start checking process',
|
package/lib/z2mController.js
CHANGED
|
@@ -47,6 +47,19 @@ class Z2mController {
|
|
|
47
47
|
topic: `${device.id}/set`
|
|
48
48
|
};
|
|
49
49
|
|
|
50
|
+
if (stateID == 'send_payload') {
|
|
51
|
+
try {
|
|
52
|
+
controlObj.payload = JSON.parse(stateVal);
|
|
53
|
+
this.adapter.setState(id, state, true);
|
|
54
|
+
}
|
|
55
|
+
catch (error) {
|
|
56
|
+
controlObj.payload = stateVal.replaceAll(' ', '').replaceAll('\n', '');
|
|
57
|
+
this.adapter.log.warn(`${device.ieee_address} state: ${stateID} error: value passed is not a valid JSON`);
|
|
58
|
+
this.adapter.log.debug(`${device.ieee_address} states: ${JSON.stringify(controlObj)} error: ${error}`);
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
50
63
|
// if available read option and set payload
|
|
51
64
|
if (deviceState.options) {
|
|
52
65
|
for (const option of deviceState.options) {
|