[text] ctc_iot

Viewer

  1. [
  2.     {
  3.         "id": "ea12e138f85f8e48",
  4.         "type": "tab",
  5.         "label": "LightIntensity",
  6.         "disabled": false,
  7.         "info": "",
  8.         "env": []
  9.     },
  10.     {
  11.         "id": "83fdf38bc3f0ef2c",
  12.         "type": "tab",
  13.         "label": "Form Submission",
  14.         "disabled": false,
  15.         "info": "",
  16.         "env": []
  17.     },
  18.     {
  19.         "id": "3f2b7e0cc1803f30",
  20.         "type": "tab",
  21.         "label": "Dht",
  22.         "disabled": false,
  23.         "info": "",
  24.         "env": []
  25.     },
  26.     {
  27.         "id": "a4e8ab4e2a622dc7",
  28.         "type": "tab",
  29.         "label": "thingboard",
  30.         "disabled": false,
  31.         "info": "",
  32.         "env": []
  33.     },
  34.     {
  35.         "id": "85456a0c4d2ec5ab",
  36.         "type": "tab",
  37.         "label": "mail node",
  38.         "disabled": false,
  39.         "info": "",
  40.         "env": []
  41.     },
  42.     {
  43.         "id": "aa7d933d7b662386",
  44.         "type": "ui_tab",
  45.         "name": "LightIntensity",
  46.         "icon": "Gauge",
  47.         "disabled": false,
  48.         "hidden": false
  49.     },
  50.     {
  51.         "id": "6615c31fd874c5bc",
  52.         "type": "ui_base",
  53.         "theme": {
  54.             "name": "theme-light",
  55.             "lightTheme": {
  56.                 "default": "#0094CE",
  57.                 "baseColor": "#0094CE",
  58.                 "baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif",
  59.                 "edited": true,
  60.                 "reset": false
  61.             },
  62.             "darkTheme": {
  63.                 "default": "#097479",
  64.                 "baseColor": "#097479",
  65.                 "baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif",
  66.                 "edited": false
  67.             },
  68.             "customTheme": {
  69.                 "name": "Untitled Theme 1",
  70.                 "default": "#4B7930",
  71.                 "baseColor": "#4B7930",
  72.                 "baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"
  73.             },
  74.             "themeState": {
  75.                 "base-color": {
  76.                     "default": "#0094CE",
  77.                     "value": "#0094CE",
  78.                     "edited": false
  79.                 },
  80.                 "page-titlebar-backgroundColor": {
  81.                     "value": "#0094CE",
  82.                     "edited": false
  83.                 },
  84.                 "page-backgroundColor": {
  85.                     "value": "#fafafa",
  86.                     "edited": false
  87.                 },
  88.                 "page-sidebar-backgroundColor": {
  89.                     "value": "#ffffff",
  90.                     "edited": false
  91.                 },
  92.                 "group-textColor": {
  93.                     "value": "#1bbfff",
  94.                     "edited": false
  95.                 },
  96.                 "group-borderColor": {
  97.                     "value": "#ffffff",
  98.                     "edited": false
  99.                 },
  100.                 "group-backgroundColor": {
  101.                     "value": "#ffffff",
  102.                     "edited": false
  103.                 },
  104.                 "widget-textColor": {
  105.                     "value": "#111111",
  106.                     "edited": false
  107.                 },
  108.                 "widget-backgroundColor": {
  109.                     "value": "#0094ce",
  110.                     "edited": false
  111.                 },
  112.                 "widget-borderColor": {
  113.                     "value": "#ffffff",
  114.                     "edited": false
  115.                 },
  116.                 "base-font": {
  117.                     "value": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"
  118.                 }
  119.             },
  120.             "angularTheme": {
  121.                 "primary": "indigo",
  122.                 "accents": "blue",
  123.                 "warn": "red",
  124.                 "background": "grey",
  125.                 "palette": "light"
  126.             }
  127.         },
  128.         "site": {
  129.             "name": "Node-RED Dashboard",
  130.             "hideToolbar": "false",
  131.             "allowSwipe": "false",
  132.             "lockMenu": "false",
  133.             "allowTempTheme": "true",
  134.             "dateFormat": "DD/MM/YYYY",
  135.             "sizes": {
  136.                 "sx": 48,
  137.                 "sy": 48,
  138.                 "gx": 6,
  139.                 "gy": 6,
  140.                 "cx": 6,
  141.                 "cy": 6,
  142.                 "px": 0,
  143.                 "py": 0
  144.             }
  145.         }
  146.     },
  147.     {
  148.         "id": "99766fa47faddd11",
  149.         "type": "mqtt-broker",
  150.         "name": "Test subject 2",
  151.         "broker": "http://broker.mqttdashboard.com",
  152.         "port": "1883",
  153.         "clientid": "",
  154.         "autoConnect": true,
  155.         "usetls": false,
  156.         "protocolVersion": "4",
  157.         "keepalive": "60",
  158.         "cleansession": true,
  159.         "birthTopic": "",
  160.         "birthQos": "0",
  161.         "birthPayload": "",
  162.         "birthMsg": {},
  163.         "closeTopic": "",
  164.         "closeQos": "0",
  165.         "closePayload": "",
  166.         "closeMsg": {},
  167.         "willTopic": "",
  168.         "willQos": "0",
  169.         "willPayload": "",
  170.         "willMsg": {},
  171.         "userProps": "",
  172.         "sessionExpiry": ""
  173.     },
  174.     {
  175.         "id": "7decdb6850f7e9ee",
  176.         "type": "mqtt-broker",
  177.         "z": "ea12e138f85f8e48",
  178.         "name": "",
  179.         "broker": "http://broker.mqttdashboard.com",
  180.         "port": "8884",
  181.         "clientid": "",
  182.         "autoConnect": true,
  183.         "usetls": false,
  184.         "protocolVersion": "4",
  185.         "keepalive": "60",
  186.         "cleansession": true,
  187.         "birthTopic": "",
  188.         "birthQos": "2",
  189.         "birthRetain": "true",
  190.         "birthPayload": "",
  191.         "birthMsg": {},
  192.         "closeTopic": "",
  193.         "closeQos": "0",
  194.         "closePayload": "",
  195.         "closeMsg": {},
  196.         "willTopic": "",
  197.         "willQos": "0",
  198.         "willPayload": "",
  199.         "willMsg": {},
  200.         "userProps": "",
  201.         "sessionExpiry": ""
  202.     },
  203.     {
  204.         "id": "f910751f5093e7a7",
  205.         "type": "mqtt-broker",
  206.         "name": "",
  207.         "broker": "mqtt-dashboard.com",
  208.         "port": "8884",
  209.         "clientid": "",
  210.         "autoConnect": true,
  211.         "usetls": false,
  212.         "protocolVersion": "4",
  213.         "keepalive": "60",
  214.         "cleansession": true,
  215.         "birthTopic": "",
  216.         "birthQos": "0",
  217.         "birthPayload": "",
  218.         "birthMsg": {},
  219.         "closeTopic": "",
  220.         "closeQos": "0",
  221.         "closePayload": "",
  222.         "closeMsg": {},
  223.         "willTopic": "",
  224.         "willQos": "0",
  225.         "willPayload": "",
  226.         "willMsg": {},
  227.         "userProps": "",
  228.         "sessionExpiry": ""
  229.     },
  230.     {
  231.         "id": "5dcf254848382325",
  232.         "type": "ui_group",
  233.         "name": "Default",
  234.         "tab": "",
  235.         "order": 1,
  236.         "disp": true,
  237.         "width": "6",
  238.         "collapse": false,
  239.         "className": ""
  240.     },
  241.     {
  242.         "id": "1252ccc53e1083b6",
  243.         "type": "ui_group",
  244.         "name": "Group 2",
  245.         "tab": "aa7d933d7b662386",
  246.         "order": 2,
  247.         "disp": true,
  248.         "width": "6",
  249.         "collapse": false,
  250.         "className": ""
  251.     },
  252.     {
  253.         "id": "97033de1acf8d5a8",
  254.         "type": "serial-port",
  255.         "name": "",
  256.         "serialport": "COM3",
  257.         "serialbaud": "9600",
  258.         "databits": "8",
  259.         "parity": "none",
  260.         "stopbits": "1",
  261.         "waitfor": "",
  262.         "dtr": "none",
  263.         "rts": "none",
  264.         "cts": "none",
  265.         "dsr": "none",
  266.         "newline": "\\n",
  267.         "bin": "false",
  268.         "out": "char",
  269.         "addchar": "",
  270.         "responsetimeout": "10000"
  271.     },
  272.     {
  273.         "id": "d0ed0c9aac0382ff",
  274.         "type": "ui_tab",
  275.         "name": "dht11",
  276.         "icon": "dashboard",
  277.         "order": 2,
  278.         "disabled": false,
  279.         "hidden": false
  280.     },
  281.     {
  282.         "id": "0e26a3e29e92ec1e",
  283.         "type": "ui_group",
  284.         "name": "Group 1",
  285.         "tab": "d0ed0c9aac0382ff",
  286.         "order": 1,
  287.         "disp": true,
  288.         "width": "6",
  289.         "collapse": false,
  290.         "className": ""
  291.     },
  292.     {
  293.         "id": "555982c8a327f680",
  294.         "type": "ui_slider",
  295.         "z": "ea12e138f85f8e48",
  296.         "name": "",
  297.         "label": "slider",
  298.         "tooltip": "",
  299.         "group": "1252ccc53e1083b6",
  300.         "order": 1,
  301.         "width": 0,
  302.         "height": 0,
  303.         "passthru": true,
  304.         "outs": "end",
  305.         "topic": "lightintensity",
  306.         "topicType": "str",
  307.         "min": 0,
  308.         "max": "200",
  309.         "step": 1,
  310.         "className": "",
  311.         "x": 210,
  312.         "y": 260,
  313.         "wires": [
  314.             [
  315.                 "cf45cc0792fcac72",
  316.                 "de2de53cd32b8cce",
  317.                 "8fb4445c9d45afcd"
  318.             ]
  319.         ]
  320.     },
  321.     {
  322.         "id": "cf45cc0792fcac72",
  323.         "type": "ui_gauge",
  324.         "z": "ea12e138f85f8e48",
  325.         "name": "",
  326.         "group": "1252ccc53e1083b6",
  327.         "order": 4,
  328.         "width": 0,
  329.         "height": 0,
  330.         "gtype": "gage",
  331.         "title": "gauge",
  332.         "label": "units",
  333.         "format": "{{value}}",
  334.         "min": 0,
  335.         "max": "200",
  336.         "colors": [
  337.             "#00b500",
  338.             "#e6e600",
  339.             "#ca3838"
  340.         ],
  341.         "seg1": "",
  342.         "seg2": "",
  343.         "diff": false,
  344.         "className": "",
  345.         "x": 590,
  346.         "y": 100,
  347.         "wires": []
  348.     },
  349.     {
  350.         "id": "de2de53cd32b8cce",
  351.         "type": "debug",
  352.         "z": "ea12e138f85f8e48",
  353.         "name": "debug 5",
  354.         "active": true,
  355.         "tosidebar": true,
  356.         "console": false,
  357.         "tostatus": false,
  358.         "complete": "payload",
  359.         "targetType": "msg",
  360.         "statusVal": "",
  361.         "statusType": "auto",
  362.         "x": 620,
  363.         "y": 240,
  364.         "wires": []
  365.     },
  366.     {
  367.         "id": "8fb4445c9d45afcd",
  368.         "type": "mqtt out",
  369.         "z": "ea12e138f85f8e48",
  370.         "name": "",
  371.         "topic": "lightintensity",
  372.         "qos": "2",
  373.         "retain": "false",
  374.         "respTopic": "",
  375.         "contentType": "",
  376.         "userProps": "",
  377.         "correl": "",
  378.         "expiry": "",
  379.         "broker": "7decdb6850f7e9ee",
  380.         "x": 630,
  381.         "y": 340,
  382.         "wires": []
  383.     },
  384.     {
  385.         "id": "2015600737bad1f6",
  386.         "type": "http in",
  387.         "z": "83fdf38bc3f0ef2c",
  388.         "name": "IoT Domain",
  389.         "url": "/IotDomain",
  390.         "method": "get",
  391.         "upload": false,
  392.         "swaggerDoc": "",
  393.         "x": 170,
  394.         "y": 80,
  395.         "wires": [
  396.             [
  397.                 "d7348c3d26790ce0"
  398.             ]
  399.         ]
  400.     },
  401.     {
  402.         "id": "d7348c3d26790ce0",
  403.         "type": "function",
  404.         "z": "83fdf38bc3f0ef2c",
  405.         "name": "function 1",
  406.         "func": "msg.url =\"Project\";\nreturn msg;",
  407.         "outputs": 1,
  408.         "noerr": 0,
  409.         "initialize": "",
  410.         "finalize": "",
  411.         "libs": [],
  412.         "x": 360,
  413.         "y": 120,
  414.         "wires": [
  415.             [
  416.                 "0837e3d792da7706"
  417.             ]
  418.         ]
  419.     },
  420.     {
  421.         "id": "0837e3d792da7706",
  422.         "type": "template",
  423.         "z": "83fdf38bc3f0ef2c",
  424.         "name": "Display Panel",
  425.         "field": "payload",
  426.         "fieldType": "msg",
  427.         "format": "handlebars",
  428.         "syntax": "mustache",
  429.         "template": "<!DOCTYPE html>\n\n<html>\n    <head>\n        <h1 style=\"background-color:DodgerBlue;\">IoT Domain</h1>\n    </head>\n    <body>\n<p style=\"background-color:Tomato;\">\n    \n<OL>\n<LI> Enter your Name. \n<LI> Registration Number.\n</OL>\n\n<h4>\n    <a href=\"https://projectmark.com/\"> Project Mark</a>\n    \n    </h4>\n\n<form method=\"post\" action=\"/{{url}}\">\n\n  <label for=\"name\">First name:</label><br>\n  <input type=\"text\" id=\"fname\" name=\"fname\"><br>\n  \n  <label for=\"reg\">Reg No:</label><br>\n  <input type=\"text\" id=\"reg\" name=\"reg\" ><br><br>\n  \n  <label for=\"topic\">Project Title:</label><br>\n  <input type=\"text\" id=\"topic\" name=\"Project Topic\" ><br><br>\n  \n  <input type=\"submit\" value=\"Submit\">\n  \n  <input type=\"reset\" value=\"Reset\" >\n\n</form> \n\n</body>\n</html>",
  430.         "output": "str",
  431.         "x": 560,
  432.         "y": 180,
  433.         "wires": [
  434.             [
  435.                 "aa20c83527ff4912"
  436.             ]
  437.         ]
  438.     },
  439.     {
  440.         "id": "aa20c83527ff4912",
  441.         "type": "http response",
  442.         "z": "83fdf38bc3f0ef2c",
  443.         "name": "IoT Domain",
  444.         "statusCode": "",
  445.         "headers": {},
  446.         "x": 810,
  447.         "y": 200,
  448.         "wires": []
  449.     },
  450.     {
  451.         "id": "3ecdfcb19778ac59",
  452.         "type": "http in",
  453.         "z": "83fdf38bc3f0ef2c",
  454.         "name": "",
  455.         "url": "/Project",
  456.         "method": "post",
  457.         "upload": false,
  458.         "swaggerDoc": "",
  459.         "x": 190,
  460.         "y": 360,
  461.         "wires": [
  462.             [
  463.                 "80c580e87e925add",
  464.                 "e55ac42a672e6525"
  465.             ]
  466.         ]
  467.     },
  468.     {
  469.         "id": "80c580e87e925add",
  470.         "type": "json",
  471.         "z": "83fdf38bc3f0ef2c",
  472.         "name": "",
  473.         "property": "payload",
  474.         "action": "",
  475.         "pretty": false,
  476.         "x": 390,
  477.         "y": 300,
  478.         "wires": [
  479.             [
  480.                 "4e303c65f50c16c0"
  481.             ]
  482.         ]
  483.     },
  484.     {
  485.         "id": "4e303c65f50c16c0",
  486.         "type": "function",
  487.         "z": "83fdf38bc3f0ef2c",
  488.         "name": "function 2",
  489.         "func": "msg.payload = \"Data Submited and is available in debug window; \" + msg.payload;\nreturn msg;",
  490.         "outputs": 1,
  491.         "noerr": 0,
  492.         "initialize": "",
  493.         "finalize": "",
  494.         "libs": [],
  495.         "x": 640,
  496.         "y": 320,
  497.         "wires": [
  498.             [
  499.                 "16b10152b23234a1"
  500.             ]
  501.         ]
  502.     },
  503.     {
  504.         "id": "e55ac42a672e6525",
  505.         "type": "debug",
  506.         "z": "83fdf38bc3f0ef2c",
  507.         "name": "Display",
  508.         "active": true,
  509.         "tosidebar": true,
  510.         "console": false,
  511.         "tostatus": false,
  512.         "complete": "payload",
  513.         "targetType": "msg",
  514.         "statusVal": "",
  515.         "statusType": "auto",
  516.         "x": 560,
  517.         "y": 440,
  518.         "wires": []
  519.     },
  520.     {
  521.         "id": "16b10152b23234a1",
  522.         "type": "http response",
  523.         "z": "83fdf38bc3f0ef2c",
  524.         "name": "Submitted",
  525.         "statusCode": "",
  526.         "headers": {},
  527.         "x": 880,
  528.         "y": 360,
  529.         "wires": []
  530.     },
  531.     {
  532.         "id": "798428370d62d0ac",
  533.         "type": "comment",
  534.         "z": "83fdf38bc3f0ef2c",
  535.         "name": "Form Submission",
  536.         "info": "",
  537.         "x": 260,
  538.         "y": 240,
  539.         "wires": []
  540.     },
  541.     {
  542.         "id": "999bc603abeb80b2",
  543.         "type": "serial in",
  544.         "z": "3f2b7e0cc1803f30",
  545.         "name": "",
  546.         "serial": "97033de1acf8d5a8",
  547.         "x": 110,
  548.         "y": 180,
  549.         "wires": [
  550.             [
  551.                 "b25974283bc2d6f0"
  552.             ]
  553.         ]
  554.     },
  555.     {
  556.         "id": "b25974283bc2d6f0",
  557.         "type": "function",
  558.         "z": "3f2b7e0cc1803f30",
  559.         "name": "function 3",
  560.         "func": "var newmsg={payload:msg.payload.toString()};\nreturn msg;",
  561.         "outputs": 1,
  562.         "noerr": 0,
  563.         "initialize": "",
  564.         "finalize": "",
  565.         "libs": [],
  566.         "x": 280,
  567.         "y": 180,
  568.         "wires": [
  569.             [
  570.                 "e6c0666b4c009a1e"
  571.             ]
  572.         ]
  573.     },
  574.     {
  575.         "id": "e6c0666b4c009a1e",
  576.         "type": "rbe",
  577.         "z": "3f2b7e0cc1803f30",
  578.         "name": "",
  579.         "func": "rbe",
  580.         "gap": "",
  581.         "start": "",
  582.         "inout": "out",
  583.         "septopics": true,
  584.         "property": "payload",
  585.         "topi": "topic",
  586.         "x": 430,
  587.         "y": 180,
  588.         "wires": [
  589.             [
  590.                 "b1d8909a6d24bdc7"
  591.             ]
  592.         ]
  593.     },
  594.     {
  595.         "id": "b1d8909a6d24bdc7",
  596.         "type": "switch",
  597.         "z": "3f2b7e0cc1803f30",
  598.         "name": "",
  599.         "property": "payload",
  600.         "propertyType": "msg",
  601.         "rules": [
  602.             {
  603.                 "t": "eq",
  604.                 "v": "",
  605.                 "vt": "str"
  606.             }
  607.         ],
  608.         "checkall": "true",
  609.         "repair": false,
  610.         "outputs": 1,
  611.         "x": 570,
  612.         "y": 180,
  613.         "wires": [
  614.             [
  615.                 "b51257a5b11dc7ca",
  616.                 "f9a7c80bc59f1377"
  617.             ]
  618.         ]
  619.     },
  620.     {
  621.         "id": "b51257a5b11dc7ca",
  622.         "type": "split",
  623.         "z": "3f2b7e0cc1803f30",
  624.         "name": "",
  625.         "splt": "\\n",
  626.         "spltType": "str",
  627.         "arraySplt": 1,
  628.         "arraySpltType": "len",
  629.         "stream": false,
  630.         "addname": "",
  631.         "x": 710,
  632.         "y": 180,
  633.         "wires": [
  634.             [
  635.                 "c0fb9665b4553a61",
  636.                 "133ff16cfd31a17b"
  637.             ]
  638.         ]
  639.     },
  640.     {
  641.         "id": "f9a7c80bc59f1377",
  642.         "type": "split",
  643.         "z": "3f2b7e0cc1803f30",
  644.         "name": "",
  645.         "splt": "\\n",
  646.         "spltType": "str",
  647.         "arraySplt": 1,
  648.         "arraySpltType": "len",
  649.         "stream": false,
  650.         "addname": "",
  651.         "x": 670,
  652.         "y": 400,
  653.         "wires": [
  654.             [
  655.                 "1e7e8bd14a82f2b7"
  656.             ]
  657.         ]
  658.     },
  659.     {
  660.         "id": "c0fb9665b4553a61",
  661.         "type": "switch",
  662.         "z": "3f2b7e0cc1803f30",
  663.         "name": "",
  664.         "property": "payload",
  665.         "propertyType": "msg",
  666.         "rules": [
  667.             {
  668.                 "t": "eq",
  669.                 "v": "",
  670.                 "vt": "str"
  671.             }
  672.         ],
  673.         "checkall": "true",
  674.         "repair": false,
  675.         "outputs": 1,
  676.         "x": 790,
  677.         "y": 60,
  678.         "wires": [
  679.             [
  680.                 "58de91becb163802"
  681.             ]
  682.         ]
  683.     },
  684.     {
  685.         "id": "58de91becb163802",
  686.         "type": "change",
  687.         "z": "3f2b7e0cc1803f30",
  688.         "name": "",
  689.         "rules": [
  690.             {
  691.                 "t": "set",
  692.                 "p": "payload",
  693.                 "pt": "msg",
  694.                 "to": "",
  695.                 "tot": "str"
  696.             }
  697.         ],
  698.         "action": "",
  699.         "property": "",
  700.         "from": "",
  701.         "to": "",
  702.         "reg": false,
  703.         "x": 980,
  704.         "y": 60,
  705.         "wires": [
  706.             [
  707.                 "acf472dc218b9a7d"
  708.             ]
  709.         ]
  710.     },
  711.     {
  712.         "id": "acf472dc218b9a7d",
  713.         "type": "debug",
  714.         "z": "3f2b7e0cc1803f30",
  715.         "name": "debug 7",
  716.         "active": true,
  717.         "tosidebar": true,
  718.         "console": false,
  719.         "tostatus": false,
  720.         "complete": "false",
  721.         "statusVal": "",
  722.         "statusType": "auto",
  723.         "x": 1180,
  724.         "y": 60,
  725.         "wires": []
  726.     },
  727.     {
  728.         "id": "6689dbf2b2a341c6",
  729.         "type": "ui_gauge",
  730.         "z": "3f2b7e0cc1803f30",
  731.         "name": "",
  732.         "group": "0e26a3e29e92ec1e",
  733.         "order": 1,
  734.         "width": 0,
  735.         "height": 0,
  736.         "gtype": "gage",
  737.         "title": "gauge",
  738.         "label": "units",
  739.         "format": "{{value}}",
  740.         "min": 0,
  741.         "max": 10,
  742.         "colors": [
  743.             "#00b500",
  744.             "#e6e600",
  745.             "#ca3838"
  746.         ],
  747.         "seg1": "",
  748.         "seg2": "",
  749.         "diff": false,
  750.         "className": "",
  751.         "x": 970,
  752.         "y": 120,
  753.         "wires": []
  754.     },
  755.     {
  756.         "id": "ed13ad9c95f21bf0",
  757.         "type": "ui_chart",
  758.         "z": "3f2b7e0cc1803f30",
  759.         "name": "",
  760.         "group": "0e26a3e29e92ec1e",
  761.         "order": 2,
  762.         "width": 0,
  763.         "height": 0,
  764.         "label": "chart",
  765.         "chartType": "line",
  766.         "legend": "false",
  767.         "xformat": "HH:mm:ss",
  768.         "interpolate": "linear",
  769.         "nodata": "",
  770.         "dot": false,
  771.         "ymin": "",
  772.         "ymax": "",
  773.         "removeOlder": 1,
  774.         "removeOlderPoints": "",
  775.         "removeOlderUnit": "3600",
  776.         "cutout": 0,
  777.         "useOneColor": false,
  778.         "useUTC": false,
  779.         "colors": [
  780.             "#1f77b4",
  781.             "#aec7e8",
  782.             "#ff7f0e",
  783.             "#2ca02c",
  784.             "#98df8a",
  785.             "#d62728",
  786.             "#ff9896",
  787.             "#9467bd",
  788.             "#c5b0d5"
  789.         ],
  790.         "outputs": 1,
  791.         "useDifferentColor": false,
  792.         "className": "",
  793.         "x": 1010,
  794.         "y": 160,
  795.         "wires": [
  796.             []
  797.         ]
  798.     },
  799.     {
  800.         "id": "7ae5f302f0a4f20f",
  801.         "type": "debug",
  802.         "z": "3f2b7e0cc1803f30",
  803.         "name": "debug 8",
  804.         "active": true,
  805.         "tosidebar": true,
  806.         "console": false,
  807.         "tostatus": false,
  808.         "complete": "false",
  809.         "statusVal": "",
  810.         "statusType": "auto",
  811.         "x": 1080,
  812.         "y": 220,
  813.         "wires": []
  814.     },
  815.     {
  816.         "id": "529ff34e4122124b",
  817.         "type": "debug",
  818.         "z": "3f2b7e0cc1803f30",
  819.         "name": "debug 9",
  820.         "active": true,
  821.         "tosidebar": true,
  822.         "console": false,
  823.         "tostatus": false,
  824.         "complete": "false",
  825.         "statusVal": "",
  826.         "statusType": "auto",
  827.         "x": 920,
  828.         "y": 480,
  829.         "wires": []
  830.     },
  831.     {
  832.         "id": "4f78ca4d70408dd2",
  833.         "type": "ui_gauge",
  834.         "z": "3f2b7e0cc1803f30",
  835.         "name": "",
  836.         "group": "0e26a3e29e92ec1e",
  837.         "order": 3,
  838.         "width": 0,
  839.         "height": 0,
  840.         "gtype": "gage",
  841.         "title": "gauge",
  842.         "label": "units",
  843.         "format": "{{value}}",
  844.         "min": 0,
  845.         "max": "50",
  846.         "colors": [
  847.             "#00b500",
  848.             "#e6e600",
  849.             "#ca3838"
  850.         ],
  851.         "seg1": "",
  852.         "seg2": "",
  853.         "diff": false,
  854.         "className": "",
  855.         "x": 890,
  856.         "y": 360,
  857.         "wires": []
  858.     },
  859.     {
  860.         "id": "b34fbfedb9a9c326",
  861.         "type": "ui_chart",
  862.         "z": "3f2b7e0cc1803f30",
  863.         "name": "",
  864.         "group": "0e26a3e29e92ec1e",
  865.         "order": 4,
  866.         "width": 0,
  867.         "height": 0,
  868.         "label": "chart",
  869.         "chartType": "line",
  870.         "legend": "false",
  871.         "xformat": "HH:mm:ss",
  872.         "interpolate": "linear",
  873.         "nodata": "",
  874.         "dot": false,
  875.         "ymin": "",
  876.         "ymax": "",
  877.         "removeOlder": 1,
  878.         "removeOlderPoints": "",
  879.         "removeOlderUnit": "3600",
  880.         "cutout": 0,
  881.         "useOneColor": false,
  882.         "useUTC": false,
  883.         "colors": [
  884.             "#1f77b4",
  885.             "#aec7e8",
  886.             "#ff7f0e",
  887.             "#2ca02c",
  888.             "#98df8a",
  889.             "#d62728",
  890.             "#ff9896",
  891.             "#9467bd",
  892.             "#c5b0d5"
  893.         ],
  894.         "outputs": 1,
  895.         "useDifferentColor": false,
  896.         "className": "",
  897.         "x": 930,
  898.         "y": 420,
  899.         "wires": [
  900.             []
  901.         ]
  902.     },
  903.     {
  904.         "id": "133ff16cfd31a17b",
  905.         "type": "ui_slider",
  906.         "z": "3f2b7e0cc1803f30",
  907.         "name": "",
  908.         "label": "slider",
  909.         "tooltip": "",
  910.         "group": "1252ccc53e1083b6",
  911.         "order": 3,
  912.         "width": 0,
  913.         "height": 0,
  914.         "passthru": true,
  915.         "outs": "end",
  916.         "topic": "topic",
  917.         "topicType": "msg",
  918.         "min": 0,
  919.         "max": "80",
  920.         "step": 1,
  921.         "className": "",
  922.         "x": 850,
  923.         "y": 200,
  924.         "wires": [
  925.             [
  926.                 "6689dbf2b2a341c6",
  927.                 "ed13ad9c95f21bf0",
  928.                 "7ae5f302f0a4f20f"
  929.             ]
  930.         ]
  931.     },
  932.     {
  933.         "id": "1e7e8bd14a82f2b7",
  934.         "type": "ui_slider",
  935.         "z": "3f2b7e0cc1803f30",
  936.         "name": "",
  937.         "label": "slider",
  938.         "tooltip": "",
  939.         "group": "1252ccc53e1083b6",
  940.         "order": 2,
  941.         "width": 0,
  942.         "height": 0,
  943.         "passthru": true,
  944.         "outs": "end",
  945.         "topic": "topic",
  946.         "topicType": "msg",
  947.         "min": 0,
  948.         "max": "50",
  949.         "step": 1,
  950.         "className": "",
  951.         "x": 750,
  952.         "y": 460,
  953.         "wires": [
  954.             [
  955.                 "4f78ca4d70408dd2",
  956.                 "b34fbfedb9a9c326",
  957.                 "529ff34e4122124b"
  958.             ]
  959.         ]
  960.     },
  961.     {
  962.         "id": "610a68de1335cbbc",
  963.         "type": "inject",
  964.         "z": "a4e8ab4e2a622dc7",
  965.         "name": "",
  966.         "props": [
  967.             {
  968.                 "p": "payload"
  969.             },
  970.             {
  971.                 "p": "topic",
  972.                 "vt": "str"
  973.             }
  974.         ],
  975.         "repeat": "",
  976.         "crontab": "",
  977.         "once": false,
  978.         "onceDelay": 0.1,
  979.         "topic": "",
  980.         "payload": "{\"CO2\":900}",
  981.         "payloadType": "json",
  982.         "x": 350,
  983.         "y": 260,
  984.         "wires": [
  985.             [
  986.                 "d1f33282893cca32"
  987.             ]
  988.         ]
  989.     },
  990.     {
  991.         "id": "d1f33282893cca32",
  992.         "type": "http request",
  993.         "z": "a4e8ab4e2a622dc7",
  994.         "name": "",
  995.         "method": "POST",
  996.         "ret": "txt",
  997.         "paytoqs": "ignore",
  998.         "url": "http://thingsboard.cloud/api/v1/aQXjaKuwgD8ZdxISvYfh/telemetry",
  999.         "tls": "",
  1000.         "persist": false,
  1001.         "proxy": "",
  1002.         "insecureHTTPParser": false,
  1003.         "authType": "",
  1004.         "senderr": false,
  1005.         "headers": [],
  1006.         "x": 590,
  1007.         "y": 180,
  1008.         "wires": [
  1009.             [
  1010.                 "3b951ada9400db47"
  1011.             ]
  1012.         ]
  1013.     },
  1014.     {
  1015.         "id": "3b951ada9400db47",
  1016.         "type": "debug",
  1017.         "z": "a4e8ab4e2a622dc7",
  1018.         "name": "debug 10",
  1019.         "active": true,
  1020.         "tosidebar": true,
  1021.         "console": false,
  1022.         "tostatus": false,
  1023.         "complete": "payload",
  1024.         "targetType": "msg",
  1025.         "statusVal": "",
  1026.         "statusType": "auto",
  1027.         "x": 860,
  1028.         "y": 260,
  1029.         "wires": []
  1030.     },
  1031.     {
  1032.         "id": "d98becf3ae69d977",
  1033.         "type": "e-mail",
  1034.         "z": "85456a0c4d2ec5ab",
  1035.         "server": "smtp.gmail.com",
  1036.         "port": "465",
  1037.         "authtype": "BASIC",
  1038.         "saslformat": true,
  1039.         "token": "oauth2Response.access_token",
  1040.         "secure": true,
  1041.         "tls": true,
  1042.         "name": "[email protected]",
  1043.         "dname": "",
  1044.         "x": 760,
  1045.         "y": 460,
  1046.         "wires": []
  1047.     },
  1048.     {
  1049.         "id": "a0e361c10e12c033",
  1050.         "type": "debug",
  1051.         "z": "85456a0c4d2ec5ab",
  1052.         "name": "debug 8",
  1053.         "active": true,
  1054.         "tosidebar": true,
  1055.         "console": false,
  1056.         "tostatus": false,
  1057.         "complete": "payload",
  1058.         "targetType": "msg",
  1059.         "statusVal": "",
  1060.         "statusType": "auto",
  1061.         "x": 700,
  1062.         "y": 280,
  1063.         "wires": []
  1064.     },
  1065.     {
  1066.         "id": "01308e7a9a7d49da",
  1067.         "type": "inject",
  1068.         "z": "85456a0c4d2ec5ab",
  1069.         "name": "18",
  1070.         "props": [
  1071.             {
  1072.                 "p": "payload"
  1073.             },
  1074.             {
  1075.                 "p": "topic",
  1076.                 "v": "18",
  1077.                 "vt": "num"
  1078.             }
  1079.         ],
  1080.         "repeat": "",
  1081.         "crontab": "",
  1082.         "once": false,
  1083.         "onceDelay": 0.1,
  1084.         "topic": "",
  1085.         "payload": "",
  1086.         "payloadType": "date",
  1087.         "x": 170,
  1088.         "y": 240,
  1089.         "wires": [
  1090.             [
  1091.                 "da356de5d99b8aab"
  1092.             ]
  1093.         ]
  1094.     },
  1095.     {
  1096.         "id": "9d8280eb46f69d6f",
  1097.         "type": "inject",
  1098.         "z": "85456a0c4d2ec5ab",
  1099.         "name": "20",
  1100.         "props": [
  1101.             {
  1102.                 "p": "payload"
  1103.             },
  1104.             {
  1105.                 "p": "topic",
  1106.                 "vt": "str"
  1107.             }
  1108.         ],
  1109.         "repeat": "",
  1110.         "crontab": "",
  1111.         "once": false,
  1112.         "onceDelay": 0.1,
  1113.         "topic": "",
  1114.         "payload": "",
  1115.         "payloadType": "date",
  1116.         "x": 170,
  1117.         "y": 320,
  1118.         "wires": [
  1119.             [
  1120.                 "da356de5d99b8aab"
  1121.             ]
  1122.         ]
  1123.     },
  1124.     {
  1125.         "id": "33b0d0e155c9b3e8",
  1126.         "type": "inject",
  1127.         "z": "85456a0c4d2ec5ab",
  1128.         "name": "22",
  1129.         "props": [
  1130.             {
  1131.                 "p": "payload"
  1132.             },
  1133.             {
  1134.                 "p": "topic",
  1135.                 "vt": "str"
  1136.             }
  1137.         ],
  1138.         "repeat": "",
  1139.         "crontab": "",
  1140.         "once": false,
  1141.         "onceDelay": 0.1,
  1142.         "topic": "",
  1143.         "payload": "",
  1144.         "payloadType": "date",
  1145.         "x": 170,
  1146.         "y": 420,
  1147.         "wires": [
  1148.             [
  1149.                 "da356de5d99b8aab"
  1150.             ]
  1151.         ]
  1152.     },
  1153.     {
  1154.         "id": "da356de5d99b8aab",
  1155.         "type": "function",
  1156.         "z": "85456a0c4d2ec5ab",
  1157.         "name": "function 1",
  1158.         "func": "var payload=msg.payload;\nvar alarmFlag= context.get(\"alarm_flag\");\nif (typeof alarmFlag===\"undefined\") alarmFlag=false;\nif (payload>20 && !alarmFlag){\n    alarmFlag=true;\n    msg.alarm=1;\n    context.set(\"alarm_flag\",alarmFlag);\n    return msg;\n}\nif (payload < -20 && alarmFlag){\n    alarmFlag=false;\n    msg.alarm=0;\n    context.set(\"alarm_flag\",alarmFlag);\n    return msg;\n}",
  1159.         "outputs": 1,
  1160.         "noerr": 0,
  1161.         "initialize": "",
  1162.         "finalize": "",
  1163.         "libs": [],
  1164.         "x": 360,
  1165.         "y": 280,
  1166.         "wires": [
  1167.             [
  1168.                 "a0e361c10e12c033",
  1169.                 "dc3f0ad486f1df5e"
  1170.             ]
  1171.         ]
  1172.     },
  1173.     {
  1174.         "id": "dc3f0ad486f1df5e",
  1175.         "type": "function",
  1176.         "z": "85456a0c4d2ec5ab",
  1177.         "name": "function 2",
  1178.         "func": "var temp=msg.payload;\nmsg.to=\"[email protected]\";\nmsg.from =\"[email protected]\";\nvar d=new Date();\nvar message=\"\";\nif (msg.alarm===1){\n    msg.topic=\"High Tempreature Alarm\";\n    message=\"High Tempreature Alarm temp= \";\n}\nelse if(msg.alarm===0){\n    message=\"Tempreature now normal temp =\";\n    msg.topic=\"Tempreature Alarm Reset\";\n}\nmsg.payload=\"time:\"+d+\" \"+message+temp;\nreturn msg;",
  1179.         "outputs": 1,
  1180.         "noerr": 0,
  1181.         "initialize": "",
  1182.         "finalize": "",
  1183.         "libs": [],
  1184.         "x": 520,
  1185.         "y": 360,
  1186.         "wires": [
  1187.             [
  1188.                 "a0e361c10e12c033",
  1189.                 "d98becf3ae69d977"
  1190.             ]
  1191.         ]
  1192.     }
  1193. ]

Editor

You can edit this paste and save as new:


File Description
  • ctc_iot
  • Paste Code
  • 23 Apr-2024
  • 30.38 Kb
You can Share it: