HolyC0w

Lab1_EX1

Apr 11th, 2023 (edited)
755
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 8.79 KB | None | 0 0
  1. [
  2.     {
  3.         "id": "db324c8818b29786",
  4.         "type": "tab",
  5.         "label": "Lab1_EXERCISE1_ECE3502",
  6.         "disabled": false,
  7.         "info": "",
  8.         "env": []
  9.     },
  10.     {
  11.         "id": "8b057d3352acbc94",
  12.         "type": "inject",
  13.         "z": "db324c8818b29786",
  14.         "name": "HR",
  15.         "props": [
  16.             {
  17.                 "p": "payload"
  18.             },
  19.             {
  20.                 "p": "topic",
  21.                 "vt": "str"
  22.             }
  23.         ],
  24.         "repeat": "",
  25.         "crontab": "",
  26.         "once": false,
  27.         "onceDelay": 0.1,
  28.         "topic": "HR",
  29.         "payload": "90",
  30.         "payloadType": "num",
  31.         "x": 110,
  32.         "y": 180,
  33.         "wires": [
  34.             [
  35.                 "d2de3b13c7a2938f"
  36.             ]
  37.         ]
  38.     },
  39.     {
  40.         "id": "ecc1cf3b8539a057",
  41.         "type": "inject",
  42.         "z": "db324c8818b29786",
  43.         "name": "SPO2",
  44.         "props": [
  45.             {
  46.                 "p": "payload"
  47.             },
  48.             {
  49.                 "p": "topic",
  50.                 "vt": "str"
  51.             }
  52.         ],
  53.         "repeat": "",
  54.         "crontab": "",
  55.         "once": false,
  56.         "onceDelay": 0.1,
  57.         "topic": "SPO2",
  58.         "payload": "90",
  59.         "payloadType": "num",
  60.         "x": 110,
  61.         "y": 260,
  62.         "wires": [
  63.             [
  64.                 "5bb1e881ebcf9066"
  65.             ]
  66.         ]
  67.     },
  68.     {
  69.         "id": "a29879ed3cf29ce6",
  70.         "type": "inject",
  71.         "z": "db324c8818b29786",
  72.         "name": "BP",
  73.         "props": [
  74.             {
  75.                 "p": "payload"
  76.             },
  77.             {
  78.                 "p": "topic",
  79.                 "vt": "str"
  80.             }
  81.         ],
  82.         "repeat": "",
  83.         "crontab": "",
  84.         "once": false,
  85.         "onceDelay": 0.1,
  86.         "topic": "BP",
  87.         "payload": "90",
  88.         "payloadType": "num",
  89.         "x": 110,
  90.         "y": 340,
  91.         "wires": [
  92.             [
  93.                 "115eadd7d4b8a8c3"
  94.             ]
  95.         ]
  96.     },
  97.     {
  98.         "id": "c45290f16e716cf8",
  99.         "type": "join",
  100.         "z": "db324c8818b29786",
  101.         "name": "",
  102.         "mode": "custom",
  103.         "build": "object",
  104.         "property": "payload",
  105.         "propertyType": "msg",
  106.         "key": "topic",
  107.         "joiner": "\\\\n",
  108.         "joinerType": "str",
  109.         "accumulate": false,
  110.         "timeout": "",
  111.         "count": "3",
  112.         "reduceRight": false,
  113.         "reduceExp": "",
  114.         "reduceInit": "",
  115.         "reduceInitType": "",
  116.         "reduceFixup": "",
  117.         "x": 650,
  118.         "y": 260,
  119.         "wires": [
  120.             [
  121.                 "388d0c53efa858c9"
  122.             ]
  123.         ]
  124.     },
  125.     {
  126.         "id": "d2de3b13c7a2938f",
  127.         "type": "random",
  128.         "z": "db324c8818b29786",
  129.         "name": "",
  130.         "low": "90",
  131.         "high": "100",
  132.         "inte": "true",
  133.         "property": "payload",
  134.         "x": 220,
  135.         "y": 180,
  136.         "wires": [
  137.             [
  138.                 "c45290f16e716cf8",
  139.                 "9e53894c6695fb55"
  140.             ]
  141.         ]
  142.     },
  143.     {
  144.         "id": "9e53894c6695fb55",
  145.         "type": "ui_gauge",
  146.         "z": "db324c8818b29786",
  147.         "name": "",
  148.         "group": "539884f48ea6548f",
  149.         "order": 4,
  150.         "width": 0,
  151.         "height": 0,
  152.         "gtype": "gage",
  153.         "title": "HR",
  154.         "label": "units",
  155.         "format": "{{value}}",
  156.         "min": "60",
  157.         "max": "120",
  158.         "colors": [
  159.             "#00b500",
  160.             "#e6e600",
  161.             "#ca3838"
  162.         ],
  163.         "seg1": "",
  164.         "seg2": "",
  165.         "x": 330,
  166.         "y": 180,
  167.         "wires": []
  168.     },
  169.     {
  170.         "id": "4fced7dbd94e0b3d",
  171.         "type": "ui_gauge",
  172.         "z": "db324c8818b29786",
  173.         "name": "",
  174.         "group": "539884f48ea6548f",
  175.         "order": 2,
  176.         "width": 0,
  177.         "height": 0,
  178.         "gtype": "gage",
  179.         "title": "SPO2",
  180.         "label": "units",
  181.         "format": "{{value}}",
  182.         "min": "60",
  183.         "max": "120",
  184.         "colors": [
  185.             "#00b500",
  186.             "#e6e600",
  187.             "#ca3838"
  188.         ],
  189.         "seg1": "",
  190.         "seg2": "",
  191.         "x": 330,
  192.         "y": 260,
  193.         "wires": []
  194.     },
  195.     {
  196.         "id": "0b22e71afe6781c8",
  197.         "type": "ui_gauge",
  198.         "z": "db324c8818b29786",
  199.         "name": "",
  200.         "group": "539884f48ea6548f",
  201.         "order": 3,
  202.         "width": 0,
  203.         "height": 0,
  204.         "gtype": "gage",
  205.         "title": "BP LEVEL",
  206.         "label": "units",
  207.         "format": "{{value}}",
  208.         "min": "60",
  209.         "max": "120",
  210.         "colors": [
  211.             "#00b500",
  212.             "#e6e600",
  213.             "#ca3838"
  214.         ],
  215.         "seg1": "",
  216.         "seg2": "",
  217.         "x": 350,
  218.         "y": 340,
  219.         "wires": []
  220.     },
  221.     {
  222.         "id": "5bb1e881ebcf9066",
  223.         "type": "random",
  224.         "z": "db324c8818b29786",
  225.         "name": "",
  226.         "low": "90",
  227.         "high": "100",
  228.         "inte": "true",
  229.         "property": "payload",
  230.         "x": 220,
  231.         "y": 260,
  232.         "wires": [
  233.             [
  234.                 "c45290f16e716cf8",
  235.                 "4fced7dbd94e0b3d"
  236.             ]
  237.         ]
  238.     },
  239.     {
  240.         "id": "115eadd7d4b8a8c3",
  241.         "type": "random",
  242.         "z": "db324c8818b29786",
  243.         "name": "",
  244.         "low": "90",
  245.         "high": "120",
  246.         "inte": "true",
  247.         "property": "payload",
  248.         "x": 220,
  249.         "y": 340,
  250.         "wires": [
  251.             [
  252.                 "c45290f16e716cf8",
  253.                 "0b22e71afe6781c8"
  254.             ]
  255.         ]
  256.     },
  257.     {
  258.         "id": "0611c7bbc6ad8533",
  259.         "type": "e-mail",
  260.         "z": "db324c8818b29786",
  261.         "server": "smtp.gmail.com",
  262.         "port": "465",
  263.         "secure": true,
  264.         "tls": true,
  265.         "name": "[email protected]",
  266.         "dname": "",
  267.         "x": 960,
  268.         "y": 260,
  269.         "wires": []
  270.     },
  271.     {
  272.         "id": "18b0e7e1f6debb1f",
  273.         "type": "debug",
  274.         "z": "db324c8818b29786",
  275.         "name": "debug 6",
  276.         "active": true,
  277.         "tosidebar": true,
  278.         "console": false,
  279.         "tostatus": false,
  280.         "complete": "payload",
  281.         "targetType": "msg",
  282.         "statusVal": "",
  283.         "statusType": "auto",
  284.         "x": 960,
  285.         "y": 340,
  286.         "wires": []
  287.     },
  288.     {
  289.         "id": "388d0c53efa858c9",
  290.         "type": "function",
  291.         "z": "db324c8818b29786",
  292.         "name": "function 2",
  293.         "func": "var hr = msg.payload[\\"HR\\"];\\nvar sp = msg.payload[\\"SP02\\"];\\nvar bp = msg.payload[\\"BP\\"];\\n\\nmsg.to = \\"subhranshupati0412@gmail.com\\";\\nmsg.from = \\"subhranshupati0412@gmail.com\\";\\n\\nvar d = new Date();\\nif (hr >= 90 && sp >= 98 && bp >= 128) {\\n    msg.topic = \\"Drug consumption level high\\";\\n}\\nelse if (hr <= 68 && sp <= 80 && bp <= 90) {\\n    msg.topic = \\"Drug consumption level low\\";\\n}\\nelse {\\n    msg.topic = \\"Drug consumption level medium\\";\\n}\\n\\nmsg.payload = \\"time: \\" + d + \\"\\\\n drug consumption level: \\" + \\"HR: \\" + hr + \\" SPO2: \\" + sp + \\" BP: \\" + bp;\\nreturn msg;",
  294.         "outputs": 1,
  295.         "noerr": 0,
  296.         "initialize": "",
  297.         "finalize": "",
  298.         "libs": [],
  299.         "x": 760,
  300.         "y": 260,
  301.         "wires": [
  302.             [
  303.                 "18b0e7e1f6debb1f",
  304.                 "0611c7bbc6ad8533",
  305.                 "79b0aaf921121509",
  306.                 "573514af2f9c4257"
  307.             ]
  308.         ]
  309.     },
  310.     {
  311.         "id": "79b0aaf921121509",
  312.         "type": "ui_text",
  313.         "z": "db324c8818b29786",
  314.         "group": "539884f48ea6548f",
  315.         "order": 1,
  316.         "width": 0,
  317.         "height": 0,
  318.         "name": "",
  319.         "label": "Drum consumption level",
  320.         "format": "{{msg.payload}}",
  321.         "layout": "col-center",
  322.         "x": 1010,
  323.         "y": 180,
  324.         "wires": []
  325.     },
  326.     {
  327.         "id": "573514af2f9c4257",
  328.         "type": "ui_toast",
  329.         "z": "db324c8818b29786",
  330.         "position": "top right",
  331.         "displayTime": "3",
  332.         "highlight": "",
  333.         "sendall": true,
  334.         "outputs": 0,
  335.         "ok": "OK",
  336.         "cancel": "",
  337.         "raw": false,
  338.         "topic": "",
  339.         "name": "",
  340.         "x": 970,
  341.         "y": 140,
  342.         "wires": []
  343.     },
  344.     {
  345.         "id": "539884f48ea6548f",
  346.         "type": "ui_group",
  347.         "name": "lab1_ex1_grp",
  348.         "tab": "0602addc88548296",
  349.         "order": 1,
  350.         "disp": true,
  351.         "width": "6",
  352.         "collapse": false
  353.     },
  354.     {
  355.         "id": "0602addc88548296",
  356.         "type": "ui_tab",
  357.         "name": "lab1_ex1",
  358.         "icon": "dashboard",
  359.         "disabled": false,
  360.         "hidden": false
  361.     }
  362. ]
Advertisement
Add Comment
Please, Sign In to add comment