Skip to content

Instantly share code, notes, and snippets.

@hj91
Created December 25, 2016 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hj91/a26eaf3e752786b904d11d65e466ac83 to your computer and use it in GitHub Desktop.
Save hj91/a26eaf3e752786b904d11d65e466ac83 to your computer and use it in GitHub Desktop.
[
{
"id": "5e47003a.bd96b",
"type": "tab",
"label": "Flow 2"
},
{
"id": "265fd756.cc0488",
"type": "tab",
"label": "Flow 1"
},
{
"id": "fa0d3393.b7c53",
"type": "ui_group",
"z": "",
"name": "Default",
"tab": "c5a012c7.f2e44",
"disp": true,
"width": "6"
},
{
"id": "c5a012c7.f2e44",
"type": "ui_tab",
"z": "",
"name": "Home",
"icon": "dashboard"
},
{
"id": "43e8ca88.33d644",
"type": "ui_base",
"name": "Node-RED Dashboard",
"theme": "theme-dark"
},
{
"id": "d28247db.b70228",
"type": "mongodb",
"z": "",
"hostname": "127.0.0.1",
"port": "27017",
"db": "cpu_temp",
"name": "mongodb"
},
{
"id": "eb3cec08.d776f",
"type": "ui_group",
"z": "",
"name": "Home2",
"tab": "c5a012c7.f2e44",
"disp": true,
"width": "6"
},
{
"id": "781e947a.a43a1c",
"type": "mqtt-broker",
"z": "",
"broker": "localhost",
"port": "1883",
"clientid": "",
"usetls": false,
"compatmode": true,
"keepalive": "60",
"cleansession": true,
"willTopic": "",
"willQos": "0",
"willPayload": "",
"birthTopic": "dev/test",
"birthQos": "0",
"birthPayload": ""
},
{
"id": "7564ef83.eea",
"type": "ui_group",
"z": "",
"name": "Default",
"tab": "",
"disp": true,
"width": "6"
},
{
"id": "ec84f4e3.6809a8",
"type": "ui_tab",
"z": "",
"name": "Home3",
"icon": "dashboard"
},
{
"id": "213d2bbb.808be4",
"type": "ui_tab",
"name": "Tab 4",
"icon": "dashboard",
"order": 4
},
{
"id": "f0180284.8dfda",
"type": "ui_group",
"z": "",
"name": "Home4",
"tab": "c5a012c7.f2e44",
"order": 3,
"disp": true,
"width": "6"
},
{
"id": "af58212e.e4fe",
"type": "inject",
"z": "5e47003a.bd96b",
"name": "",
"topic": "",
"payload": "",
"payloadType": "date",
"repeat": "20",
"crontab": "",
"once": false,
"x": 153,
"y": 146,
"wires": [
[
"bf8474f8.253c88"
]
]
},
{
"id": "bf8474f8.253c88",
"type": "exec",
"z": "5e47003a.bd96b",
"command": "vcgencmd measure_temp",
"addpay": false,
"append": "",
"useSpawn": "",
"timer": "",
"name": "temp",
"x": 218,
"y": 251.5,
"wires": [
[
"b12ab2be.e9dfc",
"32996f6e.61e45"
],
[],
[]
]
},
{
"id": "b12ab2be.e9dfc",
"type": "function",
"z": "5e47003a.bd96b",
"name": "CPU T",
"func": "str = msg.payload\nmsg.payload = str.substring(5,9);\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 344,
"y": 166,
"wires": [
[
"be04a6a3.b81548",
"c4f8ffe9.f8006"
]
]
},
{
"id": "be04a6a3.b81548",
"type": "ui_gauge",
"z": "5e47003a.bd96b",
"name": "CPU Temp",
"group": "fa0d3393.b7c53",
"order": 0,
"width": 0,
"height": 0,
"gtype": "gage",
"title": "Gauge",
"label": " C",
"format": "CPU Temp",
"min": 0,
"max": "80",
"colors": [
"#00b500",
"#e6e600",
"#ca3838"
],
"x": 496,
"y": 116,
"wires": []
},
{
"id": "c4f8ffe9.f8006",
"type": "ui_chart",
"z": "5e47003a.bd96b",
"name": "Pi CPU Temperature",
"group": "fa0d3393.b7c53",
"order": 0,
"width": 0,
"height": 0,
"label": "chart",
"chartType": "line",
"legend": "true",
"xformat": "%H:%M:%S",
"interpolate": "step-after",
"nodata": "",
"ymin": "",
"ymax": "",
"removeOlder": 1,
"removeOlderUnit": "3600",
"x": 516,
"y": 197,
"wires": [
[
"a225da49.5d4748"
],
[]
]
},
{
"id": "a225da49.5d4748",
"type": "file in",
"z": "5e47003a.bd96b",
"name": "Log_temp",
"filename": "log_temp.txt",
"format": "utf8",
"x": 689,
"y": 158,
"wires": [
[]
]
},
{
"id": "32996f6e.61e45",
"type": "ui_toast",
"z": "5e47003a.bd96b",
"position": "top right",
"displayTime": "5",
"name": "Notification",
"x": 372,
"y": 279,
"wires": []
},
{
"id": "b6fa4b6c.966748",
"type": "rpi-sensehat in",
"z": "265fd756.cc0488",
"name": "SenseHat_temp",
"motion": false,
"env": true,
"stick": false,
"x": 116,
"y": 107,
"wires": [
[]
]
},
{
"id": "7df17057.2e551",
"type": "rpi-sensehat in",
"z": "5e47003a.bd96b",
"name": "",
"motion": false,
"env": true,
"stick": false,
"x": 101,
"y": 364,
"wires": [
[
"2209c9b8.280986"
]
]
},
{
"id": "40a71b0c.b57014",
"type": "file",
"z": "5e47003a.bd96b",
"name": "",
"filename": "/home/pi/senselog.txt",
"appendNewline": true,
"createDir": true,
"overwriteFile": "false",
"x": 712,
"y": 581,
"wires": []
},
{
"id": "2209c9b8.280986",
"type": "delay",
"z": "5e47003a.bd96b",
"name": "Delay",
"pauseType": "rate",
"timeout": "40",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "10",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"x": 210,
"y": 455,
"wires": [
[
"40a71b0c.b57014",
"9de967f6.5d0f58",
"b5929c91.4e2be",
"ab56554.393faa8"
]
]
},
{
"id": "9de967f6.5d0f58",
"type": "debug",
"z": "5e47003a.bd96b",
"name": "",
"active": false,
"console": "false",
"complete": "false",
"x": 734,
"y": 531,
"wires": []
},
{
"id": "b5929c91.4e2be",
"type": "mqtt out",
"z": "5e47003a.bd96b",
"name": "",
"topic": "dev/test",
"qos": "",
"retain": "",
"broker": "781e947a.a43a1c",
"x": 781,
"y": 456,
"wires": []
},
{
"id": "ab56554.393faa8",
"type": "split",
"z": "5e47003a.bd96b",
"name": "",
"splt": ",",
"x": 395,
"y": 342,
"wires": [
[
"540223f5.75f99c",
"160d6169.2b353f"
]
]
},
{
"id": "e93d85cb.75e3d8",
"type": "ui_chart",
"z": "5e47003a.bd96b",
"name": "Ambient Temperature",
"group": "eb3cec08.d776f",
"order": 0,
"width": "0",
"height": "0",
"label": "Temperature",
"chartType": "line",
"legend": "true",
"xformat": "%H:%M:%S",
"interpolate": "step-after",
"nodata": "Ambient Temperature",
"ymin": "10",
"ymax": "40",
"removeOlder": "30",
"removeOlderUnit": "60",
"x": 961,
"y": 282,
"wires": [
[],
[]
]
},
{
"id": "540223f5.75f99c",
"type": "switch",
"z": "5e47003a.bd96b",
"name": "Temperature",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "btwn",
"v": "20",
"vt": "num",
"v2": "50",
"v2t": "num"
}
],
"checkall": "true",
"outputs": 1,
"x": 683,
"y": 315,
"wires": [
[
"e93d85cb.75e3d8",
"afb39946.ae3608",
"acdc348c.e512b8"
]
]
},
{
"id": "160d6169.2b353f",
"type": "switch",
"z": "5e47003a.bd96b",
"name": "Humidity",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "btwn",
"v": "40",
"vt": "num",
"v2": "100",
"v2t": "num"
}
],
"checkall": "true",
"outputs": 1,
"x": 624,
"y": 371,
"wires": [
[
"d17e66aa.ac6748",
"34a43934.707ef6"
]
]
},
{
"id": "d17e66aa.ac6748",
"type": "ui_chart",
"z": "5e47003a.bd96b",
"name": "Ambient Humidity",
"group": "eb3cec08.d776f",
"order": 0,
"width": 0,
"height": 0,
"label": "Humidity",
"chartType": "line",
"legend": "true",
"xformat": "%H:%M:%S",
"interpolate": "linear",
"nodata": "Ambient Humidity",
"ymin": "20",
"ymax": "100",
"removeOlder": 1,
"removeOlderUnit": "3600",
"x": 868,
"y": 359,
"wires": [
[],
[]
]
},
{
"id": "ba7fdda3.ac2d1",
"type": "ui_toast",
"z": "5e47003a.bd96b",
"position": "bottom right",
"displayTime": "5",
"name": "Ambient Temp",
"x": 1192,
"y": 327,
"wires": []
},
{
"id": "afb39946.ae3608",
"type": "delay",
"z": "5e47003a.bd96b",
"name": "Delay",
"pauseType": "rate",
"timeout": "40",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "20",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"x": 1021,
"y": 323,
"wires": [
[
"ba7fdda3.ac2d1"
]
]
},
{
"id": "acdc348c.e512b8",
"type": "ui_gauge",
"z": "5e47003a.bd96b",
"name": "Ambient Temp",
"group": "f0180284.8dfda",
"order": 0,
"width": 0,
"height": 0,
"gtype": "gage",
"title": "Gauge",
"label": " C",
"format": "Ambient Temp",
"min": 0,
"max": "80",
"colors": [
"#00b500",
"#e6e600",
"#ca3838"
],
"x": 950,
"y": 231,
"wires": []
},
{
"id": "34a43934.707ef6",
"type": "ui_gauge",
"z": "5e47003a.bd96b",
"name": "Ambient RH",
"group": "f0180284.8dfda",
"order": 0,
"width": 0,
"height": 0,
"gtype": "gage",
"title": "Gauge",
"label": " ",
"format": "Ambient RH",
"min": 0,
"max": "80",
"colors": [
"#00b500",
"#e6e600",
"#ca3838"
],
"x": 944,
"y": 410,
"wires": []
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment