iobroker.zigbee 1.7.5 → 1.7.6
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/.eslintignore +1 -1
- package/.eslintrc.json +36 -36
- package/.github/FUNDING.yml +3 -3
- package/.github/stale.yml +13 -13
- package/.github/workflows/test-and-release.yml +151 -151
- package/.travis/wiki.sh +27 -27
- package/LICENSE +21 -21
- package/README.md +382 -376
- package/admin/adapter-settings.js +244 -244
- package/admin/admin.js +2927 -2926
- package/admin/img/philips_hue_lom001.png +0 -0
- package/admin/index.html +159 -159
- package/admin/index_m.html +1161 -1161
- package/admin/moment.min.js +1 -1
- package/admin/shuffle.min.js +2 -2
- package/admin/tab_m.html +944 -944
- package/admin/vis-network.min.css +1 -1
- package/admin/vis-network.min.js +27 -27
- package/admin/words.js +111 -112
- package/io-package.json +370 -366
- package/lib/backup.js +171 -171
- package/lib/binding.js +325 -325
- package/lib/colors.js +460 -460
- package/lib/commands.js +501 -501
- package/lib/developer.js +148 -148
- package/lib/devices.js +3145 -3145
- package/lib/exclude.js +168 -168
- package/lib/exposes.js +804 -804
- package/lib/groups.js +342 -342
- package/lib/json.js +60 -60
- package/lib/networkmap.js +56 -56
- package/lib/ota.js +179 -179
- package/lib/rgb.js +255 -255
- package/lib/seriallist.js +37 -37
- package/lib/states.js +6416 -6416
- package/lib/statescontroller.js +670 -670
- package/lib/tools.js +54 -54
- package/lib/utils.js +151 -151
- package/lib/zbBaseExtension.js +36 -36
- package/lib/zbDelayedAction.js +152 -152
- package/lib/zbDeviceAvailability.js +315 -315
- package/lib/zbDeviceConfigure.js +159 -152
- package/lib/zbDeviceEvent.js +49 -49
- package/lib/zigbeecontroller.js +951 -946
- package/package.json +3 -3
- package/support/docgen.js +93 -93
- package/docs/de/img/CC2531.png +0 -0
- package/docs/de/img/CC2538_CC2592_PA.PNG +0 -0
- package/docs/de/img/CC2591.png +0 -0
- package/docs/de/img/boards.jpg +0 -0
- package/docs/de/img/cc26x2r.PNG +0 -0
- package/docs/de/img/results.jpg +0 -0
- package/docs/de/img/sku_429478_2.png +0 -0
- package/docs/de/img/sku_429601_2.png +0 -0
- package/docs/de/readme.md +0 -27
- package/docs/en/img/CC2531.png +0 -0
- package/docs/en/img/CC2591.png +0 -0
- package/docs/en/img/deconz.png +0 -0
- package/docs/en/img/sku_429478_2.png +0 -0
- package/docs/en/img/sku_429601_2.png +0 -0
- package/docs/en/readme.md +0 -30
- package/docs/flashing_via_arduino_(en).md +0 -110
- package/docs/ru/img/CC2531.png +0 -0
- package/docs/ru/img/CC2591.png +0 -0
- package/docs/ru/img/sku_429478_2.png +0 -0
- package/docs/ru/img/sku_429601_2.png +0 -0
- package/docs/ru/readme.md +0 -28
- package/docs/tutorial/CC2530_20190425.zip +0 -0
- package/docs/tutorial/CC2530_CC2591_20190515.zip +0 -0
- package/docs/tutorial/CC2530_CC2592_20190515.zip +0 -0
- package/docs/tutorial/CC2531_20190425.zip +0 -0
- package/docs/tutorial/adm5_1.PNG +0 -0
- package/docs/tutorial/adm5_2.PNG +0 -0
- package/docs/tutorial/cat.PNG +0 -0
- package/docs/tutorial/groups-1.png +0 -0
- package/docs/tutorial/groups-2.png +0 -0
- package/docs/tutorial/inst.PNG +0 -0
- package/docs/tutorial/reflash-finish.PNG +0 -0
- package/docs/tutorial/reflash-step0.png +0 -0
- package/docs/tutorial/reflash-step1.PNG +0 -0
- package/docs/tutorial/reflash-step2.PNG +0 -0
- package/docs/tutorial/settings.png +0 -0
- package/docs/tutorial/tab-dev-1.png +0 -0
- package/docs/tutorial/zigbee.png +0 -0
- package/docs/tutorial/zigbee15.png +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iobroker.zigbee",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.6",
|
|
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.46",
|
|
22
|
+
"zigbee-herdsman-converters": "14.0.575",
|
|
23
23
|
"@iobroker/adapter-core": "^2.4.0",
|
|
24
24
|
"tar": "^6.0.5",
|
|
25
25
|
"typescript": "^4.0.5"
|
package/support/docgen.js
CHANGED
|
@@ -1,93 +1,93 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This script generates the supported devices page.
|
|
3
|
-
*
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
let devices = [...require('zigbee-herdsman-converters').devices];
|
|
7
|
-
|
|
8
|
-
for (const device of devices) {
|
|
9
|
-
if (device.whiteLabel) {
|
|
10
|
-
for (const whiteLabel of device.whiteLabel) {
|
|
11
|
-
const whiteLabelDevice = {
|
|
12
|
-
...device,
|
|
13
|
-
model: whiteLabel.model,
|
|
14
|
-
vendor: whiteLabel.vendor,
|
|
15
|
-
description: whiteLabel.description,
|
|
16
|
-
whiteLabelOf: device,
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
delete whiteLabelDevice.whiteLabel;
|
|
20
|
-
|
|
21
|
-
devices.push(whiteLabelDevice);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
devices = new Map(devices.map((d) => [d.model, d]));
|
|
27
|
-
|
|
28
|
-
const Devices = require('../lib/devices');
|
|
29
|
-
let iobDevices = Devices.devices;
|
|
30
|
-
Devices.fillStatesWithExposes('');
|
|
31
|
-
|
|
32
|
-
const iobCount = iobDevices.filter((d) => (!d.exposed)).length;
|
|
33
|
-
iobDevices = new Map(iobDevices.map((d) => d.models.map((m) => [m, d])).flat());
|
|
34
|
-
|
|
35
|
-
const fs = require('fs');
|
|
36
|
-
const outputdir = process.argv[2];
|
|
37
|
-
|
|
38
|
-
if (!outputdir) {
|
|
39
|
-
console.error('Please specify an output directory');
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const file = 'Supported-devices.md';
|
|
43
|
-
let text = `*NOTE: Automatically generated by 'npm run docgen'* \n\n` +
|
|
44
|
-
`Currently **${iobDevices.size}**(${iobCount} described in adapter) devices are supported.\n\n` +
|
|
45
|
-
`(⭐EXP) - means that the device is presented automatically, based on the 'exposes' from the zigbee-herdsman-converters.\n\n`;
|
|
46
|
-
|
|
47
|
-
const logDevices = (devmodels) => {
|
|
48
|
-
let result = '';
|
|
49
|
-
|
|
50
|
-
devmodels.forEach((devmodel) => {
|
|
51
|
-
const iobDevice = iobDevices.get(devmodel);
|
|
52
|
-
const device = devices.get(devmodel);
|
|
53
|
-
const pathImg = (iobDevice.icon.startsWith('http')) ? devmodel : iobDevice.icon.replace(new RegExp('img/', 'g'), '').replace(new RegExp('.png', 'g'), '');
|
|
54
|
-
const icon = (iobDevice.icon.startsWith('http')) ? iobDevice.icon : `https://github.com/ioBroker/ioBroker.zigbee/raw/master/admin/${iobDevice.icon}`;
|
|
55
|
-
let brand;
|
|
56
|
-
const models = [];
|
|
57
|
-
let zmodels;
|
|
58
|
-
if (device.zigbeeModel) {
|
|
59
|
-
zmodels = device.zigbeeModel;
|
|
60
|
-
} else {
|
|
61
|
-
zmodels = [devmodel];
|
|
62
|
-
}
|
|
63
|
-
zmodels.forEach((modelId) => {
|
|
64
|
-
const re = /[^\x20-\x7E]+/g;
|
|
65
|
-
const model = modelId.replace(re, ' ');
|
|
66
|
-
const desc = `${device.description} (${device.supports})`;
|
|
67
|
-
const name = `**${device.model}${(iobDevice.exposed) ? ' (⭐EXP)': ''}**<br>`;
|
|
68
|
-
if (brand == undefined) {
|
|
69
|
-
brand= {
|
|
70
|
-
name: name,
|
|
71
|
-
desc: desc,
|
|
72
|
-
pathImg: pathImg,
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
models.push(model);
|
|
76
|
-
});
|
|
77
|
-
const modelsStr = models.join(', ');
|
|
78
|
-
result += `| ${brand.name} (${modelsStr}) | ${brand.desc} |  |\n`;
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
return result;
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
const vendors = Array.from(new Set([...iobDevices.keys()].map((m) => (devices.get(m)) ? devices.get(m).vendor : null)));
|
|
85
|
-
vendors.sort();
|
|
86
|
-
text += '| Model | Description | Picture |\n';
|
|
87
|
-
text += '| ------------- | ------------- | -------------------------- |\n';
|
|
88
|
-
vendors.forEach((vendor) => {
|
|
89
|
-
text += `| | **${vendor}** | |\n`;
|
|
90
|
-
text += logDevices([...iobDevices.keys()].map((m) => devices.get(m)).filter((d) => d && d.vendor === vendor).map((d) => d.model));
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
fs.writeFileSync(outputdir + '/' + file, text);
|
|
1
|
+
/**
|
|
2
|
+
* This script generates the supported devices page.
|
|
3
|
+
*
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
let devices = [...require('zigbee-herdsman-converters').devices];
|
|
7
|
+
|
|
8
|
+
for (const device of devices) {
|
|
9
|
+
if (device.whiteLabel) {
|
|
10
|
+
for (const whiteLabel of device.whiteLabel) {
|
|
11
|
+
const whiteLabelDevice = {
|
|
12
|
+
...device,
|
|
13
|
+
model: whiteLabel.model,
|
|
14
|
+
vendor: whiteLabel.vendor,
|
|
15
|
+
description: whiteLabel.description,
|
|
16
|
+
whiteLabelOf: device,
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
delete whiteLabelDevice.whiteLabel;
|
|
20
|
+
|
|
21
|
+
devices.push(whiteLabelDevice);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
devices = new Map(devices.map((d) => [d.model, d]));
|
|
27
|
+
|
|
28
|
+
const Devices = require('../lib/devices');
|
|
29
|
+
let iobDevices = Devices.devices;
|
|
30
|
+
Devices.fillStatesWithExposes('');
|
|
31
|
+
|
|
32
|
+
const iobCount = iobDevices.filter((d) => (!d.exposed)).length;
|
|
33
|
+
iobDevices = new Map(iobDevices.map((d) => d.models.map((m) => [m, d])).flat());
|
|
34
|
+
|
|
35
|
+
const fs = require('fs');
|
|
36
|
+
const outputdir = process.argv[2];
|
|
37
|
+
|
|
38
|
+
if (!outputdir) {
|
|
39
|
+
console.error('Please specify an output directory');
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const file = 'Supported-devices.md';
|
|
43
|
+
let text = `*NOTE: Automatically generated by 'npm run docgen'* \n\n` +
|
|
44
|
+
`Currently **${iobDevices.size}**(${iobCount} described in adapter) devices are supported.\n\n` +
|
|
45
|
+
`(⭐EXP) - means that the device is presented automatically, based on the 'exposes' from the zigbee-herdsman-converters.\n\n`;
|
|
46
|
+
|
|
47
|
+
const logDevices = (devmodels) => {
|
|
48
|
+
let result = '';
|
|
49
|
+
|
|
50
|
+
devmodels.forEach((devmodel) => {
|
|
51
|
+
const iobDevice = iobDevices.get(devmodel);
|
|
52
|
+
const device = devices.get(devmodel);
|
|
53
|
+
const pathImg = (iobDevice.icon.startsWith('http')) ? devmodel : iobDevice.icon.replace(new RegExp('img/', 'g'), '').replace(new RegExp('.png', 'g'), '');
|
|
54
|
+
const icon = (iobDevice.icon.startsWith('http')) ? iobDevice.icon : `https://github.com/ioBroker/ioBroker.zigbee/raw/master/admin/${iobDevice.icon}`;
|
|
55
|
+
let brand;
|
|
56
|
+
const models = [];
|
|
57
|
+
let zmodels;
|
|
58
|
+
if (device.zigbeeModel) {
|
|
59
|
+
zmodels = device.zigbeeModel;
|
|
60
|
+
} else {
|
|
61
|
+
zmodels = [devmodel];
|
|
62
|
+
}
|
|
63
|
+
zmodels.forEach((modelId) => {
|
|
64
|
+
const re = /[^\x20-\x7E]+/g;
|
|
65
|
+
const model = modelId.replace(re, ' ');
|
|
66
|
+
const desc = `${device.description} (${device.supports})`;
|
|
67
|
+
const name = `**${device.model}${(iobDevice.exposed) ? ' (⭐EXP)': ''}**<br>`;
|
|
68
|
+
if (brand == undefined) {
|
|
69
|
+
brand= {
|
|
70
|
+
name: name,
|
|
71
|
+
desc: desc,
|
|
72
|
+
pathImg: pathImg,
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
models.push(model);
|
|
76
|
+
});
|
|
77
|
+
const modelsStr = models.join(', ');
|
|
78
|
+
result += `| ${brand.name} (${modelsStr}) | ${brand.desc} |  |\n`;
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
return result;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
const vendors = Array.from(new Set([...iobDevices.keys()].map((m) => (devices.get(m)) ? devices.get(m).vendor : null)));
|
|
85
|
+
vendors.sort();
|
|
86
|
+
text += '| Model | Description | Picture |\n';
|
|
87
|
+
text += '| ------------- | ------------- | -------------------------- |\n';
|
|
88
|
+
vendors.forEach((vendor) => {
|
|
89
|
+
text += `| | **${vendor}** | |\n`;
|
|
90
|
+
text += logDevices([...iobDevices.keys()].map((m) => devices.get(m)).filter((d) => d && d.vendor === vendor).map((d) => d.model));
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
fs.writeFileSync(outputdir + '/' + file, text);
|
package/docs/de/img/CC2531.png
DELETED
|
Binary file
|
|
Binary file
|
package/docs/de/img/CC2591.png
DELETED
|
Binary file
|
package/docs/de/img/boards.jpg
DELETED
|
Binary file
|
package/docs/de/img/cc26x2r.PNG
DELETED
|
Binary file
|
package/docs/de/img/results.jpg
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/docs/de/readme.md
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# ioBroker Adapter für Zigbee-Geräte
|
|
2
|
-
Mit Hilfe eines Koordinators für Zigbee-Netz, basierend auf Texas Instruments SoC cc253x (und anderen), wird ein eigenes Netz erschaffen, welchem sich andere Zigbee Geräte beitreten können. Dank der direkten Interaktion mit dem Koordinator, erlaubt der Zigbee Adapter die Steuerung der Geräte ohne jegliche Gateways/Bridges der Hersteller (Xiaomi/Tradfri/Hue). Über Funktionsweise der Zigbee-Netze kann man [hier nachlesen (Englisch)](https://github.com/Koenkk/zigbee2mqtt/wiki/ZigBee-network).
|
|
3
|
-
|
|
4
|
-
## Die Hardware
|
|
5
|
-
Für die Umsetzung wird einer der aufgezählten Geräte/Sticks verwendet, welche mit spezieller ZNP-Firmware geflasht sind: [cc2530, cc2530, cc2530+RF.](https://github.com/Koenkk/zigbee2mqtt/wiki/Supported-sniffer-devices#zigbee-coordinator)
|
|
6
|
-
|
|
7
|
-

|
|
8
|
-

|
|
9
|
-

|
|
10
|
-

|
|
11
|
-
|
|
12
|
-
Der benötigte Flasher/Programmer und der Prozess der Vorbereitung werden [hier (Englisch)](https://github.com/Koenkk/zigbee2mqtt/wiki/Getting-started) oder [hier (Russisch)](https://github.com/kirovilya/ioBroker.zigbee/wiki/%D0%9F%D1%80%D0%BE%D1%88%D0%B8%D0%B2%D0%BA%D0%B0) beschrieben.
|
|
13
|
-
|
|
14
|
-
Die mit dem Zigbee-Netz verbundenen Geräte übermitteln dem Koordinator ihren Zustand und benachrichtigen über Ereignisse (Knopfdruck, Bewegungserkennung, Temperaturänderung). Diese Infos werden im Adapter unter den jeweiligen Objekten angezeigt. Außerdem ist es möglich manche Ereignisse/Status zurück zum Zigbee-Gerät zusenden (Zustandsänderung Steckdosen und Lampen, Farb- und Helligkeitseinstellungen).
|
|
15
|
-
|
|
16
|
-
## Einstellungen und Pairing
|
|
17
|
-

|
|
18
|
-
|
|
19
|
-
Zu Beginn muss der USB-Port angegeben werden, an welchem der cc253x angeschlossen ist. Wie man diesen Erkennt ist [hier beschrieben (Russisch)](https://github.com/kirovilya/ioBroker.zigbee/wiki#%D0%9D%D0%B0%D1%81%D1%82%D1%80%D0%BE%D0%B9%D0%BA%D0%B0-%D0%B0%D0%B4%D0%B0%D0%BF%D1%82%D0%B5%D1%80%D0%B0)
|
|
20
|
-
|
|
21
|
-
Zum Verbinden der Geräte muss der Koordinator für Zigbee-Netz in den Pairingmodus versetzt werden, dazu auf den grünen Knopf im Adapter klicken. Pairingmodus ist ab jetzt für 60 Sekunden aktiv. Um die Geräte zu verbinden, reicht im Normallfall ein Betätigen des Knopfes auf dem zu verbindendem Gerät. Es gibt aber auch „besondere“ Geräte. Wie man diese verbindet ist [hier Englisch](https://github.com/Koenkk/zigbee2mqtt/wiki/Pairing-devices) [oder Russisch](https://github.com/kirovilya/ioBroker.zigbee/wiki#%D0%9F%D0%BE%D0%B4%D0%B4%D0%B5%D1%80%D0%B6%D0%B8%D0%B2%D0%B0%D0%B5%D0%BC%D1%8B%D0%B5-%D1%83%D1%81%D1%82%D1%80%D0%BE%D0%B9%D1%81%D1%82%D0%B2%D0%B0) beschrieben.
|
|
22
|
-
|
|
23
|
-
Nach erfolgreichem Pairing, wird das Gerät im Adapter angezeigt. Sollte ein Gerät (aus der Liste) den Namen „undefined“ haben, dann versucht es zu löschen und nochmal zu pairen. Sollte es trotzdem nicht funktionieren, schreibt bitte ein Issue.
|
|
24
|
-
Zigbee-Geräte die nicht in der Liste aufgeführt sind, können zwar gepairt werden, aber der Adapter kann mit diesen nicht kommunizieren.
|
|
25
|
-
|
|
26
|
-
## Zusätzliche Informationen
|
|
27
|
-
Es gibt noch ein [Freundschaftprojekt](https://github.com/koenkk/zigbee2mqtt) mit gleichen Funktionen und gleicher Technologie, welcher mit denselben Geräten über ein MQTT Protokoll kommuniziert. Wenn irgendwelche Verbesserungen oder neu unterstütze Geräte im Projekt Zigbee2MQTT eingefügt werden, können jene auch in dieses Projekt hinzugefügt werden. Solltet Ihr unterschiede merken, schreibt bitte ein Issue, wir kümmern uns darum
|
package/docs/en/img/CC2531.png
DELETED
|
Binary file
|
package/docs/en/img/CC2591.png
DELETED
|
Binary file
|
package/docs/en/img/deconz.png
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/docs/en/readme.md
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# ioBroker adapter for working with Zigbee-devices
|
|
2
|
-
With the Zigbee-coordinator based on Texas Instruments SoC cc253x (and others), it creates its own zigbee-network, into which zigbee-devices are connected. By work directly with the coordinator, the driver allows you to manage devices without additional gateways / bridge from device manufacturers (Xiaomi / TRADFRI / Hue). About the device Zigbee-network can be read [here (in English)](https://github.com/Koenkk/zigbee2mqtt/wiki/ZigBee-network).
|
|
3
|
-
|
|
4
|
-
## Hardware
|
|
5
|
-
For work, you need one of the following devices, flashed with a special ZNP firmware: [cc2531, cc2530, cc2530 + RF](https://github.com/Koenkk/zigbee2mqtt/wiki/Supported-sniffer-devices#zigbee-coordinator)
|
|
6
|
-
|
|
7
|
-

|
|
8
|
-

|
|
9
|
-

|
|
10
|
-

|
|
11
|
-
|
|
12
|
-
The necessary equipment for the firmware and the device preparation process is described [here (in English)](https://github.com/Koenkk/zigbee2mqtt/wiki/Getting-started) or [here (in Russian)](https://github.com/kirovilya/ioBroker.zigbee/wiki/%D0%9F%D1%80%D0%BE%D1%88%D0%B8%D0%B2%D0%BA%D0%B0)
|
|
13
|
-
|
|
14
|
-
The devices connected to the Zigbee-network inform the coordinator of their status and events (button presses, motion detection, temperature change). This information is reflected in the ioBroker object-states. Some ioBroker states have feedback and send commands to the zigbee-device when the value changes (switching the state of the outlet or lamp, changing the scene or the brightness of the lamp).
|
|
15
|
-
|
|
16
|
-
## Work with adapter
|
|
17
|
-
To start the driver, you must specify the name of the port on which the cc253x device is connected.
|
|
18
|
-
|
|
19
|
-
To connect devices, you need to switch the Zigbee-coordinator to pairing mode by pressing the green button. The countdown will begin (60 seconds) until the device connectivity is available.
|
|
20
|
-
To connect Zigbee devices in most cases, just press the pairing button on the device itself. But there are features for some devices. More information about pairing with devices can be found [here (in English)](https://github.com/Koenkk/zigbee2mqtt/wiki/Pairing-devices) or [here (in Russian)](https://github.com/kirovilya/ioBroker.zigbee/wiki#%D0%9F%D0%BE%D0%B4%D0%B4%D0%B5%D1%80%D0%B6%D0%B8%D0%B2%D0%B0%D0%B5%D0%BC%D1%8B%D0%B5-%D1%83%D1%81%D1%82%D1%80%D0%BE%D0%B9%D1%81%D1%82%D0%B2%D0%B0)
|
|
21
|
-
|
|
22
|
-
After successful pairing, the device appears in the configuration panel. If the device appears in the configuration panel but has the type "undefined", then this is an unknown device and can not be work with it. If the device is in the list of available devices, but added as "undefined", then try to remove the device and add it again.
|
|
23
|
-
|
|
24
|
-
## Additional info
|
|
25
|
-
There is a [friendly project](https://github.com/koenkk/zigbee2mqtt) with similar functionality on the same technologies, where you can work with the same devices using the MQTT protocol. Therefore, if any improvements or support for new zigbee-devices occur in the Zigbee2MQTT project, we can transfer and add the same functionality to this adapter. If you notice this, then write the issue - we'll postpone it.
|
|
26
|
-
|
|
27
|
-
There are knowledge bases that can be useful for working with Zigbee-devices and equipment:
|
|
28
|
-
* in English https://github.com/koenkk/zigbee2mqtt/wiki
|
|
29
|
-
* in Russian https://github.com/kirovilya/ioBroker.zigbee/wiki
|
|
30
|
-
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
Flashing firmware via Arduino is implemented using the project https://github.com/wavesoft/CCLib
|
|
2
|
-
**But with minor improvements!!!**
|
|
3
|
-
|
|
4
|
-
[AndrewLinden](https://github.com/AndrewLinden) described that he was able to flash CC2531 using CCLib [with comments](https://github.com/wavesoft/CCLib/issues/19).
|
|
5
|
-
|
|
6
|
-
As described [I made a fork of the CCLib library with minor changes](https://github.com/kirovilya/CCLib) for flashing firmware via Arduino:
|
|
7
|
-
* Timeouts of operations
|
|
8
|
-
* After opening the port (I have in Windows 7) Arduino reboots and, accordingly, does not respond to requests - made a 3 seconds pause (found somewhere in internet).
|
|
9
|
-
* The port speed is reduced to 9600, because at another speed leaving communication errors:
|
|
10
|
-
`ERROR: Could not read from the serial port!`
|
|
11
|
-
|
|
12
|
-
## Checked on Arduino UNO on CC2531-stick
|
|
13
|
-
|
|
14
|
-
0. Download and unpack the archive with the library https://github.com/kirovilya/CCLib.
|
|
15
|
-
|
|
16
|
-
1. Flashing Arduino sketch via Arduino IDE
|
|
17
|
-
CCLib\Arduino\CCLib\Examples\CCLib_proxy\CCLib_proxy.ino
|
|
18
|
-
|
|
19
|
-
2. Install Python 2.7 or later (tested with python 2.7.13), if not installed
|
|
20
|
-
|
|
21
|
-
3. Install pyserial 3.0.1, if not installed
|
|
22
|
-
`pip install -r CCLib\Python\requirements.txt`
|
|
23
|
-
or
|
|
24
|
-
`pip install pyserial==3.0.1`
|
|
25
|
-
|
|
26
|
-
4. Connect the contacts as described https://github.com/kirovilya/CCLib#1-prepare-your-arduino-board
|
|
27
|
-
**But in my case, I connected completely without resistors, combined the contacts CC_DD_I and CC_DD_O together and connected to the DD pin of the DEBUG connector!**
|
|
28
|
-
|
|
29
|
-

|
|
30
|
-
|
|
31
|
-
I connected only 3 specified contacts and GND. During the firmware, the stick and Arduino must be connected to the USB.
|
|
32
|
-
|
|
33
|
-

|
|
34
|
-

|
|
35
|
-

|
|
36
|
-
|
|
37
|
-
5. After that, try to get information about the chip - if it works, then the connection is correct (example for COM9 port - Arduino port):
|
|
38
|
-
|
|
39
|
-
```
|
|
40
|
-
C:\Projects\CCLib\Python>python cc_info.py -p COM9
|
|
41
|
-
INFO: Found a CC2531 chip on COM9
|
|
42
|
-
|
|
43
|
-
Chip information:
|
|
44
|
-
Chip ID : 0xb524
|
|
45
|
-
Flash size : 256 Kb
|
|
46
|
-
Page size : 2 Kb
|
|
47
|
-
SRAM size : 8 Kb
|
|
48
|
-
USB : Yes
|
|
49
|
-
|
|
50
|
-
Device information:
|
|
51
|
-
IEEE Address : 00124b0014aa
|
|
52
|
-
PC : 0000
|
|
53
|
-
|
|
54
|
-
Debug status:
|
|
55
|
-
[ ] CHIP_ERASE_BUSY
|
|
56
|
-
[ ] PCON_IDLE
|
|
57
|
-
[X] CPU_HALTED
|
|
58
|
-
[ ] PM_ACTIVE
|
|
59
|
-
[ ] HALT_STATUS
|
|
60
|
-
[ ] DEBUG_LOCKED
|
|
61
|
-
[X] OSCILLATOR_STABLE
|
|
62
|
-
[ ] STACK_OVERFLOW
|
|
63
|
-
|
|
64
|
-
Debug config:
|
|
65
|
-
[ ] SOFT_POWER_MODE
|
|
66
|
-
[ ] TIMERS_OFF
|
|
67
|
-
[X] DMA_PAUSE
|
|
68
|
-
[X] TIMER_SUSPEND
|
|
69
|
-
```
|
|
70
|
-
[Another example of connection on MacOS](https://github.com/wavesoft/CCLib/issues/22#issuecomment-384452424)
|
|
71
|
-
|
|
72
|
-
6. If everything is successful, then download [modified firmware for flashing via Arduino](https://github.com/kirovilya/files/blob/master/CC2531ZNP-Pro-Secure_LinkKeyJoin_mod.hex)
|
|
73
|
-
|
|
74
|
-
7. Start the flashing firmware (it takes a long time, about 2-3 hours):
|
|
75
|
-
|
|
76
|
-
```
|
|
77
|
-
C:\Projects\ZigBee>python cc_write_flash.py -e -p COM9 --in=CC2531ZNP-Pro-Secure_LinkKeyJoin_mod.hex
|
|
78
|
-
INFO: Found a CC2531 chip on COM9
|
|
79
|
-
|
|
80
|
-
Chip information:
|
|
81
|
-
Chip ID : 0xb524
|
|
82
|
-
Flash size : 256 Kb
|
|
83
|
-
Page size : 2 Kb
|
|
84
|
-
SRAM size : 8 Kb
|
|
85
|
-
USB : Yes
|
|
86
|
-
Sections in CC2531ZNP-Pro-Secure_LinkKeyJoin_mod.hex:
|
|
87
|
-
|
|
88
|
-
Addr. Size
|
|
89
|
-
-------- -------------
|
|
90
|
-
0x0000 8176 B
|
|
91
|
-
0x1ff6 10 B
|
|
92
|
-
0x3fff0 1 B
|
|
93
|
-
0x2000 239616 B
|
|
94
|
-
|
|
95
|
-
This is going to ERASE and REPROGRAM the chip. Are you sure? <y/N>: y
|
|
96
|
-
|
|
97
|
-
Flashing:
|
|
98
|
-
- Chip erase...
|
|
99
|
-
- Flashing 4 memory blocks...
|
|
100
|
-
-> 0x0000 : 8176 bytes
|
|
101
|
-
Progress 100%... OK
|
|
102
|
-
-> 0x1ff6 : 10 bytes
|
|
103
|
-
Progress 100%... OK
|
|
104
|
-
-> 0x3fff0 : 1 bytes
|
|
105
|
-
Progress 100%... OK
|
|
106
|
-
-> 0x2000 : 239616 bytes
|
|
107
|
-
Progress 100%... OK
|
|
108
|
-
|
|
109
|
-
Completed
|
|
110
|
-
```
|
package/docs/ru/img/CC2531.png
DELETED
|
Binary file
|
package/docs/ru/img/CC2591.png
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/docs/ru/readme.md
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# Драйвер ioBroker для работы с Zigbee-устройствами
|
|
2
|
-
При помощи координатора Zigbee-сети на базе Texas Instruments SoC cc253x (и другими) создается собственная сеть, в которую подключаются zigbee-устройства. Взаимодействуя напрямую с координатором сети, драйвер позволяет управлять устройствами без дополнительных шлюзов/бриджей от производителей устройств (Xiaomi/TRADFRI/Hue). Про устройство Zigbee-сети можно прочитать [тут (на английском языке)](https://github.com/Koenkk/zigbee2mqtt/wiki/ZigBee-network).
|
|
3
|
-
|
|
4
|
-
## Оборудование
|
|
5
|
-
Для работы необходимо одно из перечисленных устройств, прошитое специальной ZNP-прошивкой: [cc2531, cc2530, cc2530+RF](https://github.com/Koenkk/zigbee2mqtt/wiki/Supported-sniffer-devices#zigbee-coordinator)
|
|
6
|
-
|
|
7
|
-

|
|
8
|
-

|
|
9
|
-

|
|
10
|
-

|
|
11
|
-
Необходимое для прошивки оборудование и процесс подготовки устройства описан [тут (на английском языке)](https://github.com/Koenkk/zigbee2mqtt/wiki/Getting-started) или [тут (на русском языке)](https://github.com/kirovilya/ioBroker.zigbee/wiki/%D0%9F%D1%80%D0%BE%D1%88%D0%B8%D0%B2%D0%BA%D0%B0)
|
|
12
|
-
|
|
13
|
-
Подключенные к Zigbee-сети устройства сообщают координатору своё состояние и информируют о событиях (нажатия кнопки, обнаружение движения, изменение температуры). Эти сведения отражаются в виде объектов-состояний ioBroker. Некоторые состояния имеют обратную связь и могут отправлять команды zigbee-устройству при изменении состояния (переключение состояния розетки и лампы, изменение сцены или яркости лампы).
|
|
14
|
-
|
|
15
|
-
## Работа с драйвером
|
|
16
|
-
Для запуска драйвера необходимо указать имя порта, на котором подключено устройство cc253x.
|
|
17
|
-
Как узнать порт написано [тут (на русском языке)](https://github.com/kirovilya/ioBroker.zigbee/wiki#%D0%9D%D0%B0%D1%81%D1%82%D1%80%D0%BE%D0%B9%D0%BA%D0%B0-%D0%B0%D0%B4%D0%B0%D0%BF%D1%82%D0%B5%D1%80%D0%B0)
|
|
18
|
-
|
|
19
|
-
Для подключения устройств необходимо перевести координатор Zigbee-сети в режим сопряжения, нажав зеленую кнопку. Начнется обратный отсчет времени (60 сек) пока будет доступна возможность подключения устройств.
|
|
20
|
-
Для подключения Zigbee-устройств в большинстве случаев достаточно нажать кнопку сопряжения на самом устройстве. Но существуют особенности для некоторых устройств. Подробнее о сопряжении с устройствами читайте [тут (на английском языке)](https://github.com/Koenkk/zigbee2mqtt/wiki/Pairing-devices) или [тут (на русском языке)](https://github.com/kirovilya/ioBroker.zigbee/wiki#%D0%9F%D0%BE%D0%B4%D0%B4%D0%B5%D1%80%D0%B6%D0%B8%D0%B2%D0%B0%D0%B5%D0%BC%D1%8B%D0%B5-%D1%83%D1%81%D1%82%D1%80%D0%BE%D0%B9%D1%81%D1%82%D0%B2%D0%B0).
|
|
21
|
-
|
|
22
|
-
После успешного сопряжения, устройство появится в панели устройств. Если устройство появилось в панели устройств, но имеет тип undefined, то это неизвестное устройство и с ним нельзя будет взаимодействовать. Если устройство есть в списке доступных устройств, но добавилось как undefined, то попробуйте удалить устройство и добавить заново.
|
|
23
|
-
Если не получается подключить устройство, то напиши issue.
|
|
24
|
-
|
|
25
|
-
## Дополнительные сведения
|
|
26
|
-
Существует [дружественный проект](https://github.com/koenkk/zigbee2mqtt) со схожим функционалом на тех же технологиях, в котором с этими же устройствами можно работать по протоколу MQTT.
|
|
27
|
-
Поэтому, если какие-либо улучшения или поддержка новых zigbee-устройств происходит в проекте Zigbee2MQTT, то можно перенести и добавить этот же функционал в этот драйвер. Если заметили это, то напиши issue - перенесем.
|
|
28
|
-
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/docs/tutorial/adm5_1.PNG
DELETED
|
Binary file
|
package/docs/tutorial/adm5_2.PNG
DELETED
|
Binary file
|
package/docs/tutorial/cat.PNG
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/docs/tutorial/inst.PNG
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/docs/tutorial/zigbee.png
DELETED
|
Binary file
|
|
Binary file
|