example_ohmpi_flows_node-red.json 13.12 KiB
        "id": "6fef03d5598b4c7a",
        "type": "tab",
        "label": "Flow 1",
        "disabled": false,
        "info": ""
    },
        "id": "77db8af51a12093d",
        "type": "mqtt in",
        "z": "6fef03d5598b4c7a",
        "name": "",
        "topic": "ohmpi_0001/exec",
        "qos": "2",
        "datatype": "auto",
        "broker": "5a09c1ee2a3419c3",
        "nl": false,
        "rap": false,
        "inputs": 0,
        "x": 410,
        "y": 500,
        "wires": [
                "b30d9b90bda62986",
                "3f46bb85053b613c"
        "id": "b30d9b90bda62986",
        "type": "debug",
        "z": "6fef03d5598b4c7a",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 850,
        "y": 500,
        "wires": []
        "id": "d9745ad9da06b862",
        "type": "mqtt in",
        "z": "6fef03d5598b4c7a",
        "name": "",
        "topic": "ohmpi_0001/data",
        "qos": "2",
        "datatype": "auto",
        "broker": "5a09c1ee2a3419c3",
        "nl": false,
        "rap": false,
        "inputs": 0,
        "x": 400,
        "y": 600,
        "wires": [
                "c5dc2f808ccac105",
                "3ef697f4f3fdc90e",
                "a67154e86b9510f8",
                "1bc67267d61f8ac7"
7172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
"id": "c5dc2f808ccac105", "type": "debug", "z": "6fef03d5598b4c7a", "name": "", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 850, "y": 600, "wires": [] }, { "id": "bafb34347dc3236b", "type": "mqtt out", "z": "6fef03d5598b4c7a", "name": "MQTT ctrl", "topic": "ohmpi_0001/ctrl", "qos": "2", "retain": "false", "respTopic": "", "contentType": "", "userProps": "", "correl": "", "expiry": "", "broker": "5a09c1ee2a3419c3", "x": 840, "y": 180, "wires": [] }, { "id": "8dc72d9df180684c", "type": "mqtt in", "z": "6fef03d5598b4c7a", "name": "", "topic": "ohmpi_0001/soh", "qos": "2", "datatype": "auto", "broker": "5a09c1ee2a3419c3", "nl": false, "rap": false, "inputs": 0, "x": 400, "y": 700, "wires": [ [ "9ecd9ccb499016d2" ] ] }, { "id": "9ecd9ccb499016d2", "type": "debug", "z": "6fef03d5598b4c7a", "name": "", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 850, "y": 700, "wires": []
141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
}, { "id": "78c8945000eccf7d", "type": "ui_button", "z": "6fef03d5598b4c7a", "name": "", "group": "142ad6ae.d55e29", "order": 0, "width": "2", "height": "1", "passthru": false, "label": "Run", "tooltip": "", "color": "", "bgcolor": "green", "className": "", "icon": "", "payload": "{\"cmd_id\" :\"0\", \"cmd\":\"run_sequence\"}", "payloadType": "str", "topic": "topic", "topicType": "msg", "x": 370, "y": 80, "wires": [ [ "bafb34347dc3236b" ] ] }, { "id": "819bb1f07e51b8c6", "type": "ui_button", "z": "6fef03d5598b4c7a", "name": "", "group": "142ad6ae.d55e29", "order": 0, "width": "2", "height": "1", "passthru": false, "label": "Interrupt", "tooltip": "", "color": "", "bgcolor": "red", "className": "", "icon": "", "payload": "{\"cmd_id\" :\"0\", \"cmd\":\"stop\"}", "payloadType": "str", "topic": "topic", "topicType": "msg", "x": 380, "y": 140, "wires": [ [ "bafb34347dc3236b" ] ] }, { "id": "4ec24224cfd4e4e8", "type": "ui_form", "z": "6fef03d5598b4c7a", "name": "Commands", "label": "", "group": "142ad6ae.d55e29", "order": 4, "width": 0, "height": 0, "options": [ { "label": "cmd_id",
211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
"value": "cmd_id", "type": "text", "required": false, "rows": null }, { "label": "cmd", "value": "cmd", "type": "text", "required": true, "rows": null }, { "label": "args", "value": "args", "type": "text", "required": false, "rows": null } ], "formValue": { "cmd_id": "", "cmd": "", "args": "" }, "payload": "", "submit": "submit", "cancel": "cancel", "topic": "topic", "topicType": "msg", "splitLayout": "", "className": "", "x": 390, "y": 340, "wires": [ [ "547fb5791365f6f7", "bafb34347dc3236b" ] ] }, { "id": "3f46bb85053b613c", "type": "ui_text", "z": "6fef03d5598b4c7a", "group": "7792ecc419ecbb59", "order": 0, "width": "16", "height": "12", "name": "MQTT exec", "label": "Execution", "format": "{{msg.payload}}", "layout": "row-spread", "className": "", "x": 850, "y": 540, "wires": [] }, { "id": "3ef697f4f3fdc90e", "type": "ui_text", "z": "6fef03d5598b4c7a", "group": "7792ecc419ecbb59", "order": 1, "width": "16", "height": "12", "name": "MQTT Data", "label": "Data", "format": "{{msg.payload}}", "layout": "row-spread",
281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350
"className": "", "x": 850, "y": 640, "wires": [] }, { "id": "547fb5791365f6f7", "type": "debug", "z": "6fef03d5598b4c7a", "name": "debug 1", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 680, "y": 360, "wires": [] }, { "id": "c7c6c06cfd2c4646", "type": "ui_button", "z": "6fef03d5598b4c7a", "name": "", "group": "142ad6ae.d55e29", "order": 0, "width": "2", "height": "1", "passthru": false, "label": "Set sequence", "tooltip": "", "color": "", "bgcolor": "green", "className": "", "icon": "", "payload": "{\"cmd_id\":\"\",\"cmd\":\"set_sequence\",\"args\": \"5 6 7 8\\n10 11 12 13\"}", "payloadType": "str", "topic": "topic", "topicType": "msg", "x": 400, "y": 200, "wires": [ [ "bafb34347dc3236b" ] ] }, { "id": "68a3f36a08839f62", "type": "ui_button", "z": "6fef03d5598b4c7a", "name": "", "group": "142ad6ae.d55e29", "order": 0, "width": "2", "height": "1", "passthru": false, "label": "Update settings", "tooltip": "", "color": "", "bgcolor": "green", "className": "", "icon": "", "payload": "{\"cmd_id\":\"\",\"cmd\":\"update_settings\",\"args\":{\"sequence\":\"5 6 7 8\\n10 11 12 13\"}}", "payloadType": "str", "topic": "topic", "topicType": "msg", "x": 400,
351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420
"y": 260, "wires": [ [ "bafb34347dc3236b" ] ] }, { "id": "b7f0b15aea29d7d2", "type": "ui_chart", "z": "6fef03d5598b4c7a", "name": "", "group": "7792ecc419ecbb59", "order": 3, "width": "11", "height": "7", "label": "chart", "chartType": "line", "legend": "true", "xformat": "HH:mm:ss", "interpolate": "linear", "nodata": "", "dot": true, "ymin": "", "ymax": "", "removeOlder": 1, "removeOlderPoints": "", "removeOlderUnit": "3600", "cutout": 0, "useOneColor": false, "useUTC": false, "colors": [ "#1f77b4", "#aec7e8", "#ff7f0e", "#2ca02c", "#98df8a", "#d62728", "#ff9896", "#9467bd", "#c5b0d5" ], "outputs": 1, "useDifferentColor": false, "className": "", "x": 1270, "y": 640, "wires": [ [] ] }, { "id": "1bc67267d61f8ac7", "type": "function", "z": "6fef03d5598b4c7a", "name": "function 1", "func": "var msg2 = { payload: JSON.parse(msg.payload.split(' | ')[2].slice(6,).split(`'`).join(`\"`))[\"R [ohm]\"] };\nreturn msg2;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 1120, "y": 640, "wires": [ [ "249d43079fd9a894", "b7f0b15aea29d7d2" ] ]
421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490
}, { "id": "249d43079fd9a894", "type": "debug", "z": "6fef03d5598b4c7a", "name": "debug 2", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 1280, "y": 700, "wires": [] }, { "id": "24e6dbe73ec692f9", "type": "ui_gauge", "z": "6fef03d5598b4c7a", "name": "", "group": "7792ecc419ecbb59", "order": 4, "width": 0, "height": 0, "gtype": "gage", "title": "Measured Resistances", "label": "R [Ohm]", "format": "{{value}}", "min": 0, "max": "50", "colors": [ "#00b500", "#e6e600", "#ca3838" ], "seg1": "", "seg2": "", "className": "", "x": 1320, "y": 560, "wires": [] }, { "id": "a67154e86b9510f8", "type": "function", "z": "6fef03d5598b4c7a", "name": "function 2", "func": "var msg2 = { payload: JSON.parse(msg.payload.split(' | ')[2].slice(6,).split(`'`).join(`\"`))[\"R [ohm]\"] };\nreturn msg2;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 1120, "y": 560, "wires": [ [ "24e6dbe73ec692f9", "df445e407bbcd544" ] ] }, { "id": "df445e407bbcd544", "type": "debug", "z": "6fef03d5598b4c7a", "name": "debug 3", "active": false,
491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557
"tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 1300, "y": 500, "wires": [] }, { "id": "5a09c1ee2a3419c3", "type": "mqtt-broker", "name": "ohmpi_local", "broker": "127.0.0.1", "port": "1880", "clientid": "", "autoConnect": true, "usetls": false, "protocolVersion": "4", "keepalive": "60", "cleansession": true, "birthTopic": "", "birthQos": "0", "birthPayload": "", "birthMsg": {}, "closeTopic": "", "closeQos": "0", "closePayload": "", "closeMsg": {}, "willTopic": "", "willQos": "0", "willPayload": "", "willMsg": {}, "userProps": "", "sessionExpiry": "" }, { "id": "142ad6ae.d55e29", "type": "ui_group", "name": "Buttons", "tab": "5d888f29.07334", "order": 3, "disp": true, "width": "6", "collapse": false }, { "id": "7792ecc419ecbb59", "type": "ui_group", "name": "Messages", "tab": "5d888f29.07334", "order": 2, "disp": true, "width": "16", "collapse": true, "className": "" }, { "id": "5d888f29.07334", "type": "ui_tab", "name": "Home", "icon": "dashboard", "disabled": false, "hidden": false } ]