-
Notifications
You must be signed in to change notification settings - Fork 15
/
all_flows.json
1 lines (1 loc) · 18.4 KB
/
all_flows.json
1
[{"id":"1a934d7.fae59b3","type":"tab","label":"Porchlight","disabled":false,"info":""},{"id":"acd05c4e.aa563","type":"tab","label":"Exercise","disabled":false,"info":""},{"id":"ff177395.3cf468","type":"tab","label":"Hello World","disabled":false,"info":""},{"id":"cb9f4cf6.82ce9","type":"tab","label":"MQTT Hello World","disabled":false,"info":""},{"id":"cca88244.79bec","type":"tab","label":"Dashboard Hello World","disabled":false,"info":""},{"id":"1b94bd42.8058ab","type":"tab","label":"Death Star","disabled":false,"info":""},{"id":"51236801.56dee8","type":"mqtt-broker","z":"","name":"","broker":"192.168.1.135","port":"1883","clientid":"nelson","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"26d6d6a.f25a12a","type":"ui_tab","z":"","name":"Home","icon":"dashboard","order":1,"disabled":false,"hidden":false},{"id":"24f75e84.298d62","type":"ui_group","z":"","name":"Exercise Log","tab":"ae02afd8.ac8d7","disp":true,"width":"6","collapse":false},{"id":"a03a7bdb.621378","type":"ui_base","theme":{"name":"theme-dark","lightTheme":{"default":"#0094CE","baseColor":"#0094CE","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":true,"reset":false},"darkTheme":{"default":"#097479","baseColor":"#097479","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":true,"reset":false},"customTheme":{"name":"Untitled Theme 1","default":"#4B7930","baseColor":"#4B7930","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"},"themeState":{"base-color":{"default":"#097479","value":"#097479","edited":false},"page-titlebar-backgroundColor":{"value":"#097479","edited":false},"page-backgroundColor":{"value":"#111111","edited":false},"page-sidebar-backgroundColor":{"value":"#000000","edited":false},"group-textColor":{"value":"#0eb8c0","edited":false},"group-borderColor":{"value":"#555555","edited":false},"group-backgroundColor":{"value":"#333333","edited":false},"widget-textColor":{"value":"#eeeeee","edited":false},"widget-backgroundColor":{"value":"#097479","edited":false},"widget-borderColor":{"value":"#333333","edited":false},"base-font":{"value":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"}},"angularTheme":{"primary":"indigo","accents":"blue","warn":"red","background":"grey"}},"site":{"name":"Node-RED Dashboard","hideToolbar":"false","allowSwipe":"false","lockMenu":"false","allowTempTheme":"true","dateFormat":"DD/MM/YYYY","sizes":{"sx":48,"sy":48,"gx":6,"gy":6,"cx":6,"cy":6,"px":0,"py":0}}},{"id":"40c2d32b.f1c23c","type":"ui_group","z":"","name":"Planets Destroyed","tab":"b0bb6dec.b8203","order":3,"disp":true,"width":"6","collapse":false},{"id":"ae02afd8.ac8d7","type":"ui_tab","z":"","name":"Exercise","icon":"dashboard","order":3,"disabled":false,"hidden":false},{"id":"fba9a46a.a3b7f8","type":"mqtt-broker","z":"","name":"Mosquitto Test Server","broker":"test.mosquitto.org","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"f13fe4fa.4a3be","type":"ui_tab","z":"","name":"Hello World","icon":"dashboard","disabled":false,"hidden":false},{"id":"5e0b0374.3ebc5c","type":"ui_group","z":"","name":"Hello World Dashboard","tab":"f13fe4fa.4a3be","disp":true,"width":"6","collapse":false},{"id":"a0972b0.da6fc58","type":"ui_group","z":"","name":"Exercise readout","tab":"ae02afd8.ac8d7","disp":false,"width":"6","collapse":false},{"id":"b0bb6dec.b8203","type":"ui_tab","z":"","name":"Death Star","icon":"fa-bullseye","disabled":false,"hidden":false},{"id":"27782f47.e87ee","type":"ui_group","z":"","name":"Porchlight Control","tab":"26d6d6a.f25a12a","order":1,"disp":true,"width":"6","collapse":false},{"id":"60447f.4c438b8","type":"ui_group","z":"","name":"Porchlight Status","tab":"26d6d6a.f25a12a","order":2,"disp":true,"width":"6","collapse":false},{"id":"601bfe9b.9851e","type":"ui_group","z":"","name":"Super Laser","tab":"b0bb6dec.b8203","order":1,"disp":true,"width":"6","collapse":false},{"id":"b501961d.143778","type":"ui_group","z":"","name":"Tractor Beam","tab":"b0bb6dec.b8203","order":5,"disp":true,"width":"6","collapse":false},{"id":"23b2054c.0f13e2","type":"ui_group","z":"","name":"Targeting","tab":"b0bb6dec.b8203","order":2,"disp":true,"width":"6","collapse":false},{"id":"e68b8e9e.08f1e","type":"ui_group","z":"","name":"Distance to Target","tab":"b0bb6dec.b8203","order":4,"disp":true,"width":"6","collapse":false},{"id":"71eb330b.5ed4ec","type":"mqtt in","z":"1a934d7.fae59b3","name":"Schedule Topic","topic":"lighting/porchlight/status/schedule","qos":"1","datatype":"auto","broker":"51236801.56dee8","x":120,"y":480,"wires":[["9d83752e.38f5a8","66b17e6f.eff47"]]},{"id":"9d83752e.38f5a8","type":"debug","z":"1a934d7.fae59b3","name":"Debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":390,"y":480,"wires":[]},{"id":"b79fcaf0.1a6a98","type":"mqtt out","z":"1a934d7.fae59b3","name":"Porchlight client","topic":"","qos":"1","retain":"","broker":"51236801.56dee8","x":420,"y":200,"wires":[]},{"id":"740e546f.41942c","type":"inject","z":"1a934d7.fae59b3","name":"Test (Timestamp)","topic":"lighting/porchlight/status/schedule","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":120,"y":260,"wires":[["b79fcaf0.1a6a98"]]},{"id":"66b17e6f.eff47","type":"ui_text","z":"1a934d7.fae59b3","group":"60447f.4c438b8","order":2,"width":0,"height":0,"name":"Schedule","label":"Schedule:","format":"{{msg.payload}}","layout":"col-center","x":400,"y":520,"wires":[]},{"id":"4fdf6abb.e63164","type":"ui_button","z":"1a934d7.fae59b3","name":"","group":"27782f47.e87ee","order":1,"width":0,"height":0,"passthru":false,"label":"On","tooltip":"","color":"","bgcolor":"","icon":"","payload":"On","payloadType":"str","topic":"lighting/porchlight/control","x":150,"y":40,"wires":[["b79fcaf0.1a6a98"]]},{"id":"509942a1.f9570c","type":"ui_button","z":"1a934d7.fae59b3","name":"","group":"27782f47.e87ee","order":1,"width":0,"height":0,"passthru":false,"label":"Off","tooltip":"","color":"","bgcolor":"","icon":"","payload":"Off","payloadType":"str","topic":"lighting/porchlight/control","x":150,"y":80,"wires":[["b79fcaf0.1a6a98"]]},{"id":"a7eab231.935d1","type":"ui_button","z":"1a934d7.fae59b3","name":"","group":"60447f.4c438b8","order":3,"width":0,"height":0,"passthru":false,"label":"Update Status","tooltip":"","color":"","bgcolor":"","icon":"","payload":"Status","payloadType":"str","topic":"lighting/porchlight/control","x":120,"y":120,"wires":[["b79fcaf0.1a6a98"]]},{"id":"84b4609f.ce9ba","type":"mqtt in","z":"1a934d7.fae59b3","name":"Status Topic","topic":"lighting/porchlight/status","qos":"1","datatype":"auto","broker":"51236801.56dee8","x":130,"y":380,"wires":[["44fdf93e.1eb5f8","2c80af3c.5eba5"]]},{"id":"44fdf93e.1eb5f8","type":"debug","z":"1a934d7.fae59b3","name":"Debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":390,"y":380,"wires":[]},{"id":"2c80af3c.5eba5","type":"ui_text","z":"1a934d7.fae59b3","group":"60447f.4c438b8","order":1,"width":0,"height":0,"name":"Status","label":"Status","format":"{{msg.payload}}","layout":"col-center","x":390,"y":420,"wires":[]},{"id":"97c2ea0e.fe4d68","type":"file","z":"acd05c4e.aa563","name":"","filename":"/home/mike/Documents/exerciselog.txt","appendNewline":true,"createDir":false,"overwriteFile":"false","encoding":"none","x":870,"y":360,"wires":[["b740d2f8.b6cf18"]]},{"id":"7117b8ed.1c3b28","type":"debug","z":"acd05c4e.aa563","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":790,"y":400,"wires":[]},{"id":"80099d73.2d50d8","type":"function","z":"acd05c4e.aa563","name":"Date Formatter","func":"var date;\ndate = new Date();\nvar year = date.getFullYear();\nvar month = date.getMonth();\nmonth = (month < 9 ? '0' : '') + (month+1)\nvar day = date.getDate();\nday = (day < 10 ? '0' : '') + day\nmsg.payload = year + '-' + month + '-' + day;\nreturn msg;","outputs":1,"noerr":0,"x":520,"y":360,"wires":[["7117b8ed.1c3b28","97c2ea0e.fe4d68"]]},{"id":"cd632328.6bb408","type":"ui_button","z":"acd05c4e.aa563","name":"","group":"24f75e84.298d62","order":0,"width":0,"height":0,"passthru":false,"label":"Mike Exercised!","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"date","topic":"","x":240,"y":320,"wires":[["80099d73.2d50d8","fa38e73c.276a38"]]},{"id":"fa38e73c.276a38","type":"file","z":"acd05c4e.aa563","name":"","filename":"/home/mike/Documents/exerciselog-raw.txt","appendNewline":true,"createDir":false,"overwriteFile":"false","encoding":"none","x":890,"y":320,"wires":[[]]},{"id":"b740d2f8.b6cf18","type":"ui_toast","z":"acd05c4e.aa563","position":"dialog","displayTime":"3","highlight":"","sendall":true,"outputs":1,"ok":"OK","cancel":"","raw":false,"topic":"Good Job! Added to log:","name":"","x":1170,"y":360,"wires":[["fbba0d1.01691f"]]},{"id":"9a0b941a.78917","type":"ui_gauge","z":"acd05c4e.aa563","name":"","group":"a0972b0.da6fc58","order":0,"width":0,"height":0,"gtype":"gage","title":"Exercise Over Last 7 Days","label":"Days","format":"{{value}}","min":0,"max":"7","colors":["#ff0000","#ffff00","#00ff00"],"seg1":"1","seg2":"3","x":1160,"y":560,"wires":[]},{"id":"fbba0d1.01691f","type":"file in","z":"acd05c4e.aa563","name":"","filename":"/home/mike/Documents/exerciselog-raw.txt","format":"utf8","chunk":false,"sendError":false,"encoding":"none","x":600,"y":560,"wires":[["d5268b63.9acba8"]]},{"id":"5d6806b.9bb7678","type":"debug","z":"acd05c4e.aa563","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":1110,"y":620,"wires":[]},{"id":"90f8d4f2.9db3a8","type":"inject","z":"acd05c4e.aa563","name":"","topic":"","payload":"Started!","payloadType":"str","repeat":"","crontab":"","once":true,"onceDelay":"0.4","x":280,"y":560,"wires":[["fbba0d1.01691f"]]},{"id":"d5268b63.9acba8","type":"function","z":"acd05c4e.aa563","name":"Magic","func":"//Turn incoming timestamps log into an array:\nvar exercisearray = msg.payload.split(\"\\n\");\nif (exercisearray.slice(-1)[0] === \"\") exercisearray.length = exercisearray.length-1\n\n//Get timestamp for week ago to compare against\nvar thismorning = new Date()\nthismorning.setHours(0)\nthismorning.setMinutes(0)\nthismorning.setSeconds(0)\nthismorning.setMilliseconds(0)\nvar sixdays = 1000*60*60*24*6\nvar oneweekago = thismorning.getTime()-sixdays\nnode.warn(oneweekago)\n\n//Iterate and count past week of exercise\nvar count = 0\nvar secondsinday = 60*24*7\nfor (var i=1; i<8; i++) {\n if (i>exercisearray.length) break;\n var testval = parseInt(exercisearray.slice(-i)[0]);\n node.warn(i,testval); \n if (testval >= oneweekago) ++count;\n}\n\n//Store our answer as the payload and pass along\nmsg.payload = count;\nreturn msg;","outputs":1,"noerr":0,"x":910,"y":560,"wires":[["5d6806b.9bb7678","9a0b941a.78917"]]},{"id":"1c6883be.759c24","type":"inject","z":"ff177395.3cf468","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":200,"y":140,"wires":[["1fec91a8.ab7156"]]},{"id":"1fec91a8.ab7156","type":"debug","z":"ff177395.3cf468","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":370,"y":140,"wires":[]},{"id":"77f24293.e58d7c","type":"mqtt out","z":"cb9f4cf6.82ce9","name":"","topic":"Hackaday/nodered/test","qos":"","retain":"","broker":"fba9a46a.a3b7f8","x":370,"y":60,"wires":[]},{"id":"d4924cea.650678","type":"mqtt in","z":"cb9f4cf6.82ce9","name":"","topic":"Hackaday/nodered/test","qos":"2","datatype":"auto","broker":"fba9a46a.a3b7f8","x":180,"y":180,"wires":[["eae6d887.d1327"]]},{"id":"eae6d887.d1327","type":"debug","z":"cb9f4cf6.82ce9","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":420,"y":180,"wires":[]},{"id":"b6e62f41.d8a7","type":"inject","z":"cb9f4cf6.82ce9","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":60,"wires":[["77f24293.e58d7c"]]},{"id":"31d56c8b.5527b4","type":"ui_button","z":"cca88244.79bec","name":"","group":"5e0b0374.3ebc5c","order":0,"width":0,"height":0,"passthru":false,"label":"button","tooltip":"","color":"","bgcolor":"","icon":"","payload":"Hello Hackaday!","payloadType":"str","topic":"","x":90,"y":60,"wires":[["8eb396e2.924698"]]},{"id":"8eb396e2.924698","type":"debug","z":"cca88244.79bec","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":250,"y":60,"wires":[]},{"id":"bea2249b.03fa28","type":"ui_gauge","z":"1b94bd42.8058ab","name":"","group":"601bfe9b.9851e","order":1,"width":0,"height":0,"gtype":"gage","title":"Recharge Status","label":"%","format":"{{value}}","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":410,"y":280,"wires":[]},{"id":"72ff4a39.ad92a4","type":"ui_chart","z":"1b94bd42.8058ab","name":"Planets Destroyed","group":"40c2d32b.f1c23c","order":5,"width":0,"height":0,"label":"","chartType":"bar","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":390,"y":460,"wires":[[]]},{"id":"7a998c0d.32f09c","type":"inject","z":"1b94bd42.8058ab","name":"","topic":"","payload":"[{\"series\":[\"X\"],\"data\":[[4,2,3,8,4,4,1]],\"labels\":[\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\",\"Sun\"]}]","payloadType":"json","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":150,"y":460,"wires":[["72ff4a39.ad92a4"]]},{"id":"d9eccff.e97323","type":"inject","z":"1b94bd42.8058ab","name":"","topic":"","payload":"68","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":180,"y":280,"wires":[["bea2249b.03fa28"]]},{"id":"551db070.2212a","type":"ui_slider","z":"1b94bd42.8058ab","name":"","label":"Power","tooltip":"","group":"b501961d.143778","order":2,"width":0,"height":0,"passthru":true,"outs":"all","topic":"","min":0,"max":10,"step":1,"x":200,"y":120,"wires":[["3a2eed5c.7efcea"]]},{"id":"fb85ad58.10f14","type":"ui_switch","z":"1b94bd42.8058ab","name":"","label":"Engaged","tooltip":"","group":"b501961d.143778","order":3,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":190,"y":80,"wires":[[]]},{"id":"3a2eed5c.7efcea","type":"ui_text","z":"1b94bd42.8058ab","group":"b501961d.143778","order":1,"width":"0","height":"0","name":"","label":"<font size =20 color =#4383f9>{{msg.payload}}","format":"","layout":"col-center","x":350,"y":120,"wires":[]},{"id":"391493ae.b38aa4","type":"ui_text_input","z":"1b94bd42.8058ab","name":"","label":"Planet:","tooltip":"","group":"23b2054c.0f13e2","order":1,"width":0,"height":0,"passthru":true,"mode":"text","delay":300,"topic":"","x":360,"y":560,"wires":[[]]},{"id":"483dac0a.fcb8d4","type":"ui_button","z":"1b94bd42.8058ab","name":"","group":"23b2054c.0f13e2","order":2,"width":"0","height":"0","passthru":false,"label":"Arm","tooltip":"","color":"black","bgcolor":"#f3ba3f","icon":"fa-bullseye","payload":"","payloadType":"str","topic":"","x":350,"y":600,"wires":[[]]},{"id":"65f18a4c.724a8c","type":"ui_button","z":"1b94bd42.8058ab","name":"","group":"23b2054c.0f13e2","order":3,"width":"0","height":"0","passthru":false,"label":"Obliterate","tooltip":"","color":"","bgcolor":"#d21d1d","icon":"fa-bomb","payload":"","payloadType":"str","topic":"","x":350,"y":640,"wires":[[]]},{"id":"3a034df7.ad23ea","type":"ui_gauge","z":"1b94bd42.8058ab","name":"Distance to target","group":"e68b8e9e.08f1e","order":0,"width":0,"height":0,"gtype":"donut","title":"","label":"Million Kilometers","format":"{{value}}","min":0,"max":"1000","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":390,"y":720,"wires":[]},{"id":"509bf119.a3a038","type":"inject","z":"1b94bd42.8058ab","name":"","topic":"","payload":"26","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":150,"y":720,"wires":[["3a034df7.ad23ea"]]},{"id":"adfce41e.f270c8","type":"ui_switch","z":"1b94bd42.8058ab","name":"","label":"Engage Reactor","tooltip":"","group":"601bfe9b.9851e","order":2,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":400,"y":240,"wires":[[]]},{"id":"1e983f0a.ee1311","type":"inject","z":"1b94bd42.8058ab","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":190,"y":240,"wires":[["adfce41e.f270c8"]]},{"id":"5e25e1.3a2c5a2","type":"ui_chart","z":"1b94bd42.8058ab","name":"","group":"601bfe9b.9851e","order":3,"width":"6","height":"3","label":"Temperature","chartType":"horizontalBar","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"0","ymax":"175","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":390,"y":380,"wires":[[]]},{"id":"cd240846.cbb04","type":"inject","z":"1b94bd42.8058ab","name":"","topic":"","payload":"[{\"series\":[\"X\"],\"data\":[[114]],\"labels\":[\"Celsius\"]}]","payloadType":"json","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":160,"y":380,"wires":[["5e25e1.3a2c5a2"]]},{"id":"fcfb946e.f2976","type":"inject","z":"1b94bd42.8058ab","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":150,"y":340,"wires":[["2b619cbc.92e8d4"]]},{"id":"2b619cbc.92e8d4","type":"ui_switch","z":"1b94bd42.8058ab","name":"","label":"Engage Cooling System","tooltip":"","group":"601bfe9b.9851e","order":4,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":430,"y":340,"wires":[[]]}]