From e7cc10692b6f2895d1be89320c5ebaa21ab91bbc Mon Sep 17 00:00:00 2001 From: Thomas <101348966+tt-tom17@users.noreply.github.com> Date: Tue, 30 Jan 2024 10:23:19 +0100 Subject: [PATCH 1/2] Update and Rename CardLChart_Influx2 --- .../Blockly/{CradLChart_Influx2.js => CardLChart_Influx2.ts} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename ioBroker/Blockly/{CradLChart_Influx2.js => CardLChart_Influx2.ts} (99%) diff --git a/ioBroker/Blockly/CradLChart_Influx2.js b/ioBroker/Blockly/CardLChart_Influx2.ts similarity index 99% rename from ioBroker/Blockly/CradLChart_Influx2.js rename to ioBroker/Blockly/CardLChart_Influx2.ts index 2f48d31e..6eb4ef5d 100644 --- a/ioBroker/Blockly/CradLChart_Influx2.js +++ b/ioBroker/Blockly/CardLChart_Influx2.ts @@ -12,8 +12,8 @@ const xAxisLabelEveryM = 240; // add all sensors which are to be displayed in this script, there is no need to use multiple scripts const sensors : Record = {}; /* ↓ Id of the sensor ↓ Id of the data source for the charts */ -sensors['deconz.0.Sensors.65.temperature'] = Path + 'buero_temperature'; -sensors['deconz.0.Sensors.65.humidity'] = Path + 'buero_luftfeuchte'; +sensors['deconz.0.Sensors.65.temperature'] = Path + 'buero_temperature.ACTUAL'; +sensors['deconz.0.Sensors.65.humidity'] = Path + 'buero_luftfeuchte.ACTUAL'; // create data source for NsPanel on script startup Object.keys(sensors).forEach(async x => { From 6172b0c35f1870f60f3614b76eaceb481df77543 Mon Sep 17 00:00:00 2001 From: Thomas <101348966+tt-tom17@users.noreply.github.com> Date: Tue, 30 Jan 2024 10:55:19 +0100 Subject: [PATCH 2/2] v4.3.3.39 Update NSPanel.ts - Add: Optional setOn & setOff for HW button with mode 'set' - Fix: ack for read-only state --- ioBroker/DEV/NSPanelTs.ts | 8 ++++---- ioBroker/NsPanelTs.ts | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ioBroker/DEV/NSPanelTs.ts b/ioBroker/DEV/NSPanelTs.ts index 17d0da34..df388ec8 100644 --- a/ioBroker/DEV/NSPanelTs.ts +++ b/ioBroker/DEV/NSPanelTs.ts @@ -1087,8 +1087,8 @@ async function CheckConfigParameters() { let common = getObject(id).common; if (common.name == 'javascript') { javaScriptVersion = common.version; - setIfExists(NSPanel_Path + 'IoBroker.JavaScriptVersion', 'v' + javaScriptVersion); - setIfExists(NSPanel_Path + 'IoBroker.ScriptName', (name as unknown as string).split('.').slice(2).join('.')); + setIfExists(NSPanel_Path + 'IoBroker.JavaScriptVersion', 'v' + javaScriptVersion, null, true); + setIfExists(NSPanel_Path + 'IoBroker.ScriptName', (name as unknown as string).split('.').slice(2).join('.'), null, true); let jsVersion = common.version.split('.'); let jsV = 10*parseInt(jsVersion[0]) + parseInt(jsVersion[1]); if (jsV<61) log('JS-Adapter: ' + common.name + ' must be at least v6.1.3. Currently: v' + common.version, 'error'); @@ -1099,7 +1099,7 @@ async function CheckConfigParameters() { const hostList = $('system.host.*.nodeCurrent'); hostList.each(function(id, i) { nodeVersion = getState(id).val; - setIfExists(NSPanel_Path + 'IoBroker.NodeJSVersion', 'v' + nodeVersion); + setIfExists(NSPanel_Path + 'IoBroker.NodeJSVersion', 'v' + nodeVersion, null , true); let nodeJSVersion = (getState(id).val).split('.'); if (parseInt(nodeJSVersion[0]) < 18) { log('nodeJS must be at least v18.X.X. Currently: v' + getState(id).val + '! Please Update your System! --> iob nodejs-update 18', ); @@ -1146,7 +1146,7 @@ async function InitIoBrokerInfo() { setObject(AliasPath + 'IoBroker.ScriptName', {type: 'channel', common: {role: 'info', name:'Scriptname'}, native: {}}); await createAliasAsync(AliasPath + 'IoBroker.ScriptName.ACTUAL', NSPanel_Path + 'IoBroker.ScriptName', true, { type: 'string', role: 'state', name: 'ACTUAL' }); } - setIfExists(NSPanel_Path + 'IoBroker.ScriptVersion', scriptVersion); + setIfExists(NSPanel_Path + 'IoBroker.ScriptVersion', scriptVersion, null, true); } catch (err: any) { log('error at funktion InitIoBrokerInfo ' + err.message, 'warn'); } diff --git a/ioBroker/NsPanelTs.ts b/ioBroker/NsPanelTs.ts index 17d0da34..df388ec8 100644 --- a/ioBroker/NsPanelTs.ts +++ b/ioBroker/NsPanelTs.ts @@ -1087,8 +1087,8 @@ async function CheckConfigParameters() { let common = getObject(id).common; if (common.name == 'javascript') { javaScriptVersion = common.version; - setIfExists(NSPanel_Path + 'IoBroker.JavaScriptVersion', 'v' + javaScriptVersion); - setIfExists(NSPanel_Path + 'IoBroker.ScriptName', (name as unknown as string).split('.').slice(2).join('.')); + setIfExists(NSPanel_Path + 'IoBroker.JavaScriptVersion', 'v' + javaScriptVersion, null, true); + setIfExists(NSPanel_Path + 'IoBroker.ScriptName', (name as unknown as string).split('.').slice(2).join('.'), null, true); let jsVersion = common.version.split('.'); let jsV = 10*parseInt(jsVersion[0]) + parseInt(jsVersion[1]); if (jsV<61) log('JS-Adapter: ' + common.name + ' must be at least v6.1.3. Currently: v' + common.version, 'error'); @@ -1099,7 +1099,7 @@ async function CheckConfigParameters() { const hostList = $('system.host.*.nodeCurrent'); hostList.each(function(id, i) { nodeVersion = getState(id).val; - setIfExists(NSPanel_Path + 'IoBroker.NodeJSVersion', 'v' + nodeVersion); + setIfExists(NSPanel_Path + 'IoBroker.NodeJSVersion', 'v' + nodeVersion, null , true); let nodeJSVersion = (getState(id).val).split('.'); if (parseInt(nodeJSVersion[0]) < 18) { log('nodeJS must be at least v18.X.X. Currently: v' + getState(id).val + '! Please Update your System! --> iob nodejs-update 18', ); @@ -1146,7 +1146,7 @@ async function InitIoBrokerInfo() { setObject(AliasPath + 'IoBroker.ScriptName', {type: 'channel', common: {role: 'info', name:'Scriptname'}, native: {}}); await createAliasAsync(AliasPath + 'IoBroker.ScriptName.ACTUAL', NSPanel_Path + 'IoBroker.ScriptName', true, { type: 'string', role: 'state', name: 'ACTUAL' }); } - setIfExists(NSPanel_Path + 'IoBroker.ScriptVersion', scriptVersion); + setIfExists(NSPanel_Path + 'IoBroker.ScriptVersion', scriptVersion, null, true); } catch (err: any) { log('error at funktion InitIoBrokerInfo ' + err.message, 'warn'); }