iobroker.smartcontrol 1.2.1 → 1.2.2
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/.github/ISSUE_TEMPLATE/BugReport.md +36 -36
- package/.github/ISSUE_TEMPLATE/Enhancement.md +19 -19
- package/.github/auto-merge.yml +17 -17
- package/.github/workflows/dependabot-auto-merge.yml +22 -22
- package/.github/workflows/npmpublish.yml +30 -30
- package/.github/workflows/test-and-release.yml +92 -129
- package/.releaseconfig.json +3 -0
- package/LICENSE +21 -21
- package/README.md +374 -406
- package/admin/doc-md/readme.txt +6 -6
- package/admin/doc-md/start_de.md +124 -124
- package/admin/doc-md/start_en.md +126 -126
- package/admin/doc-md/table-conditions_de.md +10 -10
- package/admin/doc-md/table-conditions_en.md +10 -10
- package/admin/doc-md/table-execution_de.md +12 -12
- package/admin/doc-md/table-execution_en.md +12 -12
- package/admin/doc-md/table-target-devices_de.md +18 -18
- package/admin/doc-md/table-target-devices_en.md +21 -21
- package/admin/doc-md/table-target-enums_de.md +13 -13
- package/admin/doc-md/table-target-enums_en.md +15 -15
- package/admin/doc-md/table-target-url_de.md +29 -29
- package/admin/doc-md/table-target-url_en.md +27 -27
- package/admin/doc-md/table-trigger-devices_de.md +12 -12
- package/admin/doc-md/table-trigger-devices_en.md +10 -10
- package/admin/doc-md/table-trigger-motion_de.md +23 -23
- package/admin/doc-md/table-trigger-motion_en.md +24 -24
- package/admin/doc-md/table-trigger-times_de.md +13 -13
- package/admin/doc-md/table-trigger-times_en.md +11 -11
- package/admin/doc-md/table-zones_de.md +14 -14
- package/admin/doc-md/table-zones_en.md +13 -13
- package/admin/doc-md/table-zones_select-targets_de.md +18 -18
- package/admin/doc-md/table-zones_select-targets_en.md +18 -18
- package/admin/index_m.js +1 -1
- package/admin/zero-md/webcomponents-loader.min.js +8 -8
- package/admin/zero-md/zero-md.min.js.js +8 -8
- package/io-package.json +461 -448
- package/lib/adapter-config.d.ts +15 -15
- package/lib/constants.js +128 -128
- package/lib/helper.js +1069 -1069
- package/lib/tools.js +93 -93
- package/lib/trigger-class.js +964 -964
- package/main.js +1 -1
- package/main.test.js +30 -30
- package/package.json +73 -70
package/main.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* ioBroker Smart Control Adapter
|
|
4
4
|
*
|
|
5
|
-
* @github https://github.com/
|
|
5
|
+
* @github https://github.com/iobroker-community-adapters/ioBroker.smartcontrol
|
|
6
6
|
* @forum https://forum.iobroker.net/topic/36728/
|
|
7
7
|
* @author Mic-M <https://github.com/Mic-M/ioBroker.smartcontrol>
|
|
8
8
|
* @license MIT
|
package/main.test.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* This is a dummy TypeScript test file using chai and mocha
|
|
5
|
-
*
|
|
6
|
-
* It's automatically excluded from npm and its build output is excluded from both git and npm.
|
|
7
|
-
* It is advised to test all your modules with accompanying *.test.js-files
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
// tslint:disable:no-unused-expression
|
|
11
|
-
|
|
12
|
-
const { expect } = require('chai');
|
|
13
|
-
// import { functionToTest } from "./moduleToTest";
|
|
14
|
-
|
|
15
|
-
describe('module to test => function to test', () => {
|
|
16
|
-
// initializing logic
|
|
17
|
-
const expected = 5;
|
|
18
|
-
|
|
19
|
-
it(`should return ${expected}`, () => {
|
|
20
|
-
const result = 5;
|
|
21
|
-
// assign result a value from functionToTest
|
|
22
|
-
expect(result).to.equal(expected);
|
|
23
|
-
// or using the should() syntax
|
|
24
|
-
result.should.equal(expected);
|
|
25
|
-
});
|
|
26
|
-
// ... more tests => it
|
|
27
|
-
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
// ... more test suites => describe
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* This is a dummy TypeScript test file using chai and mocha
|
|
5
|
+
*
|
|
6
|
+
* It's automatically excluded from npm and its build output is excluded from both git and npm.
|
|
7
|
+
* It is advised to test all your modules with accompanying *.test.js-files
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
// tslint:disable:no-unused-expression
|
|
11
|
+
|
|
12
|
+
const { expect } = require('chai');
|
|
13
|
+
// import { functionToTest } from "./moduleToTest";
|
|
14
|
+
|
|
15
|
+
describe('module to test => function to test', () => {
|
|
16
|
+
// initializing logic
|
|
17
|
+
const expected = 5;
|
|
18
|
+
|
|
19
|
+
it(`should return ${expected}`, () => {
|
|
20
|
+
const result = 5;
|
|
21
|
+
// assign result a value from functionToTest
|
|
22
|
+
expect(result).to.equal(expected);
|
|
23
|
+
// or using the should() syntax
|
|
24
|
+
result.should.equal(expected);
|
|
25
|
+
});
|
|
26
|
+
// ... more tests => it
|
|
27
|
+
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
// ... more test suites => describe
|
package/package.json
CHANGED
|
@@ -1,70 +1,73 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "iobroker.smartcontrol",
|
|
3
|
-
"version": "1.2.
|
|
4
|
-
"description": "Control devices smarter: by grouping, including triggers like motion, opening window, etc. and set target devices accordingly",
|
|
5
|
-
"author": {
|
|
6
|
-
"name": "Mic-M",
|
|
7
|
-
"email": "iob.micm@gmail.com"
|
|
8
|
-
},
|
|
9
|
-
"homepage": "https://github.com/
|
|
10
|
-
"license": "MIT",
|
|
11
|
-
"keywords": [
|
|
12
|
-
"smart",
|
|
13
|
-
"control",
|
|
14
|
-
"rooms",
|
|
15
|
-
"groups",
|
|
16
|
-
"motion sensors",
|
|
17
|
-
"devices",
|
|
18
|
-
"switches",
|
|
19
|
-
"lights",
|
|
20
|
-
"trigger",
|
|
21
|
-
"schedule"
|
|
22
|
-
],
|
|
23
|
-
"repository": {
|
|
24
|
-
"type": "git",
|
|
25
|
-
"url": "https://github.com/
|
|
26
|
-
},
|
|
27
|
-
"dependencies": {
|
|
28
|
-
"@iobroker/adapter-core": "^2.4.0",
|
|
29
|
-
"@types/jquery": "^3.5.
|
|
30
|
-
"cheerio": "^1.0.0-rc.
|
|
31
|
-
"got": "^11.8.0",
|
|
32
|
-
"node-schedule": "^1.
|
|
33
|
-
"suncalc2": "^1.8.1"
|
|
34
|
-
},
|
|
35
|
-
"devDependencies": {
|
|
36
|
-
"@
|
|
37
|
-
"@
|
|
38
|
-
"@
|
|
39
|
-
"@
|
|
40
|
-
"@
|
|
41
|
-
"@types/
|
|
42
|
-
"@types/
|
|
43
|
-
"@types/
|
|
44
|
-
"@types/
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
"test:
|
|
62
|
-
"test:
|
|
63
|
-
"test": "
|
|
64
|
-
"
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
"
|
|
68
|
-
},
|
|
69
|
-
"
|
|
70
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "iobroker.smartcontrol",
|
|
3
|
+
"version": "1.2.2",
|
|
4
|
+
"description": "Control devices smarter: by grouping, including triggers like motion, opening window, etc. and set target devices accordingly",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Mic-M",
|
|
7
|
+
"email": "iob.micm@gmail.com"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://github.com/iobroker-community-adapters/ioBroker.smartcontrol",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"keywords": [
|
|
12
|
+
"smart",
|
|
13
|
+
"control",
|
|
14
|
+
"rooms",
|
|
15
|
+
"groups",
|
|
16
|
+
"motion sensors",
|
|
17
|
+
"devices",
|
|
18
|
+
"switches",
|
|
19
|
+
"lights",
|
|
20
|
+
"trigger",
|
|
21
|
+
"schedule"
|
|
22
|
+
],
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "https://github.com/iobroker-community-adapters/ioBroker.smartcontrol"
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@iobroker/adapter-core": "^2.4.0",
|
|
29
|
+
"@types/jquery": "^3.5.14",
|
|
30
|
+
"cheerio": "^1.0.0-rc.12",
|
|
31
|
+
"got": "^11.8.0",
|
|
32
|
+
"node-schedule": "^2.1.0",
|
|
33
|
+
"suncalc2": "^1.8.1"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@alcalzone/release-script": "^3.5.9",
|
|
37
|
+
"@alcalzone/release-script-plugin-iobroker": "^3.5.9",
|
|
38
|
+
"@alcalzone/release-script-plugin-license": "^3.5.9",
|
|
39
|
+
"@alcalzone/release-script-plugin-manual-review": "^3.5.9",
|
|
40
|
+
"@iobroker/testing": "^4.1.0",
|
|
41
|
+
"@types/chai": "^4.3.1",
|
|
42
|
+
"@types/chai-as-promised": "^7.1.3",
|
|
43
|
+
"@types/gulp": "^4.0.9",
|
|
44
|
+
"@types/mocha": "^9.1.1",
|
|
45
|
+
"@types/node": "^18.7.23",
|
|
46
|
+
"@types/proxyquire": "^1.3.28",
|
|
47
|
+
"@types/sinon": "^10.0.11",
|
|
48
|
+
"@types/sinon-chai": "^3.2.5",
|
|
49
|
+
"axios": "^0.27.2",
|
|
50
|
+
"chai": "^4.3.6",
|
|
51
|
+
"chai-as-promised": "^7.1.1",
|
|
52
|
+
"eslint": "^8.24.0",
|
|
53
|
+
"gulp": "^4.0.2",
|
|
54
|
+
"mocha": "^10.0.0",
|
|
55
|
+
"proxyquire": "^2.1.3",
|
|
56
|
+
"sinon": "^9.2.4",
|
|
57
|
+
"sinon-chai": "^3.7.0"
|
|
58
|
+
},
|
|
59
|
+
"main": "main.js",
|
|
60
|
+
"scripts": {
|
|
61
|
+
"test:js": "mocha --opts test/mocha.custom.opts",
|
|
62
|
+
"test:package": "mocha test/package --exit",
|
|
63
|
+
"test:unit": "mocha test/unit --exit",
|
|
64
|
+
"test:integration": "mocha test/integration --exit",
|
|
65
|
+
"test": "npm run test:js && npm run test:package",
|
|
66
|
+
"lint": "eslint",
|
|
67
|
+
"release": "release-script"
|
|
68
|
+
},
|
|
69
|
+
"bugs": {
|
|
70
|
+
"url": "https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/issues"
|
|
71
|
+
},
|
|
72
|
+
"readmeFilename": "README.md"
|
|
73
|
+
}
|