iobroker.smartcontrol 2.1.0 → 2.2.1

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 (115) hide show
  1. package/README.md +21 -10
  2. package/admin/custom/assets/Components-CevOCMYi.js +77 -0
  3. package/admin/custom/assets/Components-DIpDvtxi.js +1 -0
  4. package/admin/custom/assets/_virtual_mf-localSharedImportMap___mfe_internal__SmartcontrolSet__mf_owner__1-C9SdP7_s.js +1 -0
  5. package/admin/custom/assets/_virtual_mf___mfe_internal__SmartcontrolSet__mf_owner__108197177487852__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-Ca-6Y14s.js +1525 -0
  6. package/admin/custom/assets/_virtual_mf___mfe_internal__SmartcontrolSet__mf_owner__108197177487852__loadShare__shared-4MdeZwge.js +2 -0
  7. package/admin/custom/assets/_virtual_mf___mfe_internal__SmartcontrolSet__mf_owner__108197177487852__prebuild___mf_0_iobroker_mf_1_json_mf_2_config__prebuild__-QT6he7QZ.js +122 -0
  8. package/admin/custom/assets/_virtual_mf___mfe_internal__SmartcontrolSet__mf_owner__108197177487852__prebuild__react_mf_1_jsx_mf_2_runtime__prebuild__-BWTOCVCn.js +1 -0
  9. package/admin/custom/assets/dist-Cnxr-ruU.js +1 -0
  10. package/admin/custom/assets/helpers-CNHzo155.js +1 -0
  11. package/admin/custom/assets/hostInit-BVoHSU7s.js +1 -0
  12. package/admin/custom/assets/iconLibraryData-B5fiyl1C.js +1 -0
  13. package/admin/custom/assets/index-DKuAVH1b.js +1 -0
  14. package/admin/custom/assets/lib-CgOpGT17.js +3 -0
  15. package/admin/custom/assets/mf-entry-bootstrap-0-c2b3685a.js +54 -0
  16. package/admin/custom/assets/pendingShares-CEz9fejL.js +2 -0
  17. package/admin/custom/assets/prod-XWAlCKxB.js +492 -0
  18. package/admin/custom/assets/rolldown-runtime-9C0vUP4u.js +1 -0
  19. package/admin/custom/assets/utils-DmVoYT7i.js +4 -0
  20. package/admin/custom/assets/vite-preload-helper-nldAWQd6.js +1 -0
  21. package/admin/custom/customComponents.js +12 -0
  22. package/admin/custom/i18n/de.json +59 -0
  23. package/admin/custom/i18n/en.json +59 -0
  24. package/admin/custom/i18n/es.json +59 -0
  25. package/admin/custom/i18n/fr.json +59 -0
  26. package/admin/custom/i18n/it.json +59 -0
  27. package/admin/custom/i18n/nl.json +59 -0
  28. package/admin/custom/i18n/pl.json +59 -0
  29. package/admin/custom/i18n/pt.json +59 -0
  30. package/admin/custom/i18n/ru.json +59 -0
  31. package/admin/custom/i18n/uk.json +59 -0
  32. package/admin/custom/i18n/zh-cn.json +59 -0
  33. package/admin/custom/mf-manifest.json +1 -0
  34. package/admin/doc-md/readme.txt +2 -6
  35. package/admin/doc-md/start_de.md +34 -89
  36. package/admin/doc-md/start_en.md +33 -90
  37. package/admin/doc-md/table-conditions_de.md +7 -9
  38. package/admin/doc-md/table-conditions_en.md +7 -9
  39. package/admin/doc-md/table-execution_de.md +11 -10
  40. package/admin/doc-md/table-execution_en.md +12 -11
  41. package/admin/doc-md/table-options_de.md +58 -0
  42. package/admin/doc-md/table-options_en.md +58 -0
  43. package/admin/doc-md/table-target-devices_de.md +20 -16
  44. package/admin/doc-md/table-target-devices_en.md +18 -16
  45. package/admin/doc-md/table-target-enums_de.md +13 -13
  46. package/admin/doc-md/table-target-enums_en.md +12 -14
  47. package/admin/doc-md/table-target-url_de.md +14 -25
  48. package/admin/doc-md/table-target-url_en.md +14 -23
  49. package/admin/doc-md/table-trigger-devices_de.md +10 -11
  50. package/admin/doc-md/table-trigger-devices_en.md +10 -10
  51. package/admin/doc-md/table-trigger-motion_de.md +41 -24
  52. package/admin/doc-md/table-trigger-motion_en.md +35 -19
  53. package/admin/doc-md/table-trigger-times_de.md +11 -12
  54. package/admin/doc-md/table-trigger-times_en.md +11 -11
  55. package/admin/doc-md/table-zones_de.md +19 -14
  56. package/admin/doc-md/table-zones_en.md +19 -14
  57. package/admin/doc-md/table-zones_select-targets_de.md +7 -15
  58. package/admin/doc-md/table-zones_select-targets_en.md +7 -15
  59. package/admin/i18n/{de/translations.json → de.json} +2 -1
  60. package/admin/i18n/{en/translations.json → en.json} +2 -1
  61. package/admin/i18n/{es/translations.json → es.json} +2 -1
  62. package/admin/i18n/{fr/translations.json → fr.json} +2 -1
  63. package/admin/i18n/{it/translations.json → it.json} +2 -1
  64. package/admin/i18n/{nl/translations.json → nl.json} +2 -1
  65. package/admin/i18n/{pl/translations.json → pl.json} +2 -1
  66. package/admin/i18n/{pt/translations.json → pt.json} +2 -1
  67. package/admin/i18n/{ru/translations.json → ru.json} +2 -1
  68. package/admin/i18n/uk.json +110 -0
  69. package/admin/i18n/{zh-cn/translations.json → zh-cn.json} +2 -1
  70. package/admin/img/option-screenshots/tab-conditions.png +0 -0
  71. package/admin/img/option-screenshots/tab-further-options.png +0 -0
  72. package/admin/img/option-screenshots/tab-start.png +0 -0
  73. package/admin/img/option-screenshots/tab-target-devices.png +0 -0
  74. package/admin/img/option-screenshots/tab-triggers-motion.png +0 -0
  75. package/admin/img/option-screenshots/tab-triggers-other.png +0 -0
  76. package/admin/img/option-screenshots/tab-triggers-time.png +0 -0
  77. package/admin/img/option-screenshots/tab-zones-execution.png +0 -0
  78. package/admin/img/option-screenshots/tab-zones.png +0 -0
  79. package/admin/jsonConfig.json5 +569 -0
  80. package/io-package.json +30 -27
  81. package/lib/helper.js +40 -6
  82. package/lib/trigger-class.js +185 -80
  83. package/lib/trigger-match.js +76 -0
  84. package/main.js +132 -62
  85. package/package.json +11 -21
  86. package/admin/admin.d.ts +0 -4
  87. package/admin/css/LICENSE-github-markdown-css.txt +0 -24
  88. package/admin/css/github-markdown-dark.min.css +0 -8
  89. package/admin/css/github-markdown.min.css +0 -8
  90. package/admin/doc-md/img/start_dropdown-ani.gif +0 -0
  91. package/admin/doc-md/img/start_open-dialog.png +0 -0
  92. package/admin/doc-md/img/start_show-explanation.gif +0 -0
  93. package/admin/doc-md/img/table-zones_select-target-devices-overwrite.gif +0 -0
  94. package/admin/fancytree/skin-lion/icons-rtl.gif +0 -0
  95. package/admin/fancytree/skin-lion/icons.gif +0 -0
  96. package/admin/fancytree/skin-lion/loading.gif +0 -0
  97. package/admin/fancytree/skin-lion/ui.fancytree.min.css +0 -6
  98. package/admin/fancytree/skin-lion/vline-rtl.gif +0 -0
  99. package/admin/fancytree/skin-lion/vline.gif +0 -0
  100. package/admin/img/info-big.png +0 -0
  101. package/admin/img/info-big.png_README.txt +0 -6
  102. package/admin/img/sc_always.png +0 -0
  103. package/admin/img/select-target-devices-overwrite.gif +0 -0
  104. package/admin/img/smartControl_options1.gif +0 -0
  105. package/admin/img/smartControl_options_dropdown.gif +0 -0
  106. package/admin/img/smartControl_options_dropdown_2.gif +0 -0
  107. package/admin/index_m.html +0 -812
  108. package/admin/index_m.js +0 -1659
  109. package/admin/style.css +0 -255
  110. package/admin/tsconfig.json +0 -45
  111. package/admin/words.js +0 -113
  112. package/admin/zero-md/readme.txt +0 -1
  113. package/admin/zero-md/webcomponents-loader.min.js +0 -9
  114. package/admin/zero-md/zero-md.min.js.js +0 -9
  115. package/lib/tools.js +0 -99
@@ -1,126 +1,69 @@
1
- <!-- Markdown Collapsible Section, see https://gist.github.com/pierrejoubert73/902cc94d79424356a8d20be2b382e1ab -->
2
- <details>
3
- <summary style="font-size:1.3em; border:1px solid #ddd; background-color:#E0EBF3; color:black; padding:10px 0 10px 5px">About this adapter</summary> <!-- Header -->
4
- <!-- Markdown Collapsible Section - We must have an empty line below (per link above) -->
1
+ ## About this adapter
5
2
 
6
- In our home automation we have several **triggers**, e.g.
7
- * motion sensor in the corridor triggers,
8
- * a wall switch is pressed,
9
- * a certain time occurs (e.g. 30 minutes after sunset or Mon-Fri at 7:00)
3
+ Home automation has **triggers**, for example:
10
4
 
11
- In addition, 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.).
5
+ - a motion sensor in the hallway
6
+ - a wall switch
7
+ - a time of day (30 minutes after sunset, Mon–Fri 07:00)
12
8
 
13
- So as soon as something triggers and optionally conditions apply or do not apply, target states (i.e. **Target devices**) should be switched.
14
- 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.
9
+ Often extra **conditions** should (not) apply: nobody home, holiday, brightness above 100 lux.
15
10
 
16
- Smart Control takes care of this and executes everything according to IFTTT.
11
+ When something triggers and conditions match, **target devices** switch. After motion, a timer runs: if there is no more motion, targets turn off after the configured seconds.
17
12
 
18
- The goal is to replace many JavaScript and Blockly's and to provide a very user-friendly environment for various scenarios.
13
+ Smart Control bundles this (IFTTT-style) so you need less JavaScript/Blockly.
19
14
 
20
- </details>
21
- <!-- Markdown Collapsible Section - We must have an empty line below (per link above) -->
15
+ ## Tab order
22
16
 
23
- <details>
24
- <summary style="font-size:1.3em; border:1px solid #ddd; background-color:#E0EBF3; color:black; padding:10px 0 10px 5px">How to start?</summary> <!-- Header -->
25
- <!-- Markdown Collapsible Section - We must have an empty line below (per link above) -->
26
-
27
- You simply go through the individual options pages (tabs) as follows:
17
+ Use **Check configuration** at the top before saving. Save stays locked until the check is green. The adapter instance must be running.
28
18
 
29
19
  | Tab | What to do |
30
- |--------|------------|
31
- |1. TARGET DEVICES | Here you enter all your target devices to be switched, e.g. lights, radio, etc. You can enter single device states in the first table, and/or use so-called enumerations ("enums") in the second table. [Documentation link : Enumerations](https://www.iobroker.net/#en/documentation/admin/enums.md) |
32
- |2. ADDITIONAL CONDITIONS | *optional*: Here you enter additional conditions that should (not) apply, e.g.: nobody present, holiday today, etc. |
33
- |3. TRIGGERS |Here you enter triggers, e.g. motion sensors, wall switches, etc., as well as any time-dependent triggers (e.g. every day at 8:00 am). |
34
- |4 ZONES |Here you bring everything together by defining all "zones" (e.g. bathroom 1st floor, coffee corner, etc.) and assigning triggers and target devices to be switched, as well as defining further conditions for execution. |
35
- | FURTHER OPTIONS | Here you can set additional adapter options. |
36
-
37
- ### By clicking on the dark blue highlighted headline you will get more information about the settings, example:
38
-
39
- ![image](https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/blob/master/admin/doc-md/img/start_show-explanation.gif?raw=true)
40
-
41
-
42
-
43
- ### Note: Drop-down fields in tables
20
+ |-----|------------|
21
+ | **1. Target devices** | Lights, radio, etc. Single devices, optional enums and URLs. [Enumerations](https://www.iobroker.com/docs/admin/enums.md) |
22
+ | **2. Conditions** | *Optional:* e.g. nobody home, holiday. |
23
+ | **3. Triggers** | Motion sensors, wall switches, time (cron/astro). |
24
+ | **4. Zones** | Connect everything: triggers + targets + time windows. |
25
+ | **Further options** | Adapter settings. |
44
26
 
45
- Drop-down fields that offer several selectable values must be clicked "on the side". This is an issue of the ioBroker admin adapter, not of Smart Control. [The issue is reported and addressed](https://github.com/ioBroker/ioBroker.admin/issues/590) in the ioBroker admin adapter, and will come with the next update.
27
+ More detail is in the **Help** boxes on each tab (expand them).
46
28
 
47
- ![image](https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/blob/master/admin/doc-md/img/start_dropdown-ani.gif?raw=true)
29
+ Names with **dots** (`Hallway.WallSwitch`) show as group **Hallway** in zone lists. Cloning a row appends `_1` or `_Copy` so the name stays unique.
48
30
 
31
+ **SC user state** (Other triggers): enter only the **short name**. After save the adapter creates `smartcontrol.x.userstates.<shortname>`.
49
32
 
50
- <br>Simple remedy: Just click on the blue button to the left of it and you will get a much better selection dialog:
51
-
52
- ![image](https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/blob/master/admin/doc-md/img/start_open-dialog.png?raw=true)
53
-
54
-
55
- </details>
56
- <!-- Markdown Collapsible Section - We must have an empty line below (per link above) -->
57
-
58
- <details>
59
- <summary style="font-size:1.3em; border:1px solid #ddd; background-color:#E0EBF3; color:black; padding:10px 0 10px 5px">Adapter states</summary> <!-- Header -->
60
- <!-- Markdown Collapsible Section - We must have an empty line below (per link above) -->
33
+ ## Adapter states
61
34
 
62
35
  ### smartcontrol.x.info.astroTimes
63
36
 
64
- Here you see all current astro times of your geo-coordinates, which you have set in the ioBroker-Admin-Options (wrench top left).
65
-
66
- ![image](https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/blob/master/admin/doc-md/img/start_states-astro.png?raw=true)
37
+ Current astro times for the geo coordinates in the ioBroker system settings.
67
38
 
39
+ ![Astro times](img/start_states-astro.png)
68
40
 
69
41
  ### smartcontrol.x.info.log.zoneActivations.json
70
42
 
71
- With <code>smartcontrol.x.info.log.zoneActivations.json</code> the adapter provides a state, which provides information as JSON once a a zone has been successfully executed (the newest entry appears at the top). In the adapter options, tab "FURTHER OPTIONS" -> "Logging", you can set the number of JSON entries accordingly.
72
-
43
+ JSON log of successful zones (newest on top). Count under **Further options → Logging**.
73
44
 
74
45
  ### smartcontrol.x.options
75
46
 
76
- Here you can switch on and off individual rows for each options table (state 'active').
77
- <br>In addition you can change the time in seconds (state 'duration') and the brightness threshold (state 'briThreshold') for all motion sensors.
47
+ Switch table rows via `active`, and for motion sensors `duration` and `briThreshold`.
78
48
 
79
- ![image](https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/blob/master/admin/doc-md/img/start_states-options-motion.png?raw=true)
49
+ ![Motion options](img/start_states-options-motion.png)
80
50
 
81
-
82
- **Please note:** A change of these states causes a restart of the adapter instance so that the changes can take effect.
51
+ Changing these restarts the instance.
83
52
 
84
53
  ### smartcontrol.x.targetDevices
85
54
 
86
- For each table row under "1. TARGET DEVICES" the adapter adds linked states here. If you change these states, the original target state is changed accordingly, and vice versa.
87
-
88
- ![image](https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/blob/master/admin/doc-md/img/start_states-target-devices.png?raw=true)
55
+ For each row in **1. Target devices** the adapter adds mirror states. Changing them changes the real target and vice versa.
89
56
 
57
+ ![Target devices](img/start_states-target-devices.png)
90
58
 
91
59
  ### smartcontrol.x.Test
92
60
 
93
- Here you have states purely for testing the adapter. These states do not provide any functions or features and are only used to test the adapter. After the first installation of an instance of this adapter, the adapter options are preset with some of these states. For example, start testing by activating a trigger state, e.g. set 'smartcontrol.0.Test.trigger.Bathroom_motion' to 'true'. Then you check if something is triggered (based on the settings in '4. ZONES' etc.).
94
- <br>The ioBroker Log (ioBroker Admin > Log) provides detailed information. For debugging, please set the log level of the adapter instance to 'debug' to get much more information in the log.
95
-
96
- ![image](https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/blob/master/admin/doc-md/img/start_states-test.png?raw=true)
97
-
98
- </details>
99
- <!-- Markdown Collapsible Section - We must have an empty line below (per link above) -->
100
-
101
- <details>
102
- <summary style="font-size:1.3em; border:1px solid #ddd; background-color:#E0EBF3; color:black; padding:10px 0 10px 5px">Questions / problems / suggestions for improvement</summary> <!-- Header -->
103
- <!-- Markdown Collapsible Section - We must have an empty line below (per link above) -->
104
-
105
- ### Questions about usage, etc.
106
-
107
- The best way is to ask a question in the ioBroker forum, ideally you reference @Mic so that I, as the developer, get a notification. Current forum thread for this adapter is here: [ioBroker-Forum: Smart Control](https://forum.iobroker.net/topic/36728/). Feel free to write in English or German.
108
-
109
- ### Error / Bug
110
-
111
- First check the ioBroker log for all hints and follow them accordingly. If you are not sure if you have done everything correctly in the adapter settings, see above -> *Questions about usage, etc.*.
112
- <br>If you really have an error caused by this adapter:
113
- 1. go to [GitHub: Smart Control Issues](https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/issues) and open a new issue.
114
- 2. describe **in detail** the issue and step-by-step what you were doing when/before the bug occurred. Also set the log level of the adapter to "debug", reproduce the error and set the log output in code tags in the issue. ioBroker cuts off log lines, so please go directly to the log file (by clicking on "Download Log").
115
- 3. add screenshots, if likely helpful for me as developer
116
- 4. add the adapter options export, if possibly useful for troubleshooting for me, by clicking on the blue "arrow down" button in the top right corner of the SmartControl adapter options
117
-
118
- ### Enhancement/feature requests
119
-
120
- Open a new Github issue at [GitHub: Smart Control Issues](https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/issues), in English or German.
61
+ For trying the adapter only. After first install, sample rows use these. Set e.g. `smartcontrol.0.Test.trigger.Bathroom_motion` to `true` and check the log / **4. Zones**. For debugging set the instance log level to `debug`.
121
62
 
63
+ ![Test states](img/start_states-test.png)
122
64
 
123
- </details>
124
- <!-- Markdown Collapsible Section - We must have an empty line below (per link above) -->
65
+ ## Questions / bugs
125
66
 
67
+ Usage: [ioBroker forum Smart Control](https://forum.iobroker.net/topic/36728/).
126
68
 
69
+ Bugs: check the log first. If it is an adapter bug: [GitHub Issues](https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/issues) — steps, debug log (Download log, not the truncated view), screenshots. Instance config is `system.adapter.smartcontrol.x` (`native`).
@@ -1,10 +1,8 @@
1
- Diese Tabelle ist optional:
2
- <br>Hier trägst du zusätzliche Bedingungen ein, die (nicht) zutreffen sollen, z.B.: Jemand ist anwesend, Keiner ist anwesend, Heute ist Feiertag, etc. Diese Bedingungen kannst du dann in den entsprechenden anderen Optionen-Tabellen auswählen.
3
-
4
- | Spalte | Pflichtfeld | Beschreibung |
5
- |----------|:------------:|-------|
6
- | ![image](https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/blob/master/admin/doc-md/img/check_box-24px.svg?raw=true) | Ja | Aktiviert/Deaktiviert diese Tabellenzeile. Falls nicht aktiviert, wird diese Tabellenzeile vom Adapter nicht beachtet. In den Adapter-Optionen, unter 'WEITERE OPTIONEN > Eingabe-Validierung' kannst du übrigens einstellen, dass auch deaktivierte Zeilen auf Gültigkeit geprüft werden. |
7
- | Name der Bedingung | Ja | Hier beliebigen Namen deiner Bedingung eintragen, z.B. 'Feiertag Heute'. |
8
- | Datenpunkt der Bedingung | Ja | Datenpunkt für diese Bedingung, wie `javascript.0.Holiday.isHolidayToday`. |
9
- | DP-Wert | Ja | Datenpunkt-Wert der Bedingung, wenn sie zutreffen soll. Du kannst `true`, `false`, Nummern wie `144`, or Strings wie `Oma schläft jetzt` verwenden. Sämtliche Leerzeichen und Anführungszeichen (wie `"`) am Anfang und Ende werden automatisch entfernt. <br>**Hinweis**: Du kannst auch Vergleichsoperatoren vor Nummern hinzufügen, also `<`, `>`, `>=` und `<=`, dann wird auf diese geprüft. |
1
+ Optional. Bedingungen, die in Zonen und Zeit-Auslösern wählbar sind (Anwesend, Feiertag, …).
10
2
 
3
+ | Spalte | Pflicht | Beschreibung |
4
+ |--------|:-------:|--------------|
5
+ | Aktiv | Ja | Zeile an/aus. **Weitere Optionen**: auch inaktive prüfen. |
6
+ | Name | Ja | z. B. `Feiertag heute`. |
7
+ | State der Bedingung | Ja | z. B. `javascript.0.Holiday.isHolidayToday`. |
8
+ | State-Wert | Ja | `true`/`false`, Zahl oder Text. Vor Zahlen: `<`, `>`, `>=`, `<=`. Leerzeichen/Anführungszeichen außen werden entfernt. |
@@ -1,10 +1,8 @@
1
- This table is optional:
2
- <br>Here you enter additional conditions that should (not) apply, e.g: Someone is present, No one is present, Today is a holiday, etc. You can then select these conditions in the corresponding other option tables.
3
-
4
- | Column | Mandatory | Description |
5
- |----------|:------------:|-------|
6
- | ![image](https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/blob/master/admin/doc-md/img/check_box-24px.svg?raw=true) | Yes | Enables/disables this table row. If not activated, this table row is ignored by the adapter. In the Adapter Options, under 'FURTHER OPTIONS > Input Validation', you can set that even disabled rows are checked for validity. |
7
- | Name of condition | Yes | Enter any name of your condition here, e.g. 'Holiday today'. |
8
- | State of condition | Yes | State for this condition, e.g. `javascript.0.Holiday.isHolidayToday`. |
9
- | State value | Yes | States value of the condition, if it should apply. You can use `true`, `false`, numbers like `144`, or strings. All spaces and quotation marks (like `"`) at the beginning and end are automatically removed. <br>**Note**: You can also use comparison operators `<`, `>`, `>=` and `<=` before numbers, to check for these. |
1
+ Optional. Conditions you can pick in zones and time triggers (someone home, holiday, …).
10
2
 
3
+ | Column | Required | Description |
4
+ |--------|:--------:|-------------|
5
+ | Active | Yes | Row on/off. **Further options**: also validate inactive rows. |
6
+ | Name | Yes | e.g. `Holiday today`. |
7
+ | State of condition | Yes | e.g. `javascript.0.Holiday.isHolidayToday`. |
8
+ | State value | Yes | `true`/`false`, number or text. Before numbers: `<`, `>`, `>=`, `<=`. Outer spaces/quotes are stripped. |
@@ -1,12 +1,13 @@
1
- Du kannst **Immer ausführen** selektieren, dann wird einfach immer ausgeführt, sofern etwaige zuvor definierte Bedingungen zutreffen.<br>Möchtest du jedoch weitere Bedingungen definieren, wann die in der Zone definierten Zielgeräte angeschaltet werden, sobald ein Auslöser auslöst, deaktivierst du diese Option.<br>Dann erscheint eine Tabelle mit folgenden Optionen:
1
+ In der Zone: **Immer ausführen** anhaken → ohne Zeitfenster, sofern die übrigen Bedingungen passen.
2
2
 
3
- | Spalte | Pflichtfeld | Beschreibung |
4
- |----------|:------------:|-------|
5
- | ![image](https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/blob/master/admin/doc-md/img/check_box-24px.svg?raw=true) | Ja | Aktiviert/Deaktiviert diese Tabellenzeile. Falls nicht aktiviert, wird diese Tabellenzeile vom Adapter nicht beachtet. In den Adapter-Optionen, unter 'WEITERE OPTIONEN > Eingabe-Validierung' kannst du übrigens einstellen, dass auch deaktivierte Zeilen auf Gültigkeit geprüft werden. |
6
- | Start/Ende | Ja | Sobald ein Auslöser auslöst, muss die aktuelle Uhrzeit innerhalb dieses Zeitraums sein, damit die Zielgeräte geschalten werden.<br>Du kannst hier eine Uhrzeit in Stunde/Minute, wie `08:25` oder `23:30` eingeben. Außerdem kannst du einen Astro-Namen wie `sunset` eingeben und dabei einen Versatz ("Offset") in Minuten hinzufügen, z.B. `goldenHourEnd+30` oder `sunset-60`.<br>Die aktuellen Astrozeiten findest du übrigens als Info-Datenpunkte in diesem Adapter: `smartcontrol.x.info.astroTimes`.<br>Eine Startzeit von z.B. `sunset` und eine Endzeit von z.B. `03:00` (also über Mitternacht hinaus) ist ebenso möglich. |
7
- | Mo-So | Ja | Ziele werden geschaltet, wenn diese Wochentage zutreffen. |
8
- | Zusätzliche Bedingungen | Nein | Hier kannst du zusätzliche Bedingungen eintragen, die zusätzlich zutreffen müssen, z.B.: Jemand ist anwesend, Heute ist Feiertag, Oma schläft, usw. |
9
- | ![image](https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/blob/master/admin/doc-md/img/done_all-24px.svg?raw=true) | Nein | Für *Zusätzliche Bedingungen*: Wenn aktiviert, müssen alle Bedingungen zutreffen ('und'). Wenn deaktiviert, reicht es, wenn eine der Bedingungen zutrifft.<br>Falls du nur eine Bedingung auswählst, ist es egal, ob du das aktivierst oder nicht. |
10
- | Nie einschalten wenn... | Nein | Hier kannst du zusätzliche Bedingungen eintragen, die nie zutreffen dürfen, z.B.: Keiner zu Hause, Radio läuft, usw. |
11
- | ![image](https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/blob/master/admin/doc-md/img/done_all-24px.svg?raw=true) | Nein | Für *Nie einschalten wenn...*: Wenn aktiviert, müssen alle Bedingungen zutreffen ('und'). Wenn deaktiviert, reicht es, wenn eine der Bedingungen zutrifft.<br>Falls du nur eine Bedingung auswählst, ist es egal, ob du das aktivierst oder nicht. |
3
+ Sonst Zeitfenster anlegen. Ohne **aktives** Fenster läuft die Zone nie.
12
4
 
5
+ | Feld | Pflicht | Beschreibung |
6
+ |------|:-------:|--------------|
7
+ | Aktiv | Ja | Dieses Fenster an/aus. Aus = der Adapter ignoriert es. **Weitere Optionen → Eingabe-Validierung** kann auch inaktive Zeilen prüfen. |
8
+ | Start / Ende | Ja | Sobald ein Auslöser feuert, muss die Uhrzeit in diesem Zeitraum liegen.<br>Uhr `08:25` / `23:30`, oder Astro plus Offset in Minuten, z. B. `goldenHourEnd+30`, `sunset-60`.<br>Aktuelle Astrozeiten: `smartcontrol.x.info.astroTimes`.<br>Über Mitternacht ist erlaubt (`sunset` → `03:00`). |
9
+ | Mo–So | Ja | Wochentage, an denen das Fenster gilt. |
10
+ | Zusätzliche Bedingungen | Nein | Müssen extra zutreffen (Anwesend, Feiertag, …). |
11
+ | Alle UND | Nein | Für zusätzliche Bedingungen: alle müssen passen. Aus: eine reicht. Bei nur einer Bedingung egal. |
12
+ | Nie einschalten wenn… | Nein | Trifft das zu, wird in diesem Fenster **nicht** eingeschaltet. |
13
+ | Alle UND (Nie) | Nein | Wie oben für *Nie einschalten*. |
@@ -1,12 +1,13 @@
1
- You can select **Execute always**, then the zone will simply always execute if any previously defined conditions are met.<br> However, if you want to define more conditions, you should deactivate this option. Then a table with the following options will appear:
1
+ On the zone: tick **Always execute** → no time windows, as long as the other conditions match.
2
2
 
3
- | Column | Mandatory | Description |
4
- |----------|:------------:|-------|
5
- | ![image](https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/blob/master/admin/doc-md/img/check_box-24px.svg?raw=true) | Yes | Enables/disables this table row. If not activated, this table row is ignored by the adapter. In the Adapter Options, under 'FURTHER OPTIONS > Input Validation', you can set that even disabled rows are checked for validity. |
6
- | Name of zone | Yes | Any zone name. |
7
- | Start/End | Yes | As soon as a trigger triggers, the current time must be within this time period in order for the target devices to be switched.<br>You can enter a time in hours/minutes here, such as `08:25` or `23:30`. You can also enter an astro name like `sunset` and add an offset in minutes, e.g. `goldenHourEnd+30` or `sunset-60`. <br>The current astro times can be found as info states in this adapter: `smartcontrol.x.info.astroTimes`.<br>A start time of e.g. `sunset` and an end time of e.g. `03:00` (i.e. beyond midnight) is also possible. |
8
- | Mon-Sun | Yes | Targets are switched if these weekdays apply. |
9
- | Additional conditions | No | Here you can enter additional conditions that must be fulfilled additionally, e.g: Someone is present, today is a holiday, grandma is sleeping, etc. |
10
- | ![image](https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/blob/master/admin/doc-md/img/done_all-24px.svg?raw=true) | No | For *Additional conditions*: If activated, all conditions must apply ('and'). If disabled, it is enough if one of the conditions applies.<br>If you select only one condition, it doesn't matter if you enable it or not. |
11
- | Never switch on if... | No | Here you can enter additional conditions that must never apply, e.g: No one at home, radio on, etc. |
12
- | ![image](https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/blob/master/admin/doc-md/img/done_all-24px.svg?raw=true) | No | For *Never switch on if...*: If activated, all conditions must apply ('and'). If disabled, it is enough if one of the conditions applies.<br>If you select only one condition, it doesn't matter if you enable it or not. |
3
+ Otherwise add time windows. With no **active** window the zone never runs.
4
+
5
+ | Field | Required | Description |
6
+ |-------|:--------:|-------------|
7
+ | Active | Yes | This window on/off. Off = adapter ignores it. **Further options → Input validation** can also check inactive rows. |
8
+ | Start / end | Yes | When a trigger fires, the clock must be inside this range.<br>Time `08:25` / `23:30`, or astro plus offset in minutes, e.g. `goldenHourEnd+30`, `sunset-60`.<br>Live astro: `smartcontrol.x.info.astroTimes`.<br>Overnight is allowed (`sunset` → `03:00`). |
9
+ | Mon–Sun | Yes | Weekdays this window applies. |
10
+ | Extra conditions | No | Must also match (someone home, holiday, …). |
11
+ | All AND | No | Extra conditions: all must match. Off: one is enough. Irrelevant with a single condition. |
12
+ | Never on if… | No | If this matches, do **not** switch on in this window. |
13
+ | All AND (never) | No | Same for *Never on*. |
@@ -0,0 +1,58 @@
1
+ Die Einstellungen stehen **unter** diesem Kasten, in denselben fünf Blöcken. Nach Änderungen oben **Konfiguration prüfen**, dann speichern.
2
+
3
+ ---
4
+
5
+ ## 1. Bewegungsmelder
6
+
7
+ **Helligkeit (Bri) nicht prüfen falls Zone an**
8
+
9
+ Für Bewegungsmelder mit Helligkeits-Datenpunkt: Soll die Helligkeit **ignoriert** werden, wenn die zugehörige Zone **bereits an** ist?
10
+
11
+ *Grenze* in der Melder-Tabelle ist der obere Schwellwert: darüber wird bei Bewegung nicht mehr eingeschaltet. Schaltet der Melder aber Licht, liegt die Helligkeit danach oft **über** der Grenze — dann würde keine weitere Bewegung mehr erkannt.
12
+
13
+ Mit dieser Option wird die Helligkeit **nicht** geprüft, solange die Zone schon an ist.
14
+
15
+ ---
16
+
17
+ ## 2. Zeitplan und Astro
18
+
19
+ **Setze 0:00/2:00, falls kein night/nightEnd verfügbar**
20
+
21
+ Je nach Koordinaten in den ioBroker-Systemeinstellungen gibt es z. B. in Deutschland im Sommer oft kein `night` und `nightEnd`. Wenn die Option an ist, setzt der Adapter dann `night = 00:00` und `nightEnd = 02:00`.
22
+
23
+ ---
24
+
25
+ ## 3. Auslöser
26
+
27
+ **Trigger-ACK** — Datenpunkte unter `javascript.x`, `0_userdata.0`, `alias.x`, …
28
+
29
+ Änderungen unter **Adapter-Instanzen** lösen nur aus, wenn `ack = true`. Für **eigene** Datenpunkte kannst du das hier ändern:
30
+
31
+ - **Nur ack:false** — `ack:true` ignorieren
32
+ - **Nur ack:true** — `ack:false` ignorieren
33
+ - **Egal** — `ack:true` oder `ack:false`. Kann doppelt schalten, wenn kurz nacheinander unack und ack kommen. Dagegen hilft die nächste Option.
34
+
35
+ **Min. Sekunden zwischen gleichen Auslösern**
36
+
37
+ Aus Stabilität: derselbe Auslöser wird ignoriert, wenn er vor weniger als x Sekunden schon ausgelöst hat. Weniger als 1 Sekunde ist nicht erlaubt.
38
+
39
+ ---
40
+
41
+ ## 4. Logging
42
+
43
+ **JSON-Log-Einträge (0–500)**
44
+
45
+ Der Adapter schreibt `smartcontrol.x.info.log.zoneActivations.json` und `smartcontrol.x.info.log.switchedTargetDevices.json`. Sobald eine Zone ausgeführt oder ein Ziel geschaltet wurde, steht das als JSON darin (neuester Eintrag oben). Maximum 500, Standard 100. `0` schaltet das JSON-Log aus.
46
+
47
+ **Erweiterte Info-Log-Ausgaben**
48
+
49
+ Aus: Im Level Info nur wenige Zeilen beim Start/Stop, Rest nur im Debug-Log.
50
+ An: mehr Info-Zeilen, weiterhin weniger als Debug.
51
+
52
+ ---
53
+
54
+ ## 5. Eingabe-Validierung
55
+
56
+ **Auch deaktivierte Tabellenzeilen prüfen**
57
+
58
+ Prüft inaktive Zeilen (z. B. ob der Datenpunkt existiert). Sinnvoll, weil du Zeilen über `smartcontrol.x.options.` aktivieren kannst — die Gültigkeit steht dann schon beim Adapter-Start fest, nicht erst beim Einschalten über den Datenpunkt.
@@ -0,0 +1,58 @@
1
+ The settings are **below** this box, in the same five blocks. After changes use **Check configuration** at the top, then save.
2
+
3
+ ---
4
+
5
+ ## 1. Motion sensors
6
+
7
+ **Do not verify brightness if zone is on**
8
+
9
+ For motion sensors with a brightness state: should brightness be **ignored** if the related zone is **already on**?
10
+
11
+ *Threshold* on the sensor table is the upper limit: above it, motion does not switch on. If the sensor turns lights on, brightness is then often **above** the threshold — no further motion would be seen.
12
+
13
+ With this option, brightness is **not** checked while the zone is already on.
14
+
15
+ ---
16
+
17
+ ## 2. Time schedule and astro
18
+
19
+ **Set 0:00/2:00 if night/nightEnd is not available**
20
+
21
+ Depending on coordinates in the ioBroker system settings, e.g. in Germany in summer there is often no `night` / `nightEnd`. If this option is on, the adapter sets `night = 00:00` and `nightEnd = 02:00`.
22
+
23
+ ---
24
+
25
+ ## 3. Trigger
26
+
27
+ **Trigger ACK** — states under `javascript.x`, `0_userdata.0`, `alias.x`, …
28
+
29
+ Changes under **adapter instances** only fire when `ack = true`. For **your own** states you can change that here:
30
+
31
+ - **ack:false only** — ignore `ack:true`
32
+ - **ack:true only** — ignore `ack:false`
33
+ - **Any** — `ack:true` or `ack:false`. May switch twice if unack and ack follow quickly. The next option mitigates that.
34
+
35
+ **Min. seconds between same trigger**
36
+
37
+ For stability: ignore a trigger if it already fired less than x seconds ago. Less than 1 second is not allowed.
38
+
39
+ ---
40
+
41
+ ## 4. Logging
42
+
43
+ **JSON log entries (0–500)**
44
+
45
+ The adapter writes `smartcontrol.x.info.log.zoneActivations.json` and `smartcontrol.x.info.log.switchedTargetDevices.json`. After a zone runs or a target switches, JSON is stored there (newest on top). Max 500, default 100. `0` disables the JSON log.
46
+
47
+ **Extended info log**
48
+
49
+ Off: Info level only a few lines on start/stop, rest in debug.
50
+ On: more Info lines, still less than debug.
51
+
52
+ ---
53
+
54
+ ## 5. Input validation
55
+
56
+ **Also check deactivated table rows**
57
+
58
+ Validates inactive rows (e.g. whether the state exists). Useful because you can enable rows via `smartcontrol.x.options.` — validity is then known at adapter start, not only when you enable the row via the state.
@@ -1,19 +1,23 @@
1
- Gib hier alle Zielgeräte ein, die Du schalten möchtest, sobald ein Auslöser aktiviert wird und die Bedingungen in den Zonen erfüllt sind.
1
+ Gib hier alle Zielgeräte ein, die geschaltet werden sollen, sobald ein Auslöser feuert und die Bedingungen in den Zonen erfüllt sind.
2
2
 
3
- *Warum sind hier unterschiedliche Datenpunkte für das Ein- und Ausschalten?*
4
- Normalerweise sind diese gleich (Datenpunkt erwartet `true`/`false`) für das Ein-/Ausschalten, aber in bestimmten Fällen benötigen Benutzer einen anderen Datenpunkt und Datenpunkt-Wert, um ein Gerät ein- oder auszuschalten. Beispiel: `fully-tablet-control.0.device.tablet_bathroom.commands.screenOn` und `fully-tablet-control.0.device.tablet_bathroom.commands.screenOff`.
5
- <br>Du kannst auch Datenpunkte hinzufügen, die nicht boolean (`true`/`false`), sondern String oder Zahl sind.
3
+ *Warum getrennte Datenpunkte für Ein- und Ausschalten?*
4
+ Meist sind sie gleich (`true`/`false`). Manchmal braucht man zwei verschiedene, z. B. `….commands.screenOn` und `….commands.screenOff`. Werte dürfen boolean, Zahl oder Text sein.
6
5
 
7
- Für jede Tabellenzeile fügt dieser Adapter verknüpfte Datenpunkte zu `smartcontrol.x.targetDevices.xxx` hinzu. Wenn du diese Datenpunkte änderst, wird der ursprüngliche Ziel-Datenpunkt entsprechend geändert, und umgekehrt.
6
+ Pro Tabellenzeile legt der Adapter Spiegel unter `smartcontrol.x.targetDevices.xxx` an. Änderst du die, ändert sich der echte Ziel-Datenpunkt — und umgekehrt.
8
7
 
9
- | Spalte | Pflichtfeld | Beschreibung |
10
- |----------|:------------:|-------|
11
- | ![image](https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/blob/master/admin/doc-md/img/check_box-24px.svg?raw=true) | Ja | Aktiviert/Deaktiviert diese Tabellenzeile. Falls nicht aktiviert, wird diese Tabellenzeile vom Adapter nicht beachtet. In den Adapter-Optionen, unter 'WEITERE OPTIONEN > Eingabe-Validierung' kannst du übrigens einstellen, dass auch deaktivierte Zeilen auf Gültigkeit geprüft werden. |
12
- | Geräte-Name | Ja | Name des Gerätes deiner Wahl. Verbotene Zeichen: ``[ ] * , ; ' " ` < > \ ?``<br><br>**Tipp** Nimm Punkte als Trenner und organisiere die Unterpunkte z.B. nach Räumen und Geräten, z.B. `Wohnzimmer.Lichter.Decke`, `Wohnzimmer.Lichter.Wand links`, etc. Damit werden dir in "4. ZONEN" die Zielgeräte dann als Ordner angezeigt: "Wohnzimmer > Lichter > Decke", etc. |
13
- | Datenpunkt zum einschalten | Ja | Datenpunkt des Zielgerätes zum Einschalten, sobald ein Auslöser auslöst und die Bedingungen in den Zonen zutreffen. |
14
- | Wert für 'an' | Ja | Datenpunkt-Wert, der in 'Datenpunkt zum einschalten' gesetzt wird. Du kannst `true`, `false`, Nummern wie `144`, or Strings wie `Schalte Radio an` verwenden. Sämtliche Leerzeichen und Anführungszeichen (wie `"`) am Anfang und Ende werden automatisch entfernt. <br><br>Der Wert kann unter "4. ZONEN", "Zu schaltende Zielgeräte" überschrieben werden.|
15
- | ![image](https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/blob/master/admin/doc-md/img/timelapse-24px.svg?raw=true)| Nein | **Verzögertes Einschalten des Zielgerätes (in Sekunden)**: Hiermit kannst du eine Verzögerung einstellen: erst nach dieser Anzahl an Sekunden wird das Zielgerät tatsächlich eingeschaltet.<br>Durch leer lassen oder `0` wird diese Option ignoriert. |
16
- | Prüfung deakiv. (an) | Nein | Vor dem Schalten wird immer geprüft, ob das Zielgerät bereits an ist lt. "Wert für 'an'". Wenn du diese Option aktivierst, erfolgt keine Überprüfung und es wird immer geschaltet. Use Case: z.B. ein Button als Datenpunkt. Siehe [Github Issue #5](https://github.com/Mic-M/ioBroker.smartcontrol/issues/5).|
17
- | Datenpunkt zum ausschalten | Ja | Datenpunkt des Zielgerätes zum Ausschalten, sobald ein Timeout erreicht wurde (z.B. keine Bewegung mehr und die Bewegungsmelder-Sekunden sind heruntergezählt auf 0) oder falls der Datenpunkt `smartcontrol.x.targetDevices.xxx.[Device Name]` geändert wurde.|
18
- | Wert für 'aus' | Ja | Datenpunkt-Wert, der in 'Datenpunkt zum ausschalten' gesetzt wird. Du kannst `true`, `false`, Nummern wie `144`, or Strings wie `Schalte Radio an` verwenden. Sämtliche Leerzeichen und Anführungszeichen (wie `"`) am Anfang und Ende werden automatisch entfernt.|
19
- | Prüfung deakiv. (aus) | Nein | Siehe *Prüfung deakiv. (an)* weiter oben, nur hier für das ausschalten des Gerätes.|
8
+ *Wie sende ich eine Benachrichtigung (Telegram usw.)?*
9
+ Verwende als Ziel einen Datenpunkt des Messenger-Adapters, der einen Text entgegennimmt, z. B. `telegram.0.communicate.response`. Trage die Nachricht als „Wert für an“ ein (z. B. `Fenster A ist offen bei Regen`) und aktiviere „Prüfung deaktiv. (an)“, sonst wird derselbe Text nur einmal geschrieben. Für Adapter ohne einen solchen Datenpunkt (z. B. E-Mail) nimm einen Datenpunkt unter `0_userdata.0` als Ziel und sende die Nachricht mit einem kleinen Skript (`sendTo`).
10
+
11
+ Kopieren (zwei Blätter) hängt `_1` an den Namen, damit er eindeutig bleibt.
12
+
13
+ | Spalte | Pflicht | Beschreibung |
14
+ |--------|:-------:|--------------|
15
+ | Aktiv | Ja | Aktiviert/deaktiviert diese Zeile. Ist sie aus, ignoriert der Adapter sie. Unter **Weitere Optionen → Eingabe-Validierung** kannst du auch deaktivierte Zeilen prüfen lassen. |
16
+ | Geräte-Name | Ja | Name deiner Wahl. Verboten: ``[ ] * , ; ' " ` < > \ ?``<br><br>**Tipp:** Punkte als Trenner, z. B. `Wohnzimmer.Lichter.Decke`. In **4. Zonen** erscheinen die Ziele dann gruppiert. |
17
+ | State zum Einschalten | Ja | Datenpunkt, der gesetzt wird, wenn die Zone einschaltet. |
18
+ | Wert für an | Ja | `true`, `false`, Zahlen wie `144`, oder Text wie `Schalte Radio an`. Leerzeichen und Anführungszeichen außen werden entfernt.<br><br>In **4. Zonen** unter *Pro Zielgerät* kannst du den AN-Wert **nur für diese Zone** überschreiben. |
19
+ | Verzögerung AN (s) | Nein | Gerät erst nach diesen Sekunden einschalten. Leer oder `0` = sofort. Die extra Verzögerung in der Zone kommt **zusätzlich** dazu. |
20
+ | Prüfung deaktiv. (an) | Nein | Vor dem Schalten prüft der Adapter sonst, ob das Gerät laut „Wert für an“ schon an ist. Haken setzen: immer schreiben (z. B. Taster als Datenpunkt). |
21
+ | State zum Ausschalten | Ja | Datenpunkt zum Ausschalten (Timeout, keine Bewegung mehr, oder Spiegel `smartcontrol.x.targetDevices.xxx` geändert). |
22
+ | Wert für aus | Ja | Wie Wert für an, fürs Ausschalten. |
23
+ | Prüfung deaktiv. (aus) | Nein | Wie Prüfung AN, fürs Ausschalten. |
@@ -1,21 +1,23 @@
1
- Enter here all target devices you want to switch as soon as a trigger is activated and the conditions in the zones are met.
1
+ Enter every target that should switch when a trigger fires and zone conditions match.
2
2
 
3
- *Why are there different states for switching on and off?*
4
- Normally these are the same (states expect `true`/`false`) for switching on/off, but in certain cases users may need a different state and state value to switch a device on or off. For example: fully-tablet-control.0.device.tablet_bathroom.commands.screenOn and fully-tablet-control.0.device.tablet_bathroom.commands.screenOff.
5
- You can also add states that are not boolean (`true`/`false`), but string or number.
3
+ *Why separate ON and OFF states?*
4
+ Usually they are the same (`true`/`false`). Sometimes you need two, e.g. `….commands.screenOn` and `….commands.screenOff`. Values may be boolean, number or text.
6
5
 
7
- For each table row this adapter adds linked states to `smartcontrol.x.targetDevices.xxx`. If you change these states, the original target state is changed accordingly, and vice versa.
6
+ Each row gets mirrors under `smartcontrol.x.targetDevices.xxx`. Changing those changes the real target and vice versa.
8
7
 
9
- | Column | Mandatory | Description |
10
- |----------|:------------:|-------|
11
- | ![image](https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/blob/master/admin/doc-md/img/check_box-24px.svg?raw=true) | Yes | Enables/disables this table row. If not activated, this table row is ignored by the adapter. In the Adapter Options, under 'FURTHER OPTIONS > Input Validation', you can set that even disabled rows are checked for validity. |
12
- | Device name | Yes | Name of the device of your choice. Forbidden characters: ``[ ] * , ; ' " ` < > \ ?`` |
13
- | State to switch device on | Yes | States of the target device to switch on as soon as a trigger is triggered and the conditions in the zones are met. |
14
- | Value for 'on' | Yes | States value that is set in 'states to switch on'. You can use `true`, `false`, numbers like `144`, or strings like `Turn on radio`. All spaces and quotation marks (like `"`) at the beginning and end are automatically removed. <br><br>The value can be overwritten under "4. ZONES", "Target devices". |
15
- | Do not verify (on) | No | Before switching, it is always verified if the target device is already on according to "Value for 'on'". Activating this option disables this verification, and switching is always done. Use case: e.g. a button as a state. See [Github Issue #5](https://github.com/Mic-M/ioBroker.smartcontrol/issues/5). |
16
- | State to switch device off | Yes | states of the target device to switch off as soon as a timeout has been reached (e.g. no more motion and the motion sensor seconds have counted down to 0) or if the 'smartcontrol.x.targetDevices.xxx.[Device Name]` state has been changed. |
17
- | Value for 'off' | Yes | States value to be set in 'Switch off state'. You can use `true`, `false`, numbers like `144`, or strings like `turn radio on`. All spaces and quotation marks (like `"`) at the beginning and end are automatically removed.|
18
- | ![image](https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/blob/master/admin/doc-md/img/timelapse-24px.svg?raw=true)| Nein | **Delay for switching target device on (in seconds)** This allows you to set a delay: after this number of seconds the target device will actually be switched on.<br>Leave empty or set `0` to ignore this option. |
19
- | Do not verify (off) | No | See *Value for 'on'* above, bot for switching off, and not on. |
8
+ *How to send a notification (Telegram, etc.)?*
9
+ Use a state of the messenger adapter that accepts a text as target, e.g. `telegram.0.communicate.response`. Enter the message as "Value for on" (e.g. `Window A is open during rain`) and enable "Do not verify (on)", otherwise the same text is written only once. For adapters without such a state (e.g. email), use a state under `0_userdata.0` as target and send the message with a small script (`sendTo`).
20
10
 
11
+ Clone (two pages) appends `_1` so the name stays unique.
21
12
 
13
+ | Column | Required | Description |
14
+ |--------|:--------:|-------------|
15
+ | Active | Yes | Enables/disables the row. If off, the adapter ignores it. **Further options → Input validation** can also check inactive rows. |
16
+ | Device name | Yes | Forbidden: ``[ ] * , ; ' " ` < > \ ?``<br><br>**Tip:** Dots to group, e.g. `Living.Lights.Ceiling`. In **4. Zones** targets then appear grouped. |
17
+ | State to switch on | Yes | State written when the zone turns on. |
18
+ | Value for on | Yes | `true`, `false`, numbers like `144`, or text. Outer spaces/quotes are stripped.<br><br>In **4. Zones** under *Per target* you can override the ON value **for that zone only**. |
19
+ | Delay ON (s) | No | Wait these seconds before ON. Empty or `0` = immediately. Zone extra delay is **added**. |
20
+ | Do not verify (on) | No | Otherwise the adapter skips write if the value already matches. Tick: always write (e.g. button state). |
21
+ | State to switch off | Yes | Off state (timeout, no more motion, or mirror `smartcontrol.x.targetDevices.xxx` changed). |
22
+ | Value for off | Yes | Like value for on, for off. |
23
+ | Do not verify (off) | No | Same as ON verify, for off. |
@@ -1,14 +1,14 @@
1
- Im Gegensatz zur oberen Tabelle kannst du hier sogenannte "Aufzählungen" (Enums) nutzen - [Link zur Dokumentation: Aufzählungen](https://www.iobroker.net/#de/documentation/admin/enums.md).
2
- <br>Du kannst hier in jeder Zeile jeweils eine "Funktion" (`enum.functions`) zuordnen, und dies bei Bedarf auf bestimmte Räume (`enum.rooms`) limitieren. Diese werden dann alle geschaltet, sobald ein Auslöser aktiviert wird und die Bedingungen in den Zonen erfüllt sind.
3
- <br><strong>Bitte beachte</strong>, dass alle Datenpunkte, denen du die jeweilige Funktion zugeordnet hast, denselben Datentyp haben (also boolean - true/false, oder string), da `Wert für 'an'` und `Wert für 'aus'` für alle Datenpunkte gilt, denen die gewählte Funktion zugeordnet ist. Aber keine Sorge, der Adapter liefert im Log einen Fehler, falls deine Zuordnung nicht passt ;-)
1
+ Statt einzelner Geräte: eine **Funktion** (`enum.functions`), optional auf **Räume** (`enum.rooms`) begrenzt. [Aufzählungen](https://www.iobroker.com/docs/admin/enums.md)
4
2
 
5
- | Spalte | Pflichtfeld | Beschreibung |
6
- |----------|:------------:|-------|
7
- | ![image](https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/blob/master/admin/doc-md/img/check_box-24px.svg?raw=true) | Ja | Aktiviert/Deaktiviert diese Tabellenzeile. Falls nicht aktiviert, wird diese Tabellenzeile vom Adapter nicht beachtet. In den Adapter-Optionen, unter 'WEITERE OPTIONEN > Eingabe-Validierung' kannst du übrigens einstellen, dass auch deaktivierte Zeilen auf Gültigkeit geprüft werden. |
8
- | Name | Ja | Name deiner Wahl. Verbotene Zeichen: ``[ ] * , ; ' " ` < > \ ?`` |
9
- | Funktions-Name (Aufzählungen) | Ja | Wähle hier die entsprechende Funktion der Aufzählungen aus ([hier sind Details dazu beschrieben](https://www.iobroker.net/#de/documentation/admin/enums.md)). Sobald eine Zone auslöst, in der du unter 'Zielgeräte' diese selektiert hast, werden alle Datenpunkte geschaltet, denen diese selektierte "Funktion" zugeordnet ist. |
10
- | Limitiert auf Räume | Nein | Hier kannst du optional auf bestimmte "Räume" limitieren (`enum.rooms`), d.h. falls ein oder mehrere Räume hier selektiert werden, wird nur geschaltet, falls dem Zieldatenpunkt der gewählten Funktion auch einer dieser Räume zugeordnet ist. Lässt man es leer, werden keine Räume geprüft. |
11
- | Wert für 'an' | Ja | Datenpunkt-Wert, der in 'Datenpunkt zum einschalten' gesetzt wird. Du kannst `true`, `false`, Nummern wie `144`, or Strings wie `Schalte Radio an` verwenden. Sämtliche Leerzeichen und Anführungszeichen (wie `"`) am Anfang und Ende werden automatisch entfernt. <br><br>Der Wert kann unter "4. ZONEN", "Zu schaltende Zielgeräte" überschrieben werden.|
12
- | Prüfung deakiv. (an) | Nein | Vor dem Schalten wird immer geprüft, ob das Zielgerät bereits an ist lt. "Wert für 'an'". Wenn du diese Option aktivierst, erfolgt keine Überprüfung und es wird immer geschaltet. Use Case: z.B. ein Button als Datenpunkt. Siehe [Github Issue #5](https://github.com/Mic-M/ioBroker.smartcontrol/issues/5).|
13
- | Wert für 'aus' | Ja | Datenpunkt-Wert, der in 'Datenpunkt zum ausschalten' gesetzt wird. Du kannst `true`, `false`, Nummern wie `144`, or Strings wie `Schalte Radio an` verwenden. Sämtliche Leerzeichen und Anführungszeichen (wie `"`) am Anfang und Ende werden automatisch entfernt.|
14
- | Prüfung deakiv. (aus) | Nein | Siehe *Prüfung deakiv. (an)* weiter oben, nur hier für das ausschalten des Gerätes.|
3
+ Alle Datenpunkte mit dieser Funktion müssen denselben Typ haben (boolean oder String), weil *Wert für an/aus* für alle gilt. Passt es nicht, steht ein Fehler im Log.
4
+
5
+ Es wird der **Anzeigename** der Aufzählung gespeichert (z. B. „Beleuchtung“), nicht `enum.functions.xxx`.
6
+
7
+ | Spalte | Pflicht | Beschreibung |
8
+ |--------|:-------:|--------------|
9
+ | Aktiv | Ja | Zeile an/aus. |
10
+ | Name | Ja | Verboten: ``[ ] * , ; ' " ` < > \ ?`` |
11
+ | Funktion | Ja | Welche Aufzählungs-Funktion geschaltet wird. |
12
+ | Räume | Nein | Leer = alle Räume. Sonst nur Datenpunkte, die auch in einem dieser Räume sind. |
13
+ | Wert für an / aus | Ja | Wie bei einzelnen Zielgeräten, in der Zone überschreibbar. |
14
+ | Prüfung deaktiv. | Nein | Immer schreiben, ohne vorher den Ist-Wert zu prüfen. |
@@ -1,16 +1,14 @@
1
- In contrast to the table above, you can use so-called "enums" here - [Link to documentation: Enums](https://www.iobroker.net/#en/documentation/admin/enums.md).
2
- <br>You can assign a "function" (`enum.functions`) in each row, and limit this to certain rooms (`enum.rooms`) if wanted. All states containing the function (and optionally the room) are switched once a trigger is being activated and the conditions in the zones are fulfilled.
3
- <br><strong>Please note</strong> that all states to which you have assigned the respective function require the same data type (i.e. boolean - true/false, or string), since 'Value for 'on'` and 'Value for 'off'` applies to all states to which the selected function is assigned. But don't worry, the adapter will show an error in the log if your assignment does not fit ;-)
1
+ Instead of single devices: a **function** (`enum.functions`), optionally limited to **rooms** (`enum.rooms`). [Enumerations](https://www.iobroker.com/docs/admin/enums.md)
4
2
 
5
- Translated with www.DeepL.com/Translator (free version)
3
+ All states with that function must share the same type (boolean or string), because *value for on/off* applies to all. Mismatch → error in the log.
6
4
 
7
- | Column | Mandatory | Description |
8
- |----------|:------------:|-------|
9
- | ![image](https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/blob/master/admin/doc-md/img/check_box-24px.svg?raw=true) | Yes | Enables/disables this table row. If not activated, this table row is ignored by the adapter. In the Adapter Options, under 'FURTHER OPTIONS > Input Validation', you can set that even disabled rows are checked for validity. |
10
- | Name | Yes | Name of your choice. Forbidden characters: ``[ ] * , ; ' " ` < > \ ?`` |
11
- | Enum Function Name | Yes | Select the according function of the enumerations ([enum details are described here](https://www.iobroker.net/#en/documentation/admin/enums.md)). As soon as a zone is triggered in which you have selected this table row under 'Target Devices', all states to which this selected "function" is assigned will be switched. |
12
- | Limit to rooms | No | Here you can optionally limit to certain "rooms" (`enum.rooms`): if one or more rooms are selected here, the targets will only be switched if one of these rooms is assigned to the target state of the selected function. If you leave it empty, no rooms will be checked. |
13
- | Value for 'on' | Yes | States value that is set in 'states to switch on'. You can use `true`, `false`, numbers like `144`, or strings like `Turn on radio`. All spaces and quotation marks (like `"`) at the beginning and end are automatically removed. <br><br>The value can be overwritten under "4. ZONES", "Target devices". |
14
- | Do not verify (on) | No | Before switching, it is always verified if the target device is already on according to "Value for 'on'". Activating this option disables this verification, and switching is always done. Use case: e.g. a button as a state. See [Github Issue #5](https://github.com/Mic-M/ioBroker.smartcontrol/issues/5). |
15
- | Value for 'off' | Yes | States value to be set in 'Switch off state'. You can use `true`, `false`, numbers like `144`, or strings like `turn radio on`. All spaces and quotation marks (like `"`) at the beginning and end are automatically removed.|
16
- | Do not verify (off) | No | See *Value for 'on'* above, bot for switching off, and not on. |
5
+ The adapter stores the **display name** (e.g. “Lighting”), not `enum.functions.xxx`.
6
+
7
+ | Column | Required | Description |
8
+ |--------|:--------:|-------------|
9
+ | Active | Yes | Row on/off. |
10
+ | Name | Yes | Forbidden: ``[ ] * , ; ' " ` < > \ ?`` |
11
+ | Function | Yes | Which enum function to switch. |
12
+ | Rooms | No | Empty = all rooms. Else only states that are also in one of these rooms. |
13
+ | Value for on / off | Yes | Same as single targets; overridable in the zone. |
14
+ | Do not verify | No | Always write, do not check the current value first. |
@@ -1,29 +1,18 @@
1
- Hiermit kannst du als Ziel eine URL verwenden, z.B. `http://192.198.10.20/relay/0?turn=on`. Dies dient dazu, etwa Geräte per URL zu steuern.
1
+ Ziel per HTTP, z. B. `http://192.168.10.20/relay/0?turn=on`. In den Zonen wie ein Zielgerät wählbar.
2
2
 
3
- ### Tabellen-Einstellungen:
3
+ | Spalte | Pflicht | Beschreibung |
4
+ |--------|:-------:|--------------|
5
+ | Aktiv | Ja | Zeile an/aus. |
6
+ | Name | Ja | Verboten: ``[ ] * , ; ' " ` < > \ ?`` |
7
+ | URL AN | Ja | Wird beim Einschalten aufgerufen. |
8
+ | URL AUS | Nein | Leer = kein Ausschalten, keine AUS-Datenpunkte. |
4
9
 
10
+ Unter `smartcontrol.x.targetURLs.<Name>`:
5
11
 
6
- | Spalte | Pflichtfeld | Beschreibung |
7
- |----------|:------------:|-------|
8
- | ![image](https://github.com/iobroker-community-adapters/ioBroker.smartcontrol/blob/master/admin/doc-md/img/check_box-24px.svg?raw=true) | Ja | Aktiviert/Deaktiviert diese Tabellenzeile. Falls nicht aktiviert, wird diese Tabellenzeile vom Adapter nicht beachtet. In den Adapter-Optionen, unter 'WEITERE OPTIONEN > Eingabe-Validierung' kannst du übrigens einstellen, dass auch deaktivierte Zeilen auf Gültigkeit geprüft werden. |
9
- | Name | Ja | Name deiner Wahl. Verbotene Zeichen: ``[ ] * , ; ' " ` < > \ ?`` |
10
- | URL zum Einschalten | Ja | Die entsprechende URL, die aufgerufen werden soll, z.B. `http://192.198.10.20/relay/0?turn=on`
11
- | URL zum Ausschalten| Nein | Hier optional eine URL, die die zum Ausschalten aufgerufen werden soll, z.B. `http://192.198.10.20/relay/0?turn=off`. Falls du dies leer lässt, wird nicht ausgeschaltet und auch keine Ausschalt-Datenpunkte angelegt.
12
-
13
- Unter "ZONEN" kannst du diese "Zielgeräte" dann entsprechend wählen.
14
-
15
-
16
- ### Datenpunkte unterhalb smartcontrol.x.targetURLs.<definierter URL-Name>.:
17
-
18
- Für jede Tabellenzeile werden diese Datenpunkte angelegt, dabei wird der Wert, der unter `Name` steht, eintsprechend verwendet:
19
-
20
- | Datenpunkt | Erklärung |
21
- |------------|------------|
22
- | `smartcontrol.x.targetURLs.<Name>.call_on` | Sobald dieser Datenpunkt auf `true` gesetzt wird, wird die URL aufgerufen. |
23
- | `smartcontrol.x.targetURLs.<Name>.response_on` | In diesem Datenpunkt wird dann die Response, also die Antwort auf deinen URL-Aufruf, ausgegeben. |
24
-
25
- Wenn du eine URL "zum Ausschalten" angelegt hast, dann werden ebenso die Datenpunkte `smartcontrol.x.targetURLs.<Name>.call_off` und `smartcontrol.x.targetURLs.<Name>.response_off` angelegt.
26
-
27
-
28
- Unabhängig zu den sonstigen Einstellungen in diesem Adapter kannst du über die angelegten Datenpunkte die URLs dann entsprechend ausführen bzw. aufrufen, in dem du `.call_on` oder `.call_off` auf `true` setzt. Das Antwort des Aufrufs erscheint dann im Datenpunkt `.response_on` bzw. `.response_off`. <br>Damit kannst du die URLs also beispielsweise auch über Blockly/Javascript aufrufen.
12
+ | Datenpunkt | Bedeutung |
13
+ |------------|-----------|
14
+ | `.call_on` | `true` → URL AN aufrufen |
15
+ | `.response_on` | Antwort |
16
+ | `.call_off` / `.response_off` | nur wenn URL AUS gesetzt |
29
17
 
18
+ Die `.call_*`-Punkte kannst du auch aus Script/Blockly setzen.