iobroker.javascript
Version:
Rules Engine for ioBroker
325 lines (324 loc) • 18.2 kB
JSON
{
"type": "tabs",
"i18n": true,
"iconPosition": "top",
"items": {
"_main": {
"type": "panel",
"label": "Main settings",
"icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj4KICAgIDxwYXRoIGZpbGw9ImN1cnJlbnRDb2xvciIgZD0iTTQ5NS45IDE2Ni42YzMuMiA4LjcgLjUgMTguNC02LjQgMjQuNmwtNDMuMyAzOS40YzEuMSA4LjMgMS43IDE2LjggMS43IDI1LjRzLS42IDE3LjEtMS43IDI1LjRsNDMuMyAzOS40YzYuOSA2LjIgOS42IDE1LjkgNi40IDI0LjZjLTQuNCAxMS45LTkuNyAyMy4zLTE1LjggMzQuM2wtNC43IDguMWMtNi42IDExLTE0IDIxLjQtMjIuMSAzMS4yYy01LjkgNy4yLTE1LjcgOS42LTI0LjUgNi44bC01NS43LTE3LjdjLTEzLjQgMTAuMy0yOC4yIDE4LjktNDQgMjUuNGwtMTIuNSA1Ny4xYy0yIDkuMS05IDE2LjMtMTguMiAxNy44Yy0xMy44IDIuMy0yOCAzLjUtNDIuNSAzLjVzLTI4LjctMS4yLTQyLjUtMy41Yy05LjItMS41LTE2LjItOC43LTE4LjItMTcuOGwtMTIuNS01Ny4xYy0xNS44LTYuNS0zMC42LTE1LjEtNDQtMjUuNEw4My4xIDQyNS45Yy04LjggMi44LTE4LjYgLjMtMjQuNS02LjhjLTguMS05LjgtMTUuNS0yMC4yLTIyLjEtMzEuMmwtNC43LTguMWMtNi4xLTExLTExLjQtMjIuNC0xNS44LTM0LjNjLTMuMi04LjctLjUtMTguNCA2LjQtMjQuNmw0My4zLTM5LjRDNjQuNiAyNzMuMSA2NCAyNjQuNiA2NCAyNTZzLjYtMTcuMSAxLjctMjUuNEwyMi40IDE5MS4yYy02LjktNi4yLTkuNi0xNS45LTYuNC0yNC42YzQuNC0xMS45IDkuNy0yMy4zIDE1LjgtMzQuM2w0LjctOC4xYzYuNi0xMSAxNC0yMS40IDIyLjEtMzEuMmM1LjktNy4yIDE1LjctOS42IDI0LjUtNi44bDU1LjcgMTcuN2MxMy40LTEwLjMgMjguMi0xOC45IDQ0LTI1LjRsMTIuNS01Ny4xYzItOS4xIDktMTYuMyAxOC4yLTE3LjhDMjI3LjMgMS4yIDI0MS41IDAgMjU2IDBzMjguNyAxLjIgNDIuNSAzLjVjOS4yIDEuNSAxNi4yIDguNyAxOC4yIDE3LjhsMTIuNSA1Ny4xYzE1LjggNi41IDMwLjYgMTUuMSA0NCAyNS40bDU1LjctMTcuN2M4LjgtMi44IDE4LjYtLjMgMjQuNSA2LjhjOC4xIDkuOCAxNS41IDIwLjIgMjIuMSAzMS4ybDQuNyA4LjFjNi4xIDExIDExLjQgMjIuNCAxNS44IDM0LjN6TTI1NiAzMzZhODAgODAgMCAxIDAgMC0xNjAgODAgODAgMCAxIDAgMCAxNjB6Ii8+Cjwvc3ZnPgo=",
"items": {
"libraries": {
"type": "chips",
"label": "Additional npm modules",
"delimiter": " ",
"xs": 12,
"sm": 12
},
"libraryTypings": {
"newLine": true,
"type": "chips",
"label": "Activate syntax help for these npm modules",
"delimiter": " ",
"xs": 12,
"sm": 12
},
"mirrorPath": {
"newLine": true,
"type": "text",
"label": "Mirror scripts to file path",
"xs": 12,
"sm": 8
},
"mirrorInstance": {
"hidden": "!data.mirrorPath",
"type": "instance",
"adapter": "javascript",
"label": "Instance, that do mirroring",
"xs": 12,
"sm": 4
},
"enableSetObject": {
"newLine": true,
"type": "checkbox",
"label": "Enable command \"setObject\"",
"xs": 12,
"sm": 12,
"md": 6
},
"enableSendToHost": {
"type": "checkbox",
"label": "Enable command \"sendToHost\"",
"xs": 12,
"sm": 12,
"md": 6
},
"enableExec": {
"newLine": true,
"type": "checkbox",
"label": "Enable command \"exec\"",
"xs": 12,
"sm": 12,
"md": 6
},
"subscribe": {
"type": "checkbox",
"label": "Do not subscribe all states on start",
"xs": 12,
"sm": 12,
"md": 6
},
"maxSetStatePerMinute": {
"newLine": true,
"type": "number",
"label": "Maximum setState requests per Minute per Script",
"help": "default 1000",
"min": 20,
"max": 100000,
"xs": 12,
"sm": 12,
"md": 6
},
"maxTriggersPerScript": {
"type": "number",
"label": "Maximum triggers per Script (until warning)",
"help": "default 100",
"min": 20,
"max": 100000,
"xs": 12,
"sm": 12,
"md": 6
},
"allowSelfSignedCerts": {
"newLine": true,
"type": "checkbox",
"label": "Allow self-signed certificates for URL requests",
"xs": 12,
"sm": 12
},
"sortGlobalScriptsAlphabetically": {
"newLine": true,
"type": "checkbox",
"label": "Sort global scripts alphabetically",
"xs": 12,
"sm": 12
}
}
},
"_astro": {
"type": "panel",
"label": "Astro settings",
"icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj4KICAgIDxwYXRoIGZpbGw9ImN1cnJlbnRDb2xvciIgZD0iTTQ5NC4yIDIyMS45bC01OS44LTQwLjUgMTMuNy03MWMyLjYtMTMuMi0xLjYtMjYuOC0xMS4xLTM2LjQtOS42LTkuNS0yMy4yLTEzLjctMzYuMi0xMS4xbC03MC45IDEzLjctNDAuNC01OS45Yy0xNS4xLTIyLjMtNTEuOS0yMi4zLTY3IDBsLTQwLjQgNTkuOS03MC44LTEzLjdDOTggNjAuNCA4NC41IDY0LjUgNzUgNzQuMWMtOS41IDkuNi0xMy43IDIzLjEtMTEuMSAzNi4zbDEzLjcgNzEtNTkuOCA0MC41QzYuNiAyMjkuNSAwIDI0MiAwIDI1NS41czYuNyAyNiAxNy44IDMzLjVsNTkuOCA0MC41LTEzLjcgNzFjLTIuNiAxMy4yIDEuNiAyNi44IDExLjEgMzYuMyA5LjUgOS41IDIyLjkgMTMuNyAzNi4zIDExLjFsNzAuOC0xMy43IDQwLjQgNTkuOUMyMzAgNTA1LjMgMjQyLjYgNTEyIDI1NiA1MTJzMjYtNi43IDMzLjUtMTcuOGw0MC40LTU5LjkgNzAuOSAxMy43YzEzLjQgMi43IDI2LjgtMS42IDM2LjMtMTEuMSA5LjUtOS41IDEzLjYtMjMuMSAxMS4xLTM2LjNsLTEzLjctNzEgNTkuOC00MC41YzExLjEtNy41IDE3LjgtMjAuMSAxNy44LTMzLjUtLjEtMTMuNi02LjctMjYuMS0xNy45LTMzLjd6bS0xMTIuOSA4NS42bDE3LjYgOTEuMi05MS0xNy42TDI1NiA0NThsLTUxLjktNzctOTAuOSAxNy42IDE3LjYtOTEuMi03Ni44LTUyIDc2LjgtNTItMTcuNi05MS4yIDkxIDE3LjZMMjU2IDUzbDUxLjkgNzYuOSA5MS0xNy42LTE3LjYgOTEuMSA3Ni44IDUyLTc2LjggNTIuMXpNMjU2IDE1MmMtNTcuMyAwLTEwNCA0Ni43LTEwNCAxMDRzNDYuNyAxMDQgMTA0IDEwNCAxMDQtNDYuNyAxMDQtMTA0LTQ2LjctMTA0LTEwNC0xMDR6bTAgMTYwYy0zMC45IDAtNTYtMjUuMS01Ni01NnMyNS4xLTU2IDU2LTU2IDU2IDI1LjEgNTYgNTYtMjUuMSA1Ni01NiA1NnoiLz4KPC9zdmc+Cg==",
"items": {
"_astroConfig": {
"type": "custom",
"i18n": true,
"xs": 12,
"sm": 12,
"md": 12,
"lg": 12,
"url": "custom/customComponents.js",
"name": "ConfigCustomJavascriptSet/Components/Astro",
"guiApi": 2
},
"createAstroStates": {
"newLine": true,
"type": "checkbox",
"label": "Create states for all astro times",
"xs": 12,
"sm": 12
}
}
},
"_ai": {
"type": "panel",
"label": "AI settings",
"icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJNNy41IDUuNkwxMCA3IDguNiA0LjUgMTAgMiA3LjUgMy40IDUgMmwxLjQgMi41TDUgN3ptMTIgOS44TDE3IDE0bDEuNCAyLjVMMTcgMTlsMi41LTEuNEwyMiAxOWwtMS40LTIuNUwyMiAxNHpNMjIgMmwtMi41IDEuNEwxNyAybDEuNCAyLjVMMTcgN2wyLjUtMS40TDIyIDdsLTEuNC0yLjV6bS03LjYzIDUuMjlhLjk5Ni45OTYgMCAwMC0xLjQxIDBMMS4yOSAxOC45NmEuOTk2Ljk5NiAwIDAwMCAxLjQxbDIuMzQgMi4zNGMuMzkuMzkgMS4wMi4zOSAxLjQxIDBMMTYuNyAxMS4wNWEuOTk2Ljk5NiAwIDAwMC0xLjQxbC0yLjMzLTIuMzV6TTUuMDQgMTguOTZsLTEuNDEtMS40MSA4LjY5LTguNjkgMS40MSAxLjQxLTguNjkgOC42OXoiLz48L3N2Zz4=",
"items": {
"_aiDescription": {
"type": "staticText",
"label": "AI settings description",
"xs": 12,
"sm": 12,
"style": {
"marginBottom": 16
}
},
"credentialType": {
"newLine": true,
"type": "select",
"options": [
{ "label": "System credentials", "value": "manager" },
{ "label": "Manual", "value": "manual" }
],
"label": "Credentials type",
"default": "manual",
"xs": 12,
"sm": 6
},
"gptKey": {
"newLine": true,
"type": "password",
"label": "ChatGPT API key",
"hidden": "data.credentialType === 'manager'",
"xs": 12,
"sm": 9,
"help": "platform.openai.com",
"helpLink": "https://platform.openai.com/api-keys"
},
"credentialIdGptKey": {
"newLine": true,
"type": "credential",
"credentialType": "ai",
"label": "ChatGPT credential",
"hidden": "data.credentialType !== 'manager'",
"xs": 12,
"sm": 9
},
"_testOpenAi": {
"type": "sendTo",
"label": "Test OpenAI",
"icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJjdXJyZW50Q29sb3IiPjxwYXRoIGQ9Ik0xMiAyQzYuNDggMiAyIDUuNTggMiAxMGMwIDIuMjQgMS4xMiA0LjI3IDIuOTMgNS43Mkw0IDIwbDQuMzUtMi4xOEM5LjUgMTguMjcgMTAuNzIgMTguNSAxMiAxOC41YzUuNTIgMCAxMC0zLjU4IDEwLThTMTcuNTIgMiAxMiAyem0tMSAxMUg4di0yaDNWOGgydjNoM3YyaC0zdjNoLTJ2LTN6Ii8+PC9zdmc+",
"command": "testApiConnection",
"jsonData": "{\"apiKey\": \"${data.gptKey}\", \"provider\": \"openai\", \"credentialType\": \"${data.credentialType}\", \"credentialId\": \"${data.credentialIdGptKey}\"}",
"variant": "outlined",
"disabled": "data.credentialType === 'manager' ? !data.credentialIdGptKey : !data.gptKey",
"xs": 12,
"sm": 3,
"showProcess": true
},
"claudeKey": {
"newLine": true,
"type": "password",
"label": "Anthropic API key",
"hidden": "data.credentialType === 'manager'",
"xs": 12,
"sm": 9,
"help": "console.anthropic.com",
"helpLink": "https://console.anthropic.com/settings/keys"
},
"credentialIdClaudeKey": {
"newLine": true,
"type": "credential",
"credentialType": "ai",
"label": "Anthropic credential",
"hidden": "data.credentialType !== 'manager'",
"xs": 12,
"sm": 9
},
"_testClaude": {
"type": "sendTo",
"label": "Test Anthropic",
"icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJjdXJyZW50Q29sb3IiPjxwYXRoIGQ9Ik0xMiAyTDMgMjBoNGwxLjUtNGg3bDEuNSA0aDRMMTIgMnptMCA2bDIuNSA3aC01TDEyIDh6Ii8+PC9zdmc+",
"command": "testApiConnection",
"jsonData": "{\"apiKey\": \"${data.claudeKey}\", \"provider\": \"anthropic\", \"credentialType\": \"${data.credentialType}\", \"credentialId\": \"${data.credentialIdClaudeKey}\"}",
"variant": "outlined",
"disabled": "data.credentialType === 'manager' ? !data.credentialIdClaudeKey : !data.claudeKey",
"xs": 12,
"sm": 3,
"showProcess": true
},
"geminiKey": {
"newLine": true,
"type": "password",
"label": "Gemini API key",
"hidden": "data.credentialType === 'manager'",
"xs": 12,
"sm": 9,
"help": "aistudio.google.com",
"helpLink": "https://aistudio.google.com/apikey"
},
"credentialIdGeminiKey": {
"newLine": true,
"type": "credential",
"credentialType": "ai",
"label": "Gemini credential",
"hidden": "data.credentialType !== 'manager'",
"xs": 12,
"sm": 9
},
"_testGemini": {
"type": "sendTo",
"label": "Test Gemini",
"icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJjdXJyZW50Q29sb3IiPjxwYXRoIGQ9Ik0xMiAxbDMgN2g3bC01LjUgNC41TDE4LjUgMjAgMTIgMTUuNSA1LjUgMjBsMi03LjVMMiA4aDd6Ii8+PC9zdmc+",
"command": "testApiConnection",
"jsonData": "{\"apiKey\": \"${data.geminiKey}\", \"provider\": \"gemini\", \"credentialType\": \"${data.credentialType}\", \"credentialId\": \"${data.credentialIdGeminiKey}\"}",
"variant": "outlined",
"disabled": "data.credentialType === 'manager' ? !data.credentialIdGeminiKey : !data.geminiKey",
"xs": 12,
"sm": 3,
"showProcess": true
},
"deepseekKey": {
"newLine": true,
"type": "password",
"label": "DeepSeek API key",
"hidden": "data.credentialType === 'manager'",
"xs": 12,
"sm": 9,
"help": "platform.deepseek.com",
"helpLink": "https://platform.deepseek.com/api_keys"
},
"credentialIdDeepseekKey": {
"newLine": true,
"type": "credential",
"credentialType": "ai",
"label": "DeepSeek credential",
"hidden": "data.credentialType !== 'manager'",
"xs": 12,
"sm": 9
},
"_testDeepseek": {
"type": "sendTo",
"label": "Test DeepSeek",
"icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJjdXJyZW50Q29sb3IiPjxwYXRoIGQ9Ik0xMCAyYTggOCAwIDAgMSA2LjMyIDEyLjkxbDQuMzkgNC4zOC0xLjQyIDEuNDItNC4zOC00LjM5QTggOCAwIDEgMSAxMCAyem0wIDJhNiA2IDAgMSAwIDAgMTIgNiA2IDAgMCAwIDAtMTJ6Ii8+PC9zdmc+",
"command": "testApiConnection",
"jsonData": "{\"apiKey\": \"${data.deepseekKey}\", \"provider\": \"deepseek\", \"credentialType\": \"${data.credentialType}\", \"credentialId\": \"${data.credentialIdDeepseekKey}\"}",
"variant": "outlined",
"disabled": "data.credentialType === 'manager' ? !data.credentialIdDeepseekKey : !data.deepseekKey",
"xs": 12,
"sm": 3,
"showProcess": true
},
"gptBaseUrl": {
"newLine": true,
"type": "text",
"label": "Custom API Base URL",
"xs": 12,
"sm": 5,
"help": "Custom API Base URL help",
"placeholder": "https://api.openai.com/v1"
},
"gptBaseUrlKey": {
"type": "text",
"label": "Custom API key",
"hidden": "data.credentialType === 'manager'",
"xs": 12,
"sm": 4,
"help": "Custom API key help",
"placeholder": "optional"
},
"credentialIdGptBaseUrlKey": {
"type": "credential",
"credentialType": "ai",
"label": "Custom API credential",
"hidden": "data.credentialType !== 'manager'",
"xs": 12,
"sm": 4
},
"_testCustom": {
"type": "sendTo",
"label": "Test Custom API",
"icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJjdXJyZW50Q29sb3IiPjxwYXRoIGQ9Ik00IDFoMTZ2NUg0VjF6bTEgMXYzaDE0VjJINXptLTEgNmgxNnY1SDRWOHptMSAxdjNoMTRWOUg1em0tMSA2aDE2djVINHYtNXptMSAxdjNoMTR2LTNINXptMi0xMmgydjFIN1Yzem0wIDZoMnYxSDdWOXptMCA2aDJ2MUg3di0xeiIvPjwvc3ZnPg==",
"command": "testApiConnection",
"jsonData": "{\"apiKey\": \"${data.gptBaseUrlKey}\", \"baseUrl\": \"${data.gptBaseUrl}\", \"provider\": \"openai\", \"credentialType\": \"${data.credentialType}\", \"credentialId\": \"${data.credentialIdGptBaseUrlKey}\"}",
"variant": "outlined",
"disabled": "!data.gptBaseUrl",
"xs": 12,
"sm": 3,
"showProcess": true
}
}
}
}
}