iobroker.zigbee 1.6.17 → 1.7.1
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 +70 -60
- package/admin/admin.js +2 -2
- package/admin/img/philips_ensis.png +0 -0
- package/admin/index_m.html +7 -7
- package/admin/vis-network.min.css +1 -1
- package/admin/vis-network.min.js +7 -6
- package/admin/words.js +8 -5
- package/io-package.json +85 -122
- package/lib/backup.js +62 -24
- package/lib/exposes.js +4 -2
- package/lib/statescontroller.js +35 -4
- package/lib/zbDeviceAvailability.js +0 -6
- package/main.js +6 -27
- package/package.json +77 -77
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,7 +199,6 @@ 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));
|
|
200
|
-
this.zbController.on('deviceStatusUpdate', this.onDeviceStatusUpdate.bind(this));
|
|
201
202
|
this.zbController.configure(zigbeeOptions);
|
|
202
203
|
await this.callPluginMethod('configure', [zigbeeOptions]);
|
|
203
204
|
|
|
@@ -755,32 +756,7 @@ class Zigbee extends utils.Adapter {
|
|
|
755
756
|
}
|
|
756
757
|
}
|
|
757
758
|
}
|
|
758
|
-
|
|
759
|
-
if (!deviceId) return;
|
|
760
|
-
|
|
761
|
-
this.log.debug(`onDeviceStatusUpdate: ${deviceId}: ${status}`);
|
|
762
|
-
|
|
763
|
-
try {
|
|
764
|
-
let colorIeee = '#46a100ff';
|
|
765
|
-
|
|
766
|
-
if (!status) {
|
|
767
|
-
colorIeee = '#ff0400ff'; // dev is offline
|
|
768
|
-
}
|
|
769
|
-
|
|
770
|
-
if (!this.config.colorize) {
|
|
771
|
-
colorIeee = null;
|
|
772
|
-
}
|
|
773
|
-
|
|
774
|
-
await this.extendObjectAsync(deviceId, {
|
|
775
|
-
common: {
|
|
776
|
-
color: colorIeee
|
|
777
|
-
}
|
|
778
|
-
});
|
|
779
|
-
} catch (e) {
|
|
780
|
-
this.log.error(e.toString());
|
|
781
|
-
}
|
|
782
|
-
}
|
|
783
|
-
|
|
759
|
+
|
|
784
760
|
/**
|
|
785
761
|
* @param {() => void} callback
|
|
786
762
|
*/
|
|
@@ -852,6 +828,7 @@ class Zigbee extends utils.Adapter {
|
|
|
852
828
|
disableLed: this.config.disableLed,
|
|
853
829
|
disablePing: this.config.disablePing,
|
|
854
830
|
transmitPower: this.config.transmitPower,
|
|
831
|
+
disableBackup: this.config.disableBackup,
|
|
855
832
|
extPanIdFix: extPanIdFix,
|
|
856
833
|
startWithInconsistent: this.config.startWithInconsistent || false,
|
|
857
834
|
};
|
|
@@ -860,10 +837,12 @@ class Zigbee extends utils.Adapter {
|
|
|
860
837
|
onPairing(message, data) {
|
|
861
838
|
if (Number.isInteger(data)) {
|
|
862
839
|
this.setState('info.pairingCountdown', data, true);
|
|
840
|
+
_pairingMode = true;
|
|
863
841
|
}
|
|
864
842
|
if (data === 0) {
|
|
865
843
|
// set pairing mode off
|
|
866
844
|
this.setState('info.pairingMode', false,true);
|
|
845
|
+
_pairingMode = false;
|
|
867
846
|
}
|
|
868
847
|
if (data) {
|
|
869
848
|
this.logToPairing(`${message}: ${data.toString()}`);
|
package/package.json
CHANGED
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "iobroker.zigbee",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"author": {
|
|
5
|
-
"name": "Kirov Ilya",
|
|
6
|
-
"email": "kirovilya@gmail.com"
|
|
7
|
-
},
|
|
8
|
-
"bugs": {
|
|
9
|
-
"url": "https://github.com/ioBroker/ioBroker.zigbee/issues"
|
|
10
|
-
},
|
|
11
|
-
"contributors": [
|
|
12
|
-
{
|
|
13
|
-
"name": "Kirov Ilya",
|
|
14
|
-
"email": "kirovilya@gmail.com"
|
|
15
|
-
}
|
|
16
|
-
],
|
|
17
|
-
"engines": {
|
|
18
|
-
"node": ">=10"
|
|
19
|
-
},
|
|
20
|
-
"dependencies": {
|
|
21
|
-
"zigbee-herdsman": "0.14.
|
|
22
|
-
"zigbee-herdsman-converters": "14.0.
|
|
23
|
-
"@iobroker/adapter-core": "^2.4.0",
|
|
24
|
-
"tar": "^6.0.5",
|
|
25
|
-
"typescript": "^4.0.5"
|
|
26
|
-
},
|
|
27
|
-
"description": "Zigbee devices",
|
|
28
|
-
"devDependencies": {
|
|
29
|
-
"@alcalzone/release-script": "~3.4.2",
|
|
30
|
-
"@iobroker/testing": "^2.5.4",
|
|
31
|
-
"axios": "^0.21.1",
|
|
32
|
-
"mixin-deep": "^1.3.2",
|
|
33
|
-
"eslint": "^7.18.0",
|
|
34
|
-
"eslint-config-google": "*",
|
|
35
|
-
"lint-diff": "*",
|
|
36
|
-
"chai": "^4.3.4",
|
|
37
|
-
"chai-as-promised": "^7.1.1",
|
|
38
|
-
"gulp": "^4.0.2",
|
|
39
|
-
"gulp-jsdoc3": "^3.0.0",
|
|
40
|
-
"gulp-replace": "^1.1.3",
|
|
41
|
-
"mocha": "^9.1.3"
|
|
42
|
-
},
|
|
43
|
-
"homepage": "https://github.com/ioBroker/ioBroker.zigbee",
|
|
44
|
-
"keywords": [
|
|
45
|
-
"ioBroker",
|
|
46
|
-
"zigbee",
|
|
47
|
-
"cc2531",
|
|
48
|
-
"cc2530",
|
|
49
|
-
"cc2538",
|
|
50
|
-
"cc2652",
|
|
51
|
-
"deconz",
|
|
52
|
-
"conbee",
|
|
53
|
-
"raspbee",
|
|
54
|
-
"ezsp",
|
|
55
|
-
"efr32"
|
|
56
|
-
],
|
|
57
|
-
"license": "MIT",
|
|
58
|
-
"main": "main.js",
|
|
59
|
-
"optionalDependencies": {},
|
|
60
|
-
"readmeFilename": "README.md",
|
|
61
|
-
"repository": {
|
|
62
|
-
"type": "git",
|
|
63
|
-
"url": "git+https://github.com/ioBroker/ioBroker.zigbee.git"
|
|
64
|
-
},
|
|
65
|
-
"scripts": {
|
|
66
|
-
"test": "npm run test:package && npm run test:unit",
|
|
67
|
-
"docgen": "node support/docgen.js",
|
|
68
|
-
"test:package": "mocha test/package --exit",
|
|
69
|
-
"test:unit": "mocha test/unit --exit",
|
|
70
|
-
"test:integration": "mocha test/integration --exit",
|
|
71
|
-
"watch:parcel": "parcel admin/src/index.tsx -d admin/build --hmr-port 1235",
|
|
72
|
-
"test:js": "mocha --opts test/mocha.custom.opts",
|
|
73
|
-
"lint": "npm run lint:js",
|
|
74
|
-
"lint:js": "eslint",
|
|
75
|
-
"release": "release-script"
|
|
76
|
-
}
|
|
77
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "iobroker.zigbee",
|
|
3
|
+
"version": "1.7.1",
|
|
4
|
+
"author": {
|
|
5
|
+
"name": "Kirov Ilya",
|
|
6
|
+
"email": "kirovilya@gmail.com"
|
|
7
|
+
},
|
|
8
|
+
"bugs": {
|
|
9
|
+
"url": "https://github.com/ioBroker/ioBroker.zigbee/issues"
|
|
10
|
+
},
|
|
11
|
+
"contributors": [
|
|
12
|
+
{
|
|
13
|
+
"name": "Kirov Ilya",
|
|
14
|
+
"email": "kirovilya@gmail.com"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"engines": {
|
|
18
|
+
"node": ">=10"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"zigbee-herdsman": "0.14.33",
|
|
22
|
+
"zigbee-herdsman-converters": "14.0.528",
|
|
23
|
+
"@iobroker/adapter-core": "^2.4.0",
|
|
24
|
+
"tar": "^6.0.5",
|
|
25
|
+
"typescript": "^4.0.5"
|
|
26
|
+
},
|
|
27
|
+
"description": "Zigbee devices",
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@alcalzone/release-script": "~3.4.2",
|
|
30
|
+
"@iobroker/testing": "^2.5.4",
|
|
31
|
+
"axios": "^0.21.1",
|
|
32
|
+
"mixin-deep": "^1.3.2",
|
|
33
|
+
"eslint": "^7.18.0",
|
|
34
|
+
"eslint-config-google": "*",
|
|
35
|
+
"lint-diff": "*",
|
|
36
|
+
"chai": "^4.3.4",
|
|
37
|
+
"chai-as-promised": "^7.1.1",
|
|
38
|
+
"gulp": "^4.0.2",
|
|
39
|
+
"gulp-jsdoc3": "^3.0.0",
|
|
40
|
+
"gulp-replace": "^1.1.3",
|
|
41
|
+
"mocha": "^9.1.3"
|
|
42
|
+
},
|
|
43
|
+
"homepage": "https://github.com/ioBroker/ioBroker.zigbee",
|
|
44
|
+
"keywords": [
|
|
45
|
+
"ioBroker",
|
|
46
|
+
"zigbee",
|
|
47
|
+
"cc2531",
|
|
48
|
+
"cc2530",
|
|
49
|
+
"cc2538",
|
|
50
|
+
"cc2652",
|
|
51
|
+
"deconz",
|
|
52
|
+
"conbee",
|
|
53
|
+
"raspbee",
|
|
54
|
+
"ezsp",
|
|
55
|
+
"efr32"
|
|
56
|
+
],
|
|
57
|
+
"license": "MIT",
|
|
58
|
+
"main": "main.js",
|
|
59
|
+
"optionalDependencies": {},
|
|
60
|
+
"readmeFilename": "README.md",
|
|
61
|
+
"repository": {
|
|
62
|
+
"type": "git",
|
|
63
|
+
"url": "git+https://github.com/ioBroker/ioBroker.zigbee.git"
|
|
64
|
+
},
|
|
65
|
+
"scripts": {
|
|
66
|
+
"test": "npm run test:package && npm run test:unit",
|
|
67
|
+
"docgen": "node support/docgen.js",
|
|
68
|
+
"test:package": "mocha test/package --exit",
|
|
69
|
+
"test:unit": "mocha test/unit --exit",
|
|
70
|
+
"test:integration": "mocha test/integration --exit",
|
|
71
|
+
"watch:parcel": "parcel admin/src/index.tsx -d admin/build --hmr-port 1235",
|
|
72
|
+
"test:js": "mocha --opts test/mocha.custom.opts",
|
|
73
|
+
"lint": "npm run lint:js",
|
|
74
|
+
"lint:js": "eslint",
|
|
75
|
+
"release": "release-script"
|
|
76
|
+
}
|
|
77
|
+
}
|