[ { "id": "si-tab-test", "type": "tab", "label": "State Inspector — Test", "disabled": false, "info": "Flujo de prueba para node-red-dashboard-2-state-inspector-energiam" }, { "id": "si-ui-base", "type": "ui-base", "acceptsClientConfig": ["ui-notification","ui-control"], "includeClientData": true, "navigationStyle": "default", "showPathInSidebar": false, "showPageTitle": true, "titleBarStyle": "default" }, { "id": "si-ui-theme", "type": "ui-theme", "name": "Default Theme", "colors": { "surface": "#ffffff", "primary": "#0094CE", "bgPage": "#eeeeee", "groupBg": "#ffffff", "groupOutline": "#cccccc" }, "sizes": { "density": "default", "pagePadding": "12px", "groupGap": "12px", "groupBorderRadius": "4px", "widgetGap": "6px" } }, { "id": "si-ui-page", "type": "ui-page", "name": "Test", "ui": "si-ui-base", "path": "/test", "icon": "home", "layout": "flex", "theme": "si-ui-theme", "breakpoints": [{"name":"Default","px":"0","cols":"3"},{"name":"Tablet","px":"576","cols":"6"},{"name":"Small Desktop","px":"768","cols":"9"},{"name":"Desktop","px":"1024","cols":"12"}], "order": 1, "className": "", "visible": true }, { "id": "si-ui-group", "type": "ui-group", "name": "Variables", "page": "si-ui-page", "width": "12", "height": "1", "order": 1, "showTitle": true, "className": "", "visible": true, "disabled": false }, { "id": "si-inject-inhab", "type": "inject", "z": "si-tab-test", "name": "Capturar: Inhabilitado", "props": [{ "p": "payload" }, { "p": "topic", "vt": "str" }], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "Inhabilitado", "payload": "", "payloadType": "date", "x": 160, "y": 100, "wires": [["si-fn-mock"]] }, { "id": "si-inject-habilitado", "type": "inject", "z": "si-tab-test", "name": "Capturar: Habilitado", "props": [{ "p": "payload" }, { "p": "topic", "vt": "str" }], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "Habilitado", "payload": "", "payloadType": "date", "x": 160, "y": 160, "wires": [["si-fn-mock"]] }, { "id": "si-inject-rampa", "type": "inject", "z": "si-tab-test", "name": "Capturar: Rampa↑", "props": [{ "p": "payload" }, { "p": "topic", "vt": "str" }], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "Rampa↑", "payload": "", "payloadType": "date", "x": 160, "y": 220, "wires": [["si-fn-mock"]] }, { "id": "si-inject-regimen", "type": "inject", "z": "si-tab-test", "name": "Capturar: Régimen", "props": [{ "p": "payload" }, { "p": "topic", "vt": "str" }], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "Régimen", "payload": "", "payloadType": "date", "x": 160, "y": 280, "wires": [["si-fn-mock"]] }, { "id": "si-inject-reset", "type": "inject", "z": "si-tab-test", "name": "RESET", "props": [{ "p": "payload" }, { "p": "topic", "vt": "str" }], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "state-inspector/reset", "payload": "", "payloadType": "date", "x": 160, "y": 380, "wires": [["si-node-test"]] }, { "id": "si-fn-mock", "type": "function", "z": "si-tab-test", "name": "Mock — armar snapshot", "func": "const nombre = msg.topic || 'estado_' + Date.now()\n\nconst estados = {\n 'Inhabilitado': {\n enable: false, jog: false, jogX2: false,\n objetivo: 0, rampa: false, sliderValor: 0,\n start: false, stopE: false, valorActual: 0\n },\n 'Habilitado': {\n enable: true, jog: false, jogX2: true,\n objetivo: 0, rampa: false, sliderValor: 50,\n start: false, stopE: false, valorActual: 0\n },\n 'Rampa↑': {\n enable: true, jog: false, jogX2: true,\n objetivo: 50, rampa: true, sliderValor: 50,\n start: true, stopE: false, valorActual: 43\n },\n 'Régimen': {\n enable: true, jog: false, jogX2: true,\n objetivo: 50, rampa: false, sliderValor: 50,\n start: true, stopE: false, valorActual: 50\n }\n}\n\nconst valores = estados[nombre] || {\n enable: false, jog: false, objetivo: 0,\n rampa: false, start: false, valorActual: null\n}\n\nmsg.payload = { nombre, valores }\nreturn msg", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 420, "y": 220, "wires": [["si-node-test", "si-debug"]] }, { "id": "si-debug", "type": "debug", "z": "si-tab-test", "name": "Ver payload", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 660, "y": 160, "wires": [] }, { "id": "si-node-test", "type": "state-inspector", "z": "si-tab-test", "name": "State Inspector — Velocidad", "group": "si-ui-group", "width": 12, "height": 8, "maxColumnas": 10, "ordenFilas": "arrival", "colorTrue": "#3fb950", "colorFalse": "#f85149", "colorNum": "#58a6ff", "colorStr": "#ffa657", "colorNull": "#484f58", "x": 660, "y": 280, "wires": [] } ]