[
{
"id": "496537a8935af1b6",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": "",
"env": []
},
{
"id": "0fbb48552eabd159",
"type": "s7 in",
"z": "496537a8935af1b6",
"endpoint": "5082b9e56484eb38",
"mode": "single",
"variable": "Marca0",
"diff": true,
"name": "",
"x": 230,
"y": 260,
"wires": [
[
"dbbafd6901506ea2",
"943712b4c0b90c20"
]
]
},
{
"id": "dbbafd6901506ea2",
"type": "debug",
"z": "496537a8935af1b6",
"name": "debug 1",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 520,
"y": 160,
"wires": []
},
{
"id": "cc2663cf375a64ef",
"type": "ui_svg_graphics",
"z": "496537a8935af1b6",
"group": "e014c15ac40fe0de",
"order": 0,
"width": "5",
"height": "5",
"svgString": "",
"clickableShapes": [
{
"targetId": "#path192",
"action": "change",
"payload": "path192",
"payloadType": "str",
"topic": "path192"
}
],
"javascriptHandlers": [],
"smilAnimations": [],
"bindings": [],
"showCoordinates": false,
"autoFormatAfterEdit": false,
"showBrowserErrors": false,
"showBrowserEvents": false,
"enableJsDebugging": false,
"sendMsgWhenLoaded": false,
"noClickWhenDblClick": false,
"outputField": "payload",
"editorUrl": "//drawsvg.org/drawsvg.html",
"directory": "",
"panning": "disabled",
"zooming": "disabled",
"panOnlyWhenZoomed": false,
"doubleClickZoomEnabled": false,
"mouseWheelZoomEnabled": false,
"dblClickZoomPercentage": 150,
"cssString": "div.ui-svg svg{\n color: var(--nr-dashboard-widgetColor);\n fill: currentColor !important;\n}\ndiv.ui-svg path {\n fill: inherit;\n}",
"name": "",
"x": 740,
"y": 280,
"wires": [
[]
]
},
{
"id": "943712b4c0b90c20",
"type": "function",
"z": "496537a8935af1b6",
"name": "function 1",
"func": "var css = '';\nif (msg.payload == true) {\n css = {\n \"command\": \"update_style\",\n \"selector\": \"#path192\",\n \"attributeName\": \"fill\",\n \"attributeValue\": \"red\"\n }; // Cambia el color de relleno a rojo si el valor es true\n} else {\n css = {\n \"command\": \"update_style\",\n \"selector\": \"#path192\",\n \"attributeName\": \"fill\",\n \"attributeValue\": \"blue\"\n }; // Cambia el color de relleno a verde si el valor es false\n}\n\nmsg.payload = css;\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 460,
"y": 280,
"wires": [
[
"cc2663cf375a64ef"
]
]
},
{
"id": "8f0e54d7.4d1668",
"type": "ui_svg_graphics",
"z": "496537a8935af1b6",
"d": true,
"group": "8d3148e0.0eee88",
"order": 1,
"width": "14",
"height": "10",
"svgString": " ",
"clickableShapes": [
{
"targetId": "#cam_living_room",
"action": "click",
"payload": "camera_living",
"payloadType": "str",
"topic": "camera_living"
}
],
"javascriptHandlers": [],
"smilAnimations": [],
"bindings": [],
"showCoordinates": false,
"autoFormatAfterEdit": false,
"showBrowserErrors": false,
"showBrowserEvents": false,
"enableJsDebugging": false,
"sendMsgWhenLoaded": false,
"noClickWhenDblClick": false,
"outputField": "",
"editorUrl": "http://drawsvg.org/drawsvg.html",
"directory": "",
"panning": "disabled",
"zooming": "disabled",
"panOnlyWhenZoomed": false,
"doubleClickZoomEnabled": false,
"mouseWheelZoomEnabled": false,
"dblClickZoomPercentage": "150",
"cssString": "div.ui-svg svg{\n color: var(--nr-dashboard-widgetColor);\n fill: currentColor !important;\n}\ndiv.ui-svg path {\n fill: inherit;\n}",
"name": "",
"x": 500,
"y": 520,
"wires": [
[]
]
},
{
"id": "588ccdd4.5ad384",
"type": "inject",
"z": "496537a8935af1b6",
"d": true,
"name": "fill with red",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "{\"command\":\"update_style\",\"selector\":\"#cam_living_room\",\"attributeName\":\"fill\",\"attributeValue\":\"red\"}",
"payloadType": "json",
"x": 260,
"y": 520,
"wires": [
[
"8f0e54d7.4d1668"
]
]
},
{
"id": "3272d837.2122e8",
"type": "inject",
"z": "496537a8935af1b6",
"d": true,
"name": "fill with blue",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "{\"command\":\"update_style\",\"selector\":\"#cam_living_room\",\"attributeName\":\"fill\",\"attributeValue\":\"blue\"}",
"payloadType": "json",
"x": 270,
"y": 560,
"wires": [
[
"8f0e54d7.4d1668"
]
]
},
{
"id": "5082b9e56484eb38",
"type": "s7 endpoint",
"transport": "iso-on-tcp",
"address": "192.168.0.5",
"port": "102",
"rack": "0",
"slot": "1",
"localtsaphi": "01",
"localtsaplo": "00",
"remotetsaphi": "01",
"remotetsaplo": "00",
"connmode": "rack-slot",
"adapter": "",
"busaddr": "2",
"cycletime": "1000",
"timeout": "0",
"name": "PLC 1500",
"vartable": [
{
"addr": "M0.0",
"name": "Marca0"
}
]
},
{
"id": "e014c15ac40fe0de",
"type": "ui_group",
"name": "Project 1",
"tab": "89a11544ef34a27d",
"order": 1,
"disp": true,
"width": "6",
"collapse": false,
"className": ""
},
{
"id": "8d3148e0.0eee88",
"type": "ui_group",
"name": "Floorplan test",
"tab": "93e19e4f.b80ed",
"order": 1,
"disp": true,
"width": "14",
"collapse": false
},
{
"id": "89a11544ef34a27d",
"type": "ui_tab",
"name": "Group 1",
"icon": "dashboard",
"disabled": false,
"hidden": false
},
{
"id": "93e19e4f.b80ed",
"type": "ui_tab",
"name": "SVG",
"icon": "dashboard",
"disabled": false,
"hidden": false
}
]