iobroker.smartcontrol 1.2.0 → 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.
Files changed (45) 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 +22 -22
  5. package/.github/workflows/npmpublish.yml +30 -30
  6. package/.github/workflows/test-and-release.yml +92 -129
  7. package/.releaseconfig.json +3 -0
  8. package/LICENSE +21 -21
  9. package/README.md +374 -402
  10. package/admin/doc-md/readme.txt +6 -6
  11. package/admin/doc-md/start_de.md +124 -124
  12. package/admin/doc-md/start_en.md +126 -126
  13. package/admin/doc-md/table-conditions_de.md +10 -10
  14. package/admin/doc-md/table-conditions_en.md +10 -10
  15. package/admin/doc-md/table-execution_de.md +12 -12
  16. package/admin/doc-md/table-execution_en.md +12 -12
  17. package/admin/doc-md/table-target-devices_de.md +18 -18
  18. package/admin/doc-md/table-target-devices_en.md +21 -21
  19. package/admin/doc-md/table-target-enums_de.md +13 -13
  20. package/admin/doc-md/table-target-enums_en.md +15 -15
  21. package/admin/doc-md/table-target-url_de.md +29 -29
  22. package/admin/doc-md/table-target-url_en.md +27 -27
  23. package/admin/doc-md/table-trigger-devices_de.md +12 -12
  24. package/admin/doc-md/table-trigger-devices_en.md +10 -10
  25. package/admin/doc-md/table-trigger-motion_de.md +23 -23
  26. package/admin/doc-md/table-trigger-motion_en.md +24 -24
  27. package/admin/doc-md/table-trigger-times_de.md +13 -13
  28. package/admin/doc-md/table-trigger-times_en.md +11 -11
  29. package/admin/doc-md/table-zones_de.md +14 -14
  30. package/admin/doc-md/table-zones_en.md +13 -13
  31. package/admin/doc-md/table-zones_select-targets_de.md +18 -18
  32. package/admin/doc-md/table-zones_select-targets_en.md +18 -18
  33. package/admin/index_m.html +1 -1
  34. package/admin/index_m.js +118 -88
  35. package/admin/zero-md/webcomponents-loader.min.js +8 -8
  36. package/admin/zero-md/zero-md.min.js.js +8 -8
  37. package/io-package.json +461 -433
  38. package/lib/adapter-config.d.ts +15 -15
  39. package/lib/constants.js +128 -125
  40. package/lib/helper.js +1069 -1059
  41. package/lib/tools.js +93 -93
  42. package/lib/trigger-class.js +964 -964
  43. package/main.js +105 -48
  44. package/main.test.js +30 -30
  45. package/package.json +73 -70
package/README.md CHANGED
@@ -1,402 +1,374 @@
1
- ![Logo](admin/smartcontrol-banner.png)
2
- # ioBroker.smartcontrol
3
-
4
- [![NPM version](http://img.shields.io/npm/v/iobroker.smartcontrol.svg)](https://www.npmjs.com/package/iobroker.smartcontrol)
5
- [![Downloads](https://img.shields.io/npm/dm/iobroker.smartcontrol.svg)](https://www.npmjs.com/package/iobroker.smartcontrol)
6
- ![Number of Installations (latest)](http://iobroker.live/badges/smartcontrol-installed.svg)
7
- ![Number of Installations (stable)](http://iobroker.live/badges/smartcontrol-stable.svg)
8
- [![Dependency Status](https://img.shields.io/david/Mic-M/iobroker.smartcontrol.svg)](https://david-dm.org/Mic-M/iobroker.smartcontrol)
9
- [![Known Vulnerabilities](https://snyk.io/test/github/Mic-M/ioBroker.smartcontrol/badge.svg)](https://snyk.io/test/github/Mic-M/ioBroker.smartcontrol)
10
-
11
- [![NPM](https://nodei.co/npm/iobroker.smartcontrol.png?downloads=true)](https://nodei.co/npm/iobroker.smartcontrol/)
12
-
13
- **Tests:** ![Test and Release](https://github.com/Mic-M/ioBroker.smartcontrol/workflows/Test%20and%20Release/badge.svg)
14
-
15
- ## Smart Control Adapter for ioBroker
16
-
17
- *[click here to jump to Introduction section below](#introduction)*
18
-
19
- This adapter would not exist without the awesome and valuable input from the ioBroker community related to UI, feature requests, testing and bug reports, etc. Many thanks to everyone who contributed!
20
-
21
- This as a summary of very positive feedback from the community I want to share with you 😊 (blush) (from oldest to newest, and in German):
22
-
23
- * *Ein toller Adapter und Entwicklungsarbeit!* [source](https://forum.iobroker.net/post/461724)
24
- * *Ich finde das Hilfssystem einfach Genial.👍* [source](https://forum.iobroker.net/post/463066)
25
- * *die Auswahl ist so viel viel Übersichtlicher! Bist mein absoluter Held ! 🙂 Die Eierlegende selbstversorgende Wollmilchsau ist am laufen.. 🙂* [source](https://forum.iobroker.net/post/470948)
26
- * *erstmal ein Dankeschön für die Arbeit. Möchte nicht wissen wieviele Stunden da drin stecken 👍* [source](https://forum.iobroker.net/post/474350)
27
- * *Also ich muss sagen: TOP Arbeit!* [source](https://forum.iobroker.net/post/476116)
28
- * *super, du hast echt klasse Ideen und setzt diese sehr Userfreundlich um!* [source](https://forum.iobroker.net/post/476117)
29
- * *Die Geschwindigkeit mit der Du den Adapter nach vorne treibst ist echt erschreckend, so schlimm und schnell das man manches Mal mit dem testen nicht hinterher kommt 👍 RESPEKTABEL* [source](https://forum.iobroker.net/post/477204)
30
- * *ich bin auch recht begeistert von dem Adapter, schöne Arbeit. Hab jetzt schon längere Zeit immer mal wieder verschiedene Systeme getestet, FHEM, Nodered und jetzt seit kurzem Iobroker. So schnell hab ich meine Lichtsteuerung über Bewegungsmelder noch nie hinbekommen.* [source](https://forum.iobroker.net/post/482899)
31
- * *super sache die du da gebaut hast 🙂* [source](https://forum.iobroker.net/post/485306)
32
- * *der Adapter ist bei mir im Einsatz und läuft sehr gut. Danke für Deine Arbeit.* [source](https://forum.iobroker.net/post/485463)
33
- * *ich finde es nahezu unfassbar mit welcher Hingabe und Geschwindigkeit Du hier den Adapter nach vorne bringst. RESPEKT<br>Bis jetzt konnte ich tatsächlich alles was ich so an Blockly´s hatte in den Adapter migrieren, echt toll.<br>Ich würde mir wünschen, wenn der Adapter so weit fertig ist, das Du Dir dein ein oder anderen Adapter vornimmst, "forkst" und diesen dann ebenfalls so usernah weiterentwickelst 🙄* [source](https://forum.iobroker.net/post/488090)
34
- * *erstmal Hut ab. Der Adapter ist echt gut gelungen und es lassen sich nach einer gewissen Einarbeitungszeit in die Adapterlogik sehr viele meiner Skripte damit adaptieren. (...) Trotzdem nochmal dickes Lob, viele Dinge laufen damit seit einiger Zeit reibungslos und übersichtlicher als via Skript. 👍* [source](https://forum.iobroker.net/post/492035)
35
- * *Danke für den coolen Adapter - da kann ich nur meinen Hut davor ziehen!* [source](https://forum.iobroker.net/post/496452)
36
- * *ein dickes Lob für den Adapter und Deine vorbildliche Arbeit 👍* [source](https://forum.iobroker.net/post/497110)
37
- * *vielen Dank für die wahnsinnig gute Arbeit!* [source](https://forum.iobroker.net/post/500373)
38
- * *Danke, man das Teil ist so mächtig geworden, aber GENIAL !* [source](https://forum.iobroker.net/post/500518)
39
-
40
-
41
-
42
-
43
-
44
-
45
- ## Introduction
46
-
47
- In our [ioBroker](https://github.com/ioBroker/ioBroker) home automation we have several triggers, e.g.
48
- * motion sensor in the corridor triggers,
49
- * a wall switch is pressed,
50
- * a certain time occurs (e.g. 30 minutes after sunset or Mon-Fri at 7:00)
51
-
52
- Once such a trigger is triggering, we often want that additional conditions are (not) met (e.g. 'Today is a holiday', 'living room window is open', brightness is greater than 100 lux, etc.).
53
-
54
- Once these optional verifications passed, target states (i.e. **Target devices**) should be switched.
55
-
56
- In addition, a timer should run after a motion sensor is triggered, which (as soon as there is no more motion) switches off the target devices after the set number of seconds.
57
-
58
- All of this can be easily accomplished with this adapter, und even much more ;-)
59
-
60
- The purpose of this adapter is to to provide you a very **user-friendly environment** for various scenarios you need, and while the above was just one simple example using IFTTT (*if this, then that*), you can configure many different scenarios (called "zones" in the adapter option) for your home.
61
- Also, if your are using Javascripts/Blockly, you should be typically able to replace several scripts with this adapter, which will also ensure more consistency, a stable environment, and especially a way user-friendlier configuration.
62
-
63
- ## Installation
64
-
65
- Just install the adapter regularly through the ioBroker admin interface. The adapter is both in the latest and stable repository.<br>Once done, add an adapter instance accordingly.
66
-
67
- ## Instructions
68
-
69
- I have included all instructions right in the admin settings of this adapter.
70
-
71
- <sub>Reason: We are having a nice term [Medienbruch](https://de.wikipedia.org/wiki/Medienbruch) in the German language, which is an unnecessary requirement to 'break' the current medium and switch to a different medium (like different website, program, etc.) to execute/complete a task, etc. Since this is cumbersome, I have included all instructions in the admin settings of this adapter.</sub>
72
-
73
- Also, you can read most of these instructions here as well:
74
- * [**Basic Adapter Instructions**](https://github.com/Mic-M/ioBroker.smartcontrol/blob/master/admin/doc-md/start_en.md) - for German [click here (Deutsch)](https://github.com/Mic-M/ioBroker.smartcontrol/blob/master/admin/doc-md/start_de.md)
75
- * [**Target Devices**](https://github.com/Mic-M/ioBroker.smartcontrol/blob/master/admin/doc-md/table-target-devices_en.md) - for German [click here (Deutsch)](https://github.com/Mic-M/ioBroker.smartcontrol/blob/master/admin/doc-md/table-target-devices_de.md)
76
- * [**Additional Conditions**](https://github.com/Mic-M/ioBroker.smartcontrol/blob/master/admin/doc-md/table-conditions_en.md) - for German [click here (Deutsch)](https://github.com/Mic-M/ioBroker.smartcontrol/blob/master/admin/doc-md/table-conditions_de.md)
77
- * [**Triggers: Motion Sensors**](https://github.com/Mic-M/ioBroker.smartcontrol/blob/master/admin/doc-md/table-trigger-motion_en.md) - for German [click here (Deutsch)](https://github.com/Mic-M/ioBroker.smartcontrol/blob/master/admin/doc-md/table-trigger-motion_de.md)
78
- * [**Triggers: Other Devices (wall switch, etc.)**](https://github.com/Mic-M/ioBroker.smartcontrol/blob/master/admin/doc-md/table-trigger-devices_en.md) - for German [click here (Deutsch)](https://github.com/Mic-M/ioBroker.smartcontrol/blob/master/admin/doc-md/table-trigger-devices_de.md)
79
- * [**Triggers: Time-dependent**](https://github.com/Mic-M/ioBroker.smartcontrol/blob/master/admin/doc-md/table-trigger-times_en.md) - for German [click here (Deutsch)](https://github.com/Mic-M/ioBroker.smartcontrol/blob/master/admin/doc-md/table-trigger-times_de.md)
80
- * [**Zones**](https://github.com/Mic-M/ioBroker.smartcontrol/blob/master/admin/doc-md/table-zones_en.md) - for German [click here (Deutsch)](https://github.com/Mic-M/ioBroker.smartcontrol/blob/master/admin/doc-md/table-zones_de.md)
81
- * [**Execution Settings**](https://github.com/Mic-M/ioBroker.smartcontrol/blob/master/admin/doc-md/table-execution_en.md) - for German [click here (Deutsch)](https://github.com/Mic-M/ioBroker.smartcontrol/blob/master/admin/doc-md/table-execution_de.md)
82
-
83
- ## Screenshots of adapter options (17-Sep-2020)
84
-
85
- Please note that these screenshots are a snapshot and do not reflect the latest adapter options.
86
- This is just to provide you an overview of the adapter options.
87
-
88
- ![SmartControl Options](admin/img/option-screenshots/tab-start.png)
89
-
90
- ![SmartControl Options](admin/img/option-screenshots/tab-triggers-motion.png)
91
-
92
- ![SmartControl Options](admin/img/option-screenshots/tab-triggers-other.png)
93
-
94
- ![SmartControl Options](admin/img/option-screenshots/tab-triggers-time.png)
95
-
96
- ![SmartControl Options](admin/img/option-screenshots/tab-target-devices.png)
97
-
98
- ![SmartControl Options](admin/img/option-screenshots/tab-conditions.png)
99
-
100
- ![SmartControl Options](admin/img/option-screenshots/tab-zones.png)
101
-
102
- ![SmartControl Options](admin/img/option-screenshots/tab-zones-execution.png)
103
-
104
- ![SmartControl Options](admin/img/option-screenshots/tab-further-options.png)
105
-
106
-
107
- ## Links and resources
108
- * [**Permanent Smart Control ioBroker Forum Link (Splash Page)**](https://forum.iobroker.net/topic/36728/smart-control-adapter-splash-page)
109
-
110
-
111
- ## Notes
112
- * This adapter uses Sentry libraries to automatically report exceptions and code errors to the developers.** For more details and for information how to disable the error reporting see [Sentry-Plugin Documentation](https://github.com/ioBroker/plugin-sentry#plugin-sentry)! Sentry reporting is used starting with js-controller 3.0.
113
- * Adapter icon made by [freepik](https://www.flaticon.com/authors/freepik) from [flaticon.com](https://www.flaticon.com/).</sup></sub>
114
-
115
- ## Changelog
116
-
117
- ### 1.2.0
118
- * (Mic-M) Fix: [#60 - Linked triggers of motion sensors issue](https://github.com/Mic-M/ioBroker.smartcontrol/issues/60)
119
- * (Mic-M) Several code improvements
120
- * (Mic-M) Issues [#35](https://github.com/Mic-M/ioBroker.smartcontrol/issues/35) and [#43](https://github.com/Mic-M/ioBroker.smartcontrol/issues/43) confirmed as resolved, therefore all workaround code removed.
121
-
122
-
123
- ### 1.1.1
124
- * (Mic-M) Fix: Most likely finally fixes [issue #43](https://github.com/Mic-M/ioBroker.smartcontrol/issues/43) as well as workaround for [issue #35](https://github.com/Mic-M/ioBroker.smartcontrol/issues/35) (scheduleJob() of node-schedule module: now applying 'cancel' method prior to reschedule every midnight)
125
- * (Mic-M) Update adapter documentation
126
-
127
- ### 1.1.0
128
- * (Mic-M) Improvement: if multiple motion sensors assigned to zone, zone will not switch off if any other motion sensor assigned to same zone is still motion=true (addresses [issue #45](https://github.com/Mic-M/ioBroker.smartcontrol/issues/45))
129
- * (Mic-M) Internal: align testing with latest adapter creator (remove travis and use github test only)
130
-
131
-
132
- ### 1.0.0
133
- * (Mic-M) No changes - just prepared versioning to add adapter to stable repository per adapter development documentation, [Versioning section](https://github.com/ioBroker/ioBroker.docs/blob/master/docs/en/dev/adapterdev.md).
134
-
135
- ### 0.6.0
136
- * (Mic-M) Several code improvements / fixes
137
- * (Mic-M) Enhancement: New 'Linked devices' options for tab '3. TRIGGER', motion sensors.
138
-
139
- ### 0.5.13
140
- * (Mic-M) Issue #35 should be finally fixed.
141
- * (Mic-M) Enhancement: New state `info.log.switchedTargetDevices.json` for recently switched target devices
142
- * (Mic-M) Code improvements
143
-
144
- ### 0.5.12
145
- * (Mic-M) Another fix of 0.5.10 and improvement of debug log
146
-
147
- ### 0.5.11
148
- * (Mic-M) Fix of 0.5.10
149
-
150
- ### 0.5.10
151
- * (Mic-M) Potential fix / workaround: for issue #35 to verify if schedule was called before at the same time
152
-
153
-
154
- ### 0.5.9
155
- * (Mic-M) **Breaking Change** New feature: 'Target Devices' -> 'Target URLs': added separate URL field to switch device off. This is breaking, since adapter admin config will have blank fields of 'Target URLs' once you update the adapter, and state ids will change as well.
156
- * (Mic-M) Enhancement: 'Target Devices' -> 'Target URLs' : [Allow DNS name](https://forum.iobroker.net/post/510154)
157
-
158
- ### 0.5.8
159
- * (Mic-M) Fixed admin options
160
-
161
- ### 0.5.7
162
- * (Mic-M) Various code fixes and improvements
163
- * (Mic-M) Potentially fix of [issue #35](https://github.com/Mic-M/ioBroker.smartcontrol/issues/35) - to be tested
164
- * (Mic-M) Enhancement for 'Target Devices': Add table to call URLs als target (implementation of [issue #1](https://github.com/Mic-M/ioBroker.smartcontrol/issues/1))
165
-
166
-
167
- ### 0.5.6
168
- * (Mic-M) Hotfix: loading admin settings for enums
169
-
170
- ### 0.5.5
171
- * (Mic-M) Fixed error (reported by [Sentry](https://github.com/Mic-M/ioBroker.smartcontrol#notes)): `Cannot read property 'log' of undefined` in _asyncSetTargetDevices_processZone()
172
- * (Mic-M) Fixed issue: Tab TARGET DEVICES > Enumerations: functions and rooms selection were sometimes blank, and chosen item was sometimes deleted after saving and reopening admin options.
173
- * (Mic-M) Future - Early preparation work, not yet visible and not yet activated! - Tab TARGET DEVICES: new table for URLs as targets will be added ([see issue](https://github.com/Mic-M/ioBroker.smartcontrol/issues/1))
174
-
175
- ### 0.5.4
176
- * (Mic-M) New feature: TARGET DEVICES - add delay option for delayed switching on of target device.
177
-
178
- ### 0.5.3
179
- * (Mic-M) New feature: ZONES - target devices: you can now assign a delay in seconds to wait until the device is being switched on
180
- * (Mic-M) Various fixes
181
-
182
- ### 0.5.2
183
- * (Mic-M) Fix: Removed redundant column in Target Devices table
184
- * (Mic-M) Fix: Under the hood (admin/index_m.js, admin/tsconfig.json, admin/admin.d.ts)
185
-
186
- ### 0.5.1
187
- * (Mic-M) Fixed clearing timeout while adapter is stopping.
188
-
189
- ### 0.5.0
190
- * (Mic-M) New feature: ZONES - New option "Delay for switching zone on (in seconds)" - [issue #31](https://github.com/Mic-M/ioBroker.smartcontrol/issues/31)
191
- * (Mic-M) New feature: ZONES - New option "Never switch off if..." - [issue #32](https://github.com/Mic-M/ioBroker.smartcontrol/issues/32)
192
-
193
-
194
- ### 0.4.4
195
- * (Mic-M) New feature: allow comparison operators `!=` / `<>` in 'TRIGGERS -> Other triggers' to trigger if state value is unequal. Example: `<>30` or `!=30` - see [Forum](https://forum.iobroker.net/post/496133)
196
- * (Mic-M) Fix: Don't create `smartcontrol.x.options.TargetDevices.` states for enums since this does not make sense for enums.
197
- * (Mic-M) Fix: Don't create `smartcontrol.x.targetDevices.` states for enums since this does not make sense for enums.
198
- * (Mic-M) Moved log `Trigger xyz was already activated x seconds ago and is ignored...` from regular info log to debug/'extended info log' - [Forum](https://forum.iobroker.net/post/496604)
199
-
200
-
201
- ### 0.4.3
202
- * (Mic-M) New feature in adapter options: configure number of entries in 'smartcontrol.x.info.log.zoneActivations.json'
203
- * (Mic-M) Extend adapter documentation by adding new 0.4.0 features
204
- * (Mic-M) Fixed issue regarding 'smartcontrol.x.userstates.xxx' creation
205
-
206
- ### 0.4.2
207
- * (Mic-M) Fix code
208
-
209
- ### 0.4.1
210
- * (Mic-M) Fixed io-package.json
211
-
212
-
213
- ### 0.4.0
214
- * (Mic-M) New feature: Tab 'Target Devices': New table 'Targets: Enum functions' to **support enum functions**, and optionally limit to certain enum rooms. [issue #29](https://github.com/Mic-M/ioBroker.smartcontrol/issues/29).
215
- * (Mic-M) New feature: New JSON state for recent zone activations: 'smartcontrol.x.info.log.zoneActivations.json'. [issue #30](https://github.com/Mic-M/ioBroker.smartcontrol/issues/30).
216
- * (Mic-M) Code fixes
217
-
218
-
219
- ### 0.3.10
220
- * (Mic-M) Fixed io-package.json
221
-
222
- ### 0.3.9
223
- * (Mic-M) New feature: Table "Additional Conditions" is now allowing comparators like `> 30`, `<= 25` etc. in column 'State value'. See [issue #28](https://github.com/Mic-M/ioBroker.smartcontrol/issues/28)
224
-
225
- ### 0.3.8
226
- * (Mic-M) Updated readme since adapter [is now in latest repository](https://github.com/ioBroker/ioBroker.repositories/pull/930)
227
- * (Mic-M) Updated translations, which also addresses [#26](https://github.com/Mic-M/ioBroker.smartcontrol/issues/26)
228
- * (Mic-M) Fixed/improved 'admin/index_m.js'
229
-
230
- ### 0.3.7
231
- * (Mic-M) Mini update, just under the hood.
232
-
233
- ### 0.3.6
234
- * (Mic-M) Minor translation update and [Compact Mode test](https://forum.iobroker.net/topic/32789/anleitung-f%C3%BCr-adapter-entwickler-compact-mode-testen) successfully completed.
235
-
236
- ### 0.3.5
237
- * (Mic-M) Internationalization (i18n) only – added all required 10 languages, and provide documentation in English and German plus support for embedded other translations (like Russian, Spanish, etc.) within the admin configuration.
238
-
239
- ### 0.3.4
240
- * (Mic-M) Test: Implementation of markdown documentation files within adapter configuration by using [zero-md](https://github.com/zerodevx/) for tables 'Target Devices' and 'Additional Conditions' to prepare adapter for multiple languages. Based on your language set in the adapter configuration, either German will be displayed (if language set to German) or English, if set language is not German.
241
-
242
-
243
- ### 0.3.3
244
- * (Mic-M) New feature for Motion sensors: the timer duration and brightness threshold can now be changed via states. These states are available under `smartcontrol.0.options.TriggerMotion.xxx.<duration|briThreshold>` for each of your motion sensors. Please note that any change will cause an adapter restart (for initializing and clearing all existing timers to apply the new values). [Issue #18](https://github.com/Mic-M/ioBroker.smartcontrol/issues/18)
245
-
246
- ### 0.3.2
247
- * (Mic-M) New feature: In the adapter configuration, tab 'Further Options' > 'Input Validation', you can now select if deactivated configuration table rows should be validated as well.
248
- * (Mic-M) Fix [adapter-check.iobroker.in](https://adapter-check.iobroker.in/) error [E144] "common.installedFrom field found in io-package.json. Must be removed."
249
- * (Mic-M) Fix for adapter unload: check schedule variable for undefined.
250
- * (Mic-M) Fixed debug log line
251
-
252
-
253
- ### 0.3.1
254
- * (Mic-M) Fix error if no duration is set for motion sensor - [Forum Link](https://forum.iobroker.net/post/487630)
255
-
256
- ### 0.3.0
257
- **Breaking Changes**
258
- * (Mic-M) Entire adapter code refactored. Therefore, tests are required to verify if these massive changes do not affect the adapter functionality. However, none of your existing adapter configuration should be lost and will be kept if you upgrade from 0.2.0+. But please check ALL of your configuration, since new options were added which
259
- can have an effect to your existing configuration.
260
- * (Mic-M) New feature: Implemented [issue #22](https://github.com/Mic-M/ioBroker.smartcontrol/issues/22) - Motion sensors timeout, e.g. for Homematic sensors: Motion sensor timer will now start once a motion sensor is set to false. In previous adapter versions, it was started once set to true.
261
- <br><strong>Note:</strong> This change will cause that per your existing adapter configuration, the timer end will be reached later (so: once no motion detected any longer + the seconds you have set)
262
- * (Mic-M) New feature: Time triggers - added options for additional conditions for 'any' or 'all'. [issue #24](https://github.com/Mic-M/ioBroker.smartcontrol/issues/24)
263
- * (Mic-M) New feature: Zones > Execution - added options for additional conditions for 'any' or 'all'.
264
- * (Mic-M) Many fixes under the hood
265
-
266
-
267
-
268
- ### 0.2.2
269
- * (Mic-M) New feature: In '3. TRIGGERS', 'Other Triggers', you can now easily create own states as triggers under 'smartcontrol.x.userstates'
270
-
271
- ### 0.2.1
272
- * (Mic-M) Fixed motion sensors table, column 'seconds' to allow 0 seconds for deactivation
273
-
274
- ### 0.2.0
275
- **Breaking Change**
276
- * German: In den Adapter-Optionen wurde der Reiter und die Tabelle "Ausführung" entfernt und stattdessen in "4. ZONEN" integriert. <br>Das bedeutet für euch: Falls ihr von einer vorherigen Version aktualisiert, sichert zuvor die Adapter-Einstellungen (blauer Knopf mit "Pfeil nach unten" ganz oben rechts in den Adapter-Optionen).
277
- Diese gehen sonst verloren. In einem Texteditor könnt ihr diese einsehen und dann in "4. ZONEN" unter Ausführung übertragen.
278
- * English: Tab "Execution" was removed and transferred to "4. ZONES". If you have installed and used a previous version of this adapter, please save your adapter configuration settings prior to update the adapter (adapter settings: blue button at the top right corner with 'arror down' symbol).
279
-
280
- Change Log for 0.2.0:
281
- * (Mic-M) New feature: Admin Options: Removed tab "5. EXECUTION" (German "5. AUSFÜHRUNG") and included in tab "4. ZONES"
282
- * (Mic-M) New feature: Changing name fields (renaming) will also change names in all other tables, in which these names are used. This is a huge usability improvement to quickly re-organize/rename table names without the need to correct in other tables accordingly.
283
- * (Mic-M) Improvement: Add info.connection to allow setting adapter to "yellow" in case of any configuration errors
284
-
285
- ### 0.1.2-beta.7
286
- * (Mic-M) Improvement: Once user clicks "Save" in admin options, adapter verifies if all required tables are filled, and throws an error via dialog box, which shows details.
287
- * (Mic-M) Fixed error handling for 'overwrite state vals' in target devices table
288
-
289
- ### 0.1.2-beta.6
290
- * (Mic-M) New feature: Changing name fields in admin options now also sets the names in all other fields to the new value.
291
-
292
- ### 0.1.2-beta.5
293
- * (Mic-M) New feature: option in Target Devices table to not verify if device is already on/off. Use case is e.g. for button states which do not reflect the actual status of the device in the state (like Broadlink, etc.). Addresses [request #5](https://github.com/Mic-M/ioBroker.smartcontrol/issues/5)
294
-
295
- ### 0.1.2-beta.4
296
- * (Mic-M) Enhance functionality of validating/correcting config settings (new feature with 0.1.2-beta.3) to also process overwritten target device values. The issue is described here: [ioBroker forum post](https://forum.iobroker.net/post/472856).
297
- * (Mic-M) Improved validation of all adapter config settings (user input)
298
-
299
- ### 0.1.2-beta.3
300
- * (Mic-M) New feature: Overwrite target device values in Zones table, addresses [#16](https://github.com/Mic-M/ioBroker.smartcontrol/issues/16) and [#15](https://github.com/Mic-M/ioBroker.smartcontrol/issues/15)
301
- * (Mic-M) Improved dialogs for selection: all selected nodes are expanded when opening, and additional buttons 'collapse all' and 'expand all' - [#17](https://github.com/Mic-M/ioBroker.smartcontrol/issues/17)
302
-
303
- ### 0.1.2-beta.2
304
- * (Mic-M) Fixed saving of admin options for tab 'Further Options'.
305
-
306
- ### 0.1.2-beta.1
307
- * (Mic-M) New feature: Additional dialogs in various tables to easily select items (like target devices) by implementing a modal dialog, FancyTree, etc.
308
- * (Mic-M) Improved table filter functionality in adapter configuration
309
-
310
- ### 0.1.1-beta.6
311
- * (Mic-M) Added [Sentry](https://github.com/ioBroker/plugin-sentry)
312
-
313
- ### 0.1.1-beta.5
314
- * (Mic-M) New feature: Add filter field to each table in adapter configuration to filter table rows.
315
-
316
- ### 0.1.1-beta.4
317
- * (Mic-M) Fixed errors of 0.1.1-beta.3. **Note** You may still experience errors in comparison to 0.1.1-beta.2 due to the major and breaking changes of 0.1.1-beta.3. In case of any issues in productive environments: please go back to 0.1.1-beta.2 and report your issue.
318
-
319
- ### 0.1.1-beta.3
320
- * (Mic-M) **Breaking:** I did some breaking code changes under the hood, to fix various issues. I have tested these changes well, but negative side effects are still likely. No changes to options or states, so no worries here. But please use new version with care and report any issues.
321
- * (Mic-M) Fix: issue https://forum.iobroker.net/post/464466
322
- * (Mic-M) Extensive code changes and several bug fixes within code
323
- * (hombach) corrected typos and wordings in admin/index_m.html
324
- * (hombach) corrected translations in docs/translations.md
325
- * (hombach) extended Travis tests to include ARM CPUs
326
-
327
-
328
- ### 0.1.1-beta.2
329
- * (Mic-M) Fix: Perform configuration validation and correction also for non-active table rows, since these can be switched on thru `smartcontrol.x.options.xxx.xxx.active` states.
330
-
331
-
332
- ### 0.1.1-beta.1
333
- * (Mic-M) New feature: New option in motion sensor table: if activated, motion triggers will not set a timeout if target device was turned on previously without a motion trigger ("manually"). [Forum Link](https://forum.iobroker.net/post/433871)
334
- * (Mic-M) Fix: non-consistent logs for verifying config
335
- * (Mic-M) Change: changed limitTriggerInterval from 2s to 1s - [Issue #3](https://github.com/Mic-M/ioBroker.smartcontrol/issues/3)
336
- * (Mic-M) Fix: 24:00 as time: now treated as 0:00 but adding 24h to timestamp.
337
- * (Mic-M) Fix: If a trigger state path was used multiple times in different triggers and schedules, second schedule stopped. [Forum Link](https://forum.iobroker.net/post/464208)
338
- * (Mic-M) Improvement: Better info log / extended info log per Option 'Extended Info Log'
339
-
340
- ### 0.1.0-alpha.11
341
- * (Mic-M) Fix: check for 'is time between'
342
-
343
- ### 0.1.0-alpha.10
344
- * (Mic-M) New feature: Provide "Toggle?" option in 'Other Triggers' table to allow toggles: if targets are off -> turn on, and vice versa.
345
- * (Mic-M) New feature: Allow using same trigger state multiple times. Required significant code changes.
346
- * (Mic-M) New feature: If you are using multiple motion sensors for a zone: whenever a motion device triggers, the turn off timer is being stopped and a new timer is set per the latest motion sensor.
347
- * (Mic-M) New feature: In certain northern areas is night/nightEnd not available at least in Summer in Germay. New adapter option added to set midnight to 0:00 and midnightEnd to 2:00 in this case.
348
- * (Mic-M) New feature 'Always of after x secs' in Zones table.
349
- * (Mic-M) + a few more features I forgot do mention ;)
350
-
351
- ### 0.1.0-alpha.9
352
- * (Mic-M) New feature: Triggers (Auslöser) - new option to switch target devices off and not on for 'Other Triggers' and 'Time specific Triggers'
353
-
354
- ### 0.1.0-alpha.8
355
- * (Mic-M) Editorial only: rename '5. ZEITPLÄNE' (SCHEDULES) into '5. AUSFÜHRUNG' (EXECUTION) throughout the code - https://forum.iobroker.net/post/461282
356
-
357
- ### 0.1.0-alpha.7
358
- * (Mic-M) Extend option 'triggerStatesAck' to include alias and namespaces not from adapters - https://forum.iobroker.net/post/461221
359
-
360
- ### 0.1.0-alpha.6
361
- * (Mic-M) Remove requirement that trigger states must be unique - https://forum.iobroker.net/post/461115
362
-
363
- ### 0.1.0-alpha.5
364
- * (Mic-M) New feature: allow comparison operators >=, <=, >, < for trigger states
365
-
366
- ### 0.1.0-alpha.4
367
- * (Mic-M) translations
368
-
369
- ### 0.1.0-alpha.3
370
- * (Mic-M) multiple changes, improvements and enhancements
371
-
372
- ### 0.1.0-alpha.2
373
- * (Mic-M) multiple changes, improvements and enhancements
374
-
375
- ### 0.1.0-alpha.1
376
- * (Mic-M) multiple changes, improvements and enhancements
377
-
378
- ### 0.0.3
379
- * (Mic-M) release for very early testers
380
-
381
- ## License
382
- MIT License
383
-
384
- Copyright (c) 2020 Mic-M <iob.micm@gmail.com>
385
-
386
- Permission is hereby granted, free of charge, to any person obtaining a copy
387
- of this software and associated documentation files (the "Software"), to deal
388
- in the Software without restriction, including without limitation the rights
389
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
390
- copies of the Software, and to permit persons to whom the Software is
391
- furnished to do so, subject to the following conditions:
392
-
393
- The above copyright notice and this permission notice shall be included in all
394
- copies or substantial portions of the Software.
395
-
396
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
397
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
398
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
399
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
400
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
401
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
402
- SOFTWARE.
1
+ ![Logo](admin/smartcontrol-banner.png)
2
+ # ioBroker.smartcontrol
3
+
4
+ [![NPM version](http://img.shields.io/npm/v/iobroker.smartcontrol.svg)](https://www.npmjs.com/package/iobroker.smartcontrol)
5
+ [![Downloads](https://img.shields.io/npm/dm/iobroker.smartcontrol.svg)](https://www.npmjs.com/package/iobroker.smartcontrol)
6
+ ![Number of Installations (latest)](http://iobroker.live/badges/smartcontrol-installed.svg)
7
+ ![Number of Installations (stable)](http://iobroker.live/badges/smartcontrol-stable.svg)
8
+ [![Known Vulnerabilities](https://snyk.io/test/github/iobroker-community-adapters/ioBroker.smartcontrol/badge.svg)](https://snyk.io/test/github/iobroker-community-adapters/ioBroker.smartcontrol)
9
+
10
+ [![NPM](https://nodei.co/npm/iobroker.smartcontrol.png?downloads=true)](https://nodei.co/npm/iobroker.smartcontrol/)
11
+
12
+ **Tests:** ![Test and Release](https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/workflows/Test%20and%20Release/badge.svg)
13
+
14
+ ## Smart Control Adapter for ioBroker
15
+
16
+ This adapter would not exist without Mic-M. He started this awsome adapter and bring it to a well working adapter. Due to personal issues he stopped the work on this. Thank you for your work. You will be welcome to take it over or work together on this very helpfull adapter. A lot of fans of this adapter was asking for continue this and this will happen inside of iobroker-community-adapters.
17
+
18
+ ## Introduction
19
+
20
+ In our [ioBroker](https://github.com/ioBroker/ioBroker) home automation we have several triggers, e.g.
21
+ * motion sensor in the corridor triggers,
22
+ * a wall switch is pressed,
23
+ * a certain time occurs (e.g. 30 minutes after sunset or Mon-Fri at 7:00)
24
+
25
+ Once such a trigger is triggering, we often want that additional conditions are (not) met (e.g. 'Today is a holiday', 'living room window is open', brightness is greater than 100 lux, etc.).
26
+
27
+ Once these optional verifications passed, target states (i.e. **Target devices**) should be switched.
28
+
29
+ In addition, a timer should run after a motion sensor is triggered, which (as soon as there is no more motion) switches off the target devices after the set number of seconds.
30
+
31
+ All of this can be easily accomplished with this adapter, und even much more ;-)
32
+
33
+ The purpose of this adapter is to to provide you a very **user-friendly environment** for various scenarios you need, and while the above was just one simple example using IFTTT (*if this, then that*), you can configure many different scenarios (called "zones" in the adapter option) for your home.
34
+ Also, if your are using Javascripts/Blockly, you should be typically able to replace several scripts with this adapter, which will also ensure more consistency, a stable environment, and especially a way user-friendlier configuration.
35
+
36
+ ## Installation
37
+
38
+ Just install the adapter regularly through the ioBroker admin interface. The adapter is both in the latest and stable repository.<br>Once done, add an adapter instance accordingly.
39
+
40
+ ## Instructions
41
+
42
+ I have included all instructions right in the admin settings of this adapter.
43
+
44
+ <sub>Reason: We are having a nice term [Medienbruch](https://de.wikipedia.org/wiki/Medienbruch) in the German language, which is an unnecessary requirement to 'break' the current medium and switch to a different medium (like different website, program, etc.) to execute/complete a task, etc. Since this is cumbersome, I have included all instructions in the admin settings of this adapter.</sub>
45
+
46
+ Also, you can read most of these instructions here as well:
47
+ * [**Basic Adapter Instructions**](https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/blob/master/admin/doc-md/start_en.md) - for German [click here (Deutsch)](https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/blob/master/admin/doc-md/start_de.md)
48
+ * [**Target Devices**](https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/blob/master/admin/doc-md/table-target-devices_en.md) - for German [click here (Deutsch)](https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/blob/master/admin/doc-md/table-target-devices_de.md)
49
+ * [**Additional Conditions**](https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/blob/master/admin/doc-md/table-conditions_en.md) - for German [click here (Deutsch)](https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/blob/master/admin/doc-md/table-conditions_de.md)
50
+ * [**Triggers: Motion Sensors**](https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/blob/master/admin/doc-md/table-trigger-motion_en.md) - for German [click here (Deutsch)](https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/blob/master/admin/doc-md/table-trigger-motion_de.md)
51
+ * [**Triggers: Other Devices (wall switch, etc.)**](https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/blob/master/admin/doc-md/table-trigger-devices_en.md) - for German [click here (Deutsch)](https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/blob/master/admin/doc-md/table-trigger-devices_de.md)
52
+ * [**Triggers: Time-dependent**](https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/blob/master/admin/doc-md/table-trigger-times_en.md) - for German [click here (Deutsch)](https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/blob/master/admin/doc-md/table-trigger-times_de.md)
53
+ * [**Zones**](https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/blob/master/admin/doc-md/table-zones_en.md) - for German [click here (Deutsch)](https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/blob/master/admin/doc-md/table-zones_de.md)
54
+ * [**Execution Settings**](https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/blob/master/admin/doc-md/table-execution_en.md) - for German [click here (Deutsch)](https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/blob/master/admin/doc-md/table-execution_de.md)
55
+
56
+ ## Screenshots of adapter options (17-Sep-2020)
57
+
58
+ Please note that these screenshots are a snapshot and do not reflect the latest adapter options.
59
+ This is just to provide you an overview of the adapter options.
60
+
61
+ ![SmartControl Options](admin/img/option-screenshots/tab-start.png)
62
+
63
+ ![SmartControl Options](admin/img/option-screenshots/tab-triggers-motion.png)
64
+
65
+ ![SmartControl Options](admin/img/option-screenshots/tab-triggers-other.png)
66
+
67
+ ![SmartControl Options](admin/img/option-screenshots/tab-triggers-time.png)
68
+
69
+ ![SmartControl Options](admin/img/option-screenshots/tab-target-devices.png)
70
+
71
+ ![SmartControl Options](admin/img/option-screenshots/tab-conditions.png)
72
+
73
+ ![SmartControl Options](admin/img/option-screenshots/tab-zones.png)
74
+
75
+ ![SmartControl Options](admin/img/option-screenshots/tab-zones-execution.png)
76
+
77
+ ![SmartControl Options](admin/img/option-screenshots/tab-further-options.png)
78
+
79
+
80
+ ## Links and resources
81
+ * [**Permanent Smart Control ioBroker Forum Link (Splash Page)**](https://forum.iobroker.net/topic/36728/smart-control-adapter-splash-page)
82
+
83
+
84
+ ## Notes
85
+ * This adapter uses Sentry libraries to automatically report exceptions and code errors to the developers.** For more details and for information how to disable the error reporting see [Sentry-Plugin Documentation](https://github.com/ioBroker/plugin-sentry#plugin-sentry)! Sentry reporting is used starting with js-controller 3.0.
86
+ * Adapter icon made by [freepik](https://www.flaticon.com/authors/freepik) from [flaticon.com](https://www.flaticon.com/).</sup></sub>
87
+
88
+ ## Changelog
89
+ <!--
90
+ Placeholder for the next version (at the beginning of the line):
91
+ ### **WORK IN PROGRESS**
92
+ -->
93
+ ### 1.2.2 (2022-10-11)
94
+ * (oelison) migration to links in iobroker-community-adapters
95
+ * (oelison) update due to open PR of original repo
96
+ * (oelison) node testing to 12, 14, 16
97
+
98
+ ### 1.2.1
99
+ * (Mic-M) Enhancement: Now, all adapter config validations take place while saving the adapter configuration, and all identified errors are shown in a dialog. Addresses issue [#61](https://github.com/Mic-M/ioBroker.smartcontrol/issues/61)
100
+
101
+ ### 1.2.0
102
+ * (Mic-M) Fix: [#60 - Linked triggers of motion sensors issue](https://github.com/Mic-M/ioBroker.smartcontrol/issues/60)
103
+ * (Mic-M) Several code improvements
104
+ * (Mic-M) Issues [#35](https://github.com/Mic-M/ioBroker.smartcontrol/issues/35) and [#43](https://github.com/Mic-M/ioBroker.smartcontrol/issues/43) confirmed as resolved, therefore all workaround code removed.
105
+
106
+ ### 1.1.1
107
+ * (Mic-M) Fix: Most likely finally fixes [issue #43](https://github.com/Mic-M/ioBroker.smartcontrol/issues/43) as well as workaround for [issue #35](https://github.com/Mic-M/ioBroker.smartcontrol/issues/35) (scheduleJob() of node-schedule module: now applying 'cancel' method prior to reschedule every midnight)
108
+ * (Mic-M) Update adapter documentation
109
+
110
+ ### 1.1.0
111
+ * (Mic-M) Improvement: if multiple motion sensors assigned to zone, zone will not switch off if any other motion sensor assigned to same zone is still motion=true (addresses [issue #45](https://github.com/Mic-M/ioBroker.smartcontrol/issues/45))
112
+ * (Mic-M) Internal: align testing with latest adapter creator (remove travis and use github test only)
113
+
114
+ ### 1.0.0
115
+ * (Mic-M) No changes - just prepared versioning to add adapter to stable repository per adapter development documentation, [Versioning section](https://github.com/ioBroker/ioBroker.docs/blob/master/docs/en/dev/adapterdev.md).
116
+
117
+ ### 0.6.0
118
+ * (Mic-M) Several code improvements / fixes
119
+ * (Mic-M) Enhancement: New 'Linked devices' options for tab '3. TRIGGER', motion sensors.
120
+
121
+ ### 0.5.13
122
+ * (Mic-M) Issue #35 should be finally fixed.
123
+ * (Mic-M) Enhancement: New state `info.log.switchedTargetDevices.json` for recently switched target devices
124
+ * (Mic-M) Code improvements
125
+
126
+ ### 0.5.12
127
+ * (Mic-M) Another fix of 0.5.10 and improvement of debug log
128
+
129
+ ### 0.5.11
130
+ * (Mic-M) Fix of 0.5.10
131
+
132
+ ### 0.5.10
133
+ * (Mic-M) Potential fix / workaround: for issue #35 to verify if schedule was called before at the same time
134
+
135
+ ### 0.5.9
136
+ * (Mic-M) **Breaking Change** New feature: 'Target Devices' -> 'Target URLs': added separate URL field to switch device off. This is breaking, since adapter admin config will have blank fields of 'Target URLs' once you update the adapter, and state ids will change as well.
137
+ * (Mic-M) Enhancement: 'Target Devices' -> 'Target URLs' : [Allow DNS name](https://forum.iobroker.net/post/510154)
138
+
139
+ ### 0.5.8
140
+ * (Mic-M) Fixed admin options
141
+
142
+ ### 0.5.7
143
+ * (Mic-M) Various code fixes and improvements
144
+ * (Mic-M) Potentially fix of [issue #35](https://github.com/Mic-M/ioBroker.smartcontrol/issues/35) - to be tested
145
+ * (Mic-M) Enhancement for 'Target Devices': Add table to call URLs als target (implementation of [issue #1](https://github.com/Mic-M/ioBroker.smartcontrol/issues/1))
146
+
147
+ ### 0.5.6
148
+ * (Mic-M) Hotfix: loading admin settings for enums
149
+
150
+ ### 0.5.5
151
+ * (Mic-M) Fixed error (reported by [Sentry](https://github.com/Mic-M/ioBroker.smartcontrol#notes)): `Cannot read property 'log' of undefined` in _asyncSetTargetDevices_processZone()
152
+ * (Mic-M) Fixed issue: Tab TARGET DEVICES > Enumerations: functions and rooms selection were sometimes blank, and chosen item was sometimes deleted after saving and reopening admin options.
153
+ * (Mic-M) Future - Early preparation work, not yet visible and not yet activated! - Tab TARGET DEVICES: new table for URLs as targets will be added ([see issue](https://github.com/Mic-M/ioBroker.smartcontrol/issues/1))
154
+
155
+ ### 0.5.4
156
+ * (Mic-M) New feature: TARGET DEVICES - add delay option for delayed switching on of target device.
157
+
158
+ ### 0.5.3
159
+ * (Mic-M) New feature: ZONES - target devices: you can now assign a delay in seconds to wait until the device is being switched on
160
+ * (Mic-M) Various fixes
161
+
162
+ ### 0.5.2
163
+ * (Mic-M) Fix: Removed redundant column in Target Devices table
164
+ * (Mic-M) Fix: Under the hood (admin/index_m.js, admin/tsconfig.json, admin/admin.d.ts)
165
+
166
+ ### 0.5.1
167
+ * (Mic-M) Fixed clearing timeout while adapter is stopping.
168
+
169
+ ### 0.5.0
170
+ * (Mic-M) New feature: ZONES - New option "Delay for switching zone on (in seconds)" - [issue #31](https://github.com/Mic-M/ioBroker.smartcontrol/issues/31)
171
+ * (Mic-M) New feature: ZONES - New option "Never switch off if..." - [issue #32](https://github.com/Mic-M/ioBroker.smartcontrol/issues/32)
172
+
173
+ ### 0.4.4
174
+ * (Mic-M) New feature: allow comparison operators `!=` / `<>` in 'TRIGGERS -> Other triggers' to trigger if state value is unequal. Example: `<>30` or `!=30` - see [Forum](https://forum.iobroker.net/post/496133)
175
+ * (Mic-M) Fix: Don't create `smartcontrol.x.options.TargetDevices.` states for enums since this does not make sense for enums.
176
+ * (Mic-M) Fix: Don't create `smartcontrol.x.targetDevices.` states for enums since this does not make sense for enums.
177
+ * (Mic-M) Moved log `Trigger xyz was already activated x seconds ago and is ignored...` from regular info log to debug/'extended info log' - [Forum](https://forum.iobroker.net/post/496604)
178
+
179
+ ### 0.4.3
180
+ * (Mic-M) New feature in adapter options: configure number of entries in 'smartcontrol.x.info.log.zoneActivations.json'
181
+ * (Mic-M) Extend adapter documentation by adding new 0.4.0 features
182
+ * (Mic-M) Fixed issue regarding 'smartcontrol.x.userstates.xxx' creation
183
+
184
+ ### 0.4.2
185
+ * (Mic-M) Fix code
186
+
187
+ ### 0.4.1
188
+ * (Mic-M) Fixed io-package.json
189
+
190
+ ### 0.4.0
191
+ * (Mic-M) New feature: Tab 'Target Devices': New table 'Targets: Enum functions' to **support enum functions**, and optionally limit to certain enum rooms. [issue #29](https://github.com/Mic-M/ioBroker.smartcontrol/issues/29).
192
+ * (Mic-M) New feature: New JSON state for recent zone activations: 'smartcontrol.x.info.log.zoneActivations.json'. [issue #30](https://github.com/Mic-M/ioBroker.smartcontrol/issues/30).
193
+ * (Mic-M) Code fixes
194
+
195
+ ### 0.3.10
196
+ * (Mic-M) Fixed io-package.json
197
+
198
+ ### 0.3.9
199
+ * (Mic-M) New feature: Table "Additional Conditions" is now allowing comparators like `> 30`, `<= 25` etc. in column 'State value'. See [issue #28](https://github.com/Mic-M/ioBroker.smartcontrol/issues/28)
200
+
201
+ ### 0.3.8
202
+ * (Mic-M) Updated readme since adapter [is now in latest repository](https://github.com/ioBroker/ioBroker.repositories/pull/930)
203
+ * (Mic-M) Updated translations, which also addresses [#26](https://github.com/Mic-M/ioBroker.smartcontrol/issues/26)
204
+ * (Mic-M) Fixed/improved 'admin/index_m.js'
205
+
206
+ ### 0.3.7
207
+ * (Mic-M) Mini update, just under the hood.
208
+
209
+ ### 0.3.6
210
+ * (Mic-M) Minor translation update and [Compact Mode test](https://forum.iobroker.net/topic/32789/anleitung-f%C3%BCr-adapter-entwickler-compact-mode-testen) successfully completed.
211
+
212
+ ### 0.3.5
213
+ * (Mic-M) Internationalization (i18n) only – added all required 10 languages, and provide documentation in English and German plus support for embedded other translations (like Russian, Spanish, etc.) within the admin configuration.
214
+
215
+ ### 0.3.4
216
+ * (Mic-M) Test: Implementation of markdown documentation files within adapter configuration by using [zero-md](https://github.com/zerodevx/) for tables 'Target Devices' and 'Additional Conditions' to prepare adapter for multiple languages. Based on your language set in the adapter configuration, either German will be displayed (if language set to German) or English, if set language is not German.
217
+
218
+ ### 0.3.3
219
+ * (Mic-M) New feature for Motion sensors: the timer duration and brightness threshold can now be changed via states. These states are available under `smartcontrol.0.options.TriggerMotion.xxx.<duration|briThreshold>` for each of your motion sensors. Please note that any change will cause an adapter restart (for initializing and clearing all existing timers to apply the new values). [Issue #18](https://github.com/Mic-M/ioBroker.smartcontrol/issues/18)
220
+
221
+ ### 0.3.2
222
+ * (Mic-M) New feature: In the adapter configuration, tab 'Further Options' > 'Input Validation', you can now select if deactivated configuration table rows should be validated as well.
223
+ * (Mic-M) Fix [adapter-check.iobroker.in](https://adapter-check.iobroker.in/) error [E144] "common.installedFrom field found in io-package.json. Must be removed."
224
+ * (Mic-M) Fix for adapter unload: check schedule variable for undefined.
225
+ * (Mic-M) Fixed debug log line
226
+
227
+ ### 0.3.1
228
+ * (Mic-M) Fix error if no duration is set for motion sensor - [Forum Link](https://forum.iobroker.net/post/487630)
229
+
230
+ ### 0.3.0
231
+ **Breaking Changes**
232
+ * (Mic-M) Entire adapter code refactored. Therefore, tests are required to verify if these massive changes do not affect the adapter functionality. However, none of your existing adapter configuration should be lost and will be kept if you upgrade from 0.2.0+. But please check ALL of your configuration, since new options were added which
233
+ can have an effect to your existing configuration.
234
+ * (Mic-M) New feature: Implemented [issue #22](https://github.com/Mic-M/ioBroker.smartcontrol/issues/22) - Motion sensors timeout, e.g. for Homematic sensors: Motion sensor timer will now start once a motion sensor is set to false. In previous adapter versions, it was started once set to true.
235
+ <br><strong>Note:</strong> This change will cause that per your existing adapter configuration, the timer end will be reached later (so: once no motion detected any longer + the seconds you have set)
236
+ * (Mic-M) New feature: Time triggers - added options for additional conditions for 'any' or 'all'. [issue #24](https://github.com/Mic-M/ioBroker.smartcontrol/issues/24)
237
+ * (Mic-M) New feature: Zones > Execution - added options for additional conditions for 'any' or 'all'.
238
+ * (Mic-M) Many fixes under the hood
239
+
240
+ ### 0.2.2
241
+ * (Mic-M) New feature: In '3. TRIGGERS', 'Other Triggers', you can now easily create own states as triggers under 'smartcontrol.x.userstates'
242
+
243
+ ### 0.2.1
244
+ * (Mic-M) Fixed motion sensors table, column 'seconds' to allow 0 seconds for deactivation
245
+
246
+ ### 0.2.0
247
+ **Breaking Change**
248
+ * German: In den Adapter-Optionen wurde der Reiter und die Tabelle "Ausführung" entfernt und stattdessen in "4. ZONEN" integriert. <br>Das bedeutet für euch: Falls ihr von einer vorherigen Version aktualisiert, sichert zuvor die Adapter-Einstellungen (blauer Knopf mit "Pfeil nach unten" ganz oben rechts in den Adapter-Optionen).
249
+ Diese gehen sonst verloren. In einem Texteditor könnt ihr diese einsehen und dann in "4. ZONEN" unter Ausführung übertragen.
250
+ * English: Tab "Execution" was removed and transferred to "4. ZONES". If you have installed and used a previous version of this adapter, please save your adapter configuration settings prior to update the adapter (adapter settings: blue button at the top right corner with 'arror down' symbol).
251
+
252
+ Change Log for 0.2.0:
253
+ * (Mic-M) New feature: Admin Options: Removed tab "5. EXECUTION" (German "5. AUSFÜHRUNG") and included in tab "4. ZONES"
254
+ * (Mic-M) New feature: Changing name fields (renaming) will also change names in all other tables, in which these names are used. This is a huge usability improvement to quickly re-organize/rename table names without the need to correct in other tables accordingly.
255
+ * (Mic-M) Improvement: Add info.connection to allow setting adapter to "yellow" in case of any configuration errors
256
+
257
+ ### 0.1.2-beta.7
258
+ * (Mic-M) Improvement: Once user clicks "Save" in admin options, adapter verifies if all required tables are filled, and throws an error via dialog box, which shows details.
259
+ * (Mic-M) Fixed error handling for 'overwrite state vals' in target devices table
260
+
261
+ ### 0.1.2-beta.6
262
+ * (Mic-M) New feature: Changing name fields in admin options now also sets the names in all other fields to the new value.
263
+
264
+ ### 0.1.2-beta.5
265
+ * (Mic-M) New feature: option in Target Devices table to not verify if device is already on/off. Use case is e.g. for button states which do not reflect the actual status of the device in the state (like Broadlink, etc.). Addresses [request #5](https://github.com/Mic-M/ioBroker.smartcontrol/issues/5)
266
+
267
+ ### 0.1.2-beta.4
268
+ * (Mic-M) Enhance functionality of validating/correcting config settings (new feature with 0.1.2-beta.3) to also process overwritten target device values. The issue is described here: [ioBroker forum post](https://forum.iobroker.net/post/472856).
269
+ * (Mic-M) Improved validation of all adapter config settings (user input)
270
+
271
+ ### 0.1.2-beta.3
272
+ * (Mic-M) New feature: Overwrite target device values in Zones table, addresses [#16](https://github.com/Mic-M/ioBroker.smartcontrol/issues/16) and [#15](https://github.com/Mic-M/ioBroker.smartcontrol/issues/15)
273
+ * (Mic-M) Improved dialogs for selection: all selected nodes are expanded when opening, and additional buttons 'collapse all' and 'expand all' - [#17](https://github.com/Mic-M/ioBroker.smartcontrol/issues/17)
274
+
275
+ ### 0.1.2-beta.2
276
+ * (Mic-M) Fixed saving of admin options for tab 'Further Options'.
277
+
278
+ ### 0.1.2-beta.1
279
+ * (Mic-M) New feature: Additional dialogs in various tables to easily select items (like target devices) by implementing a modal dialog, FancyTree, etc.
280
+ * (Mic-M) Improved table filter functionality in adapter configuration
281
+
282
+ ### 0.1.1-beta.6
283
+ * (Mic-M) Added [Sentry](https://github.com/ioBroker/plugin-sentry)
284
+
285
+ ### 0.1.1-beta.5
286
+ * (Mic-M) New feature: Add filter field to each table in adapter configuration to filter table rows.
287
+
288
+ ### 0.1.1-beta.4
289
+ * (Mic-M) Fixed errors of 0.1.1-beta.3. **Note** You may still experience errors in comparison to 0.1.1-beta.2 due to the major and breaking changes of 0.1.1-beta.3. In case of any issues in productive environments: please go back to 0.1.1-beta.2 and report your issue.
290
+
291
+ ### 0.1.1-beta.3
292
+ * (Mic-M) **Breaking:** I did some breaking code changes under the hood, to fix various issues. I have tested these changes well, but negative side effects are still likely. No changes to options or states, so no worries here. But please use new version with care and report any issues.
293
+ * (Mic-M) Fix: issue https://forum.iobroker.net/post/464466
294
+ * (Mic-M) Extensive code changes and several bug fixes within code
295
+ * (hombach) corrected typos and wordings in admin/index_m.html
296
+ * (hombach) corrected translations in docs/translations.md
297
+ * (hombach) extended Travis tests to include ARM CPUs
298
+
299
+ ### 0.1.1-beta.2
300
+ * (Mic-M) Fix: Perform configuration validation and correction also for non-active table rows, since these can be switched on thru `smartcontrol.x.options.xxx.xxx.active` states.
301
+
302
+ ### 0.1.1-beta.1
303
+ * (Mic-M) New feature: New option in motion sensor table: if activated, motion triggers will not set a timeout if target device was turned on previously without a motion trigger ("manually"). [Forum Link](https://forum.iobroker.net/post/433871)
304
+ * (Mic-M) Fix: non-consistent logs for verifying config
305
+ * (Mic-M) Change: changed limitTriggerInterval from 2s to 1s - [Issue #3](https://github.com/Mic-M/ioBroker.smartcontrol/issues/3)
306
+ * (Mic-M) Fix: 24:00 as time: now treated as 0:00 but adding 24h to timestamp.
307
+ * (Mic-M) Fix: If a trigger state path was used multiple times in different triggers and schedules, second schedule stopped. [Forum Link](https://forum.iobroker.net/post/464208)
308
+ * (Mic-M) Improvement: Better info log / extended info log per Option 'Extended Info Log'
309
+
310
+ ### 0.1.0-alpha.11
311
+ * (Mic-M) Fix: check for 'is time between'
312
+
313
+ ### 0.1.0-alpha.10
314
+ * (Mic-M) New feature: Provide "Toggle?" option in 'Other Triggers' table to allow toggles: if targets are off -> turn on, and vice versa.
315
+ * (Mic-M) New feature: Allow using same trigger state multiple times. Required significant code changes.
316
+ * (Mic-M) New feature: If you are using multiple motion sensors for a zone: whenever a motion device triggers, the turn off timer is being stopped and a new timer is set per the latest motion sensor.
317
+ * (Mic-M) New feature: In certain northern areas is night/nightEnd not available at least in Summer in Germay. New adapter option added to set midnight to 0:00 and midnightEnd to 2:00 in this case.
318
+ * (Mic-M) New feature 'Always of after x secs' in Zones table.
319
+ * (Mic-M) + a few more features I forgot do mention ;)
320
+
321
+ ### 0.1.0-alpha.9
322
+ * (Mic-M) New feature: Triggers (Auslöser) - new option to switch target devices off and not on for 'Other Triggers' and 'Time specific Triggers'
323
+
324
+ ### 0.1.0-alpha.8
325
+ * (Mic-M) Editorial only: rename '5. ZEITPLÄNE' (SCHEDULES) into '5. AUSFÜHRUNG' (EXECUTION) throughout the code - https://forum.iobroker.net/post/461282
326
+
327
+ ### 0.1.0-alpha.7
328
+ * (Mic-M) Extend option 'triggerStatesAck' to include alias and namespaces not from adapters - https://forum.iobroker.net/post/461221
329
+
330
+ ### 0.1.0-alpha.6
331
+ * (Mic-M) Remove requirement that trigger states must be unique - https://forum.iobroker.net/post/461115
332
+
333
+ ### 0.1.0-alpha.5
334
+ * (Mic-M) New feature: allow comparison operators >=, <=, >, < for trigger states
335
+
336
+ ### 0.1.0-alpha.4
337
+ * (Mic-M) translations
338
+
339
+ ### 0.1.0-alpha.3
340
+ * (Mic-M) multiple changes, improvements and enhancements
341
+
342
+ ### 0.1.0-alpha.2
343
+ * (Mic-M) multiple changes, improvements and enhancements
344
+
345
+ ### 0.1.0-alpha.1
346
+ * (Mic-M) multiple changes, improvements and enhancements
347
+
348
+ ### 0.0.3
349
+ * (Mic-M) release for very early testers
350
+
351
+ ## License
352
+ MIT License
353
+
354
+ Copyright (c) 2020 Mic-M <iob.micm@gmail.com>
355
+
356
+ Copyright (c) 2022 Oelison <iobrokersmartcontrol@sciphy.de>
357
+
358
+ Permission is hereby granted, free of charge, to any person obtaining a copy
359
+ of this software and associated documentation files (the "Software"), to deal
360
+ in the Software without restriction, including without limitation the rights
361
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
362
+ copies of the Software, and to permit persons to whom the Software is
363
+ furnished to do so, subject to the following conditions:
364
+
365
+ The above copyright notice and this permission notice shall be included in all
366
+ copies or substantial portions of the Software.
367
+
368
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
369
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
370
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
371
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
372
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
373
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
374
+ SOFTWARE.