-
Notifications
You must be signed in to change notification settings - Fork 1
/
flows_nodered.json
1 lines (1 loc) · 32 KB
/
flows_nodered.json
1
[{"id":"540bc4e6.69fa8c","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"626ddac.cd2cd24","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"f1a61747.24a818","type":"tab","label":"Reolink","disabled":true,"info":""},{"id":"76563904.36b9e8","type":"subflow","name":"Motor Controller","info":"Expects different messages\nAn \"On\" message and a \"Direction\" message","category":"","in":[{"x":25,"y":219,"wires":[{"id":"91e758dc.c86c68"}]}],"out":[{"x":1050,"y":91,"wires":[{"id":"c23718e2.6ab778","port":0},{"id":"ac2a1c13.36a4e","port":0}]},{"x":1053,"y":164,"wires":[{"id":"c23718e2.6ab778","port":0},{"id":"12b0f7d4.7da668","port":0}]},{"x":289,"y":67,"wires":[{"id":"91e758dc.c86c68","port":0}]}],"env":[],"color":"#DDAA99"},{"id":"6e10969e.4c2928","type":"subflow","name":"Subflow 1","info":"","in":[],"out":[]},{"id":"d4825fb1.46b48","type":"arduino-board","z":"","device":"/dev/ttyUSB1"},{"id":"baa44c00.b30c5","type":"serial-port","z":"","serialport":"/dev/ttyUSB1","serialbaud":"9600","databits":"8","parity":"none","stopbits":"1","waitfor":"","dtr":"none","rts":"none","cts":"none","dsr":"none","newline":"\\n","bin":"false","out":"char","addchar":"","responsetimeout":"10000"},{"id":"e2a78d19.20ab9","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false},{"id":"fd0d654a.200368","type":"ui_group","z":"","name":"navigation","tab":"b3a0ca06.7d4678","order":1,"disp":true,"width":"5","collapse":true},{"id":"4db584a4.f110ac","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":"Century Gothic,CenturyGothic,AppleGothic,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":"#333333","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":"Century Gothic,CenturyGothic,AppleGothic,sans-serif"}},"angularTheme":{"primary":"indigo","accents":"blue","warn":"red","background":"grey"}},"site":{"name":"Disinfection robot dashboard","hideToolbar":"true","allowSwipe":"false","lockMenu":"icon","allowTempTheme":"true","dateFormat":"DD/MM/YYYY","sizes":{"sx":48,"sy":48,"gx":6,"gy":6,"cx":6,"cy":6,"px":0,"py":0}}},{"id":"b3a0ca06.7d4678","type":"ui_tab","z":"","name":"machine","icon":"dashboard","order":4,"disabled":false,"hidden":false},{"id":"4e8a1961.efc7a8","type":"ui_group","z":"","name":"disinfection","tab":"","order":2,"disp":true,"width":"6","collapse":false},{"id":"5ad0df2.099312","type":"ui_tab","z":"","name":"testing","icon":"dashboard","disabled":false,"hidden":false},{"id":"37d658fa.aafd98","type":"ui_group","z":"","name":"machine_info","tab":"5ad0df2.099312","order":1,"disp":true,"width":"6","collapse":false},{"id":"439380e4.8e063","type":"ui_group","z":"","name":"Power","tab":"5ad0df2.099312","order":2,"disp":true,"width":"6","collapse":false},{"id":"fa9bbd1d.c222a","type":"ui_group","z":"","name":"disinfection","tab":"b3a0ca06.7d4678","order":2,"disp":true,"width":"6","collapse":false},{"id":"a2b99437.c13148","type":"ui_group","z":"","name":"Default","tab":"","order":1,"disp":true,"width":"6","collapse":false},{"id":"df9b990f.939c98","type":"ui_group","z":"","name":"RCL-522","tab":"22c66ec2.c97962","order":2,"disp":true,"width":"6","collapse":false},{"id":"48918e6c.1eea5","type":"ui_group","z":"","name":"Video capture","tab":"22c66ec2.c97962","order":3,"disp":true,"width":"6","collapse":false},{"id":"9f3c3010.cd9d9","type":"ui_group","z":"","name":"E1 Zoom PTZ control","tab":"22c66ec2.c97962","order":4,"disp":true,"width":"6","collapse":false},{"id":"dd0c6015.665ed","type":"ui_group","z":"","name":"RCL-522 Z control","tab":"22c66ec2.c97962","order":5,"disp":true,"width":"6","collapse":false},{"id":"22c66ec2.c97962","type":"ui_tab","z":"","name":"Reolink","icon":"dashboard","disabled":false,"hidden":false},{"id":"60079804.05a278","type":"ui_group","z":"","name":"motor","tab":"b3a0ca06.7d4678","order":3,"disp":true,"width":"6","collapse":true},{"id":"d2217254.ed5a","type":"ui_group","z":"","name":"peekaboo","tab":"5ad0df2.099312","order":3,"disp":true,"width":"6","collapse":true},{"id":"91e758dc.c86c68","type":"switch","z":"76563904.36b9e8","name":"Split Messages","property":"topic","propertyType":"msg","rules":[{"t":"eq","v":"Speed","vt":"str"},{"t":"eq","v":"On","vt":"str"},{"t":"eq","v":"Direction","vt":"str"}],"checkall":"true","outputs":3,"x":165,"y":228,"wires":[["c80806ac.16ef88"],["c23718e2.6ab778","5407ac68.e5fa34"],["8f57c464.0b8a08"]]},{"id":"c23718e2.6ab778","type":"switch","z":"76563904.36b9e8","name":"Off","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"str"}],"checkall":"true","outputs":1,"x":494,"y":199,"wires":[["a0702de7.a017d","c06ab144.9affe"]]},{"id":"a0702de7.a017d","type":"debug","z":"76563904.36b9e8","name":"Motor 1","active":true,"console":"false","complete":"payload","x":1099,"y":31.5,"wires":[]},{"id":"c06ab144.9affe","type":"debug","z":"76563904.36b9e8","name":"Motor 2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":1095,"y":226.5,"wires":[]},{"id":"5407ac68.e5fa34","type":"switch","z":"76563904.36b9e8","name":"On","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"}],"checkall":"true","outputs":1,"x":493,"y":263,"wires":[["ac2a1c13.36a4e"]]},{"id":"f20994cc.d77de8","type":"change","z":"76563904.36b9e8","name":"Set Direction Clockwise","rules":[{"t":"set","p":"direction","pt":"flow","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":477,"y":358,"wires":[["ac2a1c13.36a4e"]]},{"id":"5752bde3.625a34","type":"change","z":"76563904.36b9e8","name":"Set Direction Counter Clockwise","rules":[{"t":"set","p":"direction","pt":"flow","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":500,"y":417,"wires":[["ac2a1c13.36a4e"]]},{"id":"ac2a1c13.36a4e","type":"function","z":"76563904.36b9e8","name":"Get Direction","func":"var direction = flow.get('direction')||0;\nmsg.payload = direction;\nreturn msg;","outputs":1,"noerr":0,"x":713,"y":300,"wires":[["a0702de7.a017d","12b0f7d4.7da668"]]},{"id":"12b0f7d4.7da668","type":"function","z":"76563904.36b9e8","name":"Invert","func":"if (msg.payload == 1) {\n msg.payload = 0;\n}\nelse\n{\n msg.payload = 1;\n}\nreturn msg;","outputs":1,"noerr":0,"x":901,"y":303,"wires":[["c06ab144.9affe"]]},{"id":"8f57c464.0b8a08","type":"switch","z":"76563904.36b9e8","name":"Direction","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"str"},{"t":"eq","v":"1","vt":"str"}],"checkall":"true","outputs":2,"x":253,"y":398,"wires":[["f20994cc.d77de8"],["5752bde3.625a34"]]},{"id":"c80806ac.16ef88","type":"debug","z":"76563904.36b9e8","name":"Motor Speed","active":true,"console":"false","complete":"payload","x":353,"y":127.5,"wires":[]},{"id":"a1be7fce.217eb","type":"rpi-gpio out","z":"6e10969e.4c2928","name":"IN4-reverse-motorA","pin":"35","set":"","level":"0","freq":"0","out":"pwm","x":390,"y":200,"wires":[]},{"id":"5cb6826a.a4e96c","type":"rpi-gpio out","z":"6e10969e.4c2928","name":"IN3-forward-motorB","pin":"33","set":"","level":"0","freq":"50","out":"pwm","x":390,"y":160,"wires":[]},{"id":"67bc8f36.005b7","type":"rpi-gpio out","z":"6e10969e.4c2928","name":"IN2-reverse-motorA","pin":"31","set":"","level":"0","freq":"0","out":"pwm","x":380,"y":100,"wires":[]},{"id":"270ab238.da3b3e","type":"rpi-gpio out","z":"6e10969e.4c2928","name":"IN1-forward-motorA","pin":"29","set":"","level":"0","freq":"50","out":"pwm","x":380,"y":60,"wires":[]},{"id":"456bf20c.7672ac","type":"ui_button","z":"6e10969e.4c2928","name":"","group":"fd0d654a.200368","order":1,"width":0,"height":0,"passthru":false,"label":"forward_button","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":200,"y":200,"wires":[["a1be7fce.217eb","5cb6826a.a4e96c","67bc8f36.005b7","270ab238.da3b3e"]]},{"id":"5723c66b.2e4b28","type":"rpi-gpio out","z":"6e10969e.4c2928","name":"IN4-reverse-motorA","pin":"35","set":"","level":"0","freq":"0","out":"pwm","x":380,"y":400,"wires":[]},{"id":"d7e8898b.698128","type":"rpi-gpio out","z":"6e10969e.4c2928","name":"IN3-forward-motorB","pin":"33","set":"","level":"0","freq":"0","out":"pwm","x":380,"y":360,"wires":[]},{"id":"2626714e.b4d77e","type":"rpi-gpio out","z":"6e10969e.4c2928","name":"IN2-reverse-motorA","pin":"31","set":"","level":"0","freq":"0","out":"pwm","x":370,"y":300,"wires":[]},{"id":"e89cce32.bbff6","type":"rpi-gpio out","z":"6e10969e.4c2928","name":"IN1-forward-motorA","pin":"29","set":"","level":"0","freq":"0","out":"pwm","x":370,"y":260,"wires":[]},{"id":"546b3736.4f7318","type":"ui_button","z":"6e10969e.4c2928","name":"","group":"fd0d654a.200368","order":2,"width":0,"height":0,"passthru":false,"label":"stop_button","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":180,"y":400,"wires":[["5723c66b.2e4b28","d7e8898b.698128","2626714e.b4d77e","e89cce32.bbff6"]]},{"id":"d93dfacb.bb7d48","type":"ui_button","z":"540bc4e6.69fa8c","name":"","group":"fd0d654a.200368","order":9,"width":0,"height":0,"passthru":false,"label":"forward_button","tooltip":"","color":"","bgcolor":"","icon":"","payload":"true","payloadType":"bool","topic":"","x":140,"y":940,"wires":[["168eb2c4.86fc8d","5d85f494.9dbf4c","312919b2.6aa906","da14c2da.7f745"]]},{"id":"1b164cda.648d43","type":"ui_button","z":"540bc4e6.69fa8c","name":"","group":"fd0d654a.200368","order":11,"width":0,"height":0,"passthru":false,"label":"stop_button","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":70,"y":1160,"wires":[["e96b2764.be5f58"]]},{"id":"f0876206.8d89a","type":"ui_switch","z":"540bc4e6.69fa8c","name":"","label":"humidifier_switch","tooltip":"","group":"fa9bbd1d.c222a","order":1,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":270,"y":1400,"wires":[["e9b6687d.454d98"]]},{"id":"e9b6687d.454d98","type":"rpi-gpio out","z":"540bc4e6.69fa8c","name":"","pin":"16","set":true,"level":"0","freq":"","out":"out","x":520,"y":1400,"wires":[]},{"id":"84fc373c.156788","type":"rpi-gpio out","z":"540bc4e6.69fa8c","name":"","pin":"12","set":"","level":"0","freq":"70","out":"pwm","x":520,"y":1540,"wires":[]},{"id":"fa80e668.81fe88","type":"ui_slider","z":"540bc4e6.69fa8c","name":"","label":"servo_position","tooltip":"","group":"fa9bbd1d.c222a","order":10,"width":0,"height":0,"passthru":true,"outs":"all","topic":"","min":0,"max":"100","step":1,"x":280,"y":1540,"wires":[["84fc373c.156788"]]},{"id":"326c4273.bc67ee","type":"inject","z":"540bc4e6.69fa8c","name":"","topic":"","payload":"","payloadType":"date","repeat":"1","crontab":"","once":false,"onceDelay":0.1,"x":170,"y":160,"wires":[["37e4598.218d9a6"]]},{"id":"37e4598.218d9a6","type":"exec","z":"540bc4e6.69fa8c","command":"vcgencmd measure_temp","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"temp_command","x":380,"y":160,"wires":[["a8676333.42915"],[],[]]},{"id":"a8676333.42915","type":"function","z":"540bc4e6.69fa8c","name":"CPU_temp","func":"str = msg.payload\nmsg.payload = str.substring(5,9);\nreturn msg;","outputs":1,"noerr":0,"x":610,"y":120,"wires":[["a0aba617.c4fe78","1844613.8f8aa9f"]]},{"id":"a0aba617.c4fe78","type":"ui_gauge","z":"540bc4e6.69fa8c","name":"CPU temperature","group":"37d658fa.aafd98","order":2,"width":0,"height":0,"gtype":"gage","title":"CPU temperature","label":"celcius","format":"{{value}}","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"60","seg2":"80","x":880,"y":120,"wires":[]},{"id":"1844613.8f8aa9f","type":"ui_chart","z":"540bc4e6.69fa8c","name":"","group":"37d658fa.aafd98","order":1,"width":0,"height":0,"label":"chart","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"x":880,"y":180,"wires":[[]]},{"id":"f630ceae.48cba","type":"ui_button","z":"540bc4e6.69fa8c","name":"","group":"439380e4.8e063","order":1,"width":0,"height":0,"passthru":false,"label":"shutdown whole system (careful!)","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":310,"y":340,"wires":[["7924051d.a8c87c"]]},{"id":"7924051d.a8c87c","type":"exec","z":"540bc4e6.69fa8c","command":"sudo shutdown -h now","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":590,"y":360,"wires":[[],[],[]]},{"id":"124a8d3b.a9b7a3","type":"ui_button","z":"540bc4e6.69fa8c","name":"","group":"439380e4.8e063","order":2,"width":0,"height":0,"passthru":false,"label":"run line follow program","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":260,"y":420,"wires":[["5536be7d.5ad11"]]},{"id":"5536be7d.5ad11","type":"exec","z":"540bc4e6.69fa8c","command":"python line_follow.py","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":580,"y":440,"wires":[["58ebe86.dfce118"],[],[]]},{"id":"58ebe86.dfce118","type":"ui_text","z":"540bc4e6.69fa8c","group":"439380e4.8e063","order":3,"width":0,"height":0,"name":"","label":"text","format":"{{msg.payload}}","layout":"row-spread","x":860,"y":440,"wires":[]},{"id":"ae857bfc.cc2138","type":"inject","z":"626ddac.cd2cd24","name":"","topic":"","payload":"","payloadType":"str","repeat":"","crontab":"","once":false,"x":70,"y":300,"wires":[["1994f766.253a69"]]},{"id":"1994f766.253a69","type":"exec","z":"626ddac.cd2cd24","command":"raspistill","addpay":false,"append":"-w 320 -h 240 -o -","useSpawn":"false","timer":"60","oldrc":false,"name":"","x":200,"y":300,"wires":[["244df4f4.ed5d3c"],[],[]]},{"id":"c6b4b8e3.842b28","type":"template","z":"626ddac.cd2cd24","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"<img width=\"320px\" height=\"240px\" src=\"data:image/jpg;base64,{{{payload}}}\">","output":"str","x":490,"y":300,"wires":[["98f1b690.0a3b98"]]},{"id":"98f1b690.0a3b98","type":"ui_template","z":"626ddac.cd2cd24","group":"fa9bbd1d.c222a","name":"","order":0,"width":"6","height":"5","format":"<div ng-bind-html=\"msg.payload\"></div>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":false,"templateScope":"local","x":620,"y":300,"wires":[[]]},{"id":"244df4f4.ed5d3c","type":"base64","z":"626ddac.cd2cd24","name":"","action":"str","property":"payload","x":360,"y":300,"wires":[["c6b4b8e3.842b28"]]},{"id":"9926715.76a0c9","type":"ui_button","z":"540bc4e6.69fa8c","name":"","group":"fd0d654a.200368","order":9,"width":0,"height":0,"passthru":false,"label":"right_button","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":750,"y":1220,"wires":[["6383739e.0df27c","832911cc.0d76d"]]},{"id":"3ffd4221.8f2cbe","type":"ui_switch","z":"540bc4e6.69fa8c","name":"","label":"switch1","tooltip":"","group":"60079804.05a278","order":5,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":320,"y":560,"wires":[["9e1dbf86.9f6d9"]]},{"id":"62fe1695.19b408","type":"ui_switch","z":"540bc4e6.69fa8c","name":"","label":"switch2","tooltip":"","group":"60079804.05a278","order":6,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":310,"y":600,"wires":[["7cdc2d01.031854"]]},{"id":"9e1dbf86.9f6d9","type":"rpi-gpio out","z":"540bc4e6.69fa8c","name":"IN1-forward-motorA","pin":"29","set":true,"level":"0","freq":"50","out":"out","x":500,"y":560,"wires":[]},{"id":"7cdc2d01.031854","type":"rpi-gpio out","z":"540bc4e6.69fa8c","name":"IN2-reverse-motorA","pin":"31","set":true,"level":"0","freq":"0","out":"out","x":500,"y":600,"wires":[]},{"id":"97a27d8.6e0e28","type":"rpi-gpio out","z":"540bc4e6.69fa8c","name":"IN3-forward-motorB","pin":"33","set":true,"level":"0","freq":"50","out":"out","x":510,"y":660,"wires":[]},{"id":"f7784b05.c57db8","type":"rpi-gpio out","z":"540bc4e6.69fa8c","name":"IN4-reverse-motorB","pin":"35","set":true,"level":"0","freq":"0","out":"out","x":510,"y":700,"wires":[]},{"id":"ec445e24.a0573","type":"ui_switch","z":"540bc4e6.69fa8c","name":"","label":"switch4","tooltip":"","group":"60079804.05a278","order":8,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":310,"y":700,"wires":[["f7784b05.c57db8"]]},{"id":"5a744483.3643bc","type":"ui_switch","z":"540bc4e6.69fa8c","name":"","label":"switch3","tooltip":"","group":"60079804.05a278","order":7,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":310,"y":660,"wires":[["97a27d8.6e0e28"]]},{"id":"d863b2dc.cf833","type":"rpi-gpio out","z":"540bc4e6.69fa8c","name":"EN2-forward-motorB","pin":"40","set":false,"level":"0","freq":"","out":"pwm","x":470,"y":780,"wires":[]},{"id":"f3f190c8.46f07","type":"rpi-gpio out","z":"540bc4e6.69fa8c","name":"EN1-forward-motorA","pin":"38","set":false,"level":"0","freq":"","out":"pwm","x":450,"y":740,"wires":[]},{"id":"72896f9f.6a709","type":"ui_button","z":"540bc4e6.69fa8c","name":"","group":"fd0d654a.200368","order":9,"width":0,"height":0,"passthru":false,"label":"Left_button","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":750,"y":920,"wires":[["2d88387e.cee588","b0fafb6d.651be8"]]},{"id":"cf7e87f9.e825b8","type":"ui_button","z":"626ddac.cd2cd24","name":"","group":"fa9bbd1d.c222a","order":3,"width":0,"height":0,"passthru":false,"label":"camera_button","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":110,"y":380,"wires":[["1994f766.253a69"]]},{"id":"1fc8e524.14439b","type":"http request","z":"f1a61747.24a818","name":"Reolink image","method":"GET","ret":"bin","paytoqs":"ignore","url":"http://192.168.1.57/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=&user=admin&password=mokus4","tls":"","persist":false,"proxy":"","authType":"basic","x":340,"y":200,"wires":[["5d3d5efe.a954c"]]},{"id":"3df6e3db.43dbcc","type":"comment","z":"f1a61747.24a818","name":"Capture the image from IP camera","info":"For Reolink cameras (excluding battery operated cameras) the URL is described here:\nhttps://support.reolink.com/hc/en-us/articles/360007011233-How-to-Capture-Live-JPEG-Image-of-Reolink-Cameras-via-Web-Browsers\n\nSame concept will work with any other IP cameras that return a jpg image.\n\nThe file-out node saves the image to a fixed file name. node-red-static folder is set in my\nsettings.js, \nthis is the line in my settings.js:\nhttpStatic: '/home/pi/node-red-static/',\n\nso any file in that folder can be accessed as:\nhttp(s)://192.168.1.x:1880/gate.jpg","x":180,"y":40,"wires":[]},{"id":"5d3d5efe.a954c","type":"base64","z":"f1a61747.24a818","name":"","action":"str","property":"payload","x":560,"y":180,"wires":[["c0631341.90d91"]]},{"id":"c0631341.90d91","type":"template","z":"f1a61747.24a818","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"<img width=\"320px\" height=\"240px\" src=\"data:image/jpg;base64,{{{payload}}}\">","output":"str","x":720,"y":180,"wires":[["b0fe7e5b.8ffc7"]]},{"id":"b0fe7e5b.8ffc7","type":"ui_template","z":"f1a61747.24a818","group":"df9b990f.939c98","name":"","order":0,"width":"6","height":"5","format":"<div ng-bind-html=\"msg.payload\"></div>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":false,"templateScope":"local","x":880,"y":180,"wires":[[]]},{"id":"8fdf67fe.f48598","type":"inject","z":"f1a61747.24a818","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":160,"y":200,"wires":[["1fc8e524.14439b"]]},{"id":"631fa0b9.1a2db","type":"comment","z":"f1a61747.24a818","name":"Getting and image and displaying directly in Dashboard","info":"Image preview node:\nnode-red-contrib-image-output\n\nBase 64 converter:\nnode-red-node-base64","x":260,"y":120,"wires":[]},{"id":"a0d95e98.9305e","type":"ui_button","z":"626ddac.cd2cd24","name":"","group":"fa9bbd1d.c222a","order":2,"width":0,"height":0,"passthru":false,"label":"button","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":210,"y":480,"wires":[["94e656f8.4eb328"]]},{"id":"94e656f8.4eb328","type":"camerapi-takephoto","z":"626ddac.cd2cd24","filemode":"2","filename":"","filedefpath":"1","filepath":"","fileformat":"jpeg","resolution":"9","rotation":"0","fliph":"0","flipv":"0","brightness":"50","contrast":"0","sharpness":"0","quality":"80","imageeffect":"none","exposuremode":"auto","iso":"0","agcwait":"1.0","led":"0","awb":"auto","name":"","x":430,"y":480,"wires":[[]]},{"id":"2d16988b.f4a1d8","type":"ui_media","z":"626ddac.cd2cd24","group":"d2217254.ed5a","name":"M stands for mcMaster","width":0,"height":0,"order":3,"category":"photo","file":"OIP.jpeg","layout":"adjust","showcontrols":true,"loop":true,"onstart":false,"scope":"local","tooltip":"","x":300,"y":220,"wires":[[]]},{"id":"f0637293.375cc","type":"ui_media","z":"626ddac.cd2cd24","group":"d2217254.ed5a","name":"I love you Justin","width":0,"height":0,"order":3,"category":"photo","file":"beaver.jpeg","layout":"adjust","showcontrols":true,"loop":true,"onstart":false,"scope":"local","tooltip":"","x":260,"y":160,"wires":[[]]},{"id":"cce35c41.750f2","type":"ui_slider","z":"540bc4e6.69fa8c","name":"","label":"motorB_speed_adjust","tooltip":"","group":"fd0d654a.200368","order":12,"width":0,"height":0,"passthru":true,"outs":"all","topic":"","min":0,"max":"100","step":1,"x":180,"y":840,"wires":[["d863b2dc.cf833"]]},{"id":"dc03e6e8.760f48","type":"ui_slider","z":"540bc4e6.69fa8c","name":"","label":"motorA_speed_adjust","tooltip":"","group":"fd0d654a.200368","order":12,"width":0,"height":0,"passthru":true,"outs":"all","topic":"","min":0,"max":"100","step":1,"x":180,"y":780,"wires":[["f3f190c8.46f07"]]},{"id":"3601b88d.154be8","type":"exec","z":"540bc4e6.69fa8c","command":"sudo pkill python","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":590,"y":260,"wires":[[],[],[]]},{"id":"9dc6d5e1.160e08","type":"exec","z":"540bc4e6.69fa8c","command":"python servo.py","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":580,"y":300,"wires":[[],[],[]]},{"id":"cbe3d14f.e2f56","type":"catch","z":"540bc4e6.69fa8c","name":"","scope":null,"uncaught":false,"x":340,"y":1940,"wires":[["519b72f8.8d8a1c"]]},{"id":"519b72f8.8d8a1c","type":"debug","z":"540bc4e6.69fa8c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":660,"y":1940,"wires":[]},{"id":"188145bd.d683ba","type":"comment","z":"540bc4e6.69fa8c","name":"Debug","info":"","x":230,"y":1880,"wires":[]},{"id":"2bec16e1.631a6a","type":"switch","z":"540bc4e6.69fa8c","name":"","property":"payload","propertyType":"msg","rules":[{"t":"false"},{"t":"true"}],"checkall":"false","repair":false,"outputs":2,"x":390,"y":260,"wires":[["3601b88d.154be8","9dc6d5e1.160e08"],[]]},{"id":"4535ea1e.0dff34","type":"ui_switch","z":"540bc4e6.69fa8c","name":"","label":"servo","tooltip":"","group":"fa9bbd1d.c222a","order":5,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":210,"y":260,"wires":[["2bec16e1.631a6a"]]},{"id":"c62c1534.df1838","type":"ui_media","z":"626ddac.cd2cd24","group":"d2217254.ed5a","name":"mohawk","width":0,"height":0,"order":3,"category":"photo","file":"logo-mohawk.jpg","layout":"adjust","showcontrols":true,"loop":true,"onstart":false,"scope":"local","tooltip":"","x":500,"y":220,"wires":[[]]},{"id":"e25ed727.0b9008","type":"comment","z":"540bc4e6.69fa8c","name":"how to terminate a program","info":"msg.kill\nSIGTERM","x":900,"y":260,"wires":[]},{"id":"b7b64503.b945b8","type":"rpi-gpio out","z":"540bc4e6.69fa8c","d":true,"name":"IN1-forward-motorA","pin":"29","set":true,"level":"0","freq":"50","out":"out","x":1590,"y":480,"wires":[]},{"id":"78ba7949.61f508","type":"debug","z":"540bc4e6.69fa8c","d":true,"name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":1890,"y":760,"wires":[]},{"id":"246009d7.b443f6","type":"change","z":"540bc4e6.69fa8c","d":true,"name":"","rules":[{"t":"set","p":"IN1","pt":"flow","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1640,"y":760,"wires":[["78ba7949.61f508","b7b64503.b945b8"]]},{"id":"1ad9648c.eb9b7b","type":"ui_button","z":"540bc4e6.69fa8c","d":true,"name":"","group":"fd0d654a.200368","order":9,"width":0,"height":0,"passthru":false,"label":"forward_button","tooltip":"","color":"","bgcolor":"","icon":"","payload":"true","payloadType":"bool","topic":"","x":1430,"y":760,"wires":[["246009d7.b443f6"]]},{"id":"5581b6d7.1c07e8","type":"status","z":"540bc4e6.69fa8c","d":true,"name":"motor_status","scope":["9e1dbf86.9f6d9"],"x":1410,"y":820,"wires":[["ee6cc542.79f478"]]},{"id":"ee6cc542.79f478","type":"function","z":"540bc4e6.69fa8c","d":true,"name":"setIN1","func":"var IN1 = msg.status.text;\nglobal.set(\"IN1\", IN1);\nmsg.payload = IN1;\nreturn msg;","outputs":1,"noerr":0,"x":1590,"y":820,"wires":[["da2d54c3.a6c7d8"]]},{"id":"da2d54c3.a6c7d8","type":"debug","z":"540bc4e6.69fa8c","d":true,"name":"motor_debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":1930,"y":820,"wires":[]},{"id":"5aa3cede.69e6c","type":"rpi-gpio out","z":"540bc4e6.69fa8c","name":"IN1-forward-motorA","pin":"29","set":true,"level":"0","freq":"50","out":"out","x":530,"y":940,"wires":[]},{"id":"52dccfa5.514f","type":"rpi-gpio out","z":"540bc4e6.69fa8c","name":"IN2-reverse-motorA","pin":"31","set":true,"level":"0","freq":"0","out":"out","x":530,"y":980,"wires":[]},{"id":"411b1893.872068","type":"rpi-gpio out","z":"540bc4e6.69fa8c","name":"IN3-forward-motorB","pin":"33","set":true,"level":"0","freq":"50","out":"out","x":540,"y":1040,"wires":[]},{"id":"5563448d.f3d14c","type":"rpi-gpio out","z":"540bc4e6.69fa8c","name":"IN4-reverse-motorB","pin":"35","set":true,"level":"0","freq":"0","out":"out","x":540,"y":1080,"wires":[]},{"id":"168eb2c4.86fc8d","type":"function","z":"540bc4e6.69fa8c","d":true,"name":"false","func":"\nreturn false;","outputs":1,"noerr":0,"x":330,"y":1020,"wires":[["52dccfa5.514f","411b1893.872068"]]},{"id":"b101e165.64996","type":"comment","z":"540bc4e6.69fa8c","name":"a stupid/ compicated idea","info":"","x":1410,"y":640,"wires":[]},{"id":"5d85f494.9dbf4c","type":"function","z":"540bc4e6.69fa8c","d":true,"name":"true","func":"var bool = true;\nreturn bool;","outputs":1,"noerr":0,"x":330,"y":940,"wires":[["5aa3cede.69e6c","5563448d.f3d14c"]]},{"id":"312919b2.6aa906","type":"change","z":"540bc4e6.69fa8c","name":"set_to_true","rules":[{"t":"set","p":"payload","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":330,"y":900,"wires":[["5aa3cede.69e6c","5563448d.f3d14c"]]},{"id":"da14c2da.7f745","type":"change","z":"540bc4e6.69fa8c","name":"set_to_false","rules":[{"t":"set","p":"payload","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":310,"y":1060,"wires":[["52dccfa5.514f","411b1893.872068"]]},{"id":"f310287f.d89938","type":"comment","z":"540bc4e6.69fa8c","name":"function can not return boolean","info":"wow this is so wierd","x":130,"y":1000,"wires":[]},{"id":"93cd820a.6ceef","type":"rpi-gpio out","z":"540bc4e6.69fa8c","name":"IN1-forward-motorA","pin":"29","set":true,"level":"0","freq":"50","out":"out","x":470,"y":1160,"wires":[]},{"id":"f71fd632.485a98","type":"rpi-gpio out","z":"540bc4e6.69fa8c","name":"IN2-reverse-motorA","pin":"31","set":true,"level":"0","freq":"0","out":"out","x":470,"y":1200,"wires":[]},{"id":"2a64e49e.42a0fc","type":"rpi-gpio out","z":"540bc4e6.69fa8c","name":"IN3-forward-motorB","pin":"33","set":true,"level":"0","freq":"50","out":"out","x":480,"y":1260,"wires":[]},{"id":"7080f95c.86c988","type":"rpi-gpio out","z":"540bc4e6.69fa8c","name":"IN4-reverse-motorB","pin":"35","set":true,"level":"0","freq":"0","out":"out","x":480,"y":1300,"wires":[]},{"id":"e96b2764.be5f58","type":"change","z":"540bc4e6.69fa8c","name":"set_to_false","rules":[{"t":"set","p":"payload","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":270,"y":1160,"wires":[["93cd820a.6ceef","f71fd632.485a98","2a64e49e.42a0fc","7080f95c.86c988"]]},{"id":"2d88387e.cee588","type":"change","z":"540bc4e6.69fa8c","name":"set_to_true","rules":[{"t":"set","p":"payload","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":970,"y":940,"wires":[["44506c9e.21c7f4","25e5b822.e4d808"]]},{"id":"44506c9e.21c7f4","type":"rpi-gpio out","z":"540bc4e6.69fa8c","name":"IN1-forward-motorA","pin":"29","set":true,"level":"0","freq":"50","out":"out","x":1270,"y":920,"wires":[]},{"id":"70b09033.612fc","type":"rpi-gpio out","z":"540bc4e6.69fa8c","name":"IN2-reverse-motorA","pin":"31","set":true,"level":"0","freq":"0","out":"out","x":1270,"y":960,"wires":[]},{"id":"25e5b822.e4d808","type":"rpi-gpio out","z":"540bc4e6.69fa8c","name":"IN3-forward-motorB","pin":"33","set":true,"level":"0","freq":"50","out":"out","x":1280,"y":1020,"wires":[]},{"id":"8dcfb7b1.a79a48","type":"rpi-gpio out","z":"540bc4e6.69fa8c","name":"IN4-reverse-motorB","pin":"35","set":true,"level":"0","freq":"0","out":"out","x":1280,"y":1060,"wires":[]},{"id":"5c4eefe9.6d19a","type":"rpi-gpio out","z":"540bc4e6.69fa8c","name":"IN1-forward-motorA","pin":"29","set":true,"level":"0","freq":"50","out":"out","x":1230,"y":1240,"wires":[]},{"id":"116cfa2.2ee7806","type":"rpi-gpio out","z":"540bc4e6.69fa8c","name":"IN2-reverse-motorA","pin":"31","set":true,"level":"0","freq":"0","out":"out","x":1230,"y":1280,"wires":[]},{"id":"d06a651a.946d88","type":"rpi-gpio out","z":"540bc4e6.69fa8c","name":"IN3-forward-motorB","pin":"33","set":true,"level":"0","freq":"50","out":"out","x":1240,"y":1340,"wires":[]},{"id":"d61b960e.f88cd8","type":"rpi-gpio out","z":"540bc4e6.69fa8c","name":"IN4-reverse-motorB","pin":"35","set":true,"level":"0","freq":"0","out":"out","x":1240,"y":1380,"wires":[]},{"id":"b0fafb6d.651be8","type":"change","z":"540bc4e6.69fa8c","name":"set_to_false","rules":[{"t":"set","p":"payload","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":970,"y":1020,"wires":[["70b09033.612fc","8dcfb7b1.a79a48"]]},{"id":"832911cc.0d76d","type":"change","z":"540bc4e6.69fa8c","name":"set_to_false","rules":[{"t":"set","p":"payload","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":970,"y":1340,"wires":[["5c4eefe9.6d19a","d06a651a.946d88"]]},{"id":"6383739e.0df27c","type":"change","z":"540bc4e6.69fa8c","name":"set_to_true","rules":[{"t":"set","p":"payload","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":970,"y":1260,"wires":[["116cfa2.2ee7806","d61b960e.f88cd8"]]}]