{ "custom": { "VAV_tagPaths": [], "data": [ "[Ignition_Common_IO_Gtwy]RM1100/SATB1_HS1_RM1100_VAV13", "[Ignition_Common_IO_Gtwy]RM1100/SATB1_HS1_RM1100_VAV14", "[Ignition_Common_IO_Gtwy]RM1101/SATB1_HS1_RM1101_VAV17", "[Ignition_Common_IO_Gtwy]RM1102/SATB1_HS1_RM1102_VAV15", "[Ignition_Common_IO_Gtwy]RM1102-2/SATB1_HS1_RM1102-2_VAV16", "[Ignition_Common_IO_Gtwy]RM1103/SATB1_HS1_RM1103_VAV09", "[Ignition_Common_IO_Gtwy]RM1109/SATB1_HS1_RM1109_VAV06", "[Ignition_Common_IO_Gtwy]RM1110/SATB1_HS1_RM1110_VAV04", "[Ignition_Common_IO_Gtwy]RM1110/SATB1_HS1_RM1110_VAV05", "[Ignition_Common_IO_Gtwy]RM1111/SATB1_HS1_RM1111_VAV11", "[Ignition_Common_IO_Gtwy]RM1113/SATB1_HS1_RM1113_VAV08", "[Ignition_Common_IO_Gtwy]RM1114/SATB1_HS1_RM1114_VAV07", "[Ignition_Common_IO_Gtwy]RM1116/SATB1_HS1_RM1116_VAV01", "[Ignition_Common_IO_Gtwy]RM1117/SATB1_HS1_RM1117_VAV02", "[Ignition_Common_IO_Gtwy]RM1118/SATB1_HS1_RM1118_VAV03", "[Ignition_Common_IO_Gtwy]RM1121/SATB1_HS1_RM1121_VAV19", "[Ignition_Common_IO_Gtwy]RM1127/SATB1_HS1_RM1127_VAV22", "[Ignition_Common_IO_Gtwy]RM1127/SATB1_HS1_RM1127_VAV23", "[Ignition_Common_IO_Gtwy]RM1133/SATB1_HS1_RM1133_VAV25", "[Ignition_Common_IO_Gtwy]RM1133-5/SATB1_HS1_RM1133-5_VAV18", "[Ignition_Common_IO_Gtwy]RM1134/SATB1_HS1_RM1134_VAV20", "[Ignition_Common_IO_Gtwy]RM1135/SATB1_HS1_RM1135_VAV21", "[Ignition_Common_IO_Gtwy]RM1137/SATB1_HS1_RM1137_VAV12", "[Ignition_Common_IO_Gtwy]RM1138/SATB1_HS1_RM1138_VAV29", "[Ignition_Common_IO_Gtwy]RM1139/SATB1_HS1_RM1139_VAV26", "[Ignition_Common_IO_Gtwy]RM1139/SATB1_HS1_RM1139_VAV27", "[Ignition_Common_IO_Gtwy]RM1139/SATB1_HS1_RM1139_VAV28", "[Ignition_Common_IO_Gtwy]RM1141/SATB1_HS1_RM1141_VAV24", "[Ignition_Common_IO_Gtwy]RM1153/SATB1_HS1_RM1153_VAV34", "[Ignition_Common_IO_Gtwy]RM1190/SATB1_HS1_RM1190_VAV33", "[Ignition_Common_IO_Gtwy]RM1192/SATB1_HS1_RM1192_VAV31", "[Ignition_Common_IO_Gtwy]RM1194/SATB1_HS1_RM1194_VAV32" ], "selectedRoom": "RM1109", "tagPath": "[Ignition_Common_IO_Gtwy]", "tagPath_VAVmaster": "[Ignition_Common_IO_Gtwy]VAV/SATB1_VAV_Master" }, "params": {}, "propConfig": { "custom.VAV_tagPaths": { "binding": { "config": { "struct": { "selected": "{view.custom.selectedRoom}", "time": "now(1000)" }, "waitOnAll": true }, "transforms": [ { "code": "\tselected \u003d value[\"selected\"]\n\tpath \u003d str(self.view.custom.tagPath) + selected\n\ttags \u003d system.tag.browse(path,{\"typeId\":\"Objects/Air/VAV v2\", \"recursive\":True ,\"tagType\":\"UdtInstance\"})\n\toutput \u003d []\n\tfor item in tags:\n\t\toutput.append(item[\"fullPath\"])\n\treturn output", "type": "script" } ], "type": "expr-struct" }, "persistent": true }, "custom.data": { "binding": { "config": { "struct": { "tagPath": "{view.custom.tagPath}", "time": "now(3000)" }, "waitOnAll": false }, "enabled": false, "transforms": [ { "code": "\toutput \u003d []\n\ttags \u003d system.tag.browse(value[\"tagPath\"],{\"typeId\":\"Objects/Air/VAV\", \"recursive\":True ,\"tagType\":\"UdtInstance\"})\n\tfor item in tags:\n\t\toutput.append(str(item[\"fullPath\"]))\n\treturn output", "type": "script" } ], "type": "expr-struct" }, "persistent": true }, "custom.selectedRoom": { "persistent": true }, "custom.tagPath": { "persistent": true }, "custom.tagPath_VAVmaster": { "persistent": true } }, "props": { "defaultSize": { "width": 1200 } }, "root": { "children": [ { "children": [ { "meta": { "name": "Label" }, "position": { "basis": "32px" }, "propConfig": { "props.text": { "binding": { "config": { "path": "view.custom.VAV_tagPaths[0]" }, "transforms": [ { "code": "\timport re\n\ttag_path \u003d value\n\tpattern \u003d r\"]([^/]+)\" # Matches any characters between \u0027]\u0027 and \u0027/\u0027\n\tmatch \u003d re.search(pattern, tag_path)\n\tif match:\n\t\textracted_value \u003d match.group(1)\n\treturn extracted_value", "type": "script" } ], "type": "property" } } }, "props": { "style": { "backgroundColor": "var(--container)", "borderBottomLeftRadius": "var(--borderRadius)", "borderBottomRightRadius": "var(--borderRadius)", "borderTopLeftRadius": "var(--borderRadius)", "borderTopRightRadius": "var(--borderRadius)", "boxShadow": "var(--boxShadow2)", "overflow": "visible", "paddingBottom": 5, "paddingLeft": 15, "paddingRight": 15, "paddingTop": 5 } }, "type": "ia.display.label" }, { "meta": { "name": "FlexRepeater" }, "propConfig": { "props.instances": { "binding": { "config": { "path": "view.custom.VAV_tagPaths" }, "enabled": false, "transforms": [ { "code": "\toutput \u003d []\n\tfor item in value:\n\t\toutput.append({\"instanceStyle\":{\"classes\": \"\"},\n\t\t\t\t\t\t\"instancePosition\":{},\n\t\t\t\t\t\t\"embedded\": False,\n\t\t\t\t\t\t\"objectName\": \"VAV v2\",\n\t\t\t\t\t\t\"tagPath\": item})\n\treturn output", "type": "script" } ], "type": "property" } } }, "props": { "instances": [ { "embedded": false, "instancePosition": {}, "instanceStyle": { "classes": "" }, "objectName": "VAV v2", "tagPath": "[Ignition_Common_IO_Gtwy]RM1109/SATB1_HS1_RM1109_VAV06" } ], "justify": "center", "path": "Library/Diagrams/HVAC/Dgrm_VAV", "style": { "backgroundColor": "var(--containerRoot)", "gap": 50, "overflow": "visible" }, "wrap": "wrap" }, "type": "ia.display.flex-repeater" }, { "events": { "dom": { "onClick": { "config": { "script": "\ttagPath \u003d self.view.custom.tagPath_VAVmaster\n\tobjectName \u003d \"VAVMaster\"\n\tpayload\u003d{\n\t\t\u0027objectName\u0027: objectName,\n\t\t\u0027tagPath\u0027: tagPath,\n\t\t\u0027modal\u0027: False,\n\t\t\u0027resizable\u0027: True,\n\t\t\u0027draggable\u0027: True,\n\t\t\u0027position\u0027: {\n\t#\t\t\t\u0027left\u0027:\u00270\u0027,\n\t#\t\t\t\u0027top\u0027:\u00270\u0027,\n\t\t\u0027width\u0027: \u00271000px\u0027,\n\t\t\u0027height\u0027: \u0027800px\u0027\n\t\t}\n\t}\n\tutils.nav.eqPopupMsg(self, payload)" }, "scope": "G", "type": "script" } } }, "meta": { "name": "Button" }, "position": { "basis": "34px" }, "props": { "primary": false, "text": "VAV Global parameters" }, "type": "ia.input.button" } ], "meta": { "name": "Diagram" }, "position": { "basis": "70%", "grow": 1 }, "props": { "alignContent": "center", "alignItems": "center", "direction": "column", "justify": "center", "style": { "backgroundColor": "var(--containerRoot)", "gap": 20 }, "wrap": "wrap" }, "type": "ia.container.flex" }, { "children": [ { "meta": { "name": "Label_0" }, "props": { "text": "First Floor" }, "type": "ia.display.label" }, { "meta": { "name": "FirstFloor Percent_0" }, "position": { "basis": "30%", "grow": 1, "shrink": 0 }, "props": { "path": "Library/Widgets/Layouts/RTU_FirstFloor", "style": { "overflow": "visible" }, "useDefaultViewHeight": true }, "type": "ia.display.view" }, { "meta": { "name": "Label_1" }, "props": { "text": "List of devices" }, "type": "ia.display.label" }, { "events": { "component": { "onRowClick": { "config": { "script": "\tpayload \u003d {\"Room\":self.props.selection.data[0].room}\n\tmessageType \u003d \"roomUpdate\"\n\tsystem.perspective.sendMessage(messageType, payload)\n\tmessageType \u003d \"layout_01_Update\"\n\tsystem.perspective.sendMessage(messageType, payload)" }, "scope": "G", "type": "script" } } }, "meta": { "name": "Table" }, "position": { "basis": "66%", "grow": 1, "shrink": 0 }, "propConfig": { "custom.data": { "binding": { "config": { "struct": { "p": "{view.custom.data}", "t": "now(3000)" }, "waitOnAll": true }, "transforms": [ { "code": "\tpaths \u003d value[\u0027p\u0027]\n\tsubPaths \u003d [\n\t\t\"/Space Temperature\",\n\t\t\"/Damper Position\"\n\t]\n\tsize \u003d len(subPaths)\n\ttags \u003d []\n\tfor path in paths:\n\t\tfor sub in subPaths:\n\t\t\ttags.append(path+sub)\n\tdata \u003d system.tag.readBlocking(tags)\n\toutput \u003d []\n\tfor vav in paths:\n\t\telement \u003d {}\n\t\trawTag \u003d vav.split(\u0027_\u0027)\n\t\tname \u003d rawTag[-1]\n\t\troom \u003d rawTag[-2]\n\t\t#almS \u003d alarm.summary.calcMaxPriority(vav)\n\t\talmS \u003d 0\n\t\tif almS \u003c\u003d0: alm_lbl \u003d \u0027\u0027\n\t\telif almS \u003d\u003d1: alm_lbl \u003d \u0027Info\u0027\n\t\telif almS \u003d\u003d2: alm_lbl \u003d \u0027Warning\u0027\n\t\telif almS \u003d\u003d3: alm_lbl \u003d \u0027High\u0027\n\t\telif almS \u003d\u003d4: alm_lbl \u003d \u0027Critical\u0027\n\t\telse: alm_lbl \u003d \u0027error\u0027\n\t\t\n\t\tpos \u003d paths.index(vav)\n\t\tidx1 \u003d pos * size\n\t\tidx2 \u003d (pos * size) +1\n\t\telement[\u0027name\u0027] \u003d name\n\t\telement[\u0027room\u0027] \u003d room\n\t\telement[\u0027alarm\u0027] \u003d alm_lbl\n\t\telement[\u0027SpaceTemp\u0027] \u003d data[idx1].value\n\t\telement[\u0027DamperPos\u0027] \u003d data[idx2].value\n\t\t\n\t\toutput.append(element)\n\treturn output", "type": "script" } ], "type": "expr-struct" } }, "custom.selectedData": { "binding": { "config": { "struct": { "key": "{view.custom.loading}", "selectedRow": "{this.props.selection.selectedRow}" }, "waitOnAll": true }, "transforms": [ { "code": "\tselected \u003d value[\"selectedRow\"]\n\tif selected is None:\n\t\tselected \u003d 0\n\ttagPath \u003d self.props.data[selected].tagPath\n\ttagPath \u003d tagPath.split(\"/\")\n\ttags \u003d system.tag.browse(tagPath[0],{\"typeId\":\"Objects/Air/VAV v2\", \"recursive\":True ,\"tagType\":\"UdtInstance\"})\n\treturn tags", "type": "script" } ], "type": "expr-struct" } }, "props.data": { "binding": { "config": { "path": "this.custom.data" }, "type": "property" } } }, "props": { "columns": [ { "align": "center", "boolean": "checkbox", "dateFormat": "MM/DD/YYYY", "editable": false, "field": "name", "filter": { "boolean": { "condition": "" }, "date": { "condition": "", "value": "" }, "enabled": false, "number": { "condition": "", "value": "" }, "string": { "condition": "", "value": "" }, "visible": "on-hover" }, "footer": { "align": "center", "justify": "left", "style": { "classes": "" }, "title": "" }, "header": { "align": "center", "justify": "left", "style": { "classes": "" }, "title": "Name" }, "justify": "auto", "nullFormat": { "includeNullStrings": false, "nullFormatValue": "", "strict": false }, "number": "value", "numberFormat": "0,0.##", "progressBar": { "bar": { "color": "", "style": { "classes": "" } }, "max": 100, "min": 0, "track": { "color": "", "style": { "classes": "" } }, "value": { "enabled": true, "format": "0,0.##", "justify": "center", "style": { "classes": "" } } }, "render": "auto", "resizable": true, "sort": "none", "sortable": true, "strictWidth": false, "style": { "classes": "" }, "toggleSwitch": { "color": { "selected": "", "unselected": "" } }, "viewParams": {}, "viewPath": "", "visible": true, "width": 70 }, { "align": "center", "boolean": "checkbox", "dateFormat": "MM/DD/YYYY", "editable": false, "field": "room", "filter": { "boolean": { "condition": "" }, "date": { "condition": "", "value": "" }, "enabled": false, "number": { "condition": "", "value": "" }, "string": { "condition": "", "value": "" }, "visible": "on-hover" }, "footer": { "align": "center", "justify": "left", "style": { "classes": "" }, "title": "" }, "header": { "align": "center", "justify": "left", "style": { "classes": "" }, "title": "Room" }, "justify": "auto", "nullFormat": { "includeNullStrings": false, "nullFormatValue": "", "strict": false }, "number": "value", "numberFormat": "0,0.##", "progressBar": { "bar": { "color": "", "style": { "classes": "" } }, "max": 100, "min": 0, "track": { "color": "", "style": { "classes": "" } }, "value": { "enabled": true, "format": "0,0.##", "justify": "center", "style": { "classes": "" } } }, "render": "auto", "resizable": true, "sort": "none", "sortable": true, "strictWidth": false, "style": { "classes": "" }, "toggleSwitch": { "color": { "selected": "", "unselected": "" } }, "viewParams": {}, "viewPath": "", "visible": true, "width": 90 }, { "align": "center", "boolean": "checkbox", "dateFormat": "MM/DD/YYYY", "editable": false, "field": "SpaceTemp", "filter": { "boolean": { "condition": "" }, "date": { "condition": "", "value": "" }, "enabled": false, "number": { "condition": "", "value": "" }, "string": { "condition": "", "value": "" }, "visible": "on-hover" }, "footer": { "align": "center", "justify": "left", "style": { "classes": "" }, "title": "" }, "header": { "align": "center", "justify": "left", "style": { "classes": "" }, "title": "Space Temp" }, "justify": "auto", "nullFormat": { "includeNullStrings": false, "nullFormatValue": "", "strict": false }, "number": "value", "numberFormat": "0,0.##", "progressBar": { "bar": { "color": "", "style": { "classes": "" } }, "max": 100, "min": 0, "track": { "color": "", "style": { "classes": "" } }, "value": { "enabled": true, "format": "0,0.##", "justify": "center", "style": { "classes": "" } } }, "render": "auto", "resizable": true, "sort": "none", "sortable": true, "strictWidth": false, "style": { "classes": "" }, "toggleSwitch": { "color": { "selected": "", "unselected": "" } }, "viewParams": {}, "viewPath": "", "visible": true, "width": 70 }, { "align": "center", "boolean": "checkbox", "dateFormat": "MM/DD/YYYY", "editable": false, "field": "DamperPos", "filter": { "boolean": { "condition": "" }, "date": { "condition": "", "value": "" }, "enabled": false, "number": { "condition": "", "value": "" }, "string": { "condition": "", "value": "" }, "visible": "on-hover" }, "footer": { "align": "center", "justify": "left", "style": { "classes": "" }, "title": "" }, "header": { "align": "center", "justify": "left", "style": { "classes": "" }, "title": "Damper Pos" }, "justify": "left", "nullFormat": { "includeNullStrings": false, "nullFormatValue": "", "strict": false }, "number": "value", "numberFormat": "0,0.##", "progressBar": { "bar": { "color": "", "style": { "classes": "" } }, "max": 100, "min": 0, "track": { "color": "", "style": { "classes": "" } }, "value": { "enabled": true, "format": "0,0.##", "justify": "center", "style": { "classes": "" } } }, "render": "auto", "resizable": false, "sort": "none", "sortable": true, "strictWidth": false, "style": { "classes": "" }, "toggleSwitch": { "color": { "selected": "", "unselected": "" } }, "viewParams": {}, "viewPath": "", "visible": true, "width": 80 }, { "align": "center", "boolean": "checkbox", "dateFormat": "MM/DD/YYYY", "editable": false, "field": "alarm", "filter": { "boolean": { "condition": "" }, "date": { "condition": "", "value": "" }, "enabled": false, "number": { "condition": "", "value": "" }, "string": { "condition": "", "value": "" }, "visible": "on-hover" }, "footer": { "align": "center", "justify": "left", "style": { "classes": "" }, "title": "" }, "header": { "align": "center", "justify": "left", "style": { "classes": "" }, "title": "Alarm" }, "justify": "auto", "nullFormat": { "includeNullStrings": false, "nullFormatValue": "", "strict": false }, "number": "value", "numberFormat": "0,0.##", "progressBar": { "bar": { "color": "", "style": { "classes": "" } }, "max": 100, "min": 0, "track": { "color": "", "style": { "classes": "" } }, "value": { "enabled": true, "format": "0,0.##", "justify": "center", "style": { "classes": "" } } }, "render": "auto", "resizable": true, "sort": "none", "sortable": true, "strictWidth": false, "style": { "classes": "" }, "toggleSwitch": { "color": { "selected": "", "unselected": "" } }, "viewParams": {}, "viewPath": "", "visible": true, "width": "" } ], "dragOrderable": false, "filter": { "enabled": true }, "headerGroups": [ [] ], "pager": { "activeOption": 14, "options": [ 5, 10, 14, 50, 100 ] }, "rows": { "striped": { "color": { "even": "#C0C0C0" } } }, "virtualized": false }, "type": "ia.display.table" } ], "meta": { "name": "Location" }, "position": { "basis": "450px", "grow": 1 }, "props": { "direction": "column", "justify": "space-around", "style": { "backgroundColor": "var(--container)", "borderBottomLeftRadius": "var(--borderRadius)", "borderBottomRightRadius": "var(--borderRadius)", "borderTopLeftRadius": "var(--borderRadius)", "borderTopRightRadius": "var(--borderRadius)", "boxShadow": "var(--boxShadow2)", "overflow": "visible", "padding": 10 } }, "type": "ia.container.flex" } ], "meta": { "name": "root" }, "props": { "justify": "space-evenly", "style": { "backgroundColor": "var(--containerRoot)", "padding": 15 } }, "scripts": { "customMethods": [], "extensionFunctions": null, "messageHandlers": [ { "messageType": "roomUpdate", "pageScope": true, "script": "\t# implement your handler here\n\tself.view.custom.selectedRoom \u003d payload[\"Room\"]", "sessionScope": false, "viewScope": false } ] }, "type": "ia.container.flex" } }