[ { "id": "osys_ex_tab", "type": "tab", "label": "osysHome example", "disabled": false, "info": "Пример osysHome.\n\n1) Server → карандаш → Base URL + API key → Test API → Deploy.\n2) Блок «мониторинг LastSay» показывает значение ПОД нодой в realtime (Live on node).\n3) Жмите set hello / set ping — статус на get property должен смениться.\n4) events дублирует изменения в Debug." }, { "id": "osys_ex_cfg", "type": "osys-config", "name": "osysHome", "baseUrl": "http://host.docker.internal:5000" }, { "id": "osys_ex_comment_mon", "type": "comment", "z": "osys_ex_tab", "name": "Мониторинг свойства (realtime на ноде)", "info": "get property с Live on node=on подписывается на SystemVar.LastSay.\nЗначение видно под блоком без Inject.\nИзмените свойство кнопками set ниже или из UI osysHome — статус обновится сам.", "x": 230, "y": 40, "wires": [] }, { "id": "osys_ex_monitor", "type": "osys-get-property", "z": "osys_ex_tab", "name": "мониторинг LastSay", "server": "osys_ex_cfg", "object": "SystemVar", "propertyName": "LastSay", "property": "SystemVar.LastSay", "liveStatus": true, "x": 200, "y": 100, "wires": [["osys_ex_dbg_mon"]] }, { "id": "osys_ex_dbg_mon", "type": "debug", "z": "osys_ex_tab", "name": "только если был Inject", "active": true, "tosidebar": true, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "statusVal": "payload", "statusType": "auto", "x": 450, "y": 100, "wires": [] }, { "id": "osys_ex_inj_refresh", "type": "inject", "z": "osys_ex_tab", "name": "опрос (опционально)", "props": [{ "p": "payload" }], "repeat": "", "crontab": "", "once": true, "onceDelay": 1, "topic": "", "payload": "", "payloadType": "date", "x": 180, "y": 160, "wires": [["osys_ex_monitor"]] }, { "id": "osys_ex_comment_set", "type": "comment", "z": "osys_ex_tab", "name": "Меняем свойство → смотрим статус мониторинга", "info": "После set значение должно появиться под нодой «мониторинг LastSay» и в events → Debug.", "x": 260, "y": 220, "wires": [] }, { "id": "osys_ex_inj_set_on", "type": "inject", "z": "osys_ex_tab", "name": "set LastSay hello", "props": [{ "p": "payload" }], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "hello from Node-RED", "payloadType": "str", "x": 150, "y": 280, "wires": [["osys_ex_set"]] }, { "id": "osys_ex_inj_set_off", "type": "inject", "z": "osys_ex_tab", "name": "set LastSay ping", "props": [{ "p": "payload" }], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "ping", "payloadType": "str", "x": 140, "y": 320, "wires": [["osys_ex_set"]] }, { "id": "osys_ex_set", "type": "osys-set-property", "z": "osys_ex_tab", "name": "set SystemVar.LastSay", "server": "osys_ex_cfg", "object": "SystemVar", "propertyName": "LastSay", "property": "SystemVar.LastSay", "x": 380, "y": 300, "wires": [["osys_ex_dbg_set"]] }, { "id": "osys_ex_dbg_set", "type": "debug", "z": "osys_ex_tab", "name": "set ok", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 600, "y": 300, "wires": [] }, { "id": "osys_ex_events", "type": "osys-events", "z": "osys_ex_tab", "name": "events LastSay", "server": "osys_ex_cfg", "properties": "SystemVar.LastSay", "ignoreOwn": false, "x": 160, "y": 400, "wires": [["osys_ex_dbg_ev"]] }, { "id": "osys_ex_dbg_ev", "type": "debug", "z": "osys_ex_tab", "name": "event payload", "active": true, "tosidebar": true, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "statusVal": "payload", "statusType": "auto", "x": 400, "y": 400, "wires": [] }, { "id": "osys_ex_comment_other", "type": "comment", "z": "osys_ex_tab", "name": "Прочее: list / get NeedRestart / call", "info": "Дополнительные проверки API.", "x": 200, "y": 480, "wires": [] }, { "id": "osys_ex_inj_list", "type": "inject", "z": "osys_ex_tab", "name": "list objects", "props": [{ "p": "payload" }], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 130, "y": 540, "wires": [["osys_ex_list"]] }, { "id": "osys_ex_list", "type": "osys-list", "z": "osys_ex_tab", "name": "", "server": "osys_ex_cfg", "mode": "objects", "object": "", "x": 340, "y": 540, "wires": [["osys_ex_dbg_list"]] }, { "id": "osys_ex_dbg_list", "type": "debug", "z": "osys_ex_tab", "name": "catalog", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 530, "y": 540, "wires": [] }, { "id": "osys_ex_inj_get", "type": "inject", "z": "osys_ex_tab", "name": "get NeedRestart", "props": [{ "p": "payload" }], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 150, "y": 620, "wires": [["osys_ex_get"]] }, { "id": "osys_ex_get", "type": "osys-get-property", "z": "osys_ex_tab", "name": "NeedRestart", "server": "osys_ex_cfg", "object": "SystemVar", "propertyName": "NeedRestart", "property": "SystemVar.NeedRestart", "liveStatus": true, "x": 360, "y": 620, "wires": [["osys_ex_dbg_get"]] }, { "id": "osys_ex_dbg_get", "type": "debug", "z": "osys_ex_tab", "name": "NeedRestart", "active": false, "tosidebar": true, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "statusVal": "payload", "statusType": "auto", "x": 560, "y": 620, "wires": [] }, { "id": "osys_ex_inj_call", "type": "inject", "z": "osys_ex_tab", "name": "call isStarted", "props": [{ "p": "payload" }], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 140, "y": 700, "wires": [["osys_ex_call"]] }, { "id": "osys_ex_call", "type": "osys-call-method", "z": "osys_ex_tab", "name": "SystemVar.isStarted", "server": "osys_ex_cfg", "object": "SystemVar", "methodName": "isStarted", "method": "SystemVar.isStarted", "waitResult": true, "x": 370, "y": 700, "wires": [["osys_ex_dbg_call"]] }, { "id": "osys_ex_dbg_call", "type": "debug", "z": "osys_ex_tab", "name": "call result", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 600, "y": 700, "wires": [] } ]