diff --git a/flows.back b/flows.back deleted file mode 100644 index a24049f..0000000 --- a/flows.back +++ /dev/null @@ -1,449 +0,0 @@ -[{ - "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": "

Welcome to the Node-RED Dashboard

\n

On the right you will see a graph logging data from any nearby nodes.

", - "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": " \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": [ - [] - ] -}] diff --git a/flows.json b/flows.json deleted file mode 100644 index 61cca62..0000000 --- a/flows.json +++ /dev/null @@ -1 +0,0 @@ -[{"type":"tab","id":"41f61d2.fbe09e4","label":"Flow 1","_def":{"defaults":{"label":{"value":""}}}},{"type":"tab","id":"c46c66a2.e6e9e8","label":"Flow 2","_def":{"defaults":{"label":{"value":""}}}},{"id":"52a903f3.ad56fc","type":"ui_tab","z":"41f61d2.fbe09e4","name":"Home","icon":"dashboard","theme":"theme-dark"},{"id":"30e652f.d9de3ae","type":"ui_group","z":"41f61d2.fbe09e4","name":"Information","tab":"52a903f3.ad56fc","disp":true,"width":"6"},{"id":"a8ecb9.c60f4348","type":"ui_group","z":"41f61d2.fbe09e4","name":"Introduction","tab":"52a903f3.ad56fc","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","tab":"52a903f3.ad56fc","disp":true,"width":"12"},{"id":"8e058d63.275f5","type":"ui_tab","z":"41f61d2.fbe09e4","name":"Video","icon":"personal_video","theme":"theme-dark"},{"id":"a4a24af0.48bac8","type":"ui_group","z":"41f61d2.fbe09e4","name":"LabCam","tab":"8e058d63.275f5","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"},{"id":"9944bbbe.242c68","type":"ui_link","z":"41f61d2.fbe09e4","name":"Worldmap","link":"http://localhost:8000/worldmap","icon":"language","target":"iframe","order":"3"},{"id":"d9ba26fa.6d2b18","type":"ui_base","name":"DCJ Dashboard","theme":"theme-dark"},{"id":"189cf871.681118","type":"ui_template","z":"41f61d2.fbe09e4","group":"a8ecb9.c60f4348","name":"Welcome","order":1,"width":"3","height":"9","format":"

Welcome to the Node-RED Dashboard

\n

On the right you will see a graph logging data from any nearby nodes.

","storeOutMessages":false,"fwdInMessages":false,"x":80,"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":380,"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 delete msg.topic;\n return msg;\n}\nreturn null;","outputs":1,"noerr":0,"x":350,"y":140,"wires":[["e35e830d.c113b","363e875d.976f88"]]},{"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":true,"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","group":"bbdf3e02.e8fee","order":1,"width":"12","height":"6","label":"","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","799d9318.fd385c"]]},{"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","group":"30e652f.d9de3ae","order":1,"width":"0","height":"0","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","group":"a4a24af0.48bac8","name":"Video","order":1,"width":"12","height":"12","format":" \n","storeOutMessages":false,"fwdInMessages":false,"x":230,"y":40,"wires":[[]]},{"id":"363e875d.976f88","type":"geofence","z":"c46c66a2.e6e9e8","name":"Hursley","mode":"circle","inside":"true","rad":2006.0361684828208,"points":[],"centre":{"latitude":51.02493784885497,"longitude":-1.395606994628906},"x":340,"y":60,"wires":[["7011fdd6.09b8d4"]]},{"id":"5c33de85.aab6b","type":"ui_toast","z":"c46c66a2.e6e9e8","name":"show toast","x":610,"y":140,"wires":[]},{"id":"7011fdd6.09b8d4","type":"template","z":"c46c66a2.e6e9e8","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{{payload.name}} is at {{location.isat}}","x":490,"y":60,"wires":[["5c33de85.aab6b"]]},{"id":"799d9318.fd385c","type":"ui_gauge","z":"41f61d2.fbe09e4","name":"","group":"30e652f.d9de3ae","order":1,"width":"","height":"","title":"Title","label":"gauge","format":"{{value}}","min":0,"max":"60","x":510,"y":280,"wires":[]},{"id":"ef2c57ad.bb0d68","type":"ui_text","z":"41f61d2.fbe09e4","group":"30e652f.d9de3ae","order":0,"width":0,"height":0,"name":"","label":"{{msg.topic}}","format":"{{msg.payload}}","x":390,"y":540,"wires":[]},{"id":"88980f54.b7f21","type":"inject","z":"41f61d2.fbe09e4","name":"","topic":"Test","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":120,"y":540,"wires":[["ef2c57ad.bb0d68"]]},{"id":"25d2e289.15aefe","type":"ui_switch","z":"41f61d2.fbe09e4","group":"30e652f.d9de3ae","order":0,"width":0,"height":0,"name":"","label":"switch","topic":"","style":"","onvalue":"true","onicon":"","oncolor":"","offvalue":"false","officon":"","offcolor":"","x":260,"y":600,"wires":[[]]},{"id":"6f18b200.666a4","type":"ui_button","z":"41f61d2.fbe09e4","name":"","group":"30e652f.d9de3ae","order":0,"width":0,"height":0,"label":"button","color":"","icon":"fa-male","payload":"","topic":"","x":120,"y":600,"wires":[[]]}] \ No newline at end of file diff --git a/main.js b/main.js index ceb954b..906cd0b 100755 --- a/main.js +++ b/main.js @@ -96,7 +96,7 @@ function createWindow () { }); // load the initial page - setTimeout(function() {mainWindow.loadURL(url)}, 500); + setTimeout(function() {mainWindow.loadURL(url)}, 250); // Open the DevTools. //mainWindow.webContents.openDevTools();