iobroker.zigbee 1.6.8 → 1.6.16
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 +424 -385
- package/admin/adapter-settings.js +244 -244
- package/admin/admin.js +2926 -2704
- package/admin/img/14153905L.png +0 -0
- package/admin/img/81855.png +0 -0
- package/admin/img/HG06338.png +0 -0
- package/admin/img/TI0001-cover.png +0 -0
- package/admin/img/philips_hue_lom001.png +0 -0
- package/admin/index.html +159 -159
- package/admin/index_m.html +1158 -1055
- package/admin/moment.min.js +1 -1
- package/admin/shuffle.min.js +2 -2
- package/admin/tab_m.html +944 -1025
- package/admin/vis-network.min.js +26 -26
- package/admin/words.js +108 -107
- package/docs/de/readme.md +27 -27
- package/docs/en/readme.md +30 -30
- package/docs/flashing_via_arduino_(en).md +110 -110
- package/docs/ru/readme.md +28 -28
- package/docs/tutorial/groups-1.png +0 -0
- package/docs/tutorial/groups-2.png +0 -0
- package/docs/tutorial/tab-dev-1.png +0 -0
- package/docs/tutorial/zigbee.png +0 -0
- package/io-package.json +355 -317
- package/lib/backup.js +132 -132
- package/lib/binding.js +325 -325
- package/lib/colors.js +460 -460
- package/lib/commands.js +501 -435
- package/lib/developer.js +148 -148
- package/lib/devices.js +3144 -3119
- package/lib/exclude.js +168 -168
- package/lib/exposes.js +13 -9
- package/lib/groups.js +342 -316
- package/lib/json.js +60 -60
- package/lib/networkmap.js +56 -56
- package/lib/ota.js +179 -153
- package/lib/rgb.js +255 -225
- package/lib/seriallist.js +37 -37
- package/lib/states.js +6407 -6381
- package/lib/statescontroller.js +627 -502
- package/lib/tools.js +54 -54
- package/lib/utils.js +151 -151
- package/lib/zbBaseExtension.js +32 -31
- package/lib/zbDelayedAction.js +152 -151
- package/lib/zbDeviceAvailability.js +318 -306
- package/lib/zbDeviceConfigure.js +152 -148
- package/lib/zbDeviceEvent.js +49 -43
- package/lib/zigbeecontroller.js +946 -856
- package/main.js +8 -4
- package/package.json +77 -74
- package/support/docgen.js +93 -93
- package/.devcontainer/devcontainer.json +0 -36
- package/.devcontainer/docker-compose.yml +0 -51
- package/.devcontainer/iobroker/Dockerfile +0 -2
- package/.devcontainer/nginx/nginx.conf +0 -33
- package/.devcontainer/parcel/Dockerfile +0 -9
- package/.devcontainer/parcel/run.sh +0 -7
package/main.js
CHANGED
|
@@ -159,7 +159,7 @@ class Zigbee extends utils.Adapter {
|
|
|
159
159
|
this.log.error(`${message}: Code ${error.code} (${ecode.message})`);
|
|
160
160
|
this.sendError(error, `${message}: Code ${error.code} (${ecode.message})`);
|
|
161
161
|
break;
|
|
162
|
-
default:
|
|
162
|
+
default:
|
|
163
163
|
this.log.error(`${message}: Code ${error.code} (malformed error)`);
|
|
164
164
|
this.sendError(error, `${message}: Code ${error.code} (malformed error)`);
|
|
165
165
|
}
|
|
@@ -431,7 +431,7 @@ class Zigbee extends utils.Adapter {
|
|
|
431
431
|
delete msgForState['endpoint'];
|
|
432
432
|
msgForState['endpoint_id'] = message.endpoint.ID;
|
|
433
433
|
this.publishToState(devId, model, {msg_from_zigbee: safeJsonStringify(msgForState)});
|
|
434
|
-
|
|
434
|
+
|
|
435
435
|
if (!entity.mapped) {
|
|
436
436
|
return;
|
|
437
437
|
}
|
|
@@ -771,8 +771,8 @@ class Zigbee extends utils.Adapter {
|
|
|
771
771
|
getZigbeeOptions() {
|
|
772
772
|
// file path for db
|
|
773
773
|
let dbDir = path.join(utils.getAbsoluteInstanceDataDir(this), '');
|
|
774
|
-
dbDir = dbDir.replace('.', '_');
|
|
775
|
-
|
|
774
|
+
dbDir = dbDir.replace('.', '_');
|
|
775
|
+
|
|
776
776
|
if (this.systemConfig && !fs.existsSync(dbDir)) {
|
|
777
777
|
try {
|
|
778
778
|
fs.mkdirSync(dbDir);
|
|
@@ -837,6 +837,10 @@ class Zigbee extends utils.Adapter {
|
|
|
837
837
|
this.setState('info.pairingMessage', message, true);
|
|
838
838
|
}
|
|
839
839
|
|
|
840
|
+
expandFileName(fn) {
|
|
841
|
+
return path.join(utils.getAbsoluteInstanceDataDir(this), fn);
|
|
842
|
+
}
|
|
843
|
+
|
|
840
844
|
onLog(level, msg, data) {
|
|
841
845
|
if (msg) {
|
|
842
846
|
let logger = this.log.info;
|
package/package.json
CHANGED
|
@@ -1,74 +1,77 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "iobroker.zigbee",
|
|
3
|
-
"version": "1.6.
|
|
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.
|
|
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": "
|
|
30
|
-
"@iobroker/testing": "^2.5.
|
|
31
|
-
"axios": "^0.21.1",
|
|
32
|
-
"mixin-deep": "^1.3.2",
|
|
33
|
-
"
|
|
34
|
-
"eslint": "
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
"
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
"test
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"test:
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
|
|
74
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "iobroker.zigbee",
|
|
3
|
+
"version": "1.6.16",
|
|
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.16",
|
|
22
|
+
"zigbee-herdsman-converters": "14.0.422",
|
|
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
|
+
}
|
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);
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at:
|
|
2
|
-
// https://github.com/microsoft/vscode-dev-containers/tree/v0.101.1/containers/docker-existing-docker-compose
|
|
3
|
-
// If you want to run as a non-root user in the container, see .devcontainer/docker-compose.yml.
|
|
4
|
-
{
|
|
5
|
-
"name": "ioBroker Docker Compose",
|
|
6
|
-
|
|
7
|
-
// Update the 'dockerComposeFile' list if you have more compose files or use different names.
|
|
8
|
-
// The .devcontainer/docker-compose.yml file contains any overrides you need/want to make.
|
|
9
|
-
"dockerComposeFile": ["docker-compose.yml"],
|
|
10
|
-
|
|
11
|
-
// The 'service' property is the name of the service for the container that VS Code should
|
|
12
|
-
// use. Update this value and .devcontainer/docker-compose.yml to the real service name.
|
|
13
|
-
"service": "iobroker",
|
|
14
|
-
|
|
15
|
-
// The optional 'workspaceFolder' property is the path VS Code should open by default when
|
|
16
|
-
// connected. This is typically a file mount in .devcontainer/docker-compose.yml
|
|
17
|
-
"workspaceFolder": "/workspace",
|
|
18
|
-
|
|
19
|
-
// Set *default* container specific settings.json values on container create.
|
|
20
|
-
"settings": {},
|
|
21
|
-
|
|
22
|
-
// Add the IDs of extensions you want installed when the container is created.
|
|
23
|
-
"extensions": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"],
|
|
24
|
-
|
|
25
|
-
// Uncomment the next line if you want start specific services in your Docker Compose config.
|
|
26
|
-
// "runServices": [],
|
|
27
|
-
|
|
28
|
-
// Uncomment the next line if you want to keep your containers running after VS Code shuts down.
|
|
29
|
-
// "shutdownAction": "none",
|
|
30
|
-
|
|
31
|
-
// When creating the container, delete unnecessary adapters, disable error reporting, set the license as confirmed, and install/update this adapter
|
|
32
|
-
"postCreateCommand": "iob del discovery && iob plugin disable sentry && iob object set system.config common.licenseConfirmed=true && NPM_PACK=$(npm pack) && iob url \"$(pwd)/$NPM_PACK\" --debug && rm \"$NPM_PACK\""
|
|
33
|
-
|
|
34
|
-
// Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root.
|
|
35
|
-
//"remoteUser": "iobroker"
|
|
36
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
version: '3'
|
|
2
|
-
|
|
3
|
-
services:
|
|
4
|
-
iobroker:
|
|
5
|
-
build: ./iobroker
|
|
6
|
-
container_name: iobroker-zigbee-d
|
|
7
|
-
hostname: iobroker-zigbee-d
|
|
8
|
-
# This port is only internal, so we can work on this while another instance of ioBroker is running on the host
|
|
9
|
-
expose:
|
|
10
|
-
- 8081
|
|
11
|
-
volumes:
|
|
12
|
-
- ..:/workspace
|
|
13
|
-
- iobrokerdata-zigbee-d:/opt/iobroker
|
|
14
|
-
environment:
|
|
15
|
-
- LANG=en_US.UTF-8
|
|
16
|
-
- LANGUAGE=en_US:en
|
|
17
|
-
- LC_ALL=en_US.UTF-8
|
|
18
|
-
- TZ=Europe/Berlin
|
|
19
|
-
- SETGID=1000
|
|
20
|
-
|
|
21
|
-
parcel:
|
|
22
|
-
container_name: parcel-i2c
|
|
23
|
-
build: ./parcel
|
|
24
|
-
expose:
|
|
25
|
-
- 1234
|
|
26
|
-
ports:
|
|
27
|
-
- '1235:1235'
|
|
28
|
-
volumes:
|
|
29
|
-
- ..:/workspace
|
|
30
|
-
environment:
|
|
31
|
-
- CHOKIDAR_USEPOLLING=1
|
|
32
|
-
|
|
33
|
-
# Reverse proxy to load up-to-date admin sources from the repo
|
|
34
|
-
nginx:
|
|
35
|
-
image: nginx:latest
|
|
36
|
-
depends_on:
|
|
37
|
-
- iobroker
|
|
38
|
-
- parcel
|
|
39
|
-
links:
|
|
40
|
-
- iobroker
|
|
41
|
-
- parcel
|
|
42
|
-
container_name: nginx-dvlp
|
|
43
|
-
volumes:
|
|
44
|
-
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
|
|
45
|
-
- ..:/workspace
|
|
46
|
-
ports:
|
|
47
|
-
# Make the ioBroker admin available under http://localhost:8082
|
|
48
|
-
- 8082:80
|
|
49
|
-
|
|
50
|
-
volumes:
|
|
51
|
-
iobrokerdata-zigbee-d:
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
worker_processes 1;
|
|
3
|
-
events { worker_connections 1024; }
|
|
4
|
-
|
|
5
|
-
http {
|
|
6
|
-
sendfile on;
|
|
7
|
-
keepalive_timeout 65;
|
|
8
|
-
|
|
9
|
-
server {
|
|
10
|
-
listen 80;
|
|
11
|
-
|
|
12
|
-
location / {
|
|
13
|
-
proxy_redirect off;
|
|
14
|
-
proxy_pass http://iobroker:8081;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
location /socket.io/ {
|
|
18
|
-
proxy_pass http://iobroker:8081;
|
|
19
|
-
proxy_http_version 1.1;
|
|
20
|
-
proxy_set_header Upgrade $http_upgrade;
|
|
21
|
-
proxy_set_header Connection "Upgrade";
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
location /adapter/i2c/ {
|
|
25
|
-
alias /workspace/admin/;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
location /adapter/i2c/build/ {
|
|
29
|
-
proxy_redirect off;
|
|
30
|
-
proxy_pass http://parcel:1234/;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|