[text] paste1

Viewer

  1. ////////Celcius to Fahrenheit
  2. [
  3.     {
  4.         "id": "185f69ac261994d6",
  5.         "type": "tab",
  6.         "label": "Cps-Cel to Fah",
  7.         "disabled": false,
  8.         "info": "",
  9.         "env": []
  10.     },
  11.     {
  12.         "id": "22400181b95483a8",
  13.         "type": "inject",
  14.         "z": "185f69ac261994d6",
  15.         "name": "",
  16.         "props": [
  17.             {
  18.                 "p": "payload"
  19.             }
  20.         ],
  21.         "repeat": "",
  22.         "crontab": "",
  23.         "once": false,
  24.         "onceDelay": 0.1,
  25.         "topic": "",
  26.         "payload": "60",
  27.         "payloadType": "num",
  28.         "x": 230,
  29.         "y": 220,
  30.         "wires": [
  31.             [
  32.                 "e3acc237c0981547"
  33.             ]
  34.         ]
  35.     },
  36.     {
  37.         "id": "e3acc237c0981547",
  38.         "type": "function",
  39.         "z": "185f69ac261994d6",
  40.         "name": "Celsius to Fahrenheit",
  41.         "func": "var celsius = msg.payload;\nvar fahrenheit = celsius * 9 / 5 + 32;\nmsg.payload = +celsius+\"°C is \" +fahrenheit+\"°F\";\nreturn msg;",
  42.         "outputs": 1,
  43.         "noerr": 0,
  44.         "initialize": "",
  45.         "finalize": "",
  46.         "libs": [],
  47.         "x": 520,
  48.         "y": 220,
  49.         "wires": [
  50.             [
  51.                 "c416da242ad4e070"
  52.             ]
  53.         ]
  54.     },
  55.     {
  56.         "id": "c416da242ad4e070",
  57.         "type": "debug",
  58.         "z": "185f69ac261994d6",
  59.         "name": "Temperature Output",
  60.         "active": true,
  61.         "tosidebar": true,
  62.         "console": false,
  63.         "tostatus": false,
  64.         "complete": "payload",
  65.         "targetType": "msg",
  66.         "statusVal": "",
  67.         "statusType": "auto",
  68.         "x": 840,
  69.         "y": 220,
  70.         "wires": []
  71.     },
  72.     {
  73.         "id": "268d251001b27d94",
  74.         "type": "comment",
  75.         "z": "185f69ac261994d6",
  76.         "name": "21BPS1271",
  77.         "info": "",
  78.         "x": 550,
  79.         "y": 120,
  80.         "wires": []
  81.     }
  82. ]
  83.  
  84. ///////////////Sum,Mul,Div
  85. [
  86.     {
  87.         "id": "fb275865028ea307",
  88.         "type": "tab",
  89.         "label": "Cps-Add,Mul",
  90.         "disabled": false,
  91.         "info": "",
  92.         "env": []
  93.     },
  94.     {
  95.         "id": "5b3fd97d.a15cc",
  96.         "type": "function",
  97.         "z": "fb275865028ea307",
  98.         "name": "Sum, Multiplication, Subraction, Division",
  99.         "func": "var a = msg.payload.a;\nvar b = msg.payload.b;\n\nvar sum = a + b;\nvar subration = a-b;\nvar multiplication = a * b;\nvar division = (b !== 0) ? a / b : 'Division by zero';\n\nvar result = {\n    sum: sum,\n    subraction: subration,\n    multiplication: multiplication,\n    division: division\n};\n\nmsg.payload = result;\n\nreturn msg;",
  100.         "outputs": 1,
  101.         "noerr": 0,
  102.         "initialize": "",
  103.         "finalize": "",
  104.         "libs": [],
  105.         "x": 580,
  106.         "y": 280,
  107.         "wires": [
  108.             [
  109.                 "50fb2ff9.a13e88"
  110.             ]
  111.         ]
  112.     },
  113.     {
  114.         "id": "4d203c53.47e6d8",
  115.         "type": "inject",
  116.         "z": "fb275865028ea307",
  117.         "name": "Input Values",
  118.         "props": [
  119.             {
  120.                 "p": "payload.a",
  121.                 "v": "20",
  122.                 "vt": "num"
  123.             },
  124.             {
  125.                 "p": "payload.b",
  126.                 "v": "5",
  127.                 "vt": "num"
  128.             }
  129.         ],
  130.         "repeat": "",
  131.         "crontab": "",
  132.         "once": false,
  133.         "onceDelay": 0.1,
  134.         "topic": "",
  135.         "x": 250,
  136.         "y": 280,
  137.         "wires": [
  138.             [
  139.                 "5b3fd97d.a15cc"
  140.             ]
  141.         ]
  142.     },
  143.     {
  144.         "id": "50fb2ff9.a13e88",
  145.         "type": "debug",
  146.         "z": "fb275865028ea307",
  147.         "name": "",
  148.         "active": true,
  149.         "tosidebar": true,
  150.         "console": false,
  151.         "tostatus": false,
  152.         "complete": "payload",
  153.         "targetType": "msg",
  154.         "statusVal": "",
  155.         "statusType": "auto",
  156.         "x": 890,
  157.         "y": 280,
  158.         "wires": []
  159.     },
  160.     {
  161.         "id": "4b421fcc8df96ae0",
  162.         "type": "comment",
  163.         "z": "fb275865028ea307",
  164.         "name": "21BPS1271",
  165.         "info": "",
  166.         "x": 610,
  167.         "y": 160,
  168.         "wires": []
  169.     }
  170. ]
  171.  
  172. ////////Cube root and Square Root
  173. [
  174.     {
  175.         "id": "b1531c53c08fff9f",
  176.         "type": "tab",
  177.         "label": "Cps-Sq+Cube",
  178.         "disabled": false,
  179.         "info": "",
  180.         "env": []
  181.     },
  182.     {
  183.         "id": "a6dc43d4.219d58",
  184.         "type": "inject",
  185.         "z": "b1531c53c08fff9f",
  186.         "name": "",
  187.         "props": [
  188.             {
  189.                 "p": "payload"
  190.             }
  191.         ],
  192.         "repeat": "",
  193.         "crontab": "",
  194.         "once": false,
  195.         "onceDelay": 0.1,
  196.         "topic": "",
  197.         "payload": "625",
  198.         "payloadType": "num",
  199.         "x": 230,
  200.         "y": 240,
  201.         "wires": [
  202.             [
  203.                 "80e2aa9a.f1f2a8"
  204.             ]
  205.         ]
  206.     },
  207.     {
  208.         "id": "80e2aa9a.f1f2a8",
  209.         "type": "function",
  210.         "z": "b1531c53c08fff9f",
  211.         "name": "Square and Cube Roots",
  212.         "func": "var number = msg.payload;\nvar squareRoot = Math.sqrt(number);\nvar cubeRoot = Math.pow(number, 1/3);\nvar result = {\n    squareRoot:squareRoot,\n    cubeRoot:cubeRoot\n};\n\nmsg.payload = result;\n\nreturn msg;",
  213.         "outputs": 1,
  214.         "noerr": 0,
  215.         "initialize": "",
  216.         "finalize": "",
  217.         "libs": [],
  218.         "x": 530,
  219.         "y": 240,
  220.         "wires": [
  221.             [
  222.                 "78b663df.194b44"
  223.             ]
  224.         ]
  225.     },
  226.     {
  227.         "id": "78b663df.194b44",
  228.         "type": "debug",
  229.         "z": "b1531c53c08fff9f",
  230.         "name": "",
  231.         "active": true,
  232.         "tosidebar": true,
  233.         "console": false,
  234.         "tostatus": false,
  235.         "complete": "payload",
  236.         "targetType": "msg",
  237.         "statusVal": "",
  238.         "statusType": "auto",
  239.         "x": 810,
  240.         "y": 240,
  241.         "wires": []
  242.     },
  243.     {
  244.         "id": "596b9386a0f23b7b",
  245.         "type": "comment",
  246.         "z": "b1531c53c08fff9f",
  247.         "name": "21BPS1271",
  248.         "info": "",
  249.         "x": 530,
  250.         "y": 140,
  251.         "wires": []
  252.     }
  253. ]
  254.  
  255. //////Check Temp and state the AC condition
  256. [
  257.     {
  258.         "id": "2ad37fc1e230affa",
  259.         "type": "tab",
  260.         "label": "Cps-Check Temp",
  261.         "disabled": false,
  262.         "info": "",
  263.         "env": []
  264.     },
  265.     {
  266.         "id": "a559083c5a93f164",
  267.         "type": "inject",
  268.         "z": "2ad37fc1e230affa",
  269.         "name": "",
  270.         "props": [
  271.             {
  272.                 "p": "payload"
  273.             }
  274.         ],
  275.         "repeat": "",
  276.         "crontab": "",
  277.         "once": false,
  278.         "onceDelay": 0.1,
  279.         "topic": "",
  280.         "payload": "50",
  281.         "payloadType": "num",
  282.         "x": 110,
  283.         "y": 180,
  284.         "wires": [
  285.             [
  286.                 "86807f187e2c5b49"
  287.             ]
  288.         ]
  289.     },
  290.     {
  291.         "id": "86807f187e2c5b49",
  292.         "type": "change",
  293.         "z": "2ad37fc1e230affa",
  294.         "name": "Set Temperature Flow Variable",
  295.         "rules": [
  296.             {
  297.                 "t": "set",
  298.                 "p": "temperature",
  299.                 "pt": "flow",
  300.                 "to": "payload",
  301.                 "tot": "msg"
  302.             }
  303.         ],
  304.         "action": "",
  305.         "property": "",
  306.         "from": "",
  307.         "to": "",
  308.         "reg": false,
  309.         "x": 370,
  310.         "y": 180,
  311.         "wires": [
  312.             [
  313.                 "c0572917198be13a"
  314.             ]
  315.         ]
  316.     },
  317.     {
  318.         "id": "c0572917198be13a",
  319.         "type": "function",
  320.         "z": "2ad37fc1e230affa",
  321.         "name": "Check Temperature",
  322.         "func": "var temperature = flow.get('temperature');\n\nif (temperature < 100) {\n    msg.payload = \"AC should switch off\";\n} else {\n    msg.payload = \"AC should on\";\n}\n\nreturn msg;",
  323.         "outputs": 1,
  324.         "noerr": 0,
  325.         "initialize": "",
  326.         "finalize": "",
  327.         "libs": [],
  328.         "x": 650,
  329.         "y": 180,
  330.         "wires": [
  331.             [
  332.                 "b8288a0c448fc8bd"
  333.             ]
  334.         ]
  335.     },
  336.     {
  337.         "id": "b8288a0c448fc8bd",
  338.         "type": "debug",
  339.         "z": "2ad37fc1e230affa",
  340.         "name": "AC State",
  341.         "active": true,
  342.         "tosidebar": true,
  343.         "console": false,
  344.         "tostatus": false,
  345.         "complete": "payload",
  346.         "targetType": "msg",
  347.         "statusVal": "",
  348.         "statusType": "auto",
  349.         "x": 880,
  350.         "y": 180,
  351.         "wires": []
  352.     },
  353.     {
  354.         "id": "aea198cae2241d42",
  355.         "type": "comment",
  356.         "z": "2ad37fc1e230affa",
  357.         "name": "21BPS1271",
  358.         "info": "",
  359.         "x": 530,
  360.         "y": 80,
  361.         "wires": []
  362.     }
  363. ]
  364.  
  365. ////////Control Speed
  366. [
  367.     {
  368.         "id": "2db746bb75d7e594",
  369.         "type": "tab",
  370.         "label": "Cps-Control Speed",
  371.         "disabled": false,
  372.         "info": "",
  373.         "env": []
  374.     },
  375.     {
  376.         "id": "c3e1922f.55cf08",
  377.         "type": "inject",
  378.         "z": "2db746bb75d7e594",
  379.         "name": "",
  380.         "props": [
  381.             {
  382.                 "p": "payload"
  383.             }
  384.         ],
  385.         "repeat": "",
  386.         "crontab": "",
  387.         "once": false,
  388.         "onceDelay": 0.1,
  389.         "topic": "",
  390.         "payload": "55",
  391.         "payloadType": "num",
  392.         "x": 150,
  393.         "y": 240,
  394.         "wires": [
  395.             [
  396.                 "a871acfe.eb6a08"
  397.             ]
  398.         ]
  399.     },
  400.     {
  401.         "id": "a871acfe.eb6a08",
  402.         "type": "change",
  403.         "z": "2db746bb75d7e594",
  404.         "name": "Set Speed Flow Variable",
  405.         "rules": [
  406.             {
  407.                 "t": "set",
  408.                 "p": "speed",
  409.                 "pt": "flow",
  410.                 "to": "payload",
  411.                 "tot": "msg"
  412.             }
  413.         ],
  414.         "action": "",
  415.         "property": "",
  416.         "from": "",
  417.         "to": "",
  418.         "reg": false,
  419.         "x": 430,
  420.         "y": 240,
  421.         "wires": [
  422.             [
  423.                 "f3f4c292.862cd8"
  424.             ]
  425.         ]
  426.     },
  427.     {
  428.         "id": "f3f4c292.862cd8",
  429.         "type": "function",
  430.         "z": "2db746bb75d7e594",
  431.         "name": "Control Speed",
  432.         "func": "var speed = flow.get('speed');\n\nif (speed > 80) {\n    speed -= 10; \n} else {\n    speed += 10; \n}\n\nmsg.payload =\"The updated speed is \"+speed;\n\nreturn msg;",
  433.         "outputs": 1,
  434.         "noerr": 0,
  435.         "initialize": "",
  436.         "finalize": "",
  437.         "libs": [],
  438.         "x": 700,
  439.         "y": 240,
  440.         "wires": [
  441.             [
  442.                 "c899ecae.8ed0a"
  443.             ]
  444.         ]
  445.     },
  446.     {
  447.         "id": "c899ecae.8ed0a",
  448.         "type": "debug",
  449.         "z": "2db746bb75d7e594",
  450.         "name": "Updated Speed",
  451.         "active": true,
  452.         "tosidebar": true,
  453.         "console": false,
  454.         "tostatus": false,
  455.         "complete": "payload",
  456.         "targetType": "msg",
  457.         "statusVal": "",
  458.         "statusType": "auto",
  459.         "x": 940,
  460.         "y": 240,
  461.         "wires": []
  462.     },
  463.     {
  464.         "id": "44484e521046070a",
  465.         "type": "comment",
  466.         "z": "2db746bb75d7e594",
  467.         "name": "21BPS1271",
  468.         "info": "",
  469.         "x": 570,
  470.         "y": 160,
  471.         "wires": []
  472.     }
  473. ]
  474.  
  475. //////OpenWeather API
  476. [
  477.     {
  478.         "id": "a7628093d9d28aea",
  479.         "type": "tab",
  480.         "label": "Flow 7",
  481.         "disabled": false,
  482.         "info": "",
  483.         "env": []
  484.     },
  485.     {
  486.         "id": "f0f0df1b878b4993",
  487.         "type": "inject",
  488.         "z": "a7628093d9d28aea",
  489.         "name": "",
  490.         "props": [
  491.             {
  492.                 "p": "payload"
  493.             },
  494.             {
  495.                 "p": "topic",
  496.                 "vt": "str"
  497.             }
  498.         ],
  499.         "repeat": "",
  500.         "crontab": "",
  501.         "once": true,
  502.         "onceDelay": 0.1,
  503.         "topic": "",
  504.         "payload": "",
  505.         "payloadType": "date",
  506.         "x": 150,
  507.         "y": 160,
  508.         "wires": [
  509.             [
  510.                 "05582f0faf31eb0f"
  511.             ]
  512.         ]
  513.     },
  514.     {
  515.         "id": "05582f0faf31eb0f",
  516.         "type": "openweathermap",
  517.         "z": "a7628093d9d28aea",
  518.         "name": "Weather Report_21BPS1271",
  519.         "wtype": "current",
  520.         "lon": "",
  521.         "lat": "",
  522.         "city": "Chennai",
  523.         "country": "India",
  524.         "language": "en",
  525.         "x": 380,
  526.         "y": 160,
  527.         "wires": [
  528.             [
  529.                 "cb63a79ecd52c8e3",
  530.                 "87bcf6885a27fd63"
  531.             ]
  532.         ]
  533.     },
  534.     {
  535.         "id": "cb63a79ecd52c8e3",
  536.         "type": "debug",
  537.         "z": "a7628093d9d28aea",
  538.         "name": "debug 15",
  539.         "active": true,
  540.         "tosidebar": true,
  541.         "console": false,
  542.         "tostatus": false,
  543.         "complete": "payload",
  544.         "targetType": "msg",
  545.         "statusVal": "",
  546.         "statusType": "auto",
  547.         "x": 720,
  548.         "y": 100,
  549.         "wires": []
  550.     },
  551.     {
  552.         "id": "87bcf6885a27fd63",
  553.         "type": "ui_gauge",
  554.         "z": "a7628093d9d28aea",
  555.         "name": "Temperature in Celusis",
  556.         "group": "0591eb429d5bceeb",
  557.         "order": 2,
  558.         "width": 0,
  559.         "height": 0,
  560.         "gtype": "gage",
  561.         "title": "Temperature in Celusis",
  562.         "label": "units",
  563.         "format": "{{msg.payload.tempc}}",
  564.         "min": 0,
  565.         "max": "100",
  566.         "colors": [
  567.             "#00b500",
  568.             "#e6e600",
  569.             "#ca3838"
  570.         ],
  571.         "seg1": "",
  572.         "seg2": "",
  573.         "diff": false,
  574.         "className": "",
  575.         "x": 760,
  576.         "y": 200,
  577.         "wires": []
  578.     },
  579.     {
  580.         "id": "03990b0cceb01e23",
  581.         "type": "openweathermap in",
  582.         "z": "a7628093d9d28aea",
  583.         "name": "weathermapin",
  584.         "wtype": "current",
  585.         "lon": "",
  586.         "lat": "",
  587.         "city": "Chennai",
  588.         "country": "India",
  589.         "language": "en",
  590.         "x": 150,
  591.         "y": 320,
  592.         "wires": [
  593.             [
  594.                 "9021fa3014741f65",
  595.                 "37e4e50bad96e1da"
  596.             ]
  597.         ]
  598.     },
  599.     {
  600.         "id": "9021fa3014741f65",
  601.         "type": "debug",
  602.         "z": "a7628093d9d28aea",
  603.         "name": "debug 16",
  604.         "active": true,
  605.         "tosidebar": true,
  606.         "console": false,
  607.         "tostatus": false,
  608.         "complete": "payload",
  609.         "targetType": "msg",
  610.         "statusVal": "",
  611.         "statusType": "auto",
  612.         "x": 380,
  613.         "y": 280,
  614.         "wires": []
  615.     },
  616.     {
  617.         "id": "37e4e50bad96e1da",
  618.         "type": "function",
  619.         "z": "a7628093d9d28aea",
  620.         "name": "function 8",
  621.         "func": "if (msg.payload.weather == \"Clouds\") {\n    msg.payload = \"Good Day! Have a Pleasant Stay\"\n    return msg;\n} else if (msg.payload.weather == \"Rain\") {\n    msg.payload = \"Stay Home Stay Safe! It is Raining\"\n    return msg;\n}\nreturn null;",
  622.         "outputs": 1,
  623.         "noerr": 0,
  624.         "initialize": "",
  625.         "finalize": "",
  626.         "libs": [],
  627.         "x": 380,
  628.         "y": 360,
  629.         "wires": [
  630.             [
  631.                 "871eeb936cecacd4",
  632.                 "3f468aac7b5d57a8"
  633.             ]
  634.         ]
  635.     },
  636.     {
  637.         "id": "871eeb936cecacd4",
  638.         "type": "debug",
  639.         "z": "a7628093d9d28aea",
  640.         "name": "debug 17",
  641.         "active": true,
  642.         "tosidebar": true,
  643.         "console": false,
  644.         "tostatus": false,
  645.         "complete": "payload",
  646.         "targetType": "msg",
  647.         "statusVal": "",
  648.         "statusType": "auto",
  649.         "x": 640,
  650.         "y": 300,
  651.         "wires": []
  652.     },
  653.     {
  654.         "id": "3f468aac7b5d57a8",
  655.         "type": "ui_text",
  656.         "z": "a7628093d9d28aea",
  657.         "group": "0591eb429d5bceeb",
  658.         "order": 3,
  659.         "width": "5",
  660.         "height": "3",
  661.         "name": "text",
  662.         "label": "text",
  663.         "format": "{{msg.payload}}",
  664.         "layout": "col-center",
  665.         "className": "",
  666.         "x": 630,
  667.         "y": 400,
  668.         "wires": []
  669.     },
  670.     {
  671.         "id": "0591eb429d5bceeb",
  672.         "type": "ui_group",
  673.         "name": "Weather Report",
  674.         "tab": "dd9a1b2e.07aee",
  675.         "order": 1,
  676.         "disp": true,
  677.         "width": "6",
  678.         "collapse": false,
  679.         "className": ""
  680.     },
  681.     {
  682.         "id": "dd9a1b2e.07aee",
  683.         "type": "ui_tab",
  684.         "name": "ThinkIOT",
  685.         "icon": "dashboard",
  686.         "order": 1,
  687.         "disabled": false,
  688.         "hidden": false
  689.     }
  690. ]
  691.  
  692. ///////Open Weather API with text node
  693. [
  694.     {
  695.         "id": "5855d0c84441da14",
  696.         "type": "tab",
  697.         "label": "Flow 17",
  698.         "disabled": false,
  699.         "info": "",
  700.         "env": []
  701.     },
  702.     {
  703.         "id": "dc1ac2db902753f7",
  704.         "type": "inject",
  705.         "z": "5855d0c84441da14",
  706.         "name": "",
  707.         "props": [
  708.             {
  709.                 "p": "payload"
  710.             },
  711.             {
  712.                 "p": "topic",
  713.                 "vt": "str"
  714.             }
  715.         ],
  716.         "repeat": "",
  717.         "crontab": "",
  718.         "once": true,
  719.         "onceDelay": 0.1,
  720.         "topic": "",
  721.         "payload": "",
  722.         "payloadType": "date",
  723.         "x": 270,
  724.         "y": 240,
  725.         "wires": [
  726.             [
  727.                 "0f4b93d1405f593e"
  728.             ]
  729.         ]
  730.     },
  731.     {
  732.         "id": "07300cd3a3b59596",
  733.         "type": "ui_gauge",
  734.         "z": "5855d0c84441da14",
  735.         "name": "Temperature in Celsius",
  736.         "group": "7fb9b6660db04ea6",
  737.         "order": 0,
  738.         "width": 0,
  739.         "height": 0,
  740.         "gtype": "gage",
  741.         "title": "Temperature in Celsius",
  742.         "label": "units",
  743.         "format": "{{msg.payload.tempc}}",
  744.         "min": 0,
  745.         "max": "100",
  746.         "colors": [
  747.             "#41f500",
  748.             "#f5ed00",
  749.             "#f50000"
  750.         ],
  751.         "seg1": "",
  752.         "seg2": "",
  753.         "diff": false,
  754.         "className": "",
  755.         "x": 840,
  756.         "y": 340,
  757.         "wires": [],
  758.         "icon": "font-awesome/fa-wheelchair-alt"
  759.     },
  760.     {
  761.         "id": "2e69171c97edfb4f",
  762.         "type": "debug",
  763.         "z": "5855d0c84441da14",
  764.         "name": "debug 4",
  765.         "active": true,
  766.         "tosidebar": true,
  767.         "console": false,
  768.         "tostatus": false,
  769.         "complete": "payload",
  770.         "targetType": "msg",
  771.         "statusVal": "",
  772.         "statusType": "auto",
  773.         "x": 820,
  774.         "y": 240,
  775.         "wires": []
  776.     },
  777.     {
  778.         "id": "0f4b93d1405f593e",
  779.         "type": "openweathermap",
  780.         "z": "5855d0c84441da14",
  781.         "name": "WeatherReport",
  782.         "wtype": "current",
  783.         "lon": "",
  784.         "lat": "",
  785.         "city": "Chennai",
  786.         "country": "India",
  787.         "language": "en",
  788.         "x": 540,
  789.         "y": 240,
  790.         "wires": [
  791.             [
  792.                 "f414aa5d428a78be",
  793.                 "2e69171c97edfb4f",
  794.                 "07300cd3a3b59596",
  795.                 "1bdbd564f1eb2446"
  796.             ]
  797.         ]
  798.     },
  799.     {
  800.         "id": "f414aa5d428a78be",
  801.         "type": "function",
  802.         "z": "5855d0c84441da14",
  803.         "name": "function 1",
  804.         "func": "msg.payload=msg.payload.tempc\nreturn msg;",
  805.         "outputs": 1,
  806.         "noerr": 0,
  807.         "initialize": "",
  808.         "finalize": "",
  809.         "libs": [],
  810.         "x": 780,
  811.         "y": 180,
  812.         "wires": [
  813.             [
  814.                 "3a93ae6486fd9ad8"
  815.             ]
  816.         ]
  817.     },
  818.     {
  819.         "id": "1bdbd564f1eb2446",
  820.         "type": "function",
  821.         "z": "5855d0c84441da14",
  822.         "name": "function 2",
  823.         "func": "msg.payload = msg.payload.humidity\nreturn msg;",
  824.         "outputs": 1,
  825.         "noerr": 0,
  826.         "initialize": "",
  827.         "finalize": "",
  828.         "libs": [],
  829.         "x": 800,
  830.         "y": 460,
  831.         "wires": [
  832.             [
  833.                 "2787bcbe9ec12e03"
  834.             ]
  835.         ]
  836.     },
  837.     {
  838.         "id": "2787bcbe9ec12e03",
  839.         "type": "ui_numeric",
  840.         "z": "5855d0c84441da14",
  841.         "name": "",
  842.         "label": "Humidity Value",
  843.         "tooltip": "",
  844.         "group": "7fb9b6660db04ea6",
  845.         "order": 3,
  846.         "width": "0",
  847.         "height": "0",
  848.         "wrap": false,
  849.         "passthru": true,
  850.         "topic": "topic",
  851.         "topicType": "msg",
  852.         "format": "{{msg.payload.humidity}}",
  853.         "min": 0,
  854.         "max": "100",
  855.         "step": 1,
  856.         "className": "",
  857.         "x": 1020,
  858.         "y": 460,
  859.         "wires": [
  860.             []
  861.         ]
  862.     },
  863.     {
  864.         "id": "3a93ae6486fd9ad8",
  865.         "type": "ui_chart",
  866.         "z": "5855d0c84441da14",
  867.         "name": "",
  868.         "group": "7fb9b6660db04ea6",
  869.         "order": 2,
  870.         "width": "0",
  871.         "height": "0",
  872.         "label": "Temperature Chart",
  873.         "chartType": "line",
  874.         "legend": "false",
  875.         "xformat": "HH:mm:ss",
  876.         "interpolate": "linear",
  877.         "nodata": "",
  878.         "dot": false,
  879.         "ymin": "0",
  880.         "ymax": "100",
  881.         "removeOlder": 1,
  882.         "removeOlderPoints": "",
  883.         "removeOlderUnit": "3600",
  884.         "cutout": 0,
  885.         "useOneColor": false,
  886.         "useUTC": false,
  887.         "colors": [
  888.             "#1f77b4",
  889.             "#aec7e8",
  890.             "#ff7f0e",
  891.             "#2ca02c",
  892.             "#98df8a",
  893.             "#d62728",
  894.             "#ff9896",
  895.             "#9467bd",
  896.             "#c5b0d5"
  897.         ],
  898.         "outputs": 1,
  899.         "useDifferentColor": false,
  900.         "className": "",
  901.         "x": 1010,
  902.         "y": 120,
  903.         "wires": [
  904.             [
  905.                 "fbfbca4889300c97"
  906.             ]
  907.         ]
  908.     },
  909.     {
  910.         "id": "fbfbca4889300c97",
  911.         "type": "debug",
  912.         "z": "5855d0c84441da14",
  913.         "name": "debug 13",
  914.         "active": true,
  915.         "tosidebar": true,
  916.         "console": false,
  917.         "tostatus": false,
  918.         "complete": "payload",
  919.         "targetType": "msg",
  920.         "statusVal": "",
  921.         "statusType": "auto",
  922.         "x": 1220,
  923.         "y": 180,
  924.         "wires": []
  925.     },
  926.     {
  927.         "id": "7fb9b6660db04ea6",
  928.         "type": "ui_group",
  929.         "name": "Weather Report ",
  930.         "tab": "37eb36948151e2bb",
  931.         "order": 1,
  932.         "disp": true,
  933.         "width": "8",
  934.         "collapse": false,
  935.         "className": ""
  936.     },
  937.     {
  938.         "id": "37eb36948151e2bb",
  939.         "type": "ui_tab",
  940.         "name": "OPENWEATHER DASHBOARD",
  941.         "icon": "dashboard",
  942.         "disabled": false,
  943.         "hidden": false
  944.     }
  945. ]
  946.  
  947. //////////Https with ThingsBoard
  948. [
  949.     {
  950.         "id": "e7f51834ddda9c9d",
  951.         "type": "tab",
  952.         "label": "Flow 16",
  953.         "disabled": false,
  954.         "info": "",
  955.         "env": []
  956.     },
  957.     {
  958.         "id": "0a8a9105b50a64cc",
  959.         "type": "inject",
  960.         "z": "e7f51834ddda9c9d",
  961.         "name": "all sensors",
  962.         "props": [
  963.             {
  964.                 "p": "payload"
  965.             }
  966.         ],
  967.         "repeat": "",
  968.         "crontab": "",
  969.         "once": false,
  970.         "onceDelay": 0.1,
  971.         "topic": "",
  972.         "payload": "{\"humidity\":81,\"temperature\":32,\"active\":\"ON\"}",
  973.         "payloadType": "json",
  974.         "x": 320,
  975.         "y": 140,
  976.         "wires": [
  977.             [
  978.                 "a1136f35857b1ea1"
  979.             ]
  980.         ]
  981.     },
  982.     {
  983.         "id": "ad6f7befe5c0e95e",
  984.         "type": "inject",
  985.         "z": "e7f51834ddda9c9d",
  986.         "name": "humidity",
  987.         "props": [
  988.             {
  989.                 "p": "payload"
  990.             },
  991.             {
  992.                 "p": "topic",
  993.                 "vt": "str"
  994.             }
  995.         ],
  996.         "repeat": "",
  997.         "crontab": "",
  998.         "once": false,
  999.         "onceDelay": 0.1,
  1000.         "topic": "",
  1001.         "payload": "55",
  1002.         "payloadType": "num",
  1003.         "x": 300,
  1004.         "y": 360,
  1005.         "wires": [
  1006.             [
  1007.                 "a1136f35857b1ea1"
  1008.             ]
  1009.         ]
  1010.     },
  1011.     {
  1012.         "id": "a1cc8ab767c25662",
  1013.         "type": "change",
  1014.         "z": "e7f51834ddda9c9d",
  1015.         "name": "",
  1016.         "rules": [
  1017.             {
  1018.                 "t": "set",
  1019.                 "p": "payload",
  1020.                 "pt": "msg",
  1021.                 "to": "",
  1022.                 "tot": "str"
  1023.             }
  1024.         ],
  1025.         "action": "",
  1026.         "property": "",
  1027.         "from": "",
  1028.         "to": "",
  1029.         "reg": false,
  1030.         "x": 300,
  1031.         "y": 260,
  1032.         "wires": [
  1033.             []
  1034.         ]
  1035.     },
  1036.     {
  1037.         "id": "98fb73b1e26cb4fc",
  1038.         "type": "debug",
  1039.         "z": "e7f51834ddda9c9d",
  1040.         "name": "debug 22",
  1041.         "active": true,
  1042.         "tosidebar": true,
  1043.         "console": false,
  1044.         "tostatus": false,
  1045.         "complete": "payload",
  1046.         "targetType": "msg",
  1047.         "statusVal": "",
  1048.         "statusType": "auto",
  1049.         "x": 800,
  1050.         "y": 260,
  1051.         "wires": []
  1052.     },
  1053.     {
  1054.         "id": "a1136f35857b1ea1",
  1055.         "type": "http request",
  1056.         "z": "e7f51834ddda9c9d",
  1057.         "name": "",
  1058.         "method": "POST",
  1059.         "ret": "txt",
  1060.         "paytoqs": "ignore",
  1061.         "url": "http://demo.thingsboard.io/api/v1/mcydvP16D9Di4gTu2Bvy/telemetry",
  1062.         "tls": "",
  1063.         "persist": false,
  1064.         "proxy": "",
  1065.         "insecureHTTPParser": false,
  1066.         "authType": "",
  1067.         "senderr": false,
  1068.         "headers": [],
  1069.         "x": 530,
  1070.         "y": 260,
  1071.         "wires": [
  1072.             [
  1073.                 "98fb73b1e26cb4fc"
  1074.             ]
  1075.         ]
  1076.     },
  1077.     {
  1078.         "id": "69c381dcd5603c71",
  1079.         "type": "comment",
  1080.         "z": "e7f51834ddda9c9d",
  1081.         "name": "21BPS1271",
  1082.         "info": "",
  1083.         "x": 570,
  1084.         "y": 120,
  1085.         "wires": []
  1086.     }
  1087. ]
  1088.  
  1089. ////////////////DHT-11 With Ardiuno
  1090. [
  1091.     {
  1092.         "id": "d1fc6d04830a9028",
  1093.         "type": "tab",
  1094.         "label": "Flow 2",
  1095.         "disabled": false,
  1096.         "info": "",
  1097.         "env": []
  1098.     },
  1099.     {
  1100.         "id": "447e5e206fb8f049",
  1101.         "type": "function",
  1102.         "z": "d1fc6d04830a9028",
  1103.         "name": "Humidity and Temperature function",
  1104.         "func": "const m = msg.payload.split(',');\nconst h = {payload: parseFloat(m[0])};\nconst t = {payload: parseFloat(m[1])};\nreturn[h,t];",
  1105.         "outputs": 2,
  1106.         "noerr": 0,
  1107.         "initialize": "",
  1108.         "finalize": "",
  1109.         "libs": [],
  1110.         "x": 480,
  1111.         "y": 300,
  1112.         "wires": [
  1113.             [
  1114.                 "83483caa8b6e472b"
  1115.             ],
  1116.             [
  1117.                 "39e54cf1beb12afb"
  1118.             ]
  1119.         ]
  1120.     },
  1121.     {
  1122.         "id": "83483caa8b6e472b",
  1123.         "type": "ui_gauge",
  1124.         "z": "d1fc6d04830a9028",
  1125.         "name": "Humidity",
  1126.         "group": "3d13e99dd4927efe",
  1127.         "order": 0,
  1128.         "width": 0,
  1129.         "height": 0,
  1130.         "gtype": "gage",
  1131.         "title": "Humidity",
  1132.         "label": "units",
  1133.         "format": "{{value}}%",
  1134.         "min": 0,
  1135.         "max": "100",
  1136.         "colors": [
  1137.             "#00b500",
  1138.             "#e6e600",
  1139.             "#ca3838"
  1140.         ],
  1141.         "seg1": "",
  1142.         "seg2": "",
  1143.         "diff": false,
  1144.         "className": "",
  1145.         "x": 780,
  1146.         "y": 200,
  1147.         "wires": []
  1148.     },
  1149.     {
  1150.         "id": "39e54cf1beb12afb",
  1151.         "type": "ui_gauge",
  1152.         "z": "d1fc6d04830a9028",
  1153.         "name": "Temperature",
  1154.         "group": "c31299b60ed3890c",
  1155.         "order": 0,
  1156.         "width": 0,
  1157.         "height": 0,
  1158.         "gtype": "gage",
  1159.         "title": "Temperature",
  1160.         "label": "units",
  1161.         "format": "{{value}}C",
  1162.         "min": 0,
  1163.         "max": "100",
  1164.         "colors": [
  1165.             "#00b500",
  1166.             "#e6e600",
  1167.             "#ca3838"
  1168.         ],
  1169.         "seg1": "",
  1170.         "seg2": "",
  1171.         "diff": false,
  1172.         "className": "",
  1173.         "x": 790,
  1174.         "y": 360,
  1175.         "wires": []
  1176.     },
  1177.     {
  1178.         "id": "78a26cfd3f985b80",
  1179.         "type": "serial in",
  1180.         "z": "d1fc6d04830a9028",
  1181.         "name": "Arduino",
  1182.         "serial": "f2ed5863f922f026",
  1183.         "x": 150,
  1184.         "y": 300,
  1185.         "wires": [
  1186.             [
  1187.                 "447e5e206fb8f049"
  1188.             ]
  1189.         ]
  1190.     },
  1191.     {
  1192.         "id": "3d13e99dd4927efe",
  1193.         "type": "ui_group",
  1194.         "name": "Humidity",
  1195.         "tab": "cf58f35fa1d14885",
  1196.         "order": 1,
  1197.         "disp": true,
  1198.         "width": "6",
  1199.         "collapse": false,
  1200.         "className": ""
  1201.     },
  1202.     {
  1203.         "id": "c31299b60ed3890c",
  1204.         "type": "ui_group",
  1205.         "name": "Temperature",
  1206.         "tab": "cf58f35fa1d14885",
  1207.         "order": 2,
  1208.         "disp": true,
  1209.         "width": "6",
  1210.         "collapse": false,
  1211.         "className": ""
  1212.     },
  1213.     {
  1214.         "id": "f2ed5863f922f026",
  1215.         "type": "serial-port",
  1216.         "serialport": "",
  1217.         "serialbaud": "9600",
  1218.         "databits": "8",
  1219.         "parity": "none",
  1220.         "stopbits": "1",
  1221.         "waitfor": "",
  1222.         "dtr": "none",
  1223.         "rts": "none",
  1224.         "cts": "none",
  1225.         "dsr": "none",
  1226.         "newline": "\\n",
  1227.         "bin": "false",
  1228.         "out": "char",
  1229.         "addchar": "",
  1230.         "responsetimeout": "10000"
  1231.     },
  1232.     {
  1233.         "id": "cf58f35fa1d14885",
  1234.         "type": "ui_tab",
  1235.         "name": "Tab 1",
  1236.         "icon": "dashboard",
  1237.         "order": 1
  1238.     }
  1239. ]
  1240.  
  1241. ////////Csv population data
  1242. [
  1243.     {
  1244.         "id": "9b6223a33b65eb6d",
  1245.         "type": "tab",
  1246.         "label": "Flow 9",
  1247.         "disabled": false,
  1248.         "info": "",
  1249.         "env": []
  1250.     },
  1251.     {
  1252.         "id": "5d34406f82918504",
  1253.         "type": "change",
  1254.         "z": "9b6223a33b65eb6d",
  1255.         "name": "",
  1256.         "rules": [
  1257.             {
  1258.                 "t": "set",
  1259.                 "p": "payload",
  1260.                 "pt": "msg",
  1261.                 "to": "payload[0]",
  1262.                 "tot": "msg"
  1263.             }
  1264.         ],
  1265.         "action": "",
  1266.         "property": "",
  1267.         "from": "",
  1268.         "to": "",
  1269.         "reg": false,
  1270.         "x": 300,
  1271.         "y": 200,
  1272.         "wires": [
  1273.             [
  1274.                 "79558e456e811c39"
  1275.             ]
  1276.         ]
  1277.     },
  1278.     {
  1279.         "id": "79558e456e811c39",
  1280.         "type": "function",
  1281.         "z": "9b6223a33b65eb6d",
  1282.         "name": "Convert Hex to String",
  1283.         "func": "const hexBuffer = msg.payload;\n\n// Convert the hex buffer to a Buffer object\nconst buffer = Buffer.from(hexBuffer, 'hex');\n\n// Convert the Buffer to a string\nconst string = buffer.toString();\n\n// Assign the string to msg.payload for further processing\nmsg.payload = string;\n\nreturn msg;",
  1284.         "outputs": 1,
  1285.         "noerr": 0,
  1286.         "initialize": "",
  1287.         "finalize": "",
  1288.         "libs": [],
  1289.         "x": 540,
  1290.         "y": 200,
  1291.         "wires": [
  1292.             [
  1293.                 "b542a92b527c643f"
  1294.             ]
  1295.         ]
  1296.     },
  1297.     {
  1298.         "id": "b542a92b527c643f",
  1299.         "type": "csv",
  1300.         "z": "9b6223a33b65eb6d",
  1301.         "name": "",
  1302.         "sep": ",",
  1303.         "hdrin": "",
  1304.         "hdrout": "none",
  1305.         "multi": "mult",
  1306.         "ret": "\\n",
  1307.         "temp": "",
  1308.         "skip": "1",
  1309.         "strings": true,
  1310.         "include_empty_strings": "",
  1311.         "include_null_values": "",
  1312.         "x": 730,
  1313.         "y": 200,
  1314.         "wires": [
  1315.             [
  1316.                 "4c9636f634228f8c"
  1317.             ]
  1318.         ]
  1319.     },
  1320.     {
  1321.         "id": "4c9636f634228f8c",
  1322.         "type": "change",
  1323.         "z": "9b6223a33b65eb6d",
  1324.         "name": "",
  1325.         "rules": [
  1326.             {
  1327.                 "t": "set",
  1328.                 "p": "CSV",
  1329.                 "pt": "flow",
  1330.                 "to": "payload",
  1331.                 "tot": "msg"
  1332.             }
  1333.         ],
  1334.         "action": "",
  1335.         "property": "",
  1336.         "from": "",
  1337.         "to": "",
  1338.         "reg": false,
  1339.         "x": 910,
  1340.         "y": 200,
  1341.         "wires": [
  1342.             [
  1343.                 "0e2d41f2b9f210df"
  1344.             ]
  1345.         ]
  1346.     },
  1347.     {
  1348.         "id": "7b039ba8ceef766e",
  1349.         "type": "debug",
  1350.         "z": "9b6223a33b65eb6d",
  1351.         "name": "debug 4",
  1352.         "active": true,
  1353.         "tosidebar": true,
  1354.         "console": false,
  1355.         "tostatus": false,
  1356.         "complete": "payload",
  1357.         "targetType": "msg",
  1358.         "statusVal": "",
  1359.         "statusType": "auto",
  1360.         "x": 900,
  1361.         "y": 300,
  1362.         "wires": []
  1363.     },
  1364.     {
  1365.         "id": "f281331d8f62750a",
  1366.         "type": "change",
  1367.         "z": "9b6223a33b65eb6d",
  1368.         "name": "",
  1369.         "rules": [
  1370.             {
  1371.                 "t": "set",
  1372.                 "p": "payload",
  1373.                 "pt": "msg",
  1374.                 "to": "CSV",
  1375.                 "tot": "flow"
  1376.             }
  1377.         ],
  1378.         "action": "",
  1379.         "property": "",
  1380.         "from": "",
  1381.         "to": "",
  1382.         "reg": false,
  1383.         "x": 580,
  1384.         "y": 300,
  1385.         "wires": [
  1386.             [
  1387.                 "7b039ba8ceef766e"
  1388.             ]
  1389.         ]
  1390.     },
  1391.     {
  1392.         "id": "b6f54005d2fcfc4f",
  1393.         "type": "comment",
  1394.         "z": "9b6223a33b65eb6d",
  1395.         "name": "21BPS1271 Yash Sanjay Thakare",
  1396.         "info": "",
  1397.         "x": 600,
  1398.         "y": 140,
  1399.         "wires": []
  1400.     },
  1401.     {
  1402.         "id": "3a314d36c78298f5",
  1403.         "type": "ui-button",
  1404.         "z": "9b6223a33b65eb6d",
  1405.         "group": "b73dc5151c8cd587",
  1406.         "name": "",
  1407.         "label": "Click Here for debug window (21BPS1271)",
  1408.         "order": 1,
  1409.         "width": 0,
  1410.         "height": 0,
  1411.         "passthru": false,
  1412.         "tooltip": "",
  1413.         "color": "",
  1414.         "bgcolor": "",
  1415.         "className": "",
  1416.         "icon": "",
  1417.         "payload": "CSV",
  1418.         "payloadType": "flow",
  1419.         "topic": "topic",
  1420.         "topicType": "msg",
  1421.         "x": 210,
  1422.         "y": 300,
  1423.         "wires": [
  1424.             [
  1425.                 "f281331d8f62750a"
  1426.             ]
  1427.         ]
  1428.     },
  1429.     {
  1430.         "id": "0e2d41f2b9f210df",
  1431.         "type": "ui-table",
  1432.         "z": "9b6223a33b65eb6d",
  1433.         "group": "b73dc5151c8cd587",
  1434.         "name": "CSV DashBoard",
  1435.         "label": "text",
  1436.         "order": 2,
  1437.         "width": 0,
  1438.         "height": 0,
  1439.         "maxrows": 0,
  1440.         "autocols": true,
  1441.         "columns": [],
  1442.         "x": 1100,
  1443.         "y": 200,
  1444.         "wires": []
  1445.     },
  1446.     {
  1447.         "id": "4e377f82ce564615",
  1448.         "type": "ui-template",
  1449.         "z": "9b6223a33b65eb6d",
  1450.         "group": "ea5c3d2dcfb3462e",
  1451.         "page": "",
  1452.         "ui": "",
  1453.         "name": "UPLOAD",
  1454.         "order": 0,
  1455.         "width": 0,
  1456.         "height": 0,
  1457.         "head": "",
  1458.         "format": "<v-file-input show-size multiple chips :rules=\"rules\" accept=\".csv\"\n    variant=\"underlined\" label=\"File input\" v-on:change=\"uploadFile\" v-model=\"value\"\n    active-color=\"primary\" @update:modelValue=\"send({payload: value})\" />\n",
  1459.         "storeOutMessages": true,
  1460.         "passthru": true,
  1461.         "resendOnRefresh": true,
  1462.         "templateScope": "local",
  1463.         "className": "",
  1464.         "x": 80,
  1465.         "y": 200,
  1466.         "wires": [
  1467.             [
  1468.                 "5d34406f82918504"
  1469.             ]
  1470.         ]
  1471.     },
  1472.     {
  1473.         "id": "b73dc5151c8cd587",
  1474.         "type": "ui-group",
  1475.         "name": "CSV Table",
  1476.         "page": "76f6b77509a74a17",
  1477.         "width": "12",
  1478.         "height": "1",
  1479.         "order": -1,
  1480.         "showTitle": true,
  1481.         "className": "",
  1482.         "visible": "true",
  1483.         "disabled": "false"
  1484.     },
  1485.     {
  1486.         "id": "ea5c3d2dcfb3462e",
  1487.         "type": "ui-group",
  1488.         "name": "Upload the CSV file",
  1489.         "page": "76f6b77509a74a17",
  1490.         "width": "6",
  1491.         "height": "1",
  1492.         "order": -1,
  1493.         "showTitle": true,
  1494.         "className": "",
  1495.         "visible": "true",
  1496.         "disabled": "false"
  1497.     },
  1498.     {
  1499.         "id": "76f6b77509a74a17",
  1500.         "type": "ui-page",
  1501.         "name": "CSV DashBoard (21BPS1271)",
  1502.         "ui": "2daa43f2ba1b1c32",
  1503.         "path": "/",
  1504.         "icon": "",
  1505.         "layout": "grid",
  1506.         "theme": "c5ed292f3032aa43",
  1507.         "order": -1,
  1508.         "className": "",
  1509.         "visible": false,
  1510.         "disabled": "false"
  1511.     },
  1512.     {
  1513.         "id": "2daa43f2ba1b1c32",
  1514.         "type": "ui-base",
  1515.         "name": "UI Name",
  1516.         "path": "/dashboard"
  1517.     },
  1518.     {
  1519.         "id": "c5ed292f3032aa43",
  1520.         "type": "ui-theme",
  1521.         "name": "Theme Name",
  1522.         "colors": {
  1523.             "surface": "#ffffff",
  1524.             "primary": "#ff9933",
  1525.             "bgPage": "#eeeeee",
  1526.             "groupBg": "#ffffff",
  1527.             "groupOutline": "#cccccc"
  1528.         },
  1529.         "sizes": {
  1530.             "pagePadding": "12px",
  1531.             "groupGap": "12px",
  1532.             "groupBorderRadius": "4px",
  1533.             "widgetGap": "12px"
  1534.         }
  1535.     }
  1536. ]
  1537.  

Editor

You can edit this paste and save as new:


File Description
  • paste1
  • Paste Code
  • 29 Apr-2024
  • 36.65 Kb
You can Share it: