kopia lustrzana https://github.com/dceejay/electron-node-red
increase timeout at start
rodzic
56deb4c90a
commit
6020894258
|
@ -0,0 +1,449 @@
|
|||
[{
|
||||
"type": "tab",
|
||||
"id": "41f61d2.fbe09e4",
|
||||
"label": "Flow 1"
|
||||
}, {
|
||||
"type": "tab",
|
||||
"id": "c46c66a2.e6e9e8",
|
||||
"label": "Flow 2"
|
||||
}, {
|
||||
"id": "52a903f3.ad56fc",
|
||||
"type": "ui_tab",
|
||||
"z": "41f61d2.fbe09e4",
|
||||
"name": "Home",
|
||||
"icon": "dashboard",
|
||||
"theme": "theme-dark",
|
||||
"order": "1"
|
||||
}, {
|
||||
"id": "30e652f.d9de3ae",
|
||||
"type": "ui_group",
|
||||
"z": "41f61d2.fbe09e4",
|
||||
"name": "Information",
|
||||
"order": "2",
|
||||
"disp": true,
|
||||
"width": "6"
|
||||
}, {
|
||||
"id": "a8ecb9.c60f4348",
|
||||
"type": "ui_group",
|
||||
"z": "41f61d2.fbe09e4",
|
||||
"name": "Introduction",
|
||||
"order": "1",
|
||||
"disp": false,
|
||||
"width": "3"
|
||||
}, {
|
||||
"id": "b8a170b7.b3cd",
|
||||
"type": "mqtt-broker",
|
||||
"broker": "realtime.ngi.ibm.com",
|
||||
"port": "1883",
|
||||
"clientid": ""
|
||||
}, {
|
||||
"id": "bbdf3e02.e8fee",
|
||||
"type": "ui_group",
|
||||
"z": "41f61d2.fbe09e4",
|
||||
"name": "Local Temps",
|
||||
"order": "1",
|
||||
"disp": true,
|
||||
"width": "12"
|
||||
}, {
|
||||
"id": "8e058d63.275f5",
|
||||
"type": "ui_tab",
|
||||
"z": "41f61d2.fbe09e4",
|
||||
"name": "Video",
|
||||
"icon": "personal_video",
|
||||
"theme": "theme-dark",
|
||||
"order": "2"
|
||||
}, {
|
||||
"id": "a4a24af0.48bac8",
|
||||
"type": "ui_group",
|
||||
"z": "41f61d2.fbe09e4",
|
||||
"name": "LabCam",
|
||||
"order": "1",
|
||||
"disp": true,
|
||||
"width": "12"
|
||||
}, {
|
||||
"id": "852d9c04.7ad26",
|
||||
"type": "ui_link",
|
||||
"z": "41f61d2.fbe09e4",
|
||||
"name": "Editor",
|
||||
"link": "http://localhost:8000/admin",
|
||||
"icon": "mode_edit",
|
||||
"target": "newtab",
|
||||
"order": "4",
|
||||
"x": 490,
|
||||
"y": 40,
|
||||
"wires": []
|
||||
}, {
|
||||
"id": "189cf871.681118",
|
||||
"type": "ui_template",
|
||||
"z": "41f61d2.fbe09e4",
|
||||
"tab": "52a903f3.ad56fc",
|
||||
"group": "a8ecb9.c60f4348",
|
||||
"name": "Welcome",
|
||||
"order": 1,
|
||||
"width": "3",
|
||||
"height": "9",
|
||||
"format": "<h3>Welcome to the <font color=\"#CE2020\">Node-RED</font> Dashboard</h3>\n<p>On the right you will see a graph logging data from any nearby nodes.</p>",
|
||||
"storeOutMessages": false,
|
||||
"fwdInMessages": false,
|
||||
"x": 80,
|
||||
"y": 40,
|
||||
"wires": [
|
||||
[]
|
||||
]
|
||||
}, {
|
||||
"id": "9944bbbe.242c68",
|
||||
"type": "ui_link",
|
||||
"z": "41f61d2.fbe09e4",
|
||||
"name": "Worldmap",
|
||||
"link": "http://localhost:8000/worldmap",
|
||||
"icon": "language",
|
||||
"target": "newtab",
|
||||
"order": "3",
|
||||
"x": 360,
|
||||
"y": 40,
|
||||
"wires": []
|
||||
}, {
|
||||
"id": "8d425a0d.21eb88",
|
||||
"type": "mqtt in",
|
||||
"z": "c46c66a2.e6e9e8",
|
||||
"name": "",
|
||||
"topic": "planes",
|
||||
"broker": "b8a170b7.b3cd",
|
||||
"x": 70,
|
||||
"y": 380,
|
||||
"wires": [
|
||||
["dd285cbf.592b9"]
|
||||
]
|
||||
}, {
|
||||
"id": "dd285cbf.592b9",
|
||||
"type": "json",
|
||||
"z": "c46c66a2.e6e9e8",
|
||||
"name": "",
|
||||
"x": 210,
|
||||
"y": 380,
|
||||
"wires": [
|
||||
["a4e20325.1a306"]
|
||||
]
|
||||
}, {
|
||||
"id": "a4e20325.1a306",
|
||||
"type": "function",
|
||||
"z": "c46c66a2.e6e9e8",
|
||||
"name": "split and add to layers",
|
||||
"func": "var p = msg.payload.planes;\n\nvar m = [];\n\nfor (var i in p) {\n p[i].name = p[i].call;\n delete p[i].call;\n p[i].speed = parseInt(p[i].speed * 0.539957);\n p[i].layer = \"ADS-B\";\n p[i].icon = \"plane\";\n\n if (p[i].sqk == 7500) { p[i].squawk = \"Hijack !!!\"; }\n if (p[i].sqk == 7600) { p[i].squawk = \"Radio Failure\"; }\n if (p[i].sqk == 7700) { p[i].squawk = \"Emergency !\"; }\n m.push({payload:p[i]});\n}\nreturn [m];",
|
||||
"outputs": 1,
|
||||
"noerr": 0,
|
||||
"x": 400,
|
||||
"y": 380,
|
||||
"wires": [
|
||||
["e35e830d.c113b"]
|
||||
]
|
||||
}, {
|
||||
"id": "66e3a66f.91fa58",
|
||||
"type": "mqtt in",
|
||||
"z": "c46c66a2.e6e9e8",
|
||||
"name": "",
|
||||
"topic": "owntracks/#",
|
||||
"broker": "b8a170b7.b3cd",
|
||||
"x": 90,
|
||||
"y": 140,
|
||||
"wires": [
|
||||
["6a1a5342.b2539c"]
|
||||
]
|
||||
}, {
|
||||
"id": "17f3f858.8f27e8",
|
||||
"type": "function",
|
||||
"z": "c46c66a2.e6e9e8",
|
||||
"name": "",
|
||||
"func": "if (msg.payload._type === \"location\") {\n msg.payload.name = msg.topic.split(\"/\")[1];\n delete msg.payload._type;\n msg.payload.icon = \"male\";\n msg.payload.layer = \"owntracks\";\n msg.payload.iconColor = \"red\";\n return msg;\n}\nreturn null;",
|
||||
"outputs": 1,
|
||||
"noerr": 0,
|
||||
"x": 350,
|
||||
"y": 140,
|
||||
"wires": [
|
||||
["e35e830d.c113b", "30b46830.e7bb28"]
|
||||
]
|
||||
}, {
|
||||
"id": "6a1a5342.b2539c",
|
||||
"type": "json",
|
||||
"z": "c46c66a2.e6e9e8",
|
||||
"name": "",
|
||||
"x": 230,
|
||||
"y": 140,
|
||||
"wires": [
|
||||
["17f3f858.8f27e8"]
|
||||
]
|
||||
}, {
|
||||
"id": "7ac145e5.39d56c",
|
||||
"type": "comment",
|
||||
"z": "c46c66a2.e6e9e8",
|
||||
"name": "Handle OwnTracks feed",
|
||||
"info": "",
|
||||
"x": 120,
|
||||
"y": 100,
|
||||
"wires": []
|
||||
}, {
|
||||
"id": "6b66cfa0.0837b",
|
||||
"type": "mqtt in",
|
||||
"z": "c46c66a2.e6e9e8",
|
||||
"name": "",
|
||||
"topic": "ships",
|
||||
"broker": "b8a170b7.b3cd",
|
||||
"x": 70,
|
||||
"y": 260,
|
||||
"wires": [
|
||||
["704cd9c3.8dcf68"]
|
||||
]
|
||||
}, {
|
||||
"id": "e330b119.65ef9",
|
||||
"type": "mqtt in",
|
||||
"z": "c46c66a2.e6e9e8",
|
||||
"name": "",
|
||||
"topic": "map/input",
|
||||
"broker": "b8a170b7.b3cd",
|
||||
"x": 80,
|
||||
"y": 320,
|
||||
"wires": [
|
||||
["5aae3a13.d62c24"]
|
||||
]
|
||||
}, {
|
||||
"id": "5aae3a13.d62c24",
|
||||
"type": "json",
|
||||
"z": "c46c66a2.e6e9e8",
|
||||
"name": "",
|
||||
"x": 210,
|
||||
"y": 320,
|
||||
"wires": [
|
||||
["e35e830d.c113b"]
|
||||
]
|
||||
}, {
|
||||
"id": "e35e830d.c113b",
|
||||
"type": "worldmap",
|
||||
"z": "c46c66a2.e6e9e8",
|
||||
"name": "",
|
||||
"x": 470,
|
||||
"y": 200,
|
||||
"wires": []
|
||||
}, {
|
||||
"id": "704cd9c3.8dcf68",
|
||||
"type": "json",
|
||||
"z": "c46c66a2.e6e9e8",
|
||||
"name": "",
|
||||
"x": 210,
|
||||
"y": 260,
|
||||
"wires": [
|
||||
["e35e830d.c113b"]
|
||||
]
|
||||
}, {
|
||||
"id": "e78a4599.6ec248",
|
||||
"type": "autolink in",
|
||||
"z": "41f61d2.fbe09e4",
|
||||
"name": "",
|
||||
"topic": "tempC",
|
||||
"iface": "",
|
||||
"rate": "0",
|
||||
"ignore": true,
|
||||
"x": 70,
|
||||
"y": 200,
|
||||
"wires": [
|
||||
["5a560817.e1e178", "e1bc7745.0d07c8"]
|
||||
]
|
||||
}, {
|
||||
"id": "5a560817.e1e178",
|
||||
"type": "debug",
|
||||
"z": "41f61d2.fbe09e4",
|
||||
"name": "",
|
||||
"active": false,
|
||||
"console": "false",
|
||||
"complete": "true",
|
||||
"x": 230,
|
||||
"y": 260,
|
||||
"wires": []
|
||||
}, {
|
||||
"id": "6ede788e.53aa18",
|
||||
"type": "status",
|
||||
"z": "41f61d2.fbe09e4",
|
||||
"name": "",
|
||||
"scope": ["e78a4599.6ec248"],
|
||||
"x": 80,
|
||||
"y": 120,
|
||||
"wires": [
|
||||
["f4d8ea9b.87ea28"]
|
||||
]
|
||||
}, {
|
||||
"id": "9f19ee5c.beaef",
|
||||
"type": "ui_chart",
|
||||
"z": "41f61d2.fbe09e4",
|
||||
"tab": "52a903f3.ad56fc",
|
||||
"group": "bbdf3e02.e8fee",
|
||||
"order": 1,
|
||||
"width": "12",
|
||||
"height": "6",
|
||||
"name": "",
|
||||
"interpolate": "basis",
|
||||
"nodata": "No Data",
|
||||
"ymin": "30",
|
||||
"ymax": "",
|
||||
"removeOlder": 1,
|
||||
"removeOlderUnit": "3600",
|
||||
"x": 450,
|
||||
"y": 200,
|
||||
"wires": [
|
||||
[],
|
||||
[]
|
||||
]
|
||||
}, {
|
||||
"id": "e1bc7745.0d07c8",
|
||||
"type": "change",
|
||||
"z": "41f61d2.fbe09e4",
|
||||
"name": "",
|
||||
"rules": [{
|
||||
"t": "set",
|
||||
"p": "topic",
|
||||
"pt": "msg",
|
||||
"to": "host",
|
||||
"tot": "msg"
|
||||
}],
|
||||
"action": "",
|
||||
"property": "",
|
||||
"from": "",
|
||||
"to": "",
|
||||
"reg": false,
|
||||
"x": 260,
|
||||
"y": 200,
|
||||
"wires": [
|
||||
["9f19ee5c.beaef"]
|
||||
]
|
||||
}, {
|
||||
"id": "f4d8ea9b.87ea28",
|
||||
"type": "function",
|
||||
"z": "41f61d2.fbe09e4",
|
||||
"name": "",
|
||||
"func": "msg.payload = msg.status.text;\nreturn msg;",
|
||||
"outputs": 1,
|
||||
"noerr": 0,
|
||||
"x": 260,
|
||||
"y": 120,
|
||||
"wires": [
|
||||
["5903405b.8588b"]
|
||||
]
|
||||
}, {
|
||||
"id": "5903405b.8588b",
|
||||
"type": "ui_text",
|
||||
"z": "41f61d2.fbe09e4",
|
||||
"tab": "52a903f3.ad56fc",
|
||||
"group": "30e652f.d9de3ae",
|
||||
"order": 1,
|
||||
"width": 6,
|
||||
"height": 1,
|
||||
"name": "Sources",
|
||||
"label": "temperature",
|
||||
"format": "{{msg.payload}}",
|
||||
"x": 440,
|
||||
"y": 120,
|
||||
"wires": []
|
||||
}, {
|
||||
"id": "a3c2a7c1.25e898",
|
||||
"type": "autolink in",
|
||||
"z": "c46c66a2.e6e9e8",
|
||||
"name": "",
|
||||
"topic": "position",
|
||||
"iface": "",
|
||||
"rate": "0",
|
||||
"ignore": true,
|
||||
"x": 70,
|
||||
"y": 200,
|
||||
"wires": [
|
||||
["e35e830d.c113b"]
|
||||
]
|
||||
}, {
|
||||
"id": "790bbb6e.98b884",
|
||||
"type": "inject",
|
||||
"z": "41f61d2.fbe09e4",
|
||||
"name": "tick 15",
|
||||
"topic": "",
|
||||
"payload": "",
|
||||
"payloadType": "date",
|
||||
"repeat": "15",
|
||||
"crontab": "",
|
||||
"once": false,
|
||||
"x": 90,
|
||||
"y": 360,
|
||||
"wires": [
|
||||
["504cedd8.9f0ca4"]
|
||||
]
|
||||
}, {
|
||||
"id": "504cedd8.9f0ca4",
|
||||
"type": "exec",
|
||||
"z": "41f61d2.fbe09e4",
|
||||
"command": "osx-cpu-temp",
|
||||
"addpay": false,
|
||||
"append": "",
|
||||
"useSpawn": "",
|
||||
"name": "read temperature",
|
||||
"x": 190,
|
||||
"y": 440,
|
||||
"wires": [
|
||||
["6d633eab.268fd"],
|
||||
[],
|
||||
[]
|
||||
]
|
||||
}, {
|
||||
"id": "6d633eab.268fd",
|
||||
"type": "function",
|
||||
"z": "41f61d2.fbe09e4",
|
||||
"name": "local mac temp",
|
||||
"func": "msg.topic = \"local\";\n\nreturn msg;",
|
||||
"outputs": 1,
|
||||
"noerr": 0,
|
||||
"x": 320,
|
||||
"y": 360,
|
||||
"wires": [
|
||||
["9f19ee5c.beaef"]
|
||||
]
|
||||
}, {
|
||||
"id": "310282af.e7e2de",
|
||||
"type": "ui_template",
|
||||
"z": "41f61d2.fbe09e4",
|
||||
"tab": "8e058d63.275f5",
|
||||
"group": "a4a24af0.48bac8",
|
||||
"name": "Video",
|
||||
"order": 1,
|
||||
"width": "12",
|
||||
"height": "12",
|
||||
"format": "<iframe src=\"http://9.20.24.27/axis-cgi/mjpg/video.cgi?camera=1&resolution704x576\" width=710 height=580></iframe> \n",
|
||||
"storeOutMessages": false,
|
||||
"fwdInMessages": false,
|
||||
"x": 230,
|
||||
"y": 40,
|
||||
"wires": [
|
||||
[]
|
||||
]
|
||||
}, {
|
||||
"id": "30b46830.e7bb28",
|
||||
"type": "change",
|
||||
"z": "c46c66a2.e6e9e8",
|
||||
"name": "",
|
||||
"rules": [{
|
||||
"t": "set",
|
||||
"p": "location.lat",
|
||||
"pt": "msg",
|
||||
"to": "payload.lat",
|
||||
"tot": "msg"
|
||||
}, {
|
||||
"t": "set",
|
||||
"p": "location.lon",
|
||||
"pt": "msg",
|
||||
"to": "payload.lon",
|
||||
"tot": "msg"
|
||||
}],
|
||||
"action": "",
|
||||
"property": "",
|
||||
"from": "",
|
||||
"to": "",
|
||||
"reg": false,
|
||||
"x": 540,
|
||||
"y": 140,
|
||||
"wires": [
|
||||
[]
|
||||
]
|
||||
}]
|
File diff suppressed because one or more lines are too long
2
main.js
2
main.js
|
@ -96,7 +96,7 @@ function createWindow () {
|
|||
});
|
||||
|
||||
// load the initial page
|
||||
setTimeout(function() {mainWindow.loadURL(url)}, 250);
|
||||
setTimeout(function() {mainWindow.loadURL(url)}, 500);
|
||||
|
||||
// Open the DevTools.
|
||||
//mainWindow.webContents.openDevTools();
|
||||
|
|
Ładowanie…
Reference in New Issue