iobroker.javascript 5.4.0 → 5.4.3
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 +10 -16
- package/admin/asset-manifest.json +10 -10
- package/admin/google-blockly/own/blocks_trigger.js +1 -1
- package/admin/static/js/{2.8a1e22ee.chunk.js → 2.d453b3f2.chunk.js} +2 -2
- package/admin/static/js/{2.8a1e22ee.chunk.js.LICENSE.txt → 2.d453b3f2.chunk.js.LICENSE.txt} +0 -0
- package/admin/static/js/{2.8a1e22ee.chunk.js.map → 2.d453b3f2.chunk.js.map} +1 -1
- package/admin/static/js/{main.b85c3f2a.chunk.js → main.641ff6ac.chunk.js} +2 -2
- package/admin/static/js/{main.b85c3f2a.chunk.js.map → main.641ff6ac.chunk.js.map} +1 -1
- package/admin/static/js/{runtime-main.367f9424.js → runtime-main.0fde2268.js} +1 -1
- package/admin/static/js/{runtime-main.367f9424.js.map → runtime-main.0fde2268.js.map} +1 -1
- package/admin/tab.html +1 -1
- package/docs/en/javascript.md +111 -129
- package/io-package.json +38 -38
- package/lib/scheduler.js +10 -12
- package/main.js +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
!function(e){function r(r){for(var n,l,f=r[0],i=r[1],a=r[2],c=0,s=[];c<f.length;c++)l=f[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(p&&p(r);s.length;)s.shift()();return u.push.apply(u,a||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,f=1;f<t.length;f++){var i=t[f];0!==o[i]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={1:0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"===typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="/";var f=this.webpackJsonpjs=this.webpackJsonpjs||[],i=f.push.bind(f);f.push=r,f=f.slice();for(var a=0;a<f.length;a++)r(f[a]);var p=i;t()}([]);
|
|
2
|
-
//# sourceMappingURL=runtime-main.
|
|
2
|
+
//# sourceMappingURL=runtime-main.0fde2268.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../webpack/bootstrap"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","this","oldJsonpFunction","slice"],"mappings":"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","file":"static/js/runtime-main.
|
|
1
|
+
{"version":3,"sources":["../webpack/bootstrap"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","this","oldJsonpFunction","slice"],"mappings":"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","file":"static/js/runtime-main.0fde2268.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t1: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \tvar jsonpArray = this[\"webpackJsonpjs\"] = this[\"webpackJsonpjs\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// run deferred modules from other chunks\n \tcheckDeferredModules();\n"],"sourceRoot":""}
|
package/admin/tab.html
CHANGED
|
@@ -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" onerror="setTimeout(function(){window.location.reload()}, 5000)" src="./../../lib/js/socket.io.js"></script><title>Scripts</title><script type="text/javascript" src="google-blockly/blockly_compressed.js"></script><script type="text/javascript" src="google-blockly/msg/js/en.js"></script><script type="text/javascript" src="google-blockly/blocks_compressed.js"></script><script type="text/javascript" src="google-blockly/javascript_compressed.js"></script><script type="text/javascript" src="google-blockly/own/blocks_words.js"></script><script type="text/javascript" src="google-blockly/own/field_oid.js"></script><script type="text/javascript" src="google-blockly/own/field_cron.js"></script><script type="text/javascript" src="google-blockly/own/field_script.js"></script><script type="text/javascript" src="google-blockly/own/blocks_system.js"></script><script type="text/javascript" src="google-blockly/own/blocks_action.js"></script><script type="text/javascript" src="google-blockly/own/blocks_sendto.js"></script><script type="text/javascript" src="google-blockly/own/blocks_time.js"></script><script type="text/javascript" src="google-blockly/own/blocks_convert.js"></script><script type="text/javascript" src="google-blockly/own/blocks_trigger.js"></script><script type="text/javascript" src="google-blockly/own/blocks_procedures.js"></script><script type="text/javascript" src="google-blockly/own/blocks_timeout.js"></script><script type="text/javascript" src="google-blockly/own/blocks_switch.js"></script><style>.iobVerticalSplitter .layout-pane-primary{overflow:hidden!important}</style><link href="static/css/2.a442f2b4.chunk.css" rel="stylesheet"><link href="static/css/main.5b5813ce.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><script>"dark"===(window.localStorage&&window.localStorage.getItem("App.theme"))&&(window.document.body.style.background="black")</script><div id="root"></div><xml id="toolbox" style="display:none"><category><block>%%CUSTOM_BLOCKS%%</block></category><sep></sep><category name="{catLogic}" colour="210"><block type="controls_if"></block><block type="logic_compare"></block><block type="logic_operation"></block><block type="logic_negate"></block><block type="logic_boolean"></block><block type="logic_null"></block><block type="logic_ternary"></block><block type="logic_switch_case"></block></category><category name="{catLoops}" colour="120"><block type="controls_repeat_ext"><value name="TIMES"><shadow type="math_number"><field name="NUM">10</field></shadow></value></block><block type="controls_whileUntil"></block><block type="controls_for"><value name="FROM"><shadow type="math_number"><field name="NUM">1</field></shadow></value><value name="TO"><shadow type="math_number"><field name="NUM">10</field></shadow></value><value name="BY"><shadow type="math_number"><field name="NUM">1</field></shadow></value></block><block type="controls_forEach"></block><block type="controls_flow_statements"></block></category><category name="{catMath}" colour="230"><block type="math_number"></block><block type="math_arithmetic"><value name="A"><shadow type="math_number"><field name="NUM">1</field></shadow></value><value name="B"><shadow type="math_number"><field name="NUM">1</field></shadow></value></block><block type="math_single"><value name="NUM"><shadow type="math_number"><field name="NUM">9</field></shadow></value></block><block type="math_trig"><value name="NUM"><shadow type="math_number"><field name="NUM">45</field></shadow></value></block><block type="math_constant"></block><block type="math_number_property"><value name="NUMBER_TO_CHECK"><shadow type="math_number"><field name="NUM">0</field></shadow></value></block><block type="math_change"><value name="DELTA"><shadow type="math_number"><field name="NUM">1</field></shadow></value></block><block type="math_round"><value name="NUM"><shadow type="math_number"><field name="NUM">3.1</field></shadow></value></block><block type="math_rndfixed"><value name="x"><shadow type="math_number"><field name="NUM">3.1234</field></shadow></value><value name="n"><shadow type="math_number"><field name="NUM">2</field></shadow></value></block><block type="math_on_list"></block><block type="math_modulo"><value name="DIVIDEND"><shadow type="math_number"><field name="NUM">64</field></shadow></value><value name="DIVISOR"><shadow type="math_number"><field name="NUM">10</field></shadow></value></block><block type="math_constrain"><value name="VALUE"><shadow type="math_number"><field name="NUM">50</field></shadow></value><value name="LOW"><shadow type="math_number"><field name="NUM">1</field></shadow></value><value name="HIGH"><shadow type="math_number"><field name="NUM">100</field></shadow></value></block><block type="math_random_int"><value name="FROM"><shadow type="math_number"><field name="NUM">1</field></shadow></value><value name="TO"><shadow type="math_number"><field name="NUM">100</field></shadow></value></block><block type="math_random_float"></block></category><category name="{catText}" colour="160"><block type="text"></block><block type="text_newline"></block><block type="text_multiline"></block><block type="text_join"></block><block type="text_append"><value name="TEXT"><shadow type="text"></shadow></value></block><block type="text_length"><value name="VALUE"><shadow type="text"><field name="TEXT">abc</field></shadow></value></block><block type="text_isEmpty"><value name="VALUE"><shadow type="text"><field name="TEXT"></field></shadow></value></block><block type="text_indexOf"><value name="VALUE"><block type="variables_get"><field name="VAR">{textVariable}</field></block></value><value name="FIND"><shadow type="text"><field name="TEXT">abc</field></shadow></value></block><block type="text_charAt"><value name="VALUE"><block type="variables_get"><field name="VAR">{textVariable}</field></block></value></block><block type="text_getSubstring"><value name="STRING"><block type="variables_get"><field name="VAR">{textVariable}</field></block></value></block><block type="text_changeCase"><value name="TEXT"><shadow type="text"><field name="TEXT">abc</field></shadow></value></block><block type="text_trim"><value name="TEXT"><shadow type="text"><field name="TEXT">abc</field></shadow></value></block></category><category name="{catLists}" colour="260"><block type="lists_create_with"><mutation items="0"></mutation></block><block type="lists_create_with"></block><block type="lists_repeat"><value name="NUM"><shadow type="math_number"><field name="NUM">5</field></shadow></value></block><block type="lists_length"></block><block type="lists_isEmpty"></block><block type="lists_indexOf"><value name="VALUE"><block type="variables_get"><field name="VAR">{listVariable}</field></block></value></block><block type="lists_getIndex"><value name="VALUE"><block type="variables_get"><field name="VAR">{listVariable}</field></block></value></block><block type="lists_setIndex"><value name="LIST"><block type="variables_get"><field name="VAR">{listVariable}</field></block></value></block><block type="lists_getSublist"><value name="LIST"><block type="variables_get"><field name="VAR">{listVariable}</field></block></value></block><block type="lists_split"><value name="DELIM"><shadow type="text"><field name="TEXT">,</field></shadow></value></block><block type="lists_sort"></block></category><category name="{catColour}" colour="20"><block type="colour_picker"></block><block type="colour_random"></block><block type="colour_rgb"><value name="RED"><shadow type="math_number"><field name="NUM">100</field></shadow></value><value name="GREEN"><shadow type="math_number"><field name="NUM">50</field></shadow></value><value name="BLUE"><shadow type="math_number"><field name="NUM">0</field></shadow></value></block><block type="colour_blend"><value name="COLOUR1"><shadow type="colour_picker"><field name="COLOUR">#ff0000</field></shadow></value><value name="COLOUR2"><shadow type="colour_picker"><field name="COLOUR">#3333ff</field></shadow></value><value name="RATIO"><shadow type="math_number"><field name="NUM">0.5</field></shadow></value></block></category><sep></sep><category name="{catVariables}" colour="330" custom="VARIABLE"></category><category name="{catFunctions}" colour="290" custom="PROCEDURE"></category></xml><script>!function(e){function r(r){for(var n,l,f=r[0],i=r[1],a=r[2],c=0,s=[];c<f.length;c++)l=f[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(p&&p(r);s.length;)s.shift()();return u.push.apply(u,a||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,f=1;f<t.length;f++){var i=t[f];0!==o[i]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={1:0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="/";var f=this.webpackJsonpjs=this.webpackJsonpjs||[],i=f.push.bind(f);f.push=r,f=f.slice();for(var a=0;a<f.length;a++)r(f[a]);var p=i;t()}([])</script><script src="static/js/2.8a1e22ee.chunk.js"></script><script src="static/js/main.b85c3f2a.chunk.js"></script><script type="text/javascript" src="vs/loader.js"></script><script type="text/javascript" src="vs/configure.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" onerror="setTimeout(function(){window.location.reload()}, 5000)" src="./../../lib/js/socket.io.js"></script><title>Scripts</title><script type="text/javascript" src="google-blockly/blockly_compressed.js"></script><script type="text/javascript" src="google-blockly/msg/js/en.js"></script><script type="text/javascript" src="google-blockly/blocks_compressed.js"></script><script type="text/javascript" src="google-blockly/javascript_compressed.js"></script><script type="text/javascript" src="google-blockly/own/blocks_words.js"></script><script type="text/javascript" src="google-blockly/own/field_oid.js"></script><script type="text/javascript" src="google-blockly/own/field_cron.js"></script><script type="text/javascript" src="google-blockly/own/field_script.js"></script><script type="text/javascript" src="google-blockly/own/blocks_system.js"></script><script type="text/javascript" src="google-blockly/own/blocks_action.js"></script><script type="text/javascript" src="google-blockly/own/blocks_sendto.js"></script><script type="text/javascript" src="google-blockly/own/blocks_time.js"></script><script type="text/javascript" src="google-blockly/own/blocks_convert.js"></script><script type="text/javascript" src="google-blockly/own/blocks_trigger.js"></script><script type="text/javascript" src="google-blockly/own/blocks_procedures.js"></script><script type="text/javascript" src="google-blockly/own/blocks_timeout.js"></script><script type="text/javascript" src="google-blockly/own/blocks_switch.js"></script><style>.iobVerticalSplitter .layout-pane-primary{overflow:hidden!important}</style><link href="static/css/2.a442f2b4.chunk.css" rel="stylesheet"><link href="static/css/main.5b5813ce.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><script>"dark"===(window.localStorage&&window.localStorage.getItem("App.theme"))&&(window.document.body.style.background="black")</script><div id="root"></div><xml id="toolbox" style="display:none"><category><block>%%CUSTOM_BLOCKS%%</block></category><sep></sep><category name="{catLogic}" colour="210"><block type="controls_if"></block><block type="logic_compare"></block><block type="logic_operation"></block><block type="logic_negate"></block><block type="logic_boolean"></block><block type="logic_null"></block><block type="logic_ternary"></block><block type="logic_switch_case"></block></category><category name="{catLoops}" colour="120"><block type="controls_repeat_ext"><value name="TIMES"><shadow type="math_number"><field name="NUM">10</field></shadow></value></block><block type="controls_whileUntil"></block><block type="controls_for"><value name="FROM"><shadow type="math_number"><field name="NUM">1</field></shadow></value><value name="TO"><shadow type="math_number"><field name="NUM">10</field></shadow></value><value name="BY"><shadow type="math_number"><field name="NUM">1</field></shadow></value></block><block type="controls_forEach"></block><block type="controls_flow_statements"></block></category><category name="{catMath}" colour="230"><block type="math_number"></block><block type="math_arithmetic"><value name="A"><shadow type="math_number"><field name="NUM">1</field></shadow></value><value name="B"><shadow type="math_number"><field name="NUM">1</field></shadow></value></block><block type="math_single"><value name="NUM"><shadow type="math_number"><field name="NUM">9</field></shadow></value></block><block type="math_trig"><value name="NUM"><shadow type="math_number"><field name="NUM">45</field></shadow></value></block><block type="math_constant"></block><block type="math_number_property"><value name="NUMBER_TO_CHECK"><shadow type="math_number"><field name="NUM">0</field></shadow></value></block><block type="math_change"><value name="DELTA"><shadow type="math_number"><field name="NUM">1</field></shadow></value></block><block type="math_round"><value name="NUM"><shadow type="math_number"><field name="NUM">3.1</field></shadow></value></block><block type="math_rndfixed"><value name="x"><shadow type="math_number"><field name="NUM">3.1234</field></shadow></value><value name="n"><shadow type="math_number"><field name="NUM">2</field></shadow></value></block><block type="math_on_list"></block><block type="math_modulo"><value name="DIVIDEND"><shadow type="math_number"><field name="NUM">64</field></shadow></value><value name="DIVISOR"><shadow type="math_number"><field name="NUM">10</field></shadow></value></block><block type="math_constrain"><value name="VALUE"><shadow type="math_number"><field name="NUM">50</field></shadow></value><value name="LOW"><shadow type="math_number"><field name="NUM">1</field></shadow></value><value name="HIGH"><shadow type="math_number"><field name="NUM">100</field></shadow></value></block><block type="math_random_int"><value name="FROM"><shadow type="math_number"><field name="NUM">1</field></shadow></value><value name="TO"><shadow type="math_number"><field name="NUM">100</field></shadow></value></block><block type="math_random_float"></block></category><category name="{catText}" colour="160"><block type="text"></block><block type="text_newline"></block><block type="text_multiline"></block><block type="text_join"></block><block type="text_append"><value name="TEXT"><shadow type="text"></shadow></value></block><block type="text_length"><value name="VALUE"><shadow type="text"><field name="TEXT">abc</field></shadow></value></block><block type="text_isEmpty"><value name="VALUE"><shadow type="text"><field name="TEXT"></field></shadow></value></block><block type="text_indexOf"><value name="VALUE"><block type="variables_get"><field name="VAR">{textVariable}</field></block></value><value name="FIND"><shadow type="text"><field name="TEXT">abc</field></shadow></value></block><block type="text_charAt"><value name="VALUE"><block type="variables_get"><field name="VAR">{textVariable}</field></block></value></block><block type="text_getSubstring"><value name="STRING"><block type="variables_get"><field name="VAR">{textVariable}</field></block></value></block><block type="text_changeCase"><value name="TEXT"><shadow type="text"><field name="TEXT">abc</field></shadow></value></block><block type="text_trim"><value name="TEXT"><shadow type="text"><field name="TEXT">abc</field></shadow></value></block></category><category name="{catLists}" colour="260"><block type="lists_create_with"><mutation items="0"></mutation></block><block type="lists_create_with"></block><block type="lists_repeat"><value name="NUM"><shadow type="math_number"><field name="NUM">5</field></shadow></value></block><block type="lists_length"></block><block type="lists_isEmpty"></block><block type="lists_indexOf"><value name="VALUE"><block type="variables_get"><field name="VAR">{listVariable}</field></block></value></block><block type="lists_getIndex"><value name="VALUE"><block type="variables_get"><field name="VAR">{listVariable}</field></block></value></block><block type="lists_setIndex"><value name="LIST"><block type="variables_get"><field name="VAR">{listVariable}</field></block></value></block><block type="lists_getSublist"><value name="LIST"><block type="variables_get"><field name="VAR">{listVariable}</field></block></value></block><block type="lists_split"><value name="DELIM"><shadow type="text"><field name="TEXT">,</field></shadow></value></block><block type="lists_sort"></block></category><category name="{catColour}" colour="20"><block type="colour_picker"></block><block type="colour_random"></block><block type="colour_rgb"><value name="RED"><shadow type="math_number"><field name="NUM">100</field></shadow></value><value name="GREEN"><shadow type="math_number"><field name="NUM">50</field></shadow></value><value name="BLUE"><shadow type="math_number"><field name="NUM">0</field></shadow></value></block><block type="colour_blend"><value name="COLOUR1"><shadow type="colour_picker"><field name="COLOUR">#ff0000</field></shadow></value><value name="COLOUR2"><shadow type="colour_picker"><field name="COLOUR">#3333ff</field></shadow></value><value name="RATIO"><shadow type="math_number"><field name="NUM">0.5</field></shadow></value></block></category><sep></sep><category name="{catVariables}" colour="330" custom="VARIABLE"></category><category name="{catFunctions}" colour="290" custom="PROCEDURE"></category></xml><script>!function(e){function r(r){for(var n,l,f=r[0],i=r[1],a=r[2],c=0,s=[];c<f.length;c++)l=f[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(p&&p(r);s.length;)s.shift()();return u.push.apply(u,a||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,f=1;f<t.length;f++){var i=t[f];0!==o[i]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={1:0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="/";var f=this.webpackJsonpjs=this.webpackJsonpjs||[],i=f.push.bind(f);f.push=r,f=f.slice();for(var a=0;a<f.length;a++)r(f[a]);var p=i;t()}([])</script><script src="static/js/2.d453b3f2.chunk.js"></script><script src="static/js/main.641ff6ac.chunk.js"></script><script type="text/javascript" src="vs/loader.js"></script><script type="text/javascript" src="vs/configure.js"></script></body></html>
|
package/docs/en/javascript.md
CHANGED
|
@@ -183,27 +183,7 @@ on(pattern, callbackOrId, value);
|
|
|
183
183
|
The callback function will return the object as parameter with following content:
|
|
184
184
|
```js
|
|
185
185
|
{
|
|
186
|
-
'
|
|
187
|
-
'type' : 'state',
|
|
188
|
-
'common' : {
|
|
189
|
-
'def' : 0,
|
|
190
|
-
'min' : 0,
|
|
191
|
-
'max' : 6,
|
|
192
|
-
'type' : 'number',
|
|
193
|
-
'read' : true,
|
|
194
|
-
'write' : true,
|
|
195
|
-
'states' : { 0:'stop', 1:'play', 2:'pause', 3:'next', 4:'previous', 5:'mute', 6:'unmute'},
|
|
196
|
-
'role' : 'media.state',
|
|
197
|
-
'desc' : 'Player handling',
|
|
198
|
-
'name' : 'MyPlayer'
|
|
199
|
-
},
|
|
200
|
-
'native' : {},
|
|
201
|
-
'channelId' : 'channelID',
|
|
202
|
-
'channelName' : 'channelName',
|
|
203
|
-
'deviceId' : 'deviceID',
|
|
204
|
-
'deviceName' : 'deviceName',
|
|
205
|
-
'enumIds' : [],
|
|
206
|
-
'enumNames' : [],
|
|
186
|
+
'id' : 'javascript.0.myplayer',
|
|
207
187
|
'state' : {
|
|
208
188
|
'val' : 'new state',
|
|
209
189
|
'ts' : 1416149118,
|
|
@@ -230,7 +210,7 @@ var timer;
|
|
|
230
210
|
createState('counter', 0);
|
|
231
211
|
|
|
232
212
|
// On change
|
|
233
|
-
on('adapter.0.device.channel.sensor', function (
|
|
213
|
+
on('adapter.0.device.channel.sensor', function (data) {
|
|
234
214
|
// But not ofter than 30 seconds
|
|
235
215
|
if (!timer) {
|
|
236
216
|
timer = setTimeout(function () {
|
|
@@ -248,110 +228,110 @@ on('adapter.0.device.channel.sensor', function (obj) {
|
|
|
248
228
|
|
|
249
229
|
You can use following parameters to specify the trigger:
|
|
250
230
|
|
|
251
|
-
| parameter | type/value | description
|
|
252
|
-
|----------- |-------
|
|
253
|
-
| logic | string |
|
|
254
|
-
| | |
|
|
255
|
-
| id | string |
|
|
256
|
-
| | RegExp |
|
|
257
|
-
| | Array |
|
|
258
|
-
| | |
|
|
259
|
-
| name | string |
|
|
260
|
-
| | RegExp |
|
|
261
|
-
| | Array |
|
|
262
|
-
| | |
|
|
263
|
-
| change | string |
|
|
264
|
-
| | "eq" |
|
|
265
|
-
| | "ne" |
|
|
266
|
-
| | "gt" |
|
|
267
|
-
| | "ge" |
|
|
268
|
-
| | "lt" |
|
|
269
|
-
| | "le" |
|
|
270
|
-
| | "any" |
|
|
271
|
-
| | |
|
|
272
|
-
| val | mixed |
|
|
273
|
-
| valNe | mixed |
|
|
274
|
-
| valGt | mixed |
|
|
275
|
-
| valGe | mixed |
|
|
276
|
-
| valLt | mixed |
|
|
277
|
-
| valLe | mixed |
|
|
278
|
-
| | |
|
|
279
|
-
| ack | boolean |
|
|
280
|
-
| q | number |
|
|
281
|
-
| | |
|
|
282
|
-
| oldVal | mixed |
|
|
283
|
-
| oldValNe | mixed |
|
|
284
|
-
| oldValGt | mixed |
|
|
285
|
-
| oldValGe | mixed |
|
|
286
|
-
| oldValLt | mixed |
|
|
287
|
-
| oldValLe | mixed |
|
|
288
|
-
| | |
|
|
289
|
-
| oldAck | bool |
|
|
290
|
-
| oldQ | number |
|
|
291
|
-
| | |
|
|
292
|
-
| ts | string |
|
|
293
|
-
| tsGt | string |
|
|
294
|
-
| tsGe | string |
|
|
295
|
-
| tsLt | string |
|
|
296
|
-
| tsLe | string |
|
|
297
|
-
| | |
|
|
298
|
-
| oldTs | string |
|
|
299
|
-
| oldTsGt | string |
|
|
300
|
-
| oldTsGe | string |
|
|
301
|
-
| oldTsLt | string |
|
|
302
|
-
| oldTsLe | string |
|
|
303
|
-
| | |
|
|
304
|
-
| lc | string |
|
|
305
|
-
| lcGt | string |
|
|
306
|
-
| lcGe | string |
|
|
307
|
-
| lcLt | string |
|
|
308
|
-
| lcLe | string |
|
|
309
|
-
| | |
|
|
310
|
-
| oldLc | string |
|
|
311
|
-
| oldLcGt | string |
|
|
312
|
-
| oldLcGe | string |
|
|
313
|
-
| oldLcLt | string |
|
|
314
|
-
| oldLcLe | string |
|
|
315
|
-
| | |
|
|
316
|
-
| channelId | string |
|
|
317
|
-
| | RegExp |
|
|
318
|
-
| | Array |
|
|
319
|
-
| | |
|
|
320
|
-
| channelName | string |
|
|
321
|
-
| | RegExp |
|
|
322
|
-
| | Array |
|
|
323
|
-
| | |
|
|
324
|
-
| deviceId | string |
|
|
325
|
-
| | RegExp |
|
|
326
|
-
| | Array |
|
|
327
|
-
| | |
|
|
328
|
-
| deviceName | string |
|
|
329
|
-
| | RegExp |
|
|
330
|
-
| | Array |
|
|
331
|
-
| | |
|
|
332
|
-
| enumId | string |
|
|
333
|
-
| | RegExp |
|
|
334
|
-
| | Array |
|
|
335
|
-
| | |
|
|
336
|
-
| enumName | string |
|
|
337
|
-
| | RegExp |
|
|
338
|
-
| | Array |
|
|
339
|
-
| | |
|
|
340
|
-
| from | string |
|
|
341
|
-
| | RegExp |
|
|
342
|
-
| | Array |
|
|
343
|
-
| | |
|
|
344
|
-
| fromNe | string |
|
|
345
|
-
| | RegExp |
|
|
346
|
-
| | Array |
|
|
347
|
-
| | |
|
|
348
|
-
| oldFrom | string |
|
|
349
|
-
| | RegExp |
|
|
350
|
-
| | Array |
|
|
351
|
-
| | |
|
|
352
|
-
| oldFromNe | string |
|
|
353
|
-
| | RegExp |
|
|
354
|
-
| | Array |
|
|
231
|
+
| parameter | type/value | description |
|
|
232
|
+
|----------- |------- |-----------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
233
|
+
| logic | string | "and" or "or" logic to combine the conditions \(default: "and"\) |
|
|
234
|
+
| | | |
|
|
235
|
+
| id | string | id is equal to given one |
|
|
236
|
+
| | RegExp | id matched to regular expression |
|
|
237
|
+
| | Array | id matched to a list of allowed IDs |
|
|
238
|
+
| | | |
|
|
239
|
+
| name | string | name is equal to given one |
|
|
240
|
+
| | RegExp | name matched to regular expression |
|
|
241
|
+
| | Array | name matched to a list of allowed names |
|
|
242
|
+
| | | |
|
|
243
|
+
| change | string | "eq", "ne", "gt", "ge", "lt", "le", "any" |
|
|
244
|
+
| | "eq" | (equal) New value must be equal to old one (state.val == oldState.val) |
|
|
245
|
+
| | "ne" | (not equal) New value must be not equal to the old one (state.val != oldState.val) **If pattern is id-string this value is used by default** |
|
|
246
|
+
| | "gt" | (greater) New value must be greater than old value (state.val > oldState.val) |
|
|
247
|
+
| | "ge" | (greater or equal) New value must be greater or equal to old one (state.val >= oldState.val) |
|
|
248
|
+
| | "lt" | (smaller) New value must be smaller than old one (state.val < oldState.val) |
|
|
249
|
+
| | "le" | (smaller or equal) New value must be smaller or equal to old value (state.val <= oldState.val) |
|
|
250
|
+
| | "any" | Trigger will be raised if just the new value comes |
|
|
251
|
+
| | | |
|
|
252
|
+
| val | mixed | New value must be equal to given one |
|
|
253
|
+
| valNe | mixed | New value must be not equal to given one |
|
|
254
|
+
| valGt | mixed | New value must be greater than given one |
|
|
255
|
+
| valGe | mixed | New value must be greater or equal to given one |
|
|
256
|
+
| valLt | mixed | New value must be smaller than given one |
|
|
257
|
+
| valLe | mixed | New value must be smaller or equal to given one |
|
|
258
|
+
| | | |
|
|
259
|
+
| ack | boolean | Acknowledged state of new value is equal to given one |
|
|
260
|
+
| q | number | Quality code state of new value is equal to given one. You can use '*' for matching to any code. **If not provided q = 0 is set as pattern!** |
|
|
261
|
+
| | | |
|
|
262
|
+
| oldVal | mixed | Previous value must be equal to given one |
|
|
263
|
+
| oldValNe | mixed | Previous value must be not equal to given one |
|
|
264
|
+
| oldValGt | mixed | Previous value must be greater than given one |
|
|
265
|
+
| oldValGe | mixed | Previous value must be greater or equal to given one |
|
|
266
|
+
| oldValLt | mixed | Previous value must be smaller than given one |
|
|
267
|
+
| oldValLe | mixed | Previous value must be smaller or equal to given one |
|
|
268
|
+
| | | |
|
|
269
|
+
| oldAck | bool | Acknowledged state of previous value is equal to given one |
|
|
270
|
+
| oldQ | number | Quality code state of previous value is equal to given one. You can use '*' for matching to any code |
|
|
271
|
+
| | | |
|
|
272
|
+
| ts | string | New value time stamp must be equal to given one (state.ts == ts) |
|
|
273
|
+
| tsGt | string | New value time stamp must be not equal to the given one (state.ts != ts) |
|
|
274
|
+
| tsGe | string | New value time stamp must be greater than given value (state.ts > ts) |
|
|
275
|
+
| tsLt | string | New value time stamp must be greater or equal to given one (state.ts >= ts) |
|
|
276
|
+
| tsLe | string | New value time stamp must be smaller than given one (state.ts < ts) |
|
|
277
|
+
| | | |
|
|
278
|
+
| oldTs | string | Previous time stamp must be equal to given one (oldState.ts == ts) |
|
|
279
|
+
| oldTsGt | string | Previous time stamp must be not equal to the given one (oldState.ts != ts) |
|
|
280
|
+
| oldTsGe | string | Previous time stamp must be greater than given value (oldState.ts > ts) |
|
|
281
|
+
| oldTsLt | string | Previous time stamp must be greater or equal to given one (oldState.ts >= ts) |
|
|
282
|
+
| oldTsLe | string | Previous time stamp must be smaller than given one (oldState.ts < ts) |
|
|
283
|
+
| | | |
|
|
284
|
+
| lc | string | Last change time stamp must be equal to given one (state.lc == lc) |
|
|
285
|
+
| lcGt | string | Last change time stamp must be not equal to the given one (state.lc != lc) |
|
|
286
|
+
| lcGe | string | Last change time stamp must be greater than given value (state.lc > lc) |
|
|
287
|
+
| lcLt | string | Last change time stamp must be greater or equal to given one (state.lc >= lc) |
|
|
288
|
+
| lcLe | string | Last change time stamp must be smaller than given one (state.lc < lc) |
|
|
289
|
+
| | | |
|
|
290
|
+
| oldLc | string | Previous last change time stamp must be equal to given one (oldState.lc == lc) |
|
|
291
|
+
| oldLcGt | string | Previous last change time stamp must be not equal to the given one (oldState.lc != lc) |
|
|
292
|
+
| oldLcGe | string | Previous last change time stamp must be greater than given value (oldState.lc > lc) |
|
|
293
|
+
| oldLcLt | string | Previous last change time stamp must be greater or equal to given one (oldState.lc >= lc) |
|
|
294
|
+
| oldLcLe | string | Previous last change time stamp must be smaller than given one (oldState.lc < lc) |
|
|
295
|
+
| | | |
|
|
296
|
+
| channelId | string | Channel ID must be equal to given one |
|
|
297
|
+
| | RegExp | Channel ID matched to regular expression |
|
|
298
|
+
| | Array | Channel ID matched to a list of allowed channel IDs |
|
|
299
|
+
| | | |
|
|
300
|
+
| channelName | string | Channel name must be equal to given one |
|
|
301
|
+
| | RegExp | Channel name matched to regular expression |
|
|
302
|
+
| | Array | Channel name matched to a list of allowed channel names |
|
|
303
|
+
| | | |
|
|
304
|
+
| deviceId | string | Device ID must be equal to given one |
|
|
305
|
+
| | RegExp | Device ID matched to regular expression |
|
|
306
|
+
| | Array | Device ID matched to a list of allowed device IDs |
|
|
307
|
+
| | | |
|
|
308
|
+
| deviceName | string | Device name must be equal to given one |
|
|
309
|
+
| | RegExp | Device name matched to regular expression |
|
|
310
|
+
| | Array | Device name matched to a list of allowed device names |
|
|
311
|
+
| | | |
|
|
312
|
+
| enumId | string | State belongs to given enum |
|
|
313
|
+
| | RegExp | One enum ID of the state satisfies the given regular expression |
|
|
314
|
+
| | Array | One enum ID of the state is in the given list of enum IDs |
|
|
315
|
+
| | | |
|
|
316
|
+
| enumName | string | State belongs to given enum |
|
|
317
|
+
| | RegExp | One enum name of the state satisfies the given regular expression |
|
|
318
|
+
| | Array | One enum name of the state is in the given list of enum names |
|
|
319
|
+
| | | |
|
|
320
|
+
| from | string | New value is from defined adapter |
|
|
321
|
+
| | RegExp | New value is from an adapter that matches the regular expression |
|
|
322
|
+
| | Array | New value is from an adapter that appears in the given list of allowed adapters |
|
|
323
|
+
| | | |
|
|
324
|
+
| fromNe | string | New value is not from defined adapter |
|
|
325
|
+
| | RegExp | New value is not from an adapter that matches the regular expression |
|
|
326
|
+
| | Array | New value is not from an adapter that appears in the given list of forbidden adapters |
|
|
327
|
+
| | | |
|
|
328
|
+
| oldFrom | string | Old value is from defined adapter |
|
|
329
|
+
| | RegExp | Old value is from an adapter that matches the regular expression |
|
|
330
|
+
| | Array | Old value is from an adapter that appears in the given list of allowed adapters |
|
|
331
|
+
| | | |
|
|
332
|
+
| oldFromNe | string | Old value is not from defined adapter |
|
|
333
|
+
| | RegExp | Old value is not from an adapter that matches the regular expression |
|
|
334
|
+
| | Array | Old value is not from an adapter that appears in the given list of forbidden adapters |
|
|
355
335
|
|
|
356
336
|
Examples:
|
|
357
337
|
Trigger on all states with ID `'*.STATE'` if they are acknowledged and have new value `true`.
|
|
@@ -383,8 +363,6 @@ on('stateId1', 'stateId2');
|
|
|
383
363
|
|
|
384
364
|
All changes of *stateId1* will be written to *stateId2*.
|
|
385
365
|
|
|
386
|
-
Please note, that by default "change" is equal to "any", except when only id as string is set (like `on("id", function (){});`). In last case change will be set to "ne".
|
|
387
|
-
|
|
388
366
|
If the `value` parameter is set in combination with state id as the second parameter, on any change the state will filled with the `value`.
|
|
389
367
|
```js
|
|
390
368
|
on('stateId1', 'stateId2', 'triggered');
|
|
@@ -395,7 +373,11 @@ setState('stateId1', 'new value');
|
|
|
395
373
|
|
|
396
374
|
Function "on" returns handler back. This handler can be used by unsubscribe.
|
|
397
375
|
|
|
398
|
-
*Notice:*
|
|
376
|
+
*Notice:* By default only states with quality 0x00 will be passed to callback function. If you want to get all events, add {q: '*'} to pattern structure.
|
|
377
|
+
|
|
378
|
+
*Notice:* Please note, that by default "change" is equal to "any", except when only id as string is set (like `on("id", function (){});`). In last case change will be set to "ne".
|
|
379
|
+
|
|
380
|
+
*Notice:* If you want to also get state deletions/expires as trigger you need to use change with "ne" or "any" AND q with "*" as filter!
|
|
399
381
|
|
|
400
382
|
*Notice:* from 4.3.2 it is possible to write type of trigger as second parameter: `on('my.id.0', 'any', obj => console.log(obj.state.val));`
|
|
401
383
|
|
package/io-package.json
CHANGED
|
@@ -20,8 +20,44 @@
|
|
|
20
20
|
"Apollon77 <iobroker@fischer-ka.de>",
|
|
21
21
|
"AlCalzone"
|
|
22
22
|
],
|
|
23
|
-
"version": "5.4.
|
|
23
|
+
"version": "5.4.3",
|
|
24
24
|
"news": {
|
|
25
|
+
"5.4.3": {
|
|
26
|
+
"en": "Fix handling of month schedules with given date list\nOptimize scheduling to make sure to not miss triggers if callbacks would need too long",
|
|
27
|
+
"de": "Behandlung von Monatsplänen mit gegebener Datumsliste korrigiert\nOptimieren Sie die Planung, um sicherzustellen, dass Sie keine Trigger verpassen, wenn Rückrufe zu lange dauern würden",
|
|
28
|
+
"ru": "Исправлена обработка месячных расписаний с заданным списком дат.\nОптимизируйте планирование, чтобы не пропустить триггеры, если обратные вызовы потребуются слишком долго.",
|
|
29
|
+
"pt": "Corrige o manuseio de agendamentos mensais com uma lista de datas fornecida\nOtimize o agendamento para garantir que não perca os acionadores se os retornos de chamada precisarem de muito tempo",
|
|
30
|
+
"nl": "Afhandeling van maandschema's met gegeven datumlijst repareren\nOptimaliseer de planning om ervoor te zorgen dat u geen triggers mist als terugbellen te lang zou duren",
|
|
31
|
+
"fr": "Correction de la gestion des horaires mensuels avec une liste de dates donnée\nOptimisez la planification pour vous assurer de ne pas manquer les déclencheurs si les rappels prendraient trop de temps",
|
|
32
|
+
"it": "Risolto il problema con la gestione delle pianificazioni mensili con l'elenco delle date specificato\nOttimizza la pianificazione per assicurarti di non perdere i trigger se i callback richiedessero troppo tempo",
|
|
33
|
+
"es": "Arreglar el manejo de los horarios mensuales con la lista de fechas dada\nOptimice la programación para asegurarse de no perder los disparadores si las devoluciones de llamadas necesitaran demasiado tiempo",
|
|
34
|
+
"pl": "Naprawiono obsługę harmonogramów miesięcznych z podaną listą dat\nZoptymalizuj harmonogram, aby nie przegapić wyzwalaczy, jeśli wywołania zwrotne będą wymagały zbyt dużo czasu",
|
|
35
|
+
"zh-cn": "使用给定的日期列表修复月份时间表的处理\n优化调度以确保在回调需要太长时间时不会错过触发器"
|
|
36
|
+
},
|
|
37
|
+
"5.4.2": {
|
|
38
|
+
"en": "Fix automatic start of Rules scripts when starting adapter",
|
|
39
|
+
"de": "Automatisches Starten von Regelskripten beim Start des Adapters behoben",
|
|
40
|
+
"ru": "Исправлен автоматический запуск скриптов Rules при запуске адаптера.",
|
|
41
|
+
"pt": "Corrige o início automático de scripts de regras ao iniciar o adaptador",
|
|
42
|
+
"nl": "Automatische start van Regelscripts repareren bij het starten van de adapter",
|
|
43
|
+
"fr": "Correction du démarrage automatique des scripts de règles lors du démarrage de l'adaptateur",
|
|
44
|
+
"it": "Risolto il problema con l'avvio automatico degli script delle regole all'avvio dell'adattatore",
|
|
45
|
+
"es": "Arreglar el inicio automático de los scripts de reglas al iniciar el adaptador",
|
|
46
|
+
"pl": "Napraw automatyczne uruchamianie skryptów reguł podczas uruchamiania adaptera",
|
|
47
|
+
"zh-cn": "修复启动适配器时规则脚本的自动启动"
|
|
48
|
+
},
|
|
49
|
+
"5.4.1": {
|
|
50
|
+
"en": "Fix blockly subscribes broken in 5.4.0",
|
|
51
|
+
"de": "In 5.4.0 fehlerhafte Blockly-Abonnements behoben",
|
|
52
|
+
"ru": "Исправить блочную подписку, сломанную в 5.4.0",
|
|
53
|
+
"pt": "Corrigir assinaturas em bloco quebradas no 5.4.0",
|
|
54
|
+
"nl": "Repareer blockly-abonnementen verbroken in 5.4.0",
|
|
55
|
+
"fr": "Correction des abonnements bloqués cassés dans 5.4.0",
|
|
56
|
+
"it": "Risolto il problema con gli abbonamenti bloccati interrotti nella 5.4.0",
|
|
57
|
+
"es": "Arreglar suscripciones bloqueadas rotas en 5.4.0",
|
|
58
|
+
"pl": "Napraw blokowe subskrypcje zepsute w 5.4.0",
|
|
59
|
+
"zh-cn": "修复 5.4.0 中损坏的块订阅"
|
|
60
|
+
},
|
|
25
61
|
"5.4.0": {
|
|
26
62
|
"en": "Automatically create missing folder objects when states are created using createState\nFix special characters in blockly subscribe logic\nFix timing issue where state updates could not be current on startup\nFix state name handing\nFix potential crash cases reported by Sentry",
|
|
27
63
|
"de": "Automatisches Erstellen fehlender Ordnerobjekte, wenn Zustände mit createState erstellt werden\nKorrigieren Sie Sonderzeichen in der Blockly-Subscribe-Logik\nBehebung eines Zeitproblems, bei dem Statusaktualisierungen beim Start nicht aktuell sein konnten\nKorrigieren Sie die Übergabe von Staatsnamen\nBeheben Sie potenzielle Absturzfälle, die von Sentry gemeldet wurden",
|
|
@@ -69,42 +105,6 @@
|
|
|
69
105
|
"es": "Agregar verificación de devolución de llamada faltante en setObject",
|
|
70
106
|
"pl": "Dodaj brakujące sprawdzenie wywołania zwrotnego w setObject",
|
|
71
107
|
"zh-cn": "在 setObject 中添加缺少的回调检查"
|
|
72
|
-
},
|
|
73
|
-
"5.3.0": {
|
|
74
|
-
"en": "Prevent some crash cases reported by Sentry (IOBROKER-JAVASCRIPT-A3)\nFix Enum Updates\nOptimize making sure data are current for synchronous return of states/objects even for asynchronous action cases before\nMake sure admin files is cleaned up on update\nupdate channel/device structures for $ selector on object updates\nAdjustments for js-controller 4.0",
|
|
75
|
-
"de": "Einige von Sentry gemeldete Absturzfälle verhindern (IOBROKER-JAVASCRIPT-A3)\nEnum-Updates beheben\nOptimieren Sie, indem Sie sicherstellen, dass die Daten für die synchrone Rückgabe von Zuständen/Objekten auch für asynchrone Aktionsfälle zuvor aktuell sind\nStellen Sie sicher, dass die Verwaltungsdateien beim Update bereinigt werden\nKanal-/Gerätestrukturen für $-Selektor bei Objektaktualisierungen aktualisieren\nAnpassungen für js-controller 4.0",
|
|
76
|
-
"ru": "Предотвращение некоторых случаев сбоев, о которых сообщает Sentry (IOBROKER-JAVASCRIPT-A3)\nИсправление обновлений перечисления\nОптимизируйте, чтобы убедиться, что данные актуальны для синхронного возврата состояний/объектов даже для случаев асинхронного действия до\nУбедитесь, что файлы администратора очищены при обновлении\nобновлять структуру канала/устройства для селектора $ при обновлении объекта\nНастройки для js-контроллера 4.0",
|
|
77
|
-
"pt": "Prevenir alguns casos de travamento relatados pelo Sentry (IOBROKER-JAVASCRIPT-A3)\nCorrigir atualizações de enumeração\nOtimize certificando-se de que os dados estejam atualizados para retorno síncrono de estados/objetos, mesmo para casos de ação assíncrona antes\nCertifique-se de que os arquivos de administrador sejam limpos na atualização\natualizar estruturas de canal/dispositivo para seletor $ em atualizações de objetos\nAjustes para o controlador js 4.0",
|
|
78
|
-
"nl": "Voorkom enkele crashgevallen gemeld door Sentry (IOBROKER-JAVASCRIPT-A3)\nEnum-updates repareren\nOptimaliseer en zorg ervoor dat gegevens actueel zijn voor synchrone terugkeer van toestanden/objecten, zelfs voor asynchrone actiegevallen eerder\nZorg ervoor dat de admin-bestanden worden opgeschoond bij de update\nupdate kanaal/apparaatstructuren voor $ selector op objectupdates\nAanpassingen voor js-controller 4.0",
|
|
79
|
-
"fr": "Empêcher certains cas de plantage signalés par Sentry (IOBROKER-JAVASCRIPT-A3)\nCorrection des mises à jour d'énumération\nOptimiser en s'assurant que les données sont à jour pour le retour synchrone des états/objets même pour les cas d'action asynchrones avant\nAssurez-vous que les fichiers d'administration sont nettoyés lors de la mise à jour\nmettre à jour les structures de canaux/dispositifs pour le sélecteur $ sur les mises à jour d'objets\nAjustements pour js-controller 4.0",
|
|
80
|
-
"it": "Prevenire alcuni casi di crash segnalati da Sentry (IOBROKER-JAVASCRIPT-A3)\nCorreggi gli aggiornamenti Enum\nOttimizza assicurandoti che i dati siano aggiornati per il ritorno sincrono di stati/oggetti anche per i casi di azione asincrona prima\nAssicurati che i file di amministrazione vengano ripuliti durante l'aggiornamento\naggiorna le strutture del canale/dispositivo per il selettore $ sugli aggiornamenti degli oggetti\nRegolazioni per js-controller 4.0",
|
|
81
|
-
"es": "Evite algunos casos de bloqueo informados por Sentry (IOBROKER-JAVASCRIPT-A3)\nCorregir actualizaciones de enumeración\nOptimice asegurándose de que los datos estén actualizados para el retorno síncrono de estados/objetos incluso para casos de acción asíncrona antes\nAsegúrese de que los archivos de administración se limpien en la actualización\nactualizar las estructuras de canal/dispositivo para el selector $ en las actualizaciones de objetos\nAjustes para js-controller 4.0",
|
|
82
|
-
"pl": "Zapobiegaj niektórym przypadkom awarii zgłaszanych przez Sentry (IOBROKER-JAVASCRIPT-A3)\nNapraw aktualizacje Enum\nZoptymalizuj, upewniając się, że dane są aktualne dla synchronicznego zwracania stanów/obiektów, nawet w przypadku działań asynchronicznych wcześniej\nUpewnij się, że pliki administratora zostały wyczyszczone podczas aktualizacji\nzaktualizuj struktury kanałów/urządzeń dla selektora $ przy aktualizacjach obiektów\nKorekty dla js-controller 4.0",
|
|
83
|
-
"zh-cn": "防止 Sentry 报告的一些崩溃案例 (IOBROKER-JAVASCRIPT-A3)\n修复枚举更新\n优化确保数据是最新的,以同步返回状态/对象,即使是之前的异步操作案例\n确保在更新时清理管理文件\n更新对象更新时 $ 选择器的通道/设备结构\njs-controller 4.0 的调整"
|
|
84
|
-
},
|
|
85
|
-
"5.2.21": {
|
|
86
|
-
"en": "Fixed build process",
|
|
87
|
-
"de": "Build-Prozess behoben",
|
|
88
|
-
"ru": "Исправлен процесс сборки",
|
|
89
|
-
"pt": "Processo de compilação corrigido",
|
|
90
|
-
"nl": "Vast bouwproces",
|
|
91
|
-
"fr": "Processus de construction fixe",
|
|
92
|
-
"it": "Risolto il problema con il processo di compilazione",
|
|
93
|
-
"es": "Proceso de construcción fijo",
|
|
94
|
-
"pl": "Poprawiony proces kompilacji",
|
|
95
|
-
"zh-cn": "固定的构建过程"
|
|
96
|
-
},
|
|
97
|
-
"5.2.20": {
|
|
98
|
-
"en": "Fixed build process",
|
|
99
|
-
"de": "Build-Prozess behoben",
|
|
100
|
-
"ru": "Исправлен процесс сборки",
|
|
101
|
-
"pt": "Processo de compilação corrigido",
|
|
102
|
-
"nl": "Vast bouwproces",
|
|
103
|
-
"fr": "Processus de construction fixe",
|
|
104
|
-
"it": "Risolto il problema con il processo di compilazione",
|
|
105
|
-
"es": "Proceso de construcción fijo",
|
|
106
|
-
"pl": "Poprawiony proces kompilacji",
|
|
107
|
-
"zh-cn": "固定的构建过程"
|
|
108
108
|
}
|
|
109
109
|
},
|
|
110
110
|
"desc": {
|
|
@@ -205,7 +205,7 @@
|
|
|
205
205
|
"language": "javascript",
|
|
206
206
|
"views": {
|
|
207
207
|
"javascript": {
|
|
208
|
-
"map": "function(doc) { if (doc.type === 'script' && doc.common.engineType.match(/^[jJ]ava[sS]cript|^[cC]offee[sS]cript|^[tT]ype[sS]cript|^Blockly/)) emit(doc.common.name, doc); }"
|
|
208
|
+
"map": "function(doc) { if (doc.type === 'script' && doc.common.engineType.match(/^[jJ]ava[sS]cript|^[cC]offee[sS]cript|^[tT]ype[sS]cript|^Blockly|^Rules/)) emit(doc.common.name, doc); }"
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
},
|