Phytocube

UI for operating phytocube

[{"id":"c11ca71e.732458","type":"tab","label":"RPI_dashboard","disabled":false,"info":""},{"id":"406929ec.997cc","type":"tab","label":"Phytocube","disabled":false,"info":""},{"id":"ffa6f965.d09b38","type":"ui_group","z":"","name":"Col1","tab":"ab91885a.b87538","order":1,"disp":false,"width":"6"},{"id":"c022603c.873308","type":"ui_group","z":"","name":"Col2","tab":"ab91885a.b87538","order":2,"disp":false,"width":"6"},{"id":"56fa1cc8.139b74","type":"ui_group","z":"","name":"Col3","tab":"ab91885a.b87538","order":3,"disp":false,"width":"6"},{"id":"ab91885a.b87538","type":"ui_tab","z":"","name":"RPi Control","icon":"dashboard","order":1},{"id":"bc899e7d.91ee3","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":"#000000","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":"#000000","edited":false},"page-backgroundColor":{"value":"#111111","edited":false},"page-sidebar-backgroundColor":{"value":"#000000","edited":false},"group-textColor":{"value":"#262626","edited":false},"group-borderColor":{"value":"#555555","edited":false},"group-backgroundColor":{"value":"#333333","edited":false},"widget-textColor":{"value":"#eeeeee","edited":false},"widget-backgroundColor":{"value":"#000000","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"}}},"site":{"name":"Node-RED Dashboard","hideToolbar":"false","allowSwipe":"false","dateFormat":"DD/MM/YYYY","sizes":{"sx":48,"sy":48,"gx":6,"gy":6,"cx":6,"cy":6,"px":0,"py":0}}},{"id":"d32cdcb6.71edf","type":"influxdb","z":"","hostname":"phytocube","port":"8086","protocol":"http","database":"rpi_info","name":"","usetls":false,"tls":""},{"id":"49fba51a.87872c","type":"ui_group","z":"","name":"Default","tab":"5c7ad5c4.973774","order":1,"disp":true,"width":"6"},{"id":"5c7ad5c4.973774","type":"ui_tab","z":"","name":"Home","icon":"dashboard"},{"id":"b308f865.a834f8","type":"serial-port","z":"","serialport":"/dev/ttyUSB0","serialbaud":"57600","databits":"8","parity":"none","stopbits":"1","newline":"\\n","bin":"false","out":"char","addchar":false},{"id":"769b67ee.79f0b","type":"ui_gauge","z":"c11ca71e.732458","name":"","group":"56fa1cc8.139b74","order":1,"width":0,"height":0,"gtype":"gage","title":"CPU Temperature","label":"C","format":"{{value}}","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":910,"y":200,"wires":[]},{"id":"b009ad63.8703","type":"exec","z":"c11ca71e.732458","command":"vcgencmd measure_temp","addpay":false,"append":"","useSpawn":"","timer":"","oldrc":false,"name":"RPi Temp.","x":550,"y":200,"wires":[["44134eb8.c87cd8"],[],[]]},{"id":"2465f0b8.b39088","type":"inject","z":"c11ca71e.732458","name":"","topic":"","payload":"","payloadType":"date","repeat":"10","crontab":"","once":false,"x":344.5,"y":208.25,"wires":[["b009ad63.8703","605c1524.eb538c","8ee0676e.ad3c98"]]},{"id":"44134eb8.c87cd8","type":"function","z":"c11ca71e.732458","name":"","func":"str = msg.payload\nmsg.payload = str.substring(5,9);\nreturn msg;","outputs":1,"noerr":0,"x":715,"y":181,"wires":[["769b67ee.79f0b","fae4cc33.f664e","d1be0b74.e1f49"]]},{"id":"3d44ea46.f9fd16","type":"ui_button","z":"c11ca71e.732458","name":"","group":"c022603c.873308","order":3,"width":0,"height":0,"label":"Reboot","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":320,"y":580,"wires":[["15737b85.6b6704"]]},{"id":"15737b85.6b6704","type":"exec","z":"c11ca71e.732458","command":"sudo reboot","addpay":false,"append":"","useSpawn":"","timer":"","name":"Reboot","x":538,"y":580,"wires":[[],[],[]]},{"id":"fdeb4db6.852f38","type":"ui_button","z":"c11ca71e.732458","name":"","group":"56fa1cc8.139b74","order":3,"width":0,"height":0,"label":"Shutdown","color":"","bgcolor":"red","icon":"","payload":"","payloadType":"str","topic":"","x":328.5,"y":624.25,"wires":[["1e073500.e891f3"]]},{"id":"1e073500.e891f3","type":"exec","z":"c11ca71e.732458","command":"sudo shutdown -h now","addpay":false,"append":"","useSpawn":"","timer":"","name":"Shutdown","x":549.5,"y":642.25,"wires":[[],[],[]]},{"id":"fae4cc33.f664e","type":"ui_chart","z":"c11ca71e.732458","name":"","group":"56fa1cc8.139b74","order":2,"width":0,"height":0,"label":"","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":"24","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":true,"x":910,"y":240,"wires":[[],[]]},{"id":"605c1524.eb538c","type":"exec","z":"c11ca71e.732458","command":"top -d 0.5 -b -n2 | grep \"Cpu(s)\"|tail -n 1 | awk '{print $2 + $4}'","addpay":false,"append":"","useSpawn":"","timer":"","name":"CPU Load","x":550,"y":280,"wires":[["7b70cd83.2dc19c"],[],[]]},{"id":"8ee0676e.ad3c98","type":"exec","z":"c11ca71e.732458","command":"free | grep Mem | awk '{print 100*($4+$6+$7)/$2}'","addpay":false,"append":"","useSpawn":"","timer":"","name":"Free Memory","x":550,"y":360,"wires":[["2561f7ec.2fe618","babcc74d.c9c21"],[],[]]},{"id":"7b70cd83.2dc19c","type":"ui_gauge","z":"c11ca71e.732458","name":"","group":"ffa6f965.d09b38","order":1,"width":0,"height":0,"gtype":"gage","title":"Processor","label":"CPU","format":"{{value}}","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"x":910,"y":280,"wires":[]},{"id":"2561f7ec.2fe618","type":"ui_gauge","z":"c11ca71e.732458","name":"","group":"c022603c.873308","order":1,"width":0,"height":0,"gtype":"gage","title":"Memory","label":"RAM","format":"{{value.toFixed(1)}}","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"x":910,"y":360,"wires":[]},{"id":"77b05cc8.77d1cc","type":"exec","z":"c11ca71e.732458","command":"df -h","addpay":false,"append":"","useSpawn":"","timer":"","name":"Disk Usage","x":550,"y":440,"wires":[["6ba361e1.9e771"],[],[]]},{"id":"47d9afcf.bc356","type":"ui_gauge","z":"c11ca71e.732458","name":"","group":"ffa6f965.d09b38","order":2,"width":0,"height":0,"gtype":"gage","title":"Disk","label":"Usage","format":"{{value}}","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"x":910,"y":440,"wires":[]},{"id":"6ba361e1.9e771","type":"function","z":"c11ca71e.732458","name":"","func":"var re = /([0-9]{2})%/\nvar idx = msg.payload.search(re);\nvar str = msg.payload;\nif (idx >=0) {\n    str = msg.payload.substring(idx, idx + 2);\n}\nmsg.payload = str;\nreturn msg;","outputs":1,"noerr":0,"x":730,"y":440,"wires":[["47d9afcf.bc356"]]},{"id":"fc29992d.14d9f","type":"inject","z":"c11ca71e.732458","name":"","topic":"","payload":"","payloadType":"date","repeat":"60","crontab":"","once":false,"x":350,"y":440,"wires":[["77b05cc8.77d1cc"]]},{"id":"babcc74d.c9c21","type":"ui_chart","z":"c11ca71e.732458","name":"","group":"c022603c.873308","order":2,"width":0,"height":0,"label":"","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":"24","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":true,"x":910,"y":320,"wires":[[],[]]},{"id":"d1be0b74.e1f49","type":"influxdb out","z":"c11ca71e.732458","influxdb":"d32cdcb6.71edf","name":"","measurement":"rpi_temp","precision":"","retentionPolicy":"","x":960,"y":80,"wires":[]},{"id":"7d56e1bb.eede6","type":"rpi-gpio out","z":"406929ec.997cc","name":"","pin":"38","set":"","level":"0","freq":"","out":"out","x":780,"y":680,"wires":[]},{"id":"3e4e3692.46c09a","type":"ui_switch","z":"406929ec.997cc","name":"","label":"Lights","group":"ffa6f965.d09b38","order":3,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"1","onvalueType":"num","onicon":"","oncolor":"","offvalue":"0","offvalueType":"num","officon":"","offcolor":"","x":590,"y":740,"wires":[["7d56e1bb.eede6","4c461a92.cfedc4","5e04af15.dc2a8"]]},{"id":"4c461a92.cfedc4","type":"rpi-gpio out","z":"406929ec.997cc","name":"","pin":"40","set":"","level":"0","freq":"","out":"out","x":780,"y":800,"wires":[]},{"id":"ce1bb872.a194c8","type":"bigtimer","z":"406929ec.997cc","outtopic":"","outpayload1":"","outpayload2":"","name":"Big Timer","lat":"","lon":"","starttime":"390","endtime":"1335","startoff":0,"endoff":0,"offs":0,"outtext1":"","outtext2":"","timeout":1440,"sun":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":true,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"suspend":false,"random":false,"repeat":true,"atstart":true,"odd":false,"even":false,"x":400,"y":740,"wires":[[],["3e4e3692.46c09a"],[]]},{"id":"5e04af15.dc2a8","type":"influxdb out","z":"406929ec.997cc","influxdb":"d32cdcb6.71edf","name":"","measurement":"Lights_status","precision":"","retentionPolicy":"","x":870,"y":600,"wires":[]},{"id":"104eea14.64bdde","type":"serial in","z":"406929ec.997cc","name":"","serial":"b308f865.a834f8","x":537,"y":543,"wires":[[]]},{"id":"f05de896.c3cea8","type":"influxdb out","z":"406929ec.997cc","influxdb":"d32cdcb6.71edf","name":"","measurement":"dht_Temperature","precision":"","retentionPolicy":"","x":1070,"y":60,"wires":[]},{"id":"8d10384c.880f1","type":"inject","z":"406929ec.997cc","name":"","topic":"","payload":"","payloadType":"date","repeat":"3","crontab":"","once":false,"x":130,"y":320,"wires":[["66f60a60.2f0e44"]]},{"id":"66f60a60.2f0e44","type":"rpi-dht22","z":"406929ec.997cc","name":"","topic":"rpi-dht22","dht":22,"pintype":"0","pin":"17","x":340,"y":120,"wires":[["61bc465a.c6b8b","f05de896.c3cea8"]]},{"id":"6dc632ee.dcd16c","type":"sensor-ds18b20","z":"406929ec.997cc","name":"Temperature_probe","sensorid":"28-0317003d68ff","timer":"10","repeat":true,"x":500,"y":260,"wires":[["8dcf0be2.1562c","8f408dad.5085d8"]]},{"id":"9b37fa72.73c338","type":"function","z":"406929ec.997cc","name":"","func":"var myPayload = msg.payload;\nvar myTopic = msg.topic;\nvar myId = msg.id;\nreturn myId;","outputs":1,"noerr":0,"x":430,"y":460,"wires":[[]]},{"id":"61bc465a.c6b8b","type":"change","z":"406929ec.997cc","name":"Dht22 humidity","rules":[{"t":"move","p":"humidity","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":780,"y":120,"wires":[["22968512.eaa632"]]},{"id":"22968512.eaa632","type":"influxdb out","z":"406929ec.997cc","influxdb":"d32cdcb6.71edf","name":"","measurement":"dht_Humidity","precision":"","retentionPolicy":"","x":1090,"y":120,"wires":[]},{"id":"8dcf0be2.1562c","type":"debug","z":"406929ec.997cc","name":"","active":true,"console":"false","complete":"payload","x":770,"y":300,"wires":[]},{"id":"8f408dad.5085d8","type":"influxdb out","z":"406929ec.997cc","influxdb":"d32cdcb6.71edf","name":"","measurement":"Temperature_probe","precision":"","retentionPolicy":"","x":1070,"y":260,"wires":[]}]

Flow Info

Created 6 years, 11 months ago
Updated 6 years, 10 months ago
Rating: not yet rated

Owner

Actions

Rate:

Node Types

Core
  • change (x1)
  • debug (x1)
  • exec (x6)
  • function (x3)
  • inject (x3)
Other

Tags

Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option