iobroker.smartcontrol 1.2.1 → 1.3.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.
Files changed (50) hide show
  1. package/.github/ISSUE_TEMPLATE/BugReport.md +36 -36
  2. package/.github/ISSUE_TEMPLATE/Enhancement.md +19 -19
  3. package/.github/auto-merge.yml +17 -17
  4. package/.github/workflows/dependabot-auto-merge.yml +23 -22
  5. package/.github/workflows/test-and-release.yml +92 -129
  6. package/.releaseconfig.json +3 -0
  7. package/LICENSE +21 -21
  8. package/README.md +378 -406
  9. package/admin/admin.d.ts +1 -0
  10. package/admin/doc-md/img/liveInfo.png +0 -0
  11. package/admin/doc-md/info-text_de.md +1 -0
  12. package/admin/doc-md/info-text_en.md +1 -0
  13. package/admin/doc-md/readme.txt +6 -6
  14. package/admin/doc-md/start_de.md +124 -124
  15. package/admin/doc-md/start_en.md +126 -126
  16. package/admin/doc-md/table-conditions_de.md +10 -10
  17. package/admin/doc-md/table-conditions_en.md +10 -10
  18. package/admin/doc-md/table-execution_de.md +12 -12
  19. package/admin/doc-md/table-execution_en.md +12 -12
  20. package/admin/doc-md/table-target-devices_de.md +18 -18
  21. package/admin/doc-md/table-target-devices_en.md +21 -21
  22. package/admin/doc-md/table-target-enums_de.md +13 -13
  23. package/admin/doc-md/table-target-enums_en.md +15 -15
  24. package/admin/doc-md/table-target-url_de.md +29 -29
  25. package/admin/doc-md/table-target-url_en.md +27 -27
  26. package/admin/doc-md/table-trigger-devices_de.md +12 -12
  27. package/admin/doc-md/table-trigger-devices_en.md +10 -10
  28. package/admin/doc-md/table-trigger-motion_de.md +23 -23
  29. package/admin/doc-md/table-trigger-motion_en.md +24 -24
  30. package/admin/doc-md/table-trigger-times_de.md +13 -13
  31. package/admin/doc-md/table-trigger-times_en.md +11 -11
  32. package/admin/doc-md/table-zones_de.md +15 -14
  33. package/admin/doc-md/table-zones_en.md +15 -14
  34. package/admin/doc-md/table-zones_select-targets_de.md +18 -18
  35. package/admin/doc-md/table-zones_select-targets_en.md +18 -18
  36. package/admin/index_m.html +32 -14
  37. package/admin/index_m.js +31 -1
  38. package/admin/style.css +2 -0
  39. package/admin/zero-md/webcomponents-loader.min.js +8 -8
  40. package/admin/zero-md/zero-md.min.js.js +8 -8
  41. package/io-package.json +453 -449
  42. package/lib/adapter-config.d.ts +15 -15
  43. package/lib/constants.js +128 -128
  44. package/lib/helper.js +1069 -1069
  45. package/lib/tools.js +93 -93
  46. package/lib/trigger-class.js +964 -964
  47. package/main.js +3 -2
  48. package/main.test.js +30 -30
  49. package/package.json +73 -70
  50. package/.github/workflows/npmpublish.yml +0 -30
@@ -1,36 +1,36 @@
1
- ---
2
- name: Bug report
3
- about: Something is not working as it should
4
- title: ''
5
- labels: 'bug'
6
- assignees: 'Mic-M'
7
- ---
8
-
9
- **!!! Before you start !!!**
10
- 1. Verify if there is not already an issue requesting the same
11
- 2. Is this really a bug of current code or an enhancement (feature) request ?
12
-
13
- **Describe the bug**
14
- A clear and concise description of what the bug is.
15
-
16
- **To Reproduce**
17
- Steps to reproduce the behavior:
18
- 1. Go to '...'
19
- 2. Click on '...'
20
- 3. Scroll down to '....'
21
- 4. See error
22
-
23
- **Expected behavior**
24
- A clear and concise description of what you expected to happen.
25
-
26
- **Screenshots & Log files**
27
- If applicable, add screenshots and log files to help explain your problem.
28
-
29
- **Versions:**
30
- - Adapter version: <adapter-version>
31
- - JS-Controller version: <js-controller-version> <!-- determine this with `iobroker -v` on the console -->
32
- - Node version: <node-version> <!-- determine this with `node -v` on the console -->
33
- - Operating system: <os-name>
34
-
35
- **Additional context**
36
- Add any other context about the problem here.
1
+ ---
2
+ name: Bug report
3
+ about: Something is not working as it should
4
+ title: ''
5
+ labels: 'bug'
6
+ assignees: 'Mic-M'
7
+ ---
8
+
9
+ **!!! Before you start !!!**
10
+ 1. Verify if there is not already an issue requesting the same
11
+ 2. Is this really a bug of current code or an enhancement (feature) request ?
12
+
13
+ **Describe the bug**
14
+ A clear and concise description of what the bug is.
15
+
16
+ **To Reproduce**
17
+ Steps to reproduce the behavior:
18
+ 1. Go to '...'
19
+ 2. Click on '...'
20
+ 3. Scroll down to '....'
21
+ 4. See error
22
+
23
+ **Expected behavior**
24
+ A clear and concise description of what you expected to happen.
25
+
26
+ **Screenshots & Log files**
27
+ If applicable, add screenshots and log files to help explain your problem.
28
+
29
+ **Versions:**
30
+ - Adapter version: <adapter-version>
31
+ - JS-Controller version: <js-controller-version> <!-- determine this with `iobroker -v` on the console -->
32
+ - Node version: <node-version> <!-- determine this with `node -v` on the console -->
33
+ - Operating system: <os-name>
34
+
35
+ **Additional context**
36
+ Add any other context about the problem here.
@@ -1,19 +1,19 @@
1
- ---
2
- name: Enhancement Request
3
- about: Request new functionality
4
- title: ''
5
- labels: 'enhancement'
6
- assignees: 'Mic-M'
7
- ---
8
-
9
- **!!! Before you start !!!!**
10
- Verify if there is not already an issue requesting the same Enhancement.
11
-
12
- **Describe desired Enhancement !**
13
- A clear description of the desired functionality
14
-
15
- **Why should we put effort in it ?**
16
- Please add some additional information why this Enhancement should be integrated
17
-
18
- **Additional context**
19
- Add any other context about the request here.
1
+ ---
2
+ name: Enhancement Request
3
+ about: Request new functionality
4
+ title: ''
5
+ labels: 'enhancement'
6
+ assignees: 'Mic-M'
7
+ ---
8
+
9
+ **!!! Before you start !!!!**
10
+ Verify if there is not already an issue requesting the same Enhancement.
11
+
12
+ **Describe desired Enhancement !**
13
+ A clear description of the desired functionality
14
+
15
+ **Why should we put effort in it ?**
16
+ Please add some additional information why this Enhancement should be integrated
17
+
18
+ **Additional context**
19
+ Add any other context about the request here.
@@ -1,17 +1,17 @@
1
- # Configure here which dependency updates should be merged automatically.
2
- # The recommended configuration is the following:
3
- - match:
4
- # Only merge patches for production dependencies
5
- dependency_type: production
6
- update_type: "semver:patch"
7
- - match:
8
- # Except for security fixes, here we allow minor patches
9
- dependency_type: production
10
- update_type: "security:minor"
11
- - match:
12
- # and development dependencies can have a minor update, too
13
- dependency_type: development
14
- update_type: "semver:minor"
15
-
16
- # The syntax is based on the legacy dependabot v1 automerged_updates syntax, see:
17
- # https://dependabot.com/docs/config-file/#automerged_updates
1
+ # Configure here which dependency updates should be merged automatically.
2
+ # The recommended configuration is the following:
3
+ - match:
4
+ # Only merge patches for production dependencies
5
+ dependency_type: production
6
+ update_type: "semver:patch"
7
+ - match:
8
+ # Except for security fixes, here we allow minor patches
9
+ dependency_type: production
10
+ update_type: "security:minor"
11
+ - match:
12
+ # and development dependencies can have a minor update, too
13
+ dependency_type: development
14
+ update_type: "semver:minor"
15
+
16
+ # The syntax is based on the legacy dependabot v1 automerged_updates syntax, see:
17
+ # https://dependabot.com/docs/config-file/#automerged_updates
@@ -1,22 +1,23 @@
1
- # Automatically merge Dependabot PRs when version comparison is within the range
2
- # that is configured in .github/auto-merge.yml
3
-
4
- name: Auto-Merge Dependabot PRs
5
-
6
- on:
7
- pull_request:
8
-
9
- jobs:
10
- auto-merge:
11
- runs-on: ubuntu-latest
12
- steps:
13
- - name: Checkout code
14
- uses: actions/checkout@v2
15
-
16
- - name: Check if PR should be auto-merged
17
- uses: ahmadnassri/action-dependabot-auto-merge@v2
18
- with:
19
- # This must be a personal access token with push access
20
- github-token: ${{ secrets.AUTO_MERGE_TOKEN }}
21
- # By default, squash and merge, so Github chooses nice commit messages
22
- command: squash and merge
1
+ # Automatically merge Dependabot PRs when version comparison is within the range
2
+ # that is configured in .github/auto-merge.yml
3
+
4
+ name: Auto-Merge Dependabot PRs
5
+
6
+ on:
7
+ pull_request:
8
+
9
+ jobs:
10
+ auto-merge:
11
+ if: github.actor == 'dependabot[bot]'
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - name: Checkout code
15
+ uses: actions/checkout@v2
16
+
17
+ - name: Check if PR should be auto-merged
18
+ uses: ahmadnassri/action-dependabot-auto-merge@v2
19
+ with:
20
+ # This must be a personal access token with push access
21
+ github-token: ${{ secrets.AUTO_MERGE_TOKEN }}
22
+ # By default, squash and merge, so Github chooses nice commit messages
23
+ command: squash and merge
@@ -3,134 +3,97 @@ name: Test and Release
3
3
  # Run this job on all pushes and pull requests
4
4
  # as well as tags with a semantic version
5
5
  on:
6
- push:
7
- branches:
8
- - "*"
9
- tags:
10
- # normal versions
11
- - "v[0-9]+.[0-9]+.[0-9]+"
12
- # pre-releases
13
- - "v[0-9]+.[0-9]+.[0-9]+-**"
14
- pull_request: {}
6
+ push:
7
+ branches:
8
+ - "main"
9
+ tags:
10
+ # normal versions
11
+ - "v[0-9]+.[0-9]+.[0-9]+"
12
+ # pre-releases
13
+ - "v[0-9]+.[0-9]+.[0-9]+-**"
14
+ pull_request: {}
15
15
 
16
16
  jobs:
17
- # Performs quick checks before the expensive test runs
18
- check-and-lint:
19
- if: contains(github.event.head_commit.message, '[skip ci]') == false
20
-
21
- runs-on: ubuntu-latest
22
-
23
- strategy:
24
- matrix:
25
- node-version: [14.x]
26
-
27
- steps:
28
- - name: Checkout code
29
- uses: actions/checkout@v2
30
-
31
- - name: Use Node.js ${{ matrix.node-version }}
32
- uses: actions/setup-node@v1
33
- with:
34
- node-version: ${{ matrix.node-version }}
35
-
36
- - name: Install Dependencies
37
- run: npm ci
38
-
39
- - name: Lint source code
40
- run: npm run lint
41
- - name: Test package files
42
- run: npm run test:package
43
-
44
- # Runs adapter tests on all supported node versions and OSes
45
- adapter-tests:
46
- if: contains(github.event.head_commit.message, '[skip ci]') == false
47
-
48
- needs: [check-and-lint]
49
-
50
- runs-on: ${{ matrix.os }}
51
- strategy:
52
- matrix:
53
- node-version: [10.x, 12.x, 14.x]
54
- os: [ubuntu-latest, windows-latest, macos-latest]
55
-
56
- steps:
57
- - name: Checkout code
58
- uses: actions/checkout@v2
59
-
60
- - name: Use Node.js ${{ matrix.node-version }}
61
- uses: actions/setup-node@v1
62
- with:
63
- node-version: ${{ matrix.node-version }}
64
-
65
- - name: Install Dependencies
66
- run: npm ci
67
-
68
- - name: Run unit tests
69
- run: npm run test:unit
70
-
71
- - name: Run integration tests (unix only)
72
- if: startsWith(runner.OS, 'windows') == false
73
- run: DEBUG=testing:* npm run test:integration
74
-
75
- - name: Run integration tests (windows only)
76
- if: startsWith(runner.OS, 'windows')
77
- run: set DEBUG=testing:* & npm run test:integration
78
-
79
- # TODO: To enable automatic npm releases, create a token on npmjs.org
80
- # Enter this token as a GitHub secret (with name NPM_TOKEN) in the repository options
81
- # Then uncomment the following block:
82
-
83
- # # Deploys the final package to NPM
84
- # deploy:
85
- # needs: [adapter-tests]
86
- #
87
- # # Trigger this step only when a commit on any branch is tagged with a version number
88
- # if: |
89
- # contains(github.event.head_commit.message, '[skip ci]') == false &&
90
- # github.event_name == 'push' &&
91
- # startsWith(github.ref, 'refs/tags/v')
92
- #
93
- # runs-on: ubuntu-latest
94
- # strategy:
95
- # matrix:
96
- # node-version: [14.x]
97
- #
98
- # steps:
99
- # - name: Checkout code
100
- # uses: actions/checkout@v2
101
- #
102
- # - name: Use Node.js ${{ matrix.node-version }}
103
- # uses: actions/setup-node@v1
104
- # with:
105
- # node-version: ${{ matrix.node-version }}
106
- #
107
- # - name: Extract the version and commit body from the tag
108
- # id: extract_release
109
- # # The body may be multiline, therefore newlines and % need to be escaped
110
- # run: |
111
- # VERSION="${{ github.ref }}"
112
- # VERSION=${VERSION##*/v}
113
- # echo "::set-output name=VERSION::$VERSION"
114
- # BODY=$(git show -s --format=%b)
115
- # BODY="${BODY//'%'/'%25'}"
116
- # BODY="${BODY//$'\n'/'%0A'}"
117
- # BODY="${BODY//$'\r'/'%0D'}"
118
- # echo "::set-output name=BODY::$BODY"
119
- #
120
- # - name: Publish package to npm
121
- # run: |
122
- # npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
123
- # npm whoami
124
- # npm publish
125
- #
126
- # - name: Create Github Release
127
- # uses: actions/create-release@v1
128
- # env:
129
- # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
130
- # with:
131
- # tag_name: ${{ github.ref }}
132
- # release_name: Release v${{ steps.extract_release.outputs.VERSION }}
133
- # draft: false
134
- # # Prerelease versions create prereleases on Github
135
- # prerelease: ${{ contains(steps.extract_release.outputs.VERSION, '-') }}
136
- # body: ${{ steps.extract_release.outputs.BODY }}
17
+ # Performs quick checks before the expensive test runs
18
+ check-and-lint:
19
+ if: contains(github.event.head_commit.message, '[skip ci]') == false
20
+
21
+ runs-on: ubuntu-latest
22
+
23
+ strategy:
24
+ matrix:
25
+ node-version: [16.x]
26
+
27
+ steps:
28
+ - name: Checkout code
29
+ uses: actions/checkout@v3
30
+
31
+ - name: Use Node.js ${{ matrix.node-version }}
32
+ uses: actions/setup-node@v3
33
+ with:
34
+ node-version: ${{ matrix.node-version }}
35
+
36
+ - name: Install Dependencies
37
+ run: npm ci
38
+
39
+ - name: Lint source code
40
+ run: npm run lint
41
+ - name: Test package files
42
+ run: npm run test:package
43
+
44
+ # Runs adapter tests on all supported node versions and OSes
45
+ adapter-tests:
46
+ if: contains(github.event.head_commit.message, '[skip ci]') == false
47
+
48
+ needs: [check-and-lint]
49
+
50
+ runs-on: ${{ matrix.os }}
51
+ strategy:
52
+ matrix:
53
+ node-version: [14.x, 16.x]
54
+ os: [ubuntu-latest, windows-latest, macos-latest]
55
+
56
+ steps:
57
+ - name: Checkout code
58
+ uses: actions/checkout@v3
59
+
60
+ - name: Use Node.js ${{ matrix.node-version }}
61
+ uses: actions/setup-node@v3
62
+ with:
63
+ node-version: ${{ matrix.node-version }}
64
+
65
+ - name: Install Dependencies
66
+ run: npm ci
67
+
68
+ - name: Run unit tests
69
+ run: npm run test:unit
70
+
71
+ - name: Run integration tests (unix only)
72
+ if: startsWith(runner.OS, 'windows') == false
73
+ run: DEBUG=testing:* npm run test:integration
74
+
75
+ - name: Run integration tests (windows only)
76
+ if: startsWith(runner.OS, 'windows')
77
+ run: set DEBUG=testing:* & npm run test:integration
78
+
79
+ # Deploys the final package to NPM
80
+ deploy:
81
+ needs: [check-and-lint, adapter-tests]
82
+
83
+ # Trigger this step only when a commit on any branch is tagged with a version number
84
+ if: |
85
+ contains(github.event.head_commit.message, '[skip ci]') == false &&
86
+ github.event_name == 'push' &&
87
+ startsWith(github.ref, 'refs/tags/v')
88
+
89
+ runs-on: ubuntu-latest
90
+
91
+ steps:
92
+ - uses: ioBroker/testing-action-deploy@v1
93
+ with:
94
+ node-version: '16.x'
95
+ # Uncomment the following line if your adapter cannot be installed using 'npm ci'
96
+ # install-command: 'npm install'
97
+ build: false
98
+ npm-token: ${{ secrets.NPM_TOKEN }}
99
+ github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,3 @@
1
+ {
2
+ "plugins": ["iobroker", "manual-review"]
3
+ }
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2020 Mic-M <iob.micm@gmail.com>
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2020 Mic-M <iob.micm@gmail.com>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.