diff --git a/flows.json b/flows.json index b79ecd6..34810de 100644 --- a/flows.json +++ b/flows.json @@ -1 +1 @@ -[{"type":"tab","id":"41f61d2.fbe09e4","label":"Flow 1"},{"id":"52a903f3.ad56fc","type":"ui_tab","z":"41f61d2.fbe09e4","name":"Home","icon":"dashboard","order":"1"},{"id":"30e652f.d9de3ae","type":"ui_group","z":"41f61d2.fbe09e4","order":"2","name":"Widgets","width":"6"},{"id":"a8ecb9.c60f4348","type":"ui_group","z":"41f61d2.fbe09e4","order":"1","name":"Introduction","width":"6"},{"id":"d3a0fd6d.2c5f","type":"ui_slider","z":"41f61d2.fbe09e4","tab":"52a903f3.ad56fc","group":"30e652f.d9de3ae","order":"3","width":"6","height":"1","name":"Slider","label":"Slider","topic":"","min":0,"max":10,"x":130,"y":100,"wires":[["42ddca5b.bd2234"]]},{"id":"42ddca5b.bd2234","type":"ui_gauge","z":"41f61d2.fbe09e4","tab":"52a903f3.ad56fc","group":"30e652f.d9de3ae","order":"2","width":"6","height":"4","name":"Gauge","title":"","label":"","format":"{{value}}","min":0,"max":10,"x":290,"y":100,"wires":[]},{"id":"852d9c04.7ad26","type":"ui_link","z":"41f61d2.fbe09e4","name":"Editor","link":"http://localhost:8000/admin","icon":"open_in_browser","target":"newtab","order":1,"x":70,"y":240,"wires":[]},{"id":"fce4a072.031b6","type":"ui_button","z":"41f61d2.fbe09e4","tab":"52a903f3.ad56fc","group":"30e652f.d9de3ae","order":"4","width":"6","height":"1","name":"Button","label":"Click Me","color":"green","icon":"","payload":"Hello !","topic":"","x":130,"y":160,"wires":[["a09bb056.68216"]]},{"id":"a09bb056.68216","type":"ui_toast","z":"41f61d2.fbe09e4","name":"","x":310,"y":160,"wires":[]},{"id":"189cf871.681118","type":"ui_template","z":"41f61d2.fbe09e4","tab":"52a903f3.ad56fc","group":"a8ecb9.c60f4348","name":"Welcome","order":1,"format":"
On the right you will see some simple widgets to play with.\nTo get started making something a bit more useful click the menu icon at the top-left, and select Editor.\n
","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":"iframe","order":"2","x":80,"y":280,"wires":[]},{"id":"fcc1980e.81fb58","type":"worldmap","z":"41f61d2.fbe09e4","name":"","x":80,"y":320,"wires":[]}] \ No newline at end of file +[{"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":"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":[[]]}] \ No newline at end of file diff --git a/flows.original b/flows.original new file mode 100644 index 0000000..03ce244 --- /dev/null +++ b/flows.original @@ -0,0 +1 @@ +[{"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":"Widgets","order":"2","disp":true,"width":"6"},{"id":"a8ecb9.c60f4348","type":"ui_group","z":"41f61d2.fbe09e4","name":"Introduction","order":"1","disp":false,"width":"3"},{"id":"9fad2bad.c21038","type":"ui_group","z":"41f61d2.fbe09e4","name":"Extras","order":"3","disp":true,"width":"6"},{"id":"b8a170b7.b3cd","type":"mqtt-broker","broker":"realtime.ngi.ibm.com","port":"1883","clientid":""},{"id":"d3a0fd6d.2c5f","type":"ui_slider","z":"41f61d2.fbe09e4","tab":"52a903f3.ad56fc","group":"30e652f.d9de3ae","order":"3","width":"6","height":"1","name":"Slider","label":"Slider","topic":"","min":0,"max":"9","x":130,"y":100,"wires":[["42ddca5b.bd2234"]]},{"id":"42ddca5b.bd2234","type":"ui_gauge","z":"41f61d2.fbe09e4","tab":"52a903f3.ad56fc","group":"30e652f.d9de3ae","order":"2","width":"6","height":"3","name":"Gauge","title":"Slider","label":"small label","format":"{{value}}","min":0,"max":"9","x":290,"y":100,"wires":[]},{"id":"852d9c04.7ad26","type":"ui_link","z":"41f61d2.fbe09e4","name":"Editor","link":"http://localhost:8000/admin","icon":"open_in_browser","target":"newtab","order":1,"x":70,"y":280,"wires":[]},{"id":"fce4a072.031b6","type":"ui_button","z":"41f61d2.fbe09e4","name":"Button","tab":"52a903f3.ad56fc","group":"30e652f.d9de3ae","order":"4","width":"6","height":"1","label":"Click Me","color":"green","icon":"fa-male","payload":"Hello !","topic":"","x":130,"y":140,"wires":[["a09bb056.68216"]]},{"id":"a09bb056.68216","type":"ui_toast","z":"41f61d2.fbe09e4","name":"","x":310,"y":140,"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":"On the right you will see some simple widgets to play with.\nTo get started making something a bit more useful click the menu icon at the top-left, and select Editor.
","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":"2","x":80,"y":320,"wires":[]},{"id":"f7cabdee.e2deb","type":"ui_numeric","z":"41f61d2.fbe09e4","tab":"52a903f3.ad56fc","group":"9fad2bad.c21038","order":1,"width":"6","height":1,"name":"numeric","label":"numeric","topic":"number is now","format":"{{value}}","min":0,"max":10,"x":220,"y":260,"wires":[["61bab7aa.6c9038"]]},{"id":"fda2cf2d.641b","type":"ui_switch","z":"41f61d2.fbe09e4","tab":"52a903f3.ad56fc","group":"9fad2bad.c21038","order":"3","width":6,"height":1,"name":"switch","label":"switch","topic":"","style":"","onvalue":"On","onicon":"","oncolor":"green","offvalue":"Off","officon":"","offcolor":"red","x":230,"y":300,"wires":[["11b219df.2c5b76"]]},{"id":"11b219df.2c5b76","type":"ui_text_input","z":"41f61d2.fbe09e4","tab":"52a903f3.ad56fc","group":"9fad2bad.c21038","order":"4","width":6,"height":1,"name":"","mode":"text","delay":300,"label":"text","topic":"","x":350,"y":360,"wires":[["fda2cf2d.641b"]]},{"id":"61bab7aa.6c9038","type":"ui_text","z":"41f61d2.fbe09e4","tab":"52a903f3.ad56fc","group":"9fad2bad.c21038","order":"2","width":6,"height":1,"name":"text","label":"{{msg.topic}}","format":"{{msg.payload}}","x":370,"y":260,"wires":[]},{"id":"8d425a0d.21eb88","type":"mqtt in","z":"c46c66a2.e6e9e8","name":"","topic":"planes","broker":"b8a170b7.b3cd","x":70,"y":360,"wires":[["dd285cbf.592b9"]]},{"id":"84eebce6.253ed","type":"debug","z":"c46c66a2.e6e9e8","name":"","active":false,"console":"false","complete":"false","x":670,"y":360,"wires":[]},{"id":"dd285cbf.592b9","type":"json","z":"c46c66a2.e6e9e8","name":"","x":210,"y":360,"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":360,"wires":[["84eebce6.253ed","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":"msg.payload.name = msg.topic.split(\"/\")[2];\ndelete msg.payload._type;\nmsg.payload.icon = \"male\";\nmsg.payload.layer = \"owntracks\";\nmsg.payload.iconColor = \"red\";\nreturn msg;","outputs":1,"noerr":0,"x":390,"y":140,"wires":[["e35e830d.c113b"]]},{"id":"6a1a5342.b2539c","type":"json","z":"c46c66a2.e6e9e8","name":"","x":250,"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":240,"wires":[["704cd9c3.8dcf68"]]},{"id":"21745b3d.efe594","type":"debug","z":"c46c66a2.e6e9e8","name":"","active":true,"console":"false","complete":"payload","x":430,"y":260,"wires":[]},{"id":"e330b119.65ef9","type":"mqtt in","z":"c46c66a2.e6e9e8","name":"","topic":"map/input","broker":"b8a170b7.b3cd","x":80,"y":300,"wires":[["5aae3a13.d62c24"]]},{"id":"5aae3a13.d62c24","type":"json","z":"c46c66a2.e6e9e8","name":"","x":210,"y":300,"wires":[["2acc93eb.c1b67c","e35e830d.c113b"]]},{"id":"2acc93eb.c1b67c","type":"debug","z":"c46c66a2.e6e9e8","name":"","active":true,"console":"false","complete":"false","x":430,"y":300,"wires":[]},{"id":"e35e830d.c113b","type":"worldmap","z":"c46c66a2.e6e9e8","name":"","x":570,"y":200,"wires":[]},{"id":"704cd9c3.8dcf68","type":"json","z":"c46c66a2.e6e9e8","name":"","x":210,"y":240,"wires":[["e35e830d.c113b","21745b3d.efe594"]]}] \ No newline at end of file diff --git a/main.js b/main.js index 304dd0e..905e749 100755 --- a/main.js +++ b/main.js @@ -23,6 +23,7 @@ var server = http.createServer(red_app); // Create the settings object - see default settings.js file for other options var settings = { + verbose: true, httpAdminRoot:"/admin", httpNodeRoot: "/", userDir: __dirname, diff --git a/node-red-node-disco-0.0.1.tgz b/node-red-node-disco-0.0.1.tgz new file mode 100644 index 0000000..d670ba4 Binary files /dev/null and b/node-red-node-disco-0.0.1.tgz differ diff --git a/package.json b/package.json index fd2fd1b..3a945ed 100644 --- a/package.json +++ b/package.json @@ -26,9 +26,12 @@ "url": "git+https://github.com/dceejay/electron-node-red.git" }, "dependencies": { - "node-red": "~0.13.4", - "node-red-dashboard": "git+https://github.com/node-red/node-red-dashboard.git", - "node-red-contrib-web-worldmap": "*", + "node-red": "^0.13.4", + "node-red-dashboard": "node-red/node-red-dashboard", + "node-red-contrib-web-worldmap": "^1.0.0", + "node-red-node-geofence": "*", + "node-red-node-disco": "./node-red-node-disco-0.0.1.tgz", + "node-red-node-sensortag": "*", "express": "^4.13.0" }, "keywords": [