- [
- {
- "id": "ea12e138f85f8e48",
- "type": "tab",
- "label": "LightIntensity",
- "disabled": false,
- "info": "",
- "env": []
- },
- {
- "id": "83fdf38bc3f0ef2c",
- "type": "tab",
- "label": "Form Submission",
- "disabled": false,
- "info": "",
- "env": []
- },
- {
- "id": "3f2b7e0cc1803f30",
- "type": "tab",
- "label": "Dht",
- "disabled": false,
- "info": "",
- "env": []
- },
- {
- "id": "a4e8ab4e2a622dc7",
- "type": "tab",
- "label": "thingboard",
- "disabled": false,
- "info": "",
- "env": []
- },
- {
- "id": "85456a0c4d2ec5ab",
- "type": "tab",
- "label": "mail node",
- "disabled": false,
- "info": "",
- "env": []
- },
- {
- "id": "aa7d933d7b662386",
- "type": "ui_tab",
- "name": "LightIntensity",
- "icon": "Gauge",
- "disabled": false,
- "hidden": false
- },
- {
- "id": "6615c31fd874c5bc",
- "type": "ui_base",
- "theme": {
- "name": "theme-light",
- "lightTheme": {
- "default": "#0094CE",
- "baseColor": "#0094CE",
- "baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif",
- "edited": true,
- "reset": false
- },
- "darkTheme": {
- "default": "#097479",
- "baseColor": "#097479",
- "baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif",
- "edited": false
- },
- "customTheme": {
- "name": "Untitled Theme 1",
- "default": "#4B7930",
- "baseColor": "#4B7930",
- "baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"
- },
- "themeState": {
- "base-color": {
- "default": "#0094CE",
- "value": "#0094CE",
- "edited": false
- },
- "page-titlebar-backgroundColor": {
- "value": "#0094CE",
- "edited": false
- },
- "page-backgroundColor": {
- "value": "#fafafa",
- "edited": false
- },
- "page-sidebar-backgroundColor": {
- "value": "#ffffff",
- "edited": false
- },
- "group-textColor": {
- "value": "#1bbfff",
- "edited": false
- },
- "group-borderColor": {
- "value": "#ffffff",
- "edited": false
- },
- "group-backgroundColor": {
- "value": "#ffffff",
- "edited": false
- },
- "widget-textColor": {
- "value": "#111111",
- "edited": false
- },
- "widget-backgroundColor": {
- "value": "#0094ce",
- "edited": false
- },
- "widget-borderColor": {
- "value": "#ffffff",
- "edited": false
- },
- "base-font": {
- "value": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"
- }
- },
- "angularTheme": {
- "primary": "indigo",
- "accents": "blue",
- "warn": "red",
- "background": "grey",
- "palette": "light"
- }
- },
- "site": {
- "name": "Node-RED Dashboard",
- "hideToolbar": "false",
- "allowSwipe": "false",
- "lockMenu": "false",
- "allowTempTheme": "true",
- "dateFormat": "DD/MM/YYYY",
- "sizes": {
- "sx": 48,
- "sy": 48,
- "gx": 6,
- "gy": 6,
- "cx": 6,
- "cy": 6,
- "px": 0,
- "py": 0
- }
- }
- },
- {
- "id": "99766fa47faddd11",
- "type": "mqtt-broker",
- "name": "Test subject 2",
- "broker": "http://broker.mqttdashboard.com",
- "port": "1883",
- "clientid": "",
- "autoConnect": true,
- "usetls": false,
- "protocolVersion": "4",
- "keepalive": "60",
- "cleansession": true,
- "birthTopic": "",
- "birthQos": "0",
- "birthPayload": "",
- "birthMsg": {},
- "closeTopic": "",
- "closeQos": "0",
- "closePayload": "",
- "closeMsg": {},
- "willTopic": "",
- "willQos": "0",
- "willPayload": "",
- "willMsg": {},
- "userProps": "",
- "sessionExpiry": ""
- },
- {
- "id": "7decdb6850f7e9ee",
- "type": "mqtt-broker",
- "z": "ea12e138f85f8e48",
- "name": "",
- "broker": "http://broker.mqttdashboard.com",
- "port": "8884",
- "clientid": "",
- "autoConnect": true,
- "usetls": false,
- "protocolVersion": "4",
- "keepalive": "60",
- "cleansession": true,
- "birthTopic": "",
- "birthQos": "2",
- "birthRetain": "true",
- "birthPayload": "",
- "birthMsg": {},
- "closeTopic": "",
- "closeQos": "0",
- "closePayload": "",
- "closeMsg": {},
- "willTopic": "",
- "willQos": "0",
- "willPayload": "",
- "willMsg": {},
- "userProps": "",
- "sessionExpiry": ""
- },
- {
- "id": "f910751f5093e7a7",
- "type": "mqtt-broker",
- "name": "",
- "broker": "mqtt-dashboard.com",
- "port": "8884",
- "clientid": "",
- "autoConnect": true,
- "usetls": false,
- "protocolVersion": "4",
- "keepalive": "60",
- "cleansession": true,
- "birthTopic": "",
- "birthQos": "0",
- "birthPayload": "",
- "birthMsg": {},
- "closeTopic": "",
- "closeQos": "0",
- "closePayload": "",
- "closeMsg": {},
- "willTopic": "",
- "willQos": "0",
- "willPayload": "",
- "willMsg": {},
- "userProps": "",
- "sessionExpiry": ""
- },
- {
- "id": "5dcf254848382325",
- "type": "ui_group",
- "name": "Default",
- "tab": "",
- "order": 1,
- "disp": true,
- "width": "6",
- "collapse": false,
- "className": ""
- },
- {
- "id": "1252ccc53e1083b6",
- "type": "ui_group",
- "name": "Group 2",
- "tab": "aa7d933d7b662386",
- "order": 2,
- "disp": true,
- "width": "6",
- "collapse": false,
- "className": ""
- },
- {
- "id": "97033de1acf8d5a8",
- "type": "serial-port",
- "name": "",
- "serialport": "COM3",
- "serialbaud": "9600",
- "databits": "8",
- "parity": "none",
- "stopbits": "1",
- "waitfor": "",
- "dtr": "none",
- "rts": "none",
- "cts": "none",
- "dsr": "none",
- "newline": "\\n",
- "bin": "false",
- "out": "char",
- "addchar": "",
- "responsetimeout": "10000"
- },
- {
- "id": "d0ed0c9aac0382ff",
- "type": "ui_tab",
- "name": "dht11",
- "icon": "dashboard",
- "order": 2,
- "disabled": false,
- "hidden": false
- },
- {
- "id": "0e26a3e29e92ec1e",
- "type": "ui_group",
- "name": "Group 1",
- "tab": "d0ed0c9aac0382ff",
- "order": 1,
- "disp": true,
- "width": "6",
- "collapse": false,
- "className": ""
- },
- {
- "id": "555982c8a327f680",
- "type": "ui_slider",
- "z": "ea12e138f85f8e48",
- "name": "",
- "label": "slider",
- "tooltip": "",
- "group": "1252ccc53e1083b6",
- "order": 1,
- "width": 0,
- "height": 0,
- "passthru": true,
- "outs": "end",
- "topic": "lightintensity",
- "topicType": "str",
- "min": 0,
- "max": "200",
- "step": 1,
- "className": "",
- "x": 210,
- "y": 260,
- "wires": [
- [
- "cf45cc0792fcac72",
- "de2de53cd32b8cce",
- "8fb4445c9d45afcd"
- ]
- ]
- },
- {
- "id": "cf45cc0792fcac72",
- "type": "ui_gauge",
- "z": "ea12e138f85f8e48",
- "name": "",
- "group": "1252ccc53e1083b6",
- "order": 4,
- "width": 0,
- "height": 0,
- "gtype": "gage",
- "title": "gauge",
- "label": "units",
- "format": "{{value}}",
- "min": 0,
- "max": "200",
- "colors": [
- "#00b500",
- "#e6e600",
- "#ca3838"
- ],
- "seg1": "",
- "seg2": "",
- "diff": false,
- "className": "",
- "x": 590,
- "y": 100,
- "wires": []
- },
- {
- "id": "de2de53cd32b8cce",
- "type": "debug",
- "z": "ea12e138f85f8e48",
- "name": "debug 5",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "payload",
- "targetType": "msg",
- "statusVal": "",
- "statusType": "auto",
- "x": 620,
- "y": 240,
- "wires": []
- },
- {
- "id": "8fb4445c9d45afcd",
- "type": "mqtt out",
- "z": "ea12e138f85f8e48",
- "name": "",
- "topic": "lightintensity",
- "qos": "2",
- "retain": "false",
- "respTopic": "",
- "contentType": "",
- "userProps": "",
- "correl": "",
- "expiry": "",
- "broker": "7decdb6850f7e9ee",
- "x": 630,
- "y": 340,
- "wires": []
- },
- {
- "id": "2015600737bad1f6",
- "type": "http in",
- "z": "83fdf38bc3f0ef2c",
- "name": "IoT Domain",
- "url": "/IotDomain",
- "method": "get",
- "upload": false,
- "swaggerDoc": "",
- "x": 170,
- "y": 80,
- "wires": [
- [
- "d7348c3d26790ce0"
- ]
- ]
- },
- {
- "id": "d7348c3d26790ce0",
- "type": "function",
- "z": "83fdf38bc3f0ef2c",
- "name": "function 1",
- "func": "msg.url =\"Project\";\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 360,
- "y": 120,
- "wires": [
- [
- "0837e3d792da7706"
- ]
- ]
- },
- {
- "id": "0837e3d792da7706",
- "type": "template",
- "z": "83fdf38bc3f0ef2c",
- "name": "Display Panel",
- "field": "payload",
- "fieldType": "msg",
- "format": "handlebars",
- "syntax": "mustache",
- "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>",
- "output": "str",
- "x": 560,
- "y": 180,
- "wires": [
- [
- "aa20c83527ff4912"
- ]
- ]
- },
- {
- "id": "aa20c83527ff4912",
- "type": "http response",
- "z": "83fdf38bc3f0ef2c",
- "name": "IoT Domain",
- "statusCode": "",
- "headers": {},
- "x": 810,
- "y": 200,
- "wires": []
- },
- {
- "id": "3ecdfcb19778ac59",
- "type": "http in",
- "z": "83fdf38bc3f0ef2c",
- "name": "",
- "url": "/Project",
- "method": "post",
- "upload": false,
- "swaggerDoc": "",
- "x": 190,
- "y": 360,
- "wires": [
- [
- "80c580e87e925add",
- "e55ac42a672e6525"
- ]
- ]
- },
- {
- "id": "80c580e87e925add",
- "type": "json",
- "z": "83fdf38bc3f0ef2c",
- "name": "",
- "property": "payload",
- "action": "",
- "pretty": false,
- "x": 390,
- "y": 300,
- "wires": [
- [
- "4e303c65f50c16c0"
- ]
- ]
- },
- {
- "id": "4e303c65f50c16c0",
- "type": "function",
- "z": "83fdf38bc3f0ef2c",
- "name": "function 2",
- "func": "msg.payload = \"Data Submited and is available in debug window; \" + msg.payload;\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 640,
- "y": 320,
- "wires": [
- [
- "16b10152b23234a1"
- ]
- ]
- },
- {
- "id": "e55ac42a672e6525",
- "type": "debug",
- "z": "83fdf38bc3f0ef2c",
- "name": "Display",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "payload",
- "targetType": "msg",
- "statusVal": "",
- "statusType": "auto",
- "x": 560,
- "y": 440,
- "wires": []
- },
- {
- "id": "16b10152b23234a1",
- "type": "http response",
- "z": "83fdf38bc3f0ef2c",
- "name": "Submitted",
- "statusCode": "",
- "headers": {},
- "x": 880,
- "y": 360,
- "wires": []
- },
- {
- "id": "798428370d62d0ac",
- "type": "comment",
- "z": "83fdf38bc3f0ef2c",
- "name": "Form Submission",
- "info": "",
- "x": 260,
- "y": 240,
- "wires": []
- },
- {
- "id": "999bc603abeb80b2",
- "type": "serial in",
- "z": "3f2b7e0cc1803f30",
- "name": "",
- "serial": "97033de1acf8d5a8",
- "x": 110,
- "y": 180,
- "wires": [
- [
- "b25974283bc2d6f0"
- ]
- ]
- },
- {
- "id": "b25974283bc2d6f0",
- "type": "function",
- "z": "3f2b7e0cc1803f30",
- "name": "function 3",
- "func": "var newmsg={payload:msg.payload.toString()};\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 280,
- "y": 180,
- "wires": [
- [
- "e6c0666b4c009a1e"
- ]
- ]
- },
- {
- "id": "e6c0666b4c009a1e",
- "type": "rbe",
- "z": "3f2b7e0cc1803f30",
- "name": "",
- "func": "rbe",
- "gap": "",
- "start": "",
- "inout": "out",
- "septopics": true,
- "property": "payload",
- "topi": "topic",
- "x": 430,
- "y": 180,
- "wires": [
- [
- "b1d8909a6d24bdc7"
- ]
- ]
- },
- {
- "id": "b1d8909a6d24bdc7",
- "type": "switch",
- "z": "3f2b7e0cc1803f30",
- "name": "",
- "property": "payload",
- "propertyType": "msg",
- "rules": [
- {
- "t": "eq",
- "v": "",
- "vt": "str"
- }
- ],
- "checkall": "true",
- "repair": false,
- "outputs": 1,
- "x": 570,
- "y": 180,
- "wires": [
- [
- "b51257a5b11dc7ca",
- "f9a7c80bc59f1377"
- ]
- ]
- },
- {
- "id": "b51257a5b11dc7ca",
- "type": "split",
- "z": "3f2b7e0cc1803f30",
- "name": "",
- "splt": "\\n",
- "spltType": "str",
- "arraySplt": 1,
- "arraySpltType": "len",
- "stream": false,
- "addname": "",
- "x": 710,
- "y": 180,
- "wires": [
- [
- "c0fb9665b4553a61",
- "133ff16cfd31a17b"
- ]
- ]
- },
- {
- "id": "f9a7c80bc59f1377",
- "type": "split",
- "z": "3f2b7e0cc1803f30",
- "name": "",
- "splt": "\\n",
- "spltType": "str",
- "arraySplt": 1,
- "arraySpltType": "len",
- "stream": false,
- "addname": "",
- "x": 670,
- "y": 400,
- "wires": [
- [
- "1e7e8bd14a82f2b7"
- ]
- ]
- },
- {
- "id": "c0fb9665b4553a61",
- "type": "switch",
- "z": "3f2b7e0cc1803f30",
- "name": "",
- "property": "payload",
- "propertyType": "msg",
- "rules": [
- {
- "t": "eq",
- "v": "",
- "vt": "str"
- }
- ],
- "checkall": "true",
- "repair": false,
- "outputs": 1,
- "x": 790,
- "y": 60,
- "wires": [
- [
- "58de91becb163802"
- ]
- ]
- },
- {
- "id": "58de91becb163802",
- "type": "change",
- "z": "3f2b7e0cc1803f30",
- "name": "",
- "rules": [
- {
- "t": "set",
- "p": "payload",
- "pt": "msg",
- "to": "",
- "tot": "str"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 980,
- "y": 60,
- "wires": [
- [
- "acf472dc218b9a7d"
- ]
- ]
- },
- {
- "id": "acf472dc218b9a7d",
- "type": "debug",
- "z": "3f2b7e0cc1803f30",
- "name": "debug 7",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "statusVal": "",
- "statusType": "auto",
- "x": 1180,
- "y": 60,
- "wires": []
- },
- {
- "id": "6689dbf2b2a341c6",
- "type": "ui_gauge",
- "z": "3f2b7e0cc1803f30",
- "name": "",
- "group": "0e26a3e29e92ec1e",
- "order": 1,
- "width": 0,
- "height": 0,
- "gtype": "gage",
- "title": "gauge",
- "label": "units",
- "format": "{{value}}",
- "min": 0,
- "max": 10,
- "colors": [
- "#00b500",
- "#e6e600",
- "#ca3838"
- ],
- "seg1": "",
- "seg2": "",
- "diff": false,
- "className": "",
- "x": 970,
- "y": 120,
- "wires": []
- },
- {
- "id": "ed13ad9c95f21bf0",
- "type": "ui_chart",
- "z": "3f2b7e0cc1803f30",
- "name": "",
- "group": "0e26a3e29e92ec1e",
- "order": 2,
- "width": 0,
- "height": 0,
- "label": "chart",
- "chartType": "line",
- "legend": "false",
- "xformat": "HH:mm:ss",
- "interpolate": "linear",
- "nodata": "",
- "dot": false,
- "ymin": "",
- "ymax": "",
- "removeOlder": 1,
- "removeOlderPoints": "",
- "removeOlderUnit": "3600",
- "cutout": 0,
- "useOneColor": false,
- "useUTC": false,
- "colors": [
- "#1f77b4",
- "#aec7e8",
- "#ff7f0e",
- "#2ca02c",
- "#98df8a",
- "#d62728",
- "#ff9896",
- "#9467bd",
- "#c5b0d5"
- ],
- "outputs": 1,
- "useDifferentColor": false,
- "className": "",
- "x": 1010,
- "y": 160,
- "wires": [
- []
- ]
- },
- {
- "id": "7ae5f302f0a4f20f",
- "type": "debug",
- "z": "3f2b7e0cc1803f30",
- "name": "debug 8",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "statusVal": "",
- "statusType": "auto",
- "x": 1080,
- "y": 220,
- "wires": []
- },
- {
- "id": "529ff34e4122124b",
- "type": "debug",
- "z": "3f2b7e0cc1803f30",
- "name": "debug 9",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "statusVal": "",
- "statusType": "auto",
- "x": 920,
- "y": 480,
- "wires": []
- },
- {
- "id": "4f78ca4d70408dd2",
- "type": "ui_gauge",
- "z": "3f2b7e0cc1803f30",
- "name": "",
- "group": "0e26a3e29e92ec1e",
- "order": 3,
- "width": 0,
- "height": 0,
- "gtype": "gage",
- "title": "gauge",
- "label": "units",
- "format": "{{value}}",
- "min": 0,
- "max": "50",
- "colors": [
- "#00b500",
- "#e6e600",
- "#ca3838"
- ],
- "seg1": "",
- "seg2": "",
- "diff": false,
- "className": "",
- "x": 890,
- "y": 360,
- "wires": []
- },
- {
- "id": "b34fbfedb9a9c326",
- "type": "ui_chart",
- "z": "3f2b7e0cc1803f30",
- "name": "",
- "group": "0e26a3e29e92ec1e",
- "order": 4,
- "width": 0,
- "height": 0,
- "label": "chart",
- "chartType": "line",
- "legend": "false",
- "xformat": "HH:mm:ss",
- "interpolate": "linear",
- "nodata": "",
- "dot": false,
- "ymin": "",
- "ymax": "",
- "removeOlder": 1,
- "removeOlderPoints": "",
- "removeOlderUnit": "3600",
- "cutout": 0,
- "useOneColor": false,
- "useUTC": false,
- "colors": [
- "#1f77b4",
- "#aec7e8",
- "#ff7f0e",
- "#2ca02c",
- "#98df8a",
- "#d62728",
- "#ff9896",
- "#9467bd",
- "#c5b0d5"
- ],
- "outputs": 1,
- "useDifferentColor": false,
- "className": "",
- "x": 930,
- "y": 420,
- "wires": [
- []
- ]
- },
- {
- "id": "133ff16cfd31a17b",
- "type": "ui_slider",
- "z": "3f2b7e0cc1803f30",
- "name": "",
- "label": "slider",
- "tooltip": "",
- "group": "1252ccc53e1083b6",
- "order": 3,
- "width": 0,
- "height": 0,
- "passthru": true,
- "outs": "end",
- "topic": "topic",
- "topicType": "msg",
- "min": 0,
- "max": "80",
- "step": 1,
- "className": "",
- "x": 850,
- "y": 200,
- "wires": [
- [
- "6689dbf2b2a341c6",
- "ed13ad9c95f21bf0",
- "7ae5f302f0a4f20f"
- ]
- ]
- },
- {
- "id": "1e7e8bd14a82f2b7",
- "type": "ui_slider",
- "z": "3f2b7e0cc1803f30",
- "name": "",
- "label": "slider",
- "tooltip": "",
- "group": "1252ccc53e1083b6",
- "order": 2,
- "width": 0,
- "height": 0,
- "passthru": true,
- "outs": "end",
- "topic": "topic",
- "topicType": "msg",
- "min": 0,
- "max": "50",
- "step": 1,
- "className": "",
- "x": 750,
- "y": 460,
- "wires": [
- [
- "4f78ca4d70408dd2",
- "b34fbfedb9a9c326",
- "529ff34e4122124b"
- ]
- ]
- },
- {
- "id": "610a68de1335cbbc",
- "type": "inject",
- "z": "a4e8ab4e2a622dc7",
- "name": "",
- "props": [
- {
- "p": "payload"
- },
- {
- "p": "topic",
- "vt": "str"
- }
- ],
- "repeat": "",
- "crontab": "",
- "once": false,
- "onceDelay": 0.1,
- "topic": "",
- "payload": "{\"CO2\":900}",
- "payloadType": "json",
- "x": 350,
- "y": 260,
- "wires": [
- [
- "d1f33282893cca32"
- ]
- ]
- },
- {
- "id": "d1f33282893cca32",
- "type": "http request",
- "z": "a4e8ab4e2a622dc7",
- "name": "",
- "method": "POST",
- "ret": "txt",
- "paytoqs": "ignore",
- "url": "http://thingsboard.cloud/api/v1/aQXjaKuwgD8ZdxISvYfh/telemetry",
- "tls": "",
- "persist": false,
- "proxy": "",
- "insecureHTTPParser": false,
- "authType": "",
- "senderr": false,
- "headers": [],
- "x": 590,
- "y": 180,
- "wires": [
- [
- "3b951ada9400db47"
- ]
- ]
- },
- {
- "id": "3b951ada9400db47",
- "type": "debug",
- "z": "a4e8ab4e2a622dc7",
- "name": "debug 10",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "payload",
- "targetType": "msg",
- "statusVal": "",
- "statusType": "auto",
- "x": 860,
- "y": 260,
- "wires": []
- },
- {
- "id": "d98becf3ae69d977",
- "type": "e-mail",
- "z": "85456a0c4d2ec5ab",
- "server": "smtp.gmail.com",
- "port": "465",
- "authtype": "BASIC",
- "saslformat": true,
- "token": "oauth2Response.access_token",
- "secure": true,
- "tls": true,
- "name": "[email protected]",
- "dname": "",
- "x": 760,
- "y": 460,
- "wires": []
- },
- {
- "id": "a0e361c10e12c033",
- "type": "debug",
- "z": "85456a0c4d2ec5ab",
- "name": "debug 8",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "payload",
- "targetType": "msg",
- "statusVal": "",
- "statusType": "auto",
- "x": 700,
- "y": 280,
- "wires": []
- },
- {
- "id": "01308e7a9a7d49da",
- "type": "inject",
- "z": "85456a0c4d2ec5ab",
- "name": "18",
- "props": [
- {
- "p": "payload"
- },
- {
- "p": "topic",
- "v": "18",
- "vt": "num"
- }
- ],
- "repeat": "",
- "crontab": "",
- "once": false,
- "onceDelay": 0.1,
- "topic": "",
- "payload": "",
- "payloadType": "date",
- "x": 170,
- "y": 240,
- "wires": [
- [
- "da356de5d99b8aab"
- ]
- ]
- },
- {
- "id": "9d8280eb46f69d6f",
- "type": "inject",
- "z": "85456a0c4d2ec5ab",
- "name": "20",
- "props": [
- {
- "p": "payload"
- },
- {
- "p": "topic",
- "vt": "str"
- }
- ],
- "repeat": "",
- "crontab": "",
- "once": false,
- "onceDelay": 0.1,
- "topic": "",
- "payload": "",
- "payloadType": "date",
- "x": 170,
- "y": 320,
- "wires": [
- [
- "da356de5d99b8aab"
- ]
- ]
- },
- {
- "id": "33b0d0e155c9b3e8",
- "type": "inject",
- "z": "85456a0c4d2ec5ab",
- "name": "22",
- "props": [
- {
- "p": "payload"
- },
- {
- "p": "topic",
- "vt": "str"
- }
- ],
- "repeat": "",
- "crontab": "",
- "once": false,
- "onceDelay": 0.1,
- "topic": "",
- "payload": "",
- "payloadType": "date",
- "x": 170,
- "y": 420,
- "wires": [
- [
- "da356de5d99b8aab"
- ]
- ]
- },
- {
- "id": "da356de5d99b8aab",
- "type": "function",
- "z": "85456a0c4d2ec5ab",
- "name": "function 1",
- "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}",
- "outputs": 1,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 360,
- "y": 280,
- "wires": [
- [
- "a0e361c10e12c033",
- "dc3f0ad486f1df5e"
- ]
- ]
- },
- {
- "id": "dc3f0ad486f1df5e",
- "type": "function",
- "z": "85456a0c4d2ec5ab",
- "name": "function 2",
- "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;",
- "outputs": 1,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 520,
- "y": 360,
- "wires": [
- [
- "a0e361c10e12c033",
- "d98becf3ae69d977"
- ]
- ]
- }
- ]
[text] ctc_iot
Viewer
*** This page was generated with the meta tag "noindex, nofollow". This happened because you selected this option before saving or the system detected it as spam. This means that this page will never get into the search engines and the search bot will not crawl it. There is nothing to worry about, you can still share it with anyone.
Editor
You can edit this paste and save as new: