Commit 0a290a4e authored by Spencer Williams's avatar Spencer Williams
Browse files

theme colors

parent 14ad90ff
[
{
"id": "155b7069.fcdeb",
"id": "b0f89235.affc5",
"type": "tab",
"label": "Rigado DevKit"
},
{
"id": "c5e571fc.a05b9",
"type": "ui_tab",
"z": "",
"name": "Home",
"icon": "dashboard"
},
{
"id": "3adf3b1b.929a34",
"type": "ui_base",
......@@ -25,7 +18,7 @@
},
"darkTheme": {
"default": "#097479",
"baseColor": "#097479",
"baseColor": "#1f5b8d",
"baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif",
"edited": true,
"reset": false
......@@ -43,7 +36,7 @@
"edited": false
},
"page-titlebar-backgroundColor": {
"value": "#097479",
"value": "#1f5b8d",
"edited": false
},
"page-backgroundColor": {
......@@ -55,7 +48,7 @@
"edited": false
},
"group-textColor": {
"value": "#0eb8c0",
"value": "#2d83cc",
"edited": false
},
"group-borderColor": {
......@@ -71,7 +64,7 @@
"edited": false
},
"widget-backgroundColor": {
"value": "#097479",
"value": "#1f5b8d",
"edited": false
},
"widget-borderColor": {
......@@ -101,38 +94,45 @@
}
},
{
"id": "ca5f4c53.d8f4d",
"id": "b36e6687.7bb6a8",
"type": "ui_tab",
"z": "",
"name": "Home",
"icon": "dashboard"
},
{
"id": "2ddceaab.d32bc6",
"type": "ui_group",
"z": "",
"name": "Gateway Status",
"tab": "c5e571fc.a05b9",
"tab": "b36e6687.7bb6a8",
"order": 1,
"disp": true,
"width": "6"
},
{
"id": "6acbef45.d211d",
"id": "fc15833e.ee6ab",
"type": "ui_group",
"z": "",
"name": "Sensor Data",
"tab": "c5e571fc.a05b9",
"tab": "b36e6687.7bb6a8",
"order": 2,
"disp": true,
"width": "6"
},
{
"id": "f7f8948e.7057f8",
"id": "86d7ca97.d63928",
"type": "ui_group",
"z": "",
"name": "Send Data",
"tab": "c5e571fc.a05b9",
"tab": "b36e6687.7bb6a8",
"disp": true,
"width": "6"
},
{
"id": "15652f0c.77aa71",
"id": "6614b037.e11c7",
"type": "inject",
"z": "155b7069.fcdeb",
"z": "b0f89235.affc5",
"name": "Start Scanning",
"topic": "",
"payload": "{\"command\":\"scan\", \"value\":true}",
......@@ -144,14 +144,14 @@
"y": 520,
"wires": [
[
"ef0d20a6.fe7aa"
"6246b66.3590b48"
]
]
},
{
"id": "a9187f16.52543",
"id": "244cba71.93f4b6",
"type": "inject",
"z": "155b7069.fcdeb",
"z": "b0f89235.affc5",
"name": "Stop Scanning",
"topic": "",
"payload": "{\"command\":\"scan\", \"value\":false}",
......@@ -163,32 +163,32 @@
"y": 560,
"wires": [
[
"ef0d20a6.fe7aa"
"6246b66.3590b48"
]
]
},
{
"id": "ef0d20a6.fe7aa",
"id": "6246b66.3590b48",
"type": "noble-connect",
"z": "155b7069.fcdeb",
"z": "b0f89235.affc5",
"uuids": "",
"name": "",
"x": 340,
"y": 540,
"wires": [
[
"c78ef0c0.1413c"
"37b18892.a6b518"
],
[],
[
"4268da4d.798974"
"58303eaf.9bb88"
]
]
},
{
"id": "15459cab.c4ab73",
"id": "d4abe5e2.27e738",
"type": "function",
"z": "155b7069.fcdeb",
"z": "b0f89235.affc5",
"name": "format for graphs",
"func": "if (typeof msg.payload === \"undefined\") {\n return [null, null, null];\n}\n\nuuid = msg.payload.peripheralUuid;\naccmsgs = [{\n \"topic\": uuid+\"-x\",\n \"payload\": msg.payload.data.accel[0]\n},{\n \"topic\": uuid+\"-y\",\n \"payload\": msg.payload.data.accel[1]\n},{\n \"topic\": uuid+\"-z\",\n \"payload\": msg.payload.data.accel[2]\n}];\ngyrmsgs = [{\n \"topic\": uuid+\"-x\",\n \"payload\": msg.payload.data.gyro[0]\n},{\n \"topic\": uuid+\"-y\",\n \"payload\": msg.payload.data.gyro[1]\n},{\n \"topic\": uuid+\"-z\",\n \"payload\": msg.payload.data.gyro[2]\n}];\nmagmsgs = [{\n \"topic\": uuid+\"-x\",\n \"payload\": msg.payload.data.mag[0]\n},{\n \"topic\": uuid+\"-y\",\n \"payload\": msg.payload.data.mag[1]\n},{\n \"topic\": uuid+\"-z\",\n \"payload\": msg.payload.data.mag[2]\n}];\nreturn [accmsgs, gyrmsgs, magmsgs];",
"outputs": "3",
......@@ -197,23 +197,23 @@
"y": 800,
"wires": [
[
"aadbf527.6c3dd8",
"649e5655.cf7178"
"f94ca613.3f5ac8",
"6c06331.0a680cc"
],
[
"a031a60c.d4e5c8"
"1b3b2dec.5fd5a2"
],
[
"cd89b8ca.2ba998"
"c1d7f63d.9fd1b8"
]
]
},
{
"id": "aadbf527.6c3dd8",
"id": "f94ca613.3f5ac8",
"type": "ui_chart",
"z": "155b7069.fcdeb",
"z": "b0f89235.affc5",
"name": "Accelerometer",
"group": "6acbef45.d211d",
"group": "fc15833e.ee6ab",
"order": 2,
"width": 0,
"height": 0,
......@@ -251,11 +251,11 @@
]
},
{
"id": "a031a60c.d4e5c8",
"id": "1b3b2dec.5fd5a2",
"type": "ui_chart",
"z": "155b7069.fcdeb",
"z": "b0f89235.affc5",
"name": "Gyroscope",
"group": "6acbef45.d211d",
"group": "fc15833e.ee6ab",
"order": 5,
"width": 0,
"height": 0,
......@@ -293,11 +293,11 @@
]
},
{
"id": "cd89b8ca.2ba998",
"id": "c1d7f63d.9fd1b8",
"type": "ui_chart",
"z": "155b7069.fcdeb",
"z": "b0f89235.affc5",
"name": "Magnetometer",
"group": "6acbef45.d211d",
"group": "fc15833e.ee6ab",
"order": 7,
"width": 0,
"height": 0,
......@@ -335,10 +335,10 @@
]
},
{
"id": "b90fef18.3dfe5",
"id": "9229d32c.a4c3e",
"type": "ui_template",
"z": "155b7069.fcdeb",
"group": "ca5f4c53.d8f4d",
"z": "b0f89235.affc5",
"group": "2ddceaab.d32bc6",
"name": "Device List",
"order": 2,
"width": 0,
......@@ -354,10 +354,10 @@
]
},
{
"id": "4268da4d.798974",
"id": "58303eaf.9bb88",
"type": "ui_template",
"z": "155b7069.fcdeb",
"group": "ca5f4c53.d8f4d",
"z": "b0f89235.affc5",
"group": "2ddceaab.d32bc6",
"name": "NoBLE Status",
"order": 1,
"width": 0,
......@@ -373,10 +373,10 @@
]
},
{
"id": "c0089866.6b4b08",
"id": "d7bb57da.c80f58",
"type": "ui_template",
"z": "155b7069.fcdeb",
"group": "6acbef45.d211d",
"z": "b0f89235.affc5",
"group": "fc15833e.ee6ab",
"name": "Clear Acc",
"order": 4,
"width": 0,
......@@ -389,15 +389,15 @@
"y": 760,
"wires": [
[
"aadbf527.6c3dd8"
"f94ca613.3f5ac8"
]
]
},
{
"id": "3fbfeb63.c5f724",
"id": "a2194034.e571c",
"type": "ui_template",
"z": "155b7069.fcdeb",
"group": "6acbef45.d211d",
"z": "b0f89235.affc5",
"group": "fc15833e.ee6ab",
"name": "Clear Gyr",
"order": 6,
"width": 0,
......@@ -410,15 +410,15 @@
"y": 800,
"wires": [
[
"a031a60c.d4e5c8"
"1b3b2dec.5fd5a2"
]
]
},
{
"id": "6ce6ac16.8895b4",
"id": "d2fd89.9c465278",
"type": "ui_template",
"z": "155b7069.fcdeb",
"group": "6acbef45.d211d",
"z": "b0f89235.affc5",
"group": "fc15833e.ee6ab",
"name": "Clear Mag",
"order": 8,
"width": 0,
......@@ -431,14 +431,14 @@
"y": 840,
"wires": [
[
"cd89b8ca.2ba998"
"c1d7f63d.9fd1b8"
]
]
},
{
"id": "240447c9.909a48",
"id": "e8b460ec.00408",
"type": "function",
"z": "155b7069.fcdeb",
"z": "b0f89235.affc5",
"name": "format for AWS",
"func": "if (!flow.get(\"unitSerialNumber\")) {\n return null;\n}\nmsg.payload.unitSerialNumber = flow.get(\"unitSerialNumber\");\nreturn {\n \"sendPayload\": msg.payload\n};",
"outputs": "1",
......@@ -447,15 +447,15 @@
"y": 380,
"wires": [
[
"6fc0d0a8.5ed6d",
"26745f68.9288f"
"80927c78.3baa",
"56110fa4.a81d8"
]
]
},
{
"id": "63ff7486.e7ce4c",
"id": "27a1a378.e84c0c",
"type": "debug",
"z": "155b7069.fcdeb",
"z": "b0f89235.affc5",
"name": "",
"active": true,
"console": "false",
......@@ -465,9 +465,9 @@
"wires": []
},
{
"id": "d018552a.dfb148",
"id": "f38c1566.d62df8",
"type": "exec",
"z": "155b7069.fcdeb",
"z": "b0f89235.affc5",
"command": "unit_serial_number",
"addpay": false,
"append": "",
......@@ -478,16 +478,16 @@
"y": 240,
"wires": [
[
"e8e6ab02.1d3398"
"5065e103.5031f"
],
[],
[]
]
},
{
"id": "e8e6ab02.1d3398",
"id": "5065e103.5031f",
"type": "function",
"z": "155b7069.fcdeb",
"z": "b0f89235.affc5",
"name": "save serial number",
"func": "flow.set(\"unitSerialNumber\", msg.payload);",
"outputs": 1,
......@@ -499,12 +499,12 @@
]
},
{
"id": "6fc0d0a8.5ed6d",
"id": "80927c78.3baa",
"type": "ui_switch",
"z": "155b7069.fcdeb",
"z": "b0f89235.affc5",
"name": "dashboard switch",
"label": "Send data to Amazon Lambda",
"group": "f7f8948e.7057f8",
"group": "86d7ca97.d63928",
"order": 0,
"width": 0,
"height": 0,
......@@ -524,14 +524,14 @@
"y": 380,
"wires": [
[
"714fe226.7f3efc"
"17765032.9e1ff"
]
]
},
{
"id": "714fe226.7f3efc",
"id": "17765032.9e1ff",
"type": "function",
"z": "155b7069.fcdeb",
"z": "b0f89235.affc5",
"name": "check send switch",
"func": "if (msg.payload) {\n msg.payload = msg.sendPayload;\n delete msg.sendPayload;\n return msg;\n} else {\n return null;\n}",
"outputs": 1,
......@@ -540,14 +540,14 @@
"y": 380,
"wires": [
[
"6f0d5570.dfed3c"
"995b10f4.6b934"
]
]
},
{
"id": "69e2433b.25dcec",
"id": "45b3514e.6a42f",
"type": "comment",
"z": "155b7069.fcdeb",
"z": "b0f89235.affc5",
"name": "1. Concatenate sensor data and gateway information",
"info": "When sensor data comes in, it does not include Gateway information. This part of\nthe flow stores the Gateway serial number in the flow context.\n\nNote: This command is a binary that exists on Rigado Gateways, and may not exist\non other systems.",
"x": 1100,
......@@ -555,9 +555,9 @@
"wires": []
},
{
"id": "88b23f6c.7cd45",
"id": "602d052.0903afc",
"type": "comment",
"z": "155b7069.fcdeb",
"z": "b0f89235.affc5",
"name": "2. A dashboard switch controls sending",
"info": "The first formatter here moves the payload into a safer location: `sendPayload`\n(you'll see why shortly). It also pulls the unit serial number out of the flow\ncontext and adds it to the payload. The message is forwarded through a dashboard\nswitch.\n\nThe dashboard switch will put `true` or `false` in its payload, and forward the\nrest of the input message. It pipes all this to another formatter.\n\nThe final formatter examines the value of the payload (the state of the switch),\nand reacts accordingly. It will move the `sendPayload` back into `payload` and\nforward the message *only* if the dashboard switch is on.",
"x": 1090,
......@@ -565,9 +565,9 @@
"wires": []
},
{
"id": "2fed45e2.ce1d2a",
"id": "521582e6.b0730c",
"type": "comment",
"z": "155b7069.fcdeb",
"z": "b0f89235.affc5",
"name": "3. Send data to Amazon",
"info": "This node will send input messages to the Amazon lambda function that will\nprocess the data and forward it to storage or other dashboard applications.",
"x": 1090,
......@@ -575,9 +575,9 @@
"wires": []
},
{
"id": "72c47f77.b2786",
"id": "8ee4bf7f.5f9eb",
"type": "comment",
"z": "155b7069.fcdeb",
"z": "b0f89235.affc5",
"name": "4. Graph the data on the dashboard",
"info": "This flow also graphs the incoming data on the dashboard. The delay node limits\nthe number of records to 1 per second. This is done to reduce the load on the\nGateway's CPU and memory.\n\nIf you connect multiple Thingys, or decrease the throttling of the delay node,\nyou may experience a drastic change in performance.",
"x": 1080,
......@@ -585,9 +585,9 @@
"wires": []
},
{
"id": "6f5b2160.1b6f7",
"id": "338c7611.8d7fca",
"type": "function",
"z": "155b7069.fcdeb",
"z": "b0f89235.affc5",
"name": "check serial number",
"func": "if (flow.get(\"unitSerialNumber\")) return null;\nreturn {};",
"outputs": 1,
......@@ -596,14 +596,14 @@
"y": 240,
"wires": [
[
"d018552a.dfb148"
"f38c1566.d62df8"
]
]
},
{
"id": "26745f68.9288f",
"id": "56110fa4.a81d8",
"type": "debug",
"z": "155b7069.fcdeb",
"z": "b0f89235.affc5",
"name": "",
"active": false,
"console": "false",
......@@ -613,9 +613,9 @@
"wires": []
},
{
"id": "6f0d5570.dfed3c",
"id": "995b10f4.6b934",
"type": "http request",
"z": "155b7069.fcdeb",
"z": "b0f89235.affc5",
"name": "Rigado Demo Kit Lambda",
"method": "POST",
"ret": "obj",
......@@ -625,14 +625,14 @@
"y": 540,
"wires": [
[
"63ff7486.e7ce4c"
"27a1a378.e84c0c"
]
]
},
{
"id": "193b3996.8bc026",
"id": "9c274dc8.c12dc",
"type": "comment",
"z": "155b7069.fcdeb",
"z": "b0f89235.affc5",
"name": "Rigado DevKit Flow (click for instructions)",
"info": "This flow is loaded by default on your Gateway and will read data from a Nordic Thingy development sensor and visualize the data on a local Node-RED dashboard as well as send it to AWS and an online dashboard.\n\nTo view the dashboard click on the 'Dashboard' tab in the right pane of the Node-RED window and then click the 'Open New Window' button to the right of the 'Site' tab. This will launch a Node-RED dashboard in a new window.\n\nAdditional instructions and support can be found at developer.rigado.com.",
"x": 340,
......@@ -640,15 +640,15 @@
"wires": []
},
{
"id": "72b3dcf0.a2c1a4",
"id": "7d399d0f.5a6444",
"type": "ui_template",
"z": "155b7069.fcdeb",
"group": "f7f8948e.7057f8",
"z": "b0f89235.affc5",
"group": "86d7ca97.d63928",
"name": "Freeboard note",
"order": 0,
"width": 0,
"height": 0,
"format": "<p>See the data on <a target=\"_blank\" href=\"https://demo-dashboard.rigado.io/\">Freeboard</a>.</p>",
"format": "<p>See the data on <a target=\"_blank\" href=\"https://demo-dashboard.rigado.io/\" style=\"color: #308DD9;\">Freeboard</a>.</p>",
"storeOutMessages": true,
"fwdInMessages": true,
"templateScope": "local",
......@@ -659,9 +659,9 @@
]
},
{
"id": "9b92e418.391e18",
"id": "ad53aa54.c0f808",
"type": "function",
"z": "155b7069.fcdeb",
"z": "b0f89235.affc5",
"name": "",
"func": "return {\n \"topic\": \"deviceList\",\n \"payload\": flow.get(\"deviceList\")\n};",
"outputs": 1,
......@@ -670,14 +670,14 @@
"y": 640,
"wires": [
[
"b90fef18.3dfe5"
"9229d32c.a4c3e"
]
]
},
{
"id": "89698bfc.7fc4b8",
"id": "a8edd2fd.aa13d",
"type": "inject",
"z": "155b7069.fcdeb",
"z": "b0f89235.affc5",
"name": "1/sec",
"topic": "",
"payload": "{}",
......@@ -689,14 +689,14 @@
"y": 640,
"wires": [
[
"9b92e418.391e18"
"ad53aa54.c0f808"
]
]
},
{
"id": "c78ef0c0.1413c",
"id": "37b18892.a6b518",
"type": "function",
"z": "155b7069.fcdeb",
"z": "b0f89235.affc5",
"name": "ratelimit",
"func": "if (!flow.get(\"deviceList\")) {\n flow.set(\"deviceList\", {});\n}\n\nlet deviceList = flow.get(\"deviceList\");\nlet uuid = msg.payload.peripheralUuid;\nlet forwardAWS = null;\nlet forwardDash = null;\n\nif (deviceList.hasOwnProperty(uuid)) {\n let msAWS = msg.payload.time - deviceList[uuid].sentToAWS;\n if (msAWS > 1000) {\n deviceList[uuid].sentToAWS=msg.payload.time;\n forwardAWS = msg;\n }\n let msDash = msg.payload.time - deviceList[uuid].sentToDash;\n if (msDash > 5000) {\n deviceList[uuid].sentToDash=msg.payload.time;\n forwardDash = msg;\n }\n} else {\n deviceList[uuid] = {\n \"sentToAWS\": msg.payload.time,\n \"sentToDash\": msg.payload.time\n };\n node.log(\"adding new uuid \"+uuid);\n forwardAWS = msg;\n forwardDash = msg;\n}\n\nflow.set(\"deviceList\", deviceList);\nreturn [forwardAWS, forwardDash];",
"outputs": "2",
......@@ -705,18 +705,18 @@
"y": 520,
"wires": [
[
"6f5b2160.1b6f7",
"240447c9.909a48"
"338c7611.8d7fca",
"e8b460ec.00408"
],
[
"15459cab.c4ab73"
"d4abe5e2.27e738"
]
]
},
{
"id": "649e5655.cf7178",
"id": "6c06331.0a680cc",
"type": "debug",
"z": "155b7069.fcdeb",
"z": "b0f89235.affc5",
"name": "",
"active": false,
"console": "false",
......@@ -726,9 +726,9 @@
"wires": []
},
{
"id": "5a5b2fc6.c6c88",
"id": "6676b6cd.886fa8",
"type": "comment",
"z": "155b7069.fcdeb",
"z": "b0f89235.affc5",
"name": "About ratelimiting",
"info": "This function node limits the rate of data to each of the other parts of the\nflow. It will send 1 message per device per second to Amazon Lambda, and 1\nmessage per device per 5 seconds to the Node-RED Dashboard.",
"x": 520,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment