iobroker.iot 1.11.9 → 1.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -185,10 +185,14 @@ The adapter will provide the details in two states with different detail level
185
185
  * **smart.lastCommand** contains the received text including an info on type of query (intent). Example: "askDevice Status Rasenmäher"
186
186
  * **smart.lastCommandObj*** contains an JSON string that can be parsed to an object containing the following information
187
187
  * **words** contains the received words in an array
188
- * **intent** contains the type of query. Possible values currently are "askDevice", "controlDevice", "actionStart", "actionEnd", "askWhen", "askWhere", "askWho"
188
+ * **intent** contains the type of query. Possible values currently are:
189
+ * v1 Skill: "askDevice", "controlDevice", "actionStart", "actionEnd", "askWhen", "askWhere", "askWho"
190
+ * v2 Skill: "queryIntent" when full said text was captured, "controlDevice" for fallback with only partial text
189
191
  * **deviceId** contains a deviceId identifying the device the request was sent to, delivered by Amazon, will be empty string if not provided
192
+ * **deviceRoom** contains a mapped room identifier you can configure in iot admin UI for collected deviceIds
190
193
  * **sessionId** contains a sessionId of the Skill session, should be the same if multiple commands were spoken, delivered by Amazon, will be empty string if not provided
191
194
  * **userId** contains a userId from the device owner (or maybe later the user that was interacting with the skill), delivered by Amazon, will be empty string if not provided
195
+ * **userName** contains a mapped username you can configure in iot admin UI for collected userIds
192
196
 
193
197
  More details on how the words are detected and what type of queries the Alexa Custom Skill differentiates please check https://forum.iobroker.net/viewtopic.php?f=37&t=17452 .
194
198
 
@@ -199,10 +203,11 @@ If it is a text string then this text will be sent as response to the skill.
199
203
  if the text is a JSON object then the following keys can be used:
200
204
  * **responseText** needs to contain the text to return to Amazon
201
205
  * **shouldEndSession** is a boolean and controls if the session will be closed after the response was spoken or stays open to accept another voice input.
206
+ * **sessionId** needs to contain the sessionId the response is meaned for. Ideally provide it to allow concurrent sessions. If not provided the first session that expects a response is assumed.
202
207
 
203
208
  **Return result via the message to iot instance**
204
209
 
205
- The iot instance also accepts a message with the name "alexaCustomResponse" containing the key "response" with an object that can contain the keys **responseText** and **shouldEndSession** as described above.
210
+ The iot instance also accepts a message with the name "alexaCustomResponse" containing the key "response" with an object that can contain the keys **responseText** and **shouldEndSession** and **sessionId** as described above.
206
211
  There will be no response from the iot instance to the message!
207
212
 
208
213
  **Example of a script that uses texts**
@@ -222,14 +227,15 @@ on({id: 'iot.0.smart.lastCommandObj', ack: true, change: 'any'}, obj => {
222
227
  const request = JSON.parse(obj.state.val);
223
228
  const response = {
224
229
  'responseText': 'Received phrase is: ' + request.words.join(' ') + '. Bye',
225
- 'shouldEndSession': true
230
+ 'shouldEndSession': true,
231
+ 'sessionId': request.sessionId
226
232
  };
227
233
 
228
234
  // Return response via state
229
235
  setState('iot.0.smart.lastResponse', JSON.stringify(response)); // important, that ack=false (default)
230
236
 
231
237
  // or alternatively return as message
232
- sendTo('iot.0', response);
238
+ sendTo('iot.0', 'alexaCustomResponse', response);
233
239
  });
234
240
  ```
235
241
 
@@ -263,6 +269,10 @@ Following types are supported:
263
269
  -->
264
270
 
265
271
  ## Changelog
272
+ ### 1.12.0 (2022-09-27)
273
+ * (Apollon77) Do not control saturation with a percentage request via alexa
274
+ * (bluefox) Migrated GUI to v5
275
+
266
276
  ### 1.11.9 (2022-07-22)
267
277
  * (Apollon77) Fix temperature controlling for thermostats via alexa
268
278
 
package/admin/actions.js CHANGED
@@ -1,49 +1,49 @@
1
- function getActions(obj) {
2
- var type = obj.common.type;
3
- var actions = null;
4
-
5
- if (obj.common.write === false) {
6
- if (obj.common.unit === 'C' || obj.common.unit === 'C°' || obj.common.unit === '°C' ||
7
- obj.common.unit === 'F' || obj.common.unit === 'F°' || obj.common.unit === '°F' ||
8
- obj.common.unit === 'K' || obj.common.unit === 'K°' || obj.common.unit === '°K' ||
9
- obj.common.role === 'value.temperature') {
10
- actions = ['getTemperatureReading'];
11
- type = '';
12
- } else {
13
- return null;
14
- }
15
- } else {
16
- if (type === 'number') {
17
- if ((obj.common.unit === 'C' || obj.common.unit === 'C°' || obj.common.unit === '°C' ||
18
- obj.common.unit === 'F' || obj.common.unit === 'F°' || obj.common.unit === '°F' ||
19
- obj.common.unit === 'K' || obj.common.unit === 'K°' || obj.common.unit === '°K')
20
- &&
21
- obj.common.role !== 'level.color.temperature') {
22
- actions = ['setTargetTemperature', 'incrementTargetTemperature', 'decrementTargetTemperature', 'getTargetTemperature'];
23
- type = '';
24
- } else if (obj.common.role === 'level.color.hue') {
25
- actions = ['setColor', 'turnOn', 'turnOff'];
26
- } else if (obj.common.role === 'level.color.temperature') {
27
- actions = ['incrementColorTemperature', 'decrementColorTemperature', 'setColorTemperature'];
28
- } else {
29
- actions = ['setPercentage', 'incrementPercentage', 'decrementPercentage', 'turnOn', 'turnOff'];
30
- }
31
- } else if (obj.common.role === 'switch.lock') {
32
- actions = ['setLockState', 'getLockState'];
33
- type = '';
34
- } else if (obj.common.role && obj.common.role.match(/^button/)) {
35
- actions = ['turnOn'];
36
- type = '';
37
- } else if (obj.common.role === 'level.color.rgb') {
38
- actions = ['setColor', 'turnOn', 'turnOff'];
39
- } else {
40
- actions = ['turnOn', 'turnOff'];
41
- type = '';
42
- }
43
- }
44
- return {type: type, actions: actions};
45
- }
46
-
47
- if (typeof module !== 'undefined' && module.parent) {
48
- module.exports.getActions = getActions;
49
- }
1
+ function getActions(obj) {
2
+ var type = obj.common.type;
3
+ var actions = null;
4
+
5
+ if (obj.common.write === false) {
6
+ if (obj.common.unit === 'C' || obj.common.unit === 'C°' || obj.common.unit === '°C' ||
7
+ obj.common.unit === 'F' || obj.common.unit === 'F°' || obj.common.unit === '°F' ||
8
+ obj.common.unit === 'K' || obj.common.unit === 'K°' || obj.common.unit === '°K' ||
9
+ obj.common.role === 'value.temperature') {
10
+ actions = ['getTemperatureReading'];
11
+ type = '';
12
+ } else {
13
+ return null;
14
+ }
15
+ } else {
16
+ if (type === 'number') {
17
+ if ((obj.common.unit === 'C' || obj.common.unit === 'C°' || obj.common.unit === '°C' ||
18
+ obj.common.unit === 'F' || obj.common.unit === 'F°' || obj.common.unit === '°F' ||
19
+ obj.common.unit === 'K' || obj.common.unit === 'K°' || obj.common.unit === '°K')
20
+ &&
21
+ obj.common.role !== 'level.color.temperature') {
22
+ actions = ['setTargetTemperature', 'incrementTargetTemperature', 'decrementTargetTemperature', 'getTargetTemperature'];
23
+ type = '';
24
+ } else if (obj.common.role === 'level.color.hue' || obj.common.role === 'level.color.saturation') {
25
+ actions = ['setColor', 'turnOn', 'turnOff'];
26
+ } else if (obj.common.role === 'level.color.temperature') {
27
+ actions = ['incrementColorTemperature', 'decrementColorTemperature', 'setColorTemperature'];
28
+ } else {
29
+ actions = ['setPercentage', 'incrementPercentage', 'decrementPercentage', 'turnOn', 'turnOff'];
30
+ }
31
+ } else if (obj.common.role === 'switch.lock') {
32
+ actions = ['setLockState', 'getLockState'];
33
+ type = '';
34
+ } else if (obj.common.role && obj.common.role.match(/^button/)) {
35
+ actions = ['turnOn'];
36
+ type = '';
37
+ } else if (obj.common.role === 'level.color.rgb') {
38
+ actions = ['setColor', 'turnOn', 'turnOff'];
39
+ } else {
40
+ actions = ['turnOn', 'turnOff'];
41
+ type = '';
42
+ }
43
+ }
44
+ return {type: type, actions: actions};
45
+ }
46
+
47
+ if (typeof module !== 'undefined' && module.parent) {
48
+ module.exports.getActions = getActions;
49
+ }
@@ -1,23 +1,13 @@
1
1
  {
2
2
  "files": {
3
- "main.css": "./static/css/main.e2d673ee.chunk.css",
4
- "main.js": "./static/js/main.67ccc2e8.chunk.js",
5
- "main.js.map": "./static/js/main.67ccc2e8.chunk.js.map",
6
- "runtime-main.js": "./static/js/runtime-main.0327cad0.js",
7
- "runtime-main.js.map": "./static/js/runtime-main.0327cad0.js.map",
8
- "static/css/2.6ab12a0e.chunk.css": "./static/css/2.6ab12a0e.chunk.css",
9
- "static/js/2.e9a02d96.chunk.js": "./static/js/2.e9a02d96.chunk.js",
10
- "static/js/2.e9a02d96.chunk.js.map": "./static/js/2.e9a02d96.chunk.js.map",
3
+ "main.css": "./static/css/main.96b3c861.css",
4
+ "main.js": "./static/js/main.c7ea8cbe.js",
11
5
  "index.html": "./index.html",
12
- "static/css/2.6ab12a0e.chunk.css.map": "./static/css/2.6ab12a0e.chunk.css.map",
13
- "static/css/main.e2d673ee.chunk.css.map": "./static/css/main.e2d673ee.chunk.css.map",
14
- "static/js/2.e9a02d96.chunk.js.LICENSE.txt": "./static/js/2.e9a02d96.chunk.js.LICENSE.txt"
6
+ "main.96b3c861.css.map": "./static/css/main.96b3c861.css.map",
7
+ "main.c7ea8cbe.js.map": "./static/js/main.c7ea8cbe.js.map"
15
8
  },
16
9
  "entrypoints": [
17
- "static/js/runtime-main.0327cad0.js",
18
- "static/css/2.6ab12a0e.chunk.css",
19
- "static/js/2.e9a02d96.chunk.js",
20
- "static/css/main.e2d673ee.chunk.css",
21
- "static/js/main.67ccc2e8.chunk.js"
10
+ "static/css/main.96b3c861.css",
11
+ "static/js/main.c7ea8cbe.js"
22
12
  ]
23
13
  }
@@ -1 +1 @@
1
- <!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="shortcut icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/><meta name="theme-color" content="#000000"/><link rel="manifest" href="./manifest.json"/><script type="text/javascript" src="./../../lib/js/socket.io.js"></script><title>IoT Settings</title><link href="./static/css/2.6ab12a0e.chunk.css" rel="stylesheet"><link href="./static/css/main.e2d673ee.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function t(t){for(var n,i,l=t[0],a=t[1],f=t[2],c=0,s=[];c<l.length;c++)i=l[c],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&s.push(o[i][0]),o[i]=0;for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);for(p&&p(t);s.length;)s.shift()();return u.push.apply(u,f||[]),r()}function r(){for(var e,t=0;t<u.length;t++){for(var r=u[t],n=!0,l=1;l<r.length;l++){var a=r[l];0!==o[a]&&(n=!1)}n&&(u.splice(t--,1),e=i(i.s=r[0]))}return e}var n={},o={1:0},u=[];function i(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=e,i.c=n,i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(r,n,function(t){return e[t]}.bind(null,n));return r},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="./";var l=this["webpackJsonpiot-admin"]=this["webpackJsonpiot-admin"]||[],a=l.push.bind(l);l.push=t,l=l.slice();for(var f=0;f<l.length;f++)t(l[f]);var p=a;r()}([])</script><script src="./static/js/2.e9a02d96.chunk.js"></script><script src="./static/js/main.67ccc2e8.chunk.js"></script></body></html>
1
+ <!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="shortcut icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/><meta name="theme-color" content="#000000"/><link rel="manifest" href="./manifest.json"/><script type="text/javascript" src="./../../lib/js/socket.io.js"></script><title>IoT Settings</title><script defer="defer" src="./static/js/main.c7ea8cbe.js"></script><link href="./static/css/main.96b3c861.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
@@ -0,0 +1,2 @@
1
+ body,html{height:100%}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;margin:0;overflow:hidden;padding:0;width:100%}::-webkit-scrollbar,::-webkit-scrollbar-track{background-color:#ccc}::-webkit-scrollbar{width:6px}::-webkit-scrollbar-thumb{background-color:#575757}#root,.App{height:100%}
2
+ /*# sourceMappingURL=main.96b3c861.css.map*/
@@ -0,0 +1 @@
1
+ {"version":3,"file":"static/css/main.96b3c861.css","mappings":"AAGA,UAFE,WAWF,CATA,KAIE,kCAAmC,CACnC,iCAAkC,CAFlC,mIAA8J,CAF9J,QAAS,CAOT,eAAgB,CANhB,SAAU,CAIV,UAGF,CAKA,8CAFE,qBAKF,CAHA,oBACE,SAEF,CACA,0BACE,wBACF,CAMA,WACE,WACF","sources":["index.css"],"sourcesContent":["html {\n height: 100%;\n}\nbody {\n margin: 0;\n padding: 0;\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Roboto\", \"Oxygen\", \"Ubuntu\", \"Cantarell\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\", sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n width: 100%;\n height: 100%;\n overflow: hidden;\n}\n/* scrollbar */\n*::-webkit-scrollbar-track {\n background-color: #ccc;\n}\n*::-webkit-scrollbar {\n width: 6px;\n background-color: #ccc;\n}\n*::-webkit-scrollbar-thumb {\n background-color: #575757;\n}\n\n\n#root {\n height: 100%;\n}\n.App {\n height: 100%;\n}"],"names":[],"sourceRoot":""}