[{"id":"5d1f8c70.660414","type":"tab","label":"Greenhouse without wifi","disabled":true,"info":""},{"id":"b75708d7.395ed8","type":"tab","label":"Greenhouse wifi","disabled":true,"info":""},{"id":"83707ece.9a88c","type":"subflow","name":"Settings","info":"Persist settings in a flat file.\n\nIf msg.clearAll is set to true, the settings are truncated.\n\nSending a topic of \"get\" will return the property you've named in the payload.\n\nAny other topic will be treated as a property and the payload will be saved to the settings file.","in":[{"x":40,"y":220,"wires":[{"id":"2ce5d147.cc99fe"}]}],"out":[{"x":380,"y":160,"wires":[{"id":"2ce5d147.cc99fe","port":0}]}]},{"id":"fef497df.9b2318","type":"subflow","name":"Settings (2)","info":"Persist settings in a flat file.\n\nIf msg.clearAll is set to true, the settings are truncated.\n\nSending a topic of \"get\" will return the property you've named in the payload.\n\nAny other topic will be treated as a property and the payload will be saved to the settings file.","in":[{"x":40,"y":220,"wires":[{"id":"bc8bb57c.e1d608"}]}],"out":[{"x":380,"y":160,"wires":[{"id":"bc8bb57c.e1d608","port":0}]}]},{"id":"ef5f233b.30c15","type":"mqtt-broker","z":"","name":"","broker":"localhost","port":"1880","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"7edbba89.4480d4","type":"arduino-board","z":"","device":"COM4"},{"id":"68bec08.5254f4","type":"serial-port","z":"","serialport":"COM3","serialbaud":"9600","databits":"8","parity":"none","stopbits":"1","newline":"\\n","bin":"false","out":"char","addchar":false,"responsetimeout":"10000"},{"id":"3478aa85.24a7d6","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":"#ff0000","baseFont":"Times New Roman,Times,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","reset":false},"themeState":{"base-color":{"default":"#097479","value":"#097479","edited":true},"page-titlebar-backgroundColor":{"value":"#ff0000","edited":false},"page-backgroundColor":{"value":"#111111","edited":false},"page-sidebar-backgroundColor":{"value":"#ffffff","edited":false},"group-textColor":{"value":"#ff4d4d","edited":false},"group-borderColor":{"value":"#555555","edited":false},"group-backgroundColor":{"value":"#333333","edited":false},"widget-textColor":{"value":"#eeeeee","edited":false},"widget-backgroundColor":{"value":"#ff0000","edited":false},"widget-borderColor":{"value":"#333333","edited":false},"base-font":{"value":"Times New Roman,Times,serif"}},"angularTheme":{"primary":"indigo","accents":"blue","warn":"red","background":"grey"}},"site":{"name":"Node-RED Dashboard","hideToolbar":"true","allowSwipe":"false","allowTempTheme":"true","dateFormat":"","sizes":{"sx":48,"sy":48,"gx":6,"gy":6,"cx":6,"cy":6,"px":0,"py":0}}},{"id":"a2ae1942.c63e68","type":"ui_group","z":"","name":"Value","tab":"8c3724bf.1ceed8","order":7,"disp":true,"width":"6","collapse":false},{"id":"c501859e.232898","type":"ui_group","z":"","name":"Moisture","tab":"8c3724bf.1ceed8","order":2,"disp":true,"width":"7","collapse":false},{"id":"8c3724bf.1ceed8","type":"ui_tab","z":"","name":"Data liste","icon":"dashboard"},{"id":"6037cbf5.1e6e74","type":"serial-port","z":"","serialport":"COM4","serialbaud":"57600","databits":"8","parity":"none","stopbits":"1","newline":"\\n","bin":"false","out":"char","addchar":false,"responsetimeout":""},{"id":"70e03130.e48d3","type":"serial-port","z":"","serialport":"COM3","serialbaud":"9600","databits":"8","parity":"none","stopbits":"1","newline":"0","bin":"bin","out":"time","addchar":false,"responsetimeout":""},{"id":"ca152513.9a45a8","type":"ui_group","z":"","name":"Sensor DHT11","tab":"","order":1,"disp":true,"width":"6"},{"id":"9d6db663.066f68","type":"ui_group","z":"","name":"Sensor BMP180","tab":"","order":2,"disp":true,"width":"6"},{"id":"900b39f2.1218e8","type":"ui_group","z":"","name":"Pressure, Humidity","tab":"","order":3,"disp":true,"width":"6"},{"id":"581084fd.00763c","type":"ui_group","z":"","name":"DHT11: Humid (24 Horas)","tab":"","order":5,"disp":true,"width":"6"},{"id":"40eda738.05d7e8","type":"ui_group","z":"","name":"BMP180: Pressure (24 Horas)","tab":"","order":6,"disp":true,"width":"6"},{"id":"7d7a7bd7.e6a5c4","type":"ui_group","z":"","name":"DS18B20: Temp (24 Horas)","tab":"","order":7,"disp":true,"width":"6"},{"id":"7bf4f781.2dcb18","type":"ui_group","z":"","name":"DHT11: Humid (5 Min)","tab":"","order":4,"disp":true,"width":"6"},{"id":"fd9965cf.7fc9f8","type":"ui_group","z":"","name":"LED","tab":"","disp":true,"width":"3","collapse":false},{"id":"fa994d26.19a7e","type":"serial-port","z":"","serialport":"COM3","serialbaud":"57600","databits":"8","parity":"none","stopbits":"1","newline":"\\n","bin":"false","out":"char","addchar":false,"responsetimeout":""},{"id":"1802f879.cd4568","type":"ui_group","z":"","name":"ldr","tab":"","disp":true,"width":"6"},{"id":"62c780bb.84b03","type":"serial-port","z":"","serialport":"COM3","serialbaud":"57600","databits":"8","parity":"none","stopbits":"1","newline":"\\n","bin":"false","out":"char","addchar":false,"responsetimeout":""},{"id":"47aaf006.493f6","type":"ui_group","z":"","name":"pot","tab":"","disp":true,"width":"6","collapse":false},{"id":"67609703.c0b808","type":"ui_group","z":"","name":"DATA","tab":"","order":2,"disp":true,"width":"6"},{"id":"ae8728a7.c76928","type":"ui_group","z":"","name":"LED","tab":"","order":1,"disp":true,"width":"7","collapse":true},{"id":"fde2690a.10f7e8","type":"serial-port","z":"","serialport":"com4","serialbaud":"57600","databits":"8","parity":"none","stopbits":"1","newline":"\\n","bin":"false","out":"char","addchar":false,"responsetimeout":"10000"},{"id":"6ac7bac2.0e2fe4","type":"ui_group","z":"","name":"Temperature","tab":"8c3724bf.1ceed8","order":1,"disp":true,"width":"6","collapse":false},{"id":"e2bf43c7.94776","type":"serial-port","z":"","serialport":"COM5","serialbaud":"57600","databits":"8","parity":"none","stopbits":"1","newline":"\\n","bin":"false","out":"char","addchar":false,"responsetimeout":""},{"id":"fc1ec305.306f2","type":"ui_group","z":"","name":"Light","tab":"8c3724bf.1ceed8","order":9,"disp":true,"width":"6","collapse":false},{"id":"f89ca7f0.35c6b8","type":"ui_group","z":"","name":"Humidity","tab":"8c3724bf.1ceed8","order":3,"disp":true,"width":"6","collapse":false},{"id":"20cae087.0d2fe","type":"ui_group","z":"","name":"","tab":"","disp":true,"width":"6","collapse":false},{"id":"803070a5.98058","type":"ui_group","z":"","name":"LED","tab":"","disp":true,"width":"3","collapse":false},{"id":"ee715bda.377298","type":"serial-port","z":"","serialport":"COM3","serialbaud":"57600","databits":"8","parity":"none","stopbits":"1","newline":"\\n","bin":"false","out":"char","addchar":false,"responsetimeout":""},{"id":"3e186538.9168da","type":"ui_group","z":"","name":"ldr","tab":"","disp":true,"width":"6"},{"id":"e63074e4.664388","type":"serial-port","z":"","serialport":"COM3","serialbaud":"57600","databits":"8","parity":"none","stopbits":"1","newline":"\\n","bin":"false","out":"char","addchar":false,"responsetimeout":""},{"id":"689dc289.aaed5c","type":"ui_group","z":"","name":"pot","tab":"","disp":true,"width":"6"},{"id":"758ca86d.f6d588","type":"ui_group","z":"","name":"DATA","tab":"","order":2,"disp":true,"width":"6"},{"id":"2782d9b2.1468a6","type":"ui_group","z":"","name":"LED","tab":"","order":1,"disp":true,"width":"7","collapse":true},{"id":"93290155.db0e9","type":"ui_group","z":"","name":"LED","tab":"","disp":true,"width":"3","collapse":false},{"id":"bf911072.10da1","type":"serial-port","z":"","serialport":"COM3","serialbaud":"57600","databits":"8","parity":"none","stopbits":"1","newline":"\\n","bin":"false","out":"char","addchar":false,"responsetimeout":""},{"id":"3cd79eb9.38add2","type":"ui_group","z":"","name":"LED","tab":"","disp":true,"width":"3","collapse":false},{"id":"6ab92818.cd3ff8","type":"serial-port","z":"","serialport":"COM3","serialbaud":"57600","databits":"8","parity":"none","stopbits":"1","newline":"\\n","bin":"false","out":"char","addchar":false,"responsetimeout":""},{"id":"8ce4b9e4.124438","type":"serial-port","z":"","serialport":"COM3","serialbaud":"9600","databits":"8","parity":"none","stopbits":"1","newline":"\\n","bin":"false","out":"char","addchar":true,"responsetimeout":"10000"},{"id":"870ef839.0f56b8","type":"ui_group","z":"","name":"","tab":"","disp":true,"width":"6","collapse":false},{"id":"c586c072.84375","type":"ui_group","z":"","name":"Default","tab":"","disp":true,"width":"6","collapse":false},{"id":"c62e0577.0fcf08","type":"serial-port","z":"","serialport":"COM3","serialbaud":"9600","databits":"8","parity":"none","stopbits":"1","newline":"\\n","bin":"false","out":"char","addchar":true,"responsetimeout":"10000"},{"id":"a2843fd4.b0d2e","type":"ui_group","z":"","name":"","tab":"","disp":true,"width":"6","collapse":false},{"id":"e330f1ed.f9a4a","type":"ui_group","z":"","name":"Default","tab":"","disp":true,"width":"6","collapse":false},{"id":"d1761ae2.063e48","type":"MySQLdatabase","z":"","host":"127.0.0.1","port":"3306","db":"nodered","tz":""},{"id":"e1880f2f.01ac3","type":"serial-port","z":"","serialport":"COM3","serialbaud":"9600","databits":"8","parity":"none","stopbits":"1","newline":"\\n","bin":"false","out":"char","addchar":false,"responsetimeout":"10000"},{"id":"786baf7.e35c85","type":"MySQLdatabase","z":"","host":"127.0.0.1","port":"3306","db":"nodered","tz":""},{"id":"87dc16b.c2227e8","type":"serial-port","z":"","serialport":"COM3","serialbaud":"9600","databits":"8","parity":"none","stopbits":"1","newline":"\\n","bin":"false","out":"char","addchar":false,"responsetimeout":"10000"},{"id":"1b1824f0.fa835b","type":"ui_group","z":"","name":"DATA","tab":"","order":2,"disp":true,"width":"6"},{"id":"167edc03.e06124","type":"MySQLdatabase","z":"","host":"127.0.0.1","port":"3306","db":"nodered","tz":""},{"id":"13404ce3.652213","type":"MySQLdatabase","z":"","host":"127.0.0.1","port":"3306","db":"nodered","tz":""},{"id":"632ba6c2.3264e8","type":"ui_group","name":"Group","tab":"","order":3,"disp":true,"width":6},{"id":"43de05e1.ff7a4c","type":"serial-port","z":"","serialport":"COM3","serialbaud":"9600","databits":"8","parity":"none","stopbits":"1","newline":"\\n","bin":"false","out":"char","addchar":false,"responsetimeout":"10000"},{"id":"141d31d5.08dd9e","type":"ui_group","z":"","name":"DATA","tab":"","order":2,"disp":true,"width":"6"},{"id":"55ea48d8.6fdab8","type":"MySQLdatabase","z":"","host":"127.0.0.1","port":"3306","db":"nodered","tz":"+2"},{"id":"caa97f2d.348e8","type":"ui_group","z":"","name":"Google Services","tab":"","order":1,"disp":true,"width":"12"},{"id":"ca58fa52.4cad68","type":"ui_group","z":"","name":"Ping Latency","tab":"","order":2,"disp":true,"width":"25"},{"id":"4627bbc7.1498c4","type":"ui_group","z":"","name":"ldr","tab":"","disp":true,"width":"6"},{"id":"821ac7cb.399388","type":"serial-port","z":"","serialport":"COM3","serialbaud":"57600","databits":"8","parity":"none","stopbits":"1","newline":"\\n","bin":"false","out":"char","addchar":false,"responsetimeout":""},{"id":"5a0e73.5d70e18c","type":"ui_group","z":"","name":"pot","tab":"","disp":true,"width":"6"},{"id":"eb34af1d.8c464","type":"ui_group","z":"","name":"DATA","tab":"","order":2,"disp":true,"width":"6"},{"id":"a6ed6453.6b25e8","type":"ui_group","z":"","name":"LED","tab":"","order":1,"disp":true,"width":"7","collapse":true},{"id":"b796b57c.739678","type":"ui_group","z":"","name":"","tab":"","disp":true,"width":"6","collapse":false},{"id":"a0309a05.bee948","type":"ui_group","z":"","name":"LED","tab":"","disp":true,"width":"3","collapse":false},{"id":"6e27d9aa.67db78","type":"serial-port","z":"","serialport":"COM3","serialbaud":"57600","databits":"8","parity":"none","stopbits":"1","newline":"\\n","bin":"false","out":"char","addchar":false,"responsetimeout":""},{"id":"127f1f68.33dd01","type":"ui_group","z":"","name":"LED","tab":"","disp":true,"width":"3","collapse":false},{"id":"61d30f80.e8303","type":"serial-port","z":"","serialport":"COM3","serialbaud":"57600","databits":"8","parity":"none","stopbits":"1","newline":"\\n","bin":"false","out":"char","addchar":false,"responsetimeout":""},{"id":"b56d5c22.1b56e","type":"ui_group","z":"","name":"ldr","tab":"","disp":true,"width":"6"},{"id":"d89c3d1d.28c77","type":"serial-port","z":"","serialport":"COM3","serialbaud":"57600","databits":"8","parity":"none","stopbits":"1","newline":"\\n","bin":"false","out":"char","addchar":false,"responsetimeout":""},{"id":"4425d3bf.704cbc","type":"ui_group","z":"","name":"pot","tab":"","disp":true,"width":"6"},{"id":"2143648e.f21a7c","type":"ui_group","z":"","name":"DATA","tab":"","order":2,"disp":true,"width":"6"},{"id":"dc82800c.9200a","type":"ui_group","z":"","name":"LED","tab":"","order":1,"disp":true,"width":"7","collapse":true},{"id":"6af25318.27caec","type":"arduino-board","device":""},{"id":"7bd847b4.614958","type":"ui_group","z":"","name":"LED","tab":"","disp":true,"width":"3","collapse":false},{"id":"fd50771a.6c3618","type":"serial-port","z":"","serialport":"COM3","serialbaud":"57600","databits":"8","parity":"none","stopbits":"1","newline":"\\n","bin":"false","out":"char","addchar":false,"responsetimeout":""},{"id":"4287ee42.b66fd","type":"ui_group","name":"Group 5","tab":"","order":5,"disp":true,"width":6},{"id":"2c308181.70cb1e","type":"ui_group","z":"","name":"Data liste","tab":"8c3724bf.1ceed8","order":8,"disp":true,"width":"7","collapse":false},{"id":"e2109fbc.88733","type":"serial-port","z":"","serialport":"COM11","serialbaud":"9600","databits":"8","parity":"none","stopbits":"1","newline":"0","bin":"bin","out":"time","addchar":false},{"id":"de23849.8824b78","type":"ui_group","z":"","name":"Sensor DHT11","tab":"","order":2,"disp":true,"width":"6"},{"id":"58ed2a62.71cc74","type":"ui_group","z":"","name":"Sensor DS18B20","tab":"","order":1,"disp":true,"width":"6"},{"id":"347df9d0.041c26","type":"ui_group","z":"","name":"Sensor BMP180","tab":"","order":3,"disp":true,"width":"6"},{"id":"81d65e78.0d828","type":"ui_group","z":"","name":"Pressure, Humidity","tab":"","order":4,"disp":true,"width":"6"},{"id":"add33f43.c5192","type":"ui_group","z":"","name":"DHT11: Humid (24 Horas)","tab":"","order":6,"disp":true,"width":"6"},{"id":"4b6958f.0d1c6a8","type":"ui_group","z":"","name":"BMP180: Pressure (24 Horas)","tab":"","order":7,"disp":true,"width":"6"},{"id":"a39a7b67.569348","type":"ui_group","z":"","name":"DS18B20: Temp (24 Horas)","tab":"","order":8,"disp":true,"width":"6"},{"id":"6fb261e6.277ab","type":"ui_group","z":"","name":"DHT11: Humid (5 Min)","tab":"","order":5,"disp":true,"width":"6"},{"id":"47ee5bab.85adc4","type":"ui_group","z":"","name":"Numbers","tab":"","order":1,"disp":false,"width":"5"},{"id":"d84eab15.705bf8","type":"ui_group","z":"","name":"Chart","tab":"","order":2,"disp":false,"width":"18"},{"id":"7ec03729.0dcf38","type":"ui_group","name":"Group 1","tab":"","order":1,"disp":true,"width":6},{"id":"bf244509.57fab8","type":"ui_group","z":"","name":"LED","tab":"","disp":true,"width":"3","collapse":false},{"id":"4b3cca93.c7c2f4","type":"ui_group","z":"","name":"LED","tab":"","disp":true,"width":"3","collapse":false},{"id":"1ce173f2.d3551c","type":"ui_group","z":"","name":"Sensor DS18B20","tab":"","order":1,"disp":true,"width":"6"},{"id":"ba1177a0.03d768","type":"ui_group","name":"Group 1","tab":"","order":1,"disp":true,"width":6},{"id":"ce8812c1.21c7a","type":"mqtt-broker","z":"","name":"","broker":"10.140.101.44","port":"60000","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"45f17566.24a92c","type":"ui_group","z":"","name":"Control led ESP8266","tab":"","order":1,"disp":true,"width":"6"},{"id":"dea97ee7.19f8e","type":"ui_group","z":"","name":"Sensor DHT11","tab":"","order":2,"disp":false,"width":"6","collapse":false},{"id":"5e375e96.c984b","type":"ui_group","z":"","name":"Sensor DHT11","tab":"","order":2,"disp":false,"width":"6","collapse":false},{"id":"44c3274d.8b5918","type":"ui_group","z":"","name":"Chart for humidity","tab":"8c3724bf.1ceed8","order":6,"disp":true,"width":"6","collapse":false},{"id":"90dc7ac3.0b5728","type":"ui_group","z":"","name":"Chart for moisture","tab":"8c3724bf.1ceed8","order":5,"disp":true,"width":"7","collapse":false},{"id":"c2aeb38.def745","type":"ui_group","z":"","name":"Chart for temperature","tab":"8c3724bf.1ceed8","order":4,"disp":true,"width":"6","collapse":false},{"id":"557e922b.7d1b5c","type":"debug","z":"5d1f8c70.660414","name":"","active":false,"console":"false","complete":"payload","x":770,"y":120,"wires":[]},{"id":"b1c2ff30.a74b5","type":"ui_gauge","z":"5d1f8c70.660414","name":"","group":"6ac7bac2.0e2fe4","order":1,"width":"6","height":"5","gtype":"gage","title":"","label":"°","format":"{{value}}°","min":"0","max":"40","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":750,"y":40,"wires":[]},{"id":"dc64a301.acbe9","type":"debug","z":"5d1f8c70.660414","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":250,"y":200,"wires":[]},{"id":"eb0f47d7.f70068","type":"function","z":"5d1f8c70.660414","name":"Temp, Moisture og Humidity","func":"var m1 = {payload: msg.payload.split(\"-\")[0]};\nvar m2 = {payload: msg.payload.split(\"-\")[1]};\nvar m3 = {payload: msg.payload.split(\"-\")[2]};\nvar m4 = {payload: msg.payload.split(\"-\")[3]};\nreturn [m1, m2, m3, m4];","outputs":4,"noerr":0,"x":300,"y":140,"wires":[["557e922b.7d1b5c","b1c2ff30.a74b5","4b8921e1.d3c9"],["6104a7d3.2938d8","4e682bce.d0c6c4","5e3d16a8.e4ff68"],["439847f3.4a02f8","b2b635d4.080f68","33ce4440.02397c"],["43ad9efa.9c276"]]},{"id":"6104a7d3.2938d8","type":"debug","z":"5d1f8c70.660414","name":"","active":false,"console":"false","complete":"false","x":770,"y":240,"wires":[]},{"id":"4e682bce.d0c6c4","type":"ui_gauge","z":"5d1f8c70.660414","name":"","group":"c501859e.232898","order":1,"width":"7","height":"5","gtype":"gage","title":"","label":"%","format":"{{value}}%","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":750,"y":160,"wires":[]},{"id":"edbedbfb.457858","type":"ui_text","z":"5d1f8c70.660414","group":"a2ae1942.c63e68","order":1,"width":"6","height":"2","name":"","label":"Value from Temperature, Moisture, Humidity and light","format":"{{msg.payload}}","layout":"col-center","x":360,"y":40,"wires":[]},{"id":"b2979691.8d4718","type":"ui_text","z":"5d1f8c70.660414","group":"fc1ec305.306f2","order":1,"width":"3","height":"2","name":"on","label":"","format":"
on","layout":"col-center","x":1290,"y":380,"wires":[]},{"id":"6f385e3e.13da2","type":"ui_text","z":"5d1f8c70.660414","group":"fc1ec305.306f2","order":3,"width":"3","height":"2","name":"off","label":"","format":"
off","layout":"col-center","x":1290,"y":420,"wires":[]},{"id":"b2b635d4.080f68","type":"ui_gauge","z":"5d1f8c70.660414","name":"","group":"f89ca7f0.35c6b8","order":2,"width":"6","height":"5","gtype":"gage","title":"","label":"%","format":"{{value}}%","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":750,"y":280,"wires":[]},{"id":"439847f3.4a02f8","type":"debug","z":"5d1f8c70.660414","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":770,"y":360,"wires":[]},{"id":"43ad9efa.9c276","type":"switch","z":"5d1f8c70.660414","name":" Selects whether it is true or false","property":"payload","propertyType":"msg","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":830,"y":400,"wires":[["b997d8d0.55eeb8","b7067c7b.f1e7"],["a760109c.c493b","a460183b.2074f8"]]},{"id":"b997d8d0.55eeb8","type":"function","z":"5d1f8c70.660414","name":"Shows that the light is on","func":"msg.color = (msg.payload == \"ON\")?\"black\":\"lime\";\nreturn msg;","outputs":1,"noerr":0,"x":1110,"y":380,"wires":[["b2979691.8d4718"]]},{"id":"a760109c.c493b","type":"function","z":"5d1f8c70.660414","name":"Shows that the light is off","func":"msg.color = (msg.payload == \"OFF\")?\"black\":\"red\";\nreturn msg;","outputs":1,"noerr":0,"x":1110,"y":420,"wires":[["6f385e3e.13da2"]]},{"id":"446aeaf9.6dd874","type":"mysql","z":"5d1f8c70.660414","mydb":"d1761ae2.063e48","name":"","x":440,"y":300,"wires":[[]]},{"id":"a7fe2e5e.fddbf","type":"debug","z":"5d1f8c70.660414","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":450,"y":340,"wires":[]},{"id":"c058bf41.0c301","type":"function","z":"5d1f8c70.660414","name":" Sending data to MYSQL","func":"var data = msg.payload.split('-');\nvar Temp = data[0];\nvar Moisture = data[1];\nvar Humidity = data[2];\nvar out = \"INSERT INTO nodered.node (Time,Temp,Moisture,Humidity) VALUES('\"+new Date().toISOString().slice(0, 19).replace('T', ' ')+\"','\"+Temp+\"','\"+Moisture+\"','\"+Humidity+\"')\";\nmsg.topic = out;\nreturn msg;\n","outputs":1,"noerr":0,"x":250,"y":320,"wires":[["446aeaf9.6dd874","a7fe2e5e.fddbf"]]},{"id":"28794fe9.0f192","type":"ui_template","z":"5d1f8c70.660414","group":"2c308181.70cb1e","name":"","order":1,"width":"7","height":"3","format":"\n\n\n\n{{msg.payload[$index].\nTime}} {{msg.payload[$index].\nTemp}}° {{msg.payload[$index].\nMoisture}}% {{msg.payload[$index].\nHumidity}}%
List nr. TimeTemperature Moisture Humidity
{{$index}}
","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":500,"y":480,"wires":[[]]},{"id":"7b40f2af.62d16c","type":"ui_button","z":"5d1f8c70.660414","name":"","group":"2c308181.70cb1e","order":2,"width":"0","height":"0","passthru":false,"label":"Update List","color":"","bgcolor":"red","icon":"","payload":"","payloadType":"str","topic":"SELECT * FROM nodered.node","x":170,"y":500,"wires":[["29f0615c.1a4d9e"]]},{"id":"29f0615c.1a4d9e","type":"mysql","z":"5d1f8c70.660414","mydb":"d1761ae2.063e48","name":"","x":340,"y":500,"wires":[["28794fe9.0f192","35e24f4a.c06e6"]]},{"id":"35e24f4a.c06e6","type":"debug","z":"5d1f8c70.660414","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":510,"y":520,"wires":[]},{"id":"b7067c7b.f1e7","type":"debug","z":"5d1f8c70.660414","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1070,"y":340,"wires":[]},{"id":"a460183b.2074f8","type":"debug","z":"5d1f8c70.660414","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1070,"y":460,"wires":[]},{"id":"ef388163.7d7db","type":"serial in","z":"5d1f8c70.660414","name":"","serial":"fa994d26.19a7e","x":70,"y":140,"wires":[["edbedbfb.457858","eb0f47d7.f70068","dc64a301.acbe9","c058bf41.0c301"]]},{"id":"d4daf9c1.ef6bf8","type":"file in","z":"83707ece.9a88c","name":"","filename":"persist/settings.json","format":"utf8","chunk":false,"sendError":true,"x":360,"y":60,"wires":[["8b5da63f.32ecd8"]]},{"id":"8b5da63f.32ecd8","type":"switch","z":"83707ece.9a88c","name":"","property":"error","propertyType":"msg","rules":[{"t":"nnull"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":570,"y":60,"wires":[["dce61eee.aa134"],["99c858ef.886188"]]},{"id":"9159c835.a48198","type":"file","z":"83707ece.9a88c","name":"","filename":"persist/settings.json","appendNewline":false,"createDir":true,"overwriteFile":"false","x":1080,"y":40,"wires":[[]]},{"id":"2f817738.1e5908","type":"json","z":"83707ece.9a88c","name":"","property":"payload","action":"str","pretty":false,"x":390,"y":260,"wires":[["80eeada4.7e39b"]]},{"id":"c1e1b7c3.d01528","type":"inject","z":"83707ece.9a88c","name":"","topic":"","payload":"","payloadType":"str","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":90,"y":60,"wires":[["d4daf9c1.ef6bf8"]]},{"id":"d1b8ec79.adb1","type":"change","z":"83707ece.9a88c","name":"","rules":[{"t":"set","p":"persistant_settings","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1120,"y":100,"wires":[[]]},{"id":"99c858ef.886188","type":"json","z":"83707ece.9a88c","name":"","property":"payload","action":"","pretty":false,"x":930,"y":100,"wires":[["d1b8ec79.adb1"]]},{"id":"2ce5d147.cc99fe","type":"function","z":"83707ece.9a88c","name":"","func":"if(msg.clearAll === true){\n flow.set('persistant_settings', {});\n return [msg, {payload: {}}];\n}\n\nvar settings = flow.get('persistant_settings') || {};\n\nif(msg.topic == 'get'){\n msg.payload = settings[msg.payload] || null;\n return [msg, null]\n}else{\n settings[msg.topic] = msg.payload;\n flow.set('persistant_settings', settings);\n return [msg, {payload: settings}];\n}","outputs":2,"noerr":0,"x":210,"y":220,"wires":[[],["2f817738.1e5908"]]},{"id":"80eeada4.7e39b","type":"file","z":"83707ece.9a88c","name":"","filename":"persist/settings.json","appendNewline":false,"createDir":true,"overwriteFile":"true","x":620,"y":260,"wires":[[]]},{"id":"dce61eee.aa134","type":"change","z":"83707ece.9a88c","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"{}","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":780,"y":20,"wires":[["9159c835.a48198","99c858ef.886188"]]},{"id":"dc0cf304.97f7f","type":"file in","z":"fef497df.9b2318","name":"","filename":"persist/settings.json","format":"utf8","chunk":false,"sendError":true,"x":360,"y":60,"wires":[["980cfac4.d38b98"]]},{"id":"980cfac4.d38b98","type":"switch","z":"fef497df.9b2318","name":"","property":"error","propertyType":"msg","rules":[{"t":"nnull"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":570,"y":60,"wires":[["98e2d44a.5d0b18"],["ce5c6223.e3b43"]]},{"id":"55a9c8bb.da0ed8","type":"file","z":"fef497df.9b2318","name":"","filename":"persist/settings.json","appendNewline":false,"createDir":true,"overwriteFile":"false","x":1080,"y":40,"wires":[[]]},{"id":"94a015a9.60b848","type":"json","z":"fef497df.9b2318","name":"","property":"payload","action":"str","pretty":false,"x":390,"y":260,"wires":[["7a9490ef.80f9e"]]},{"id":"d3c94a0.8d67fb8","type":"inject","z":"fef497df.9b2318","name":"","topic":"","payload":"","payloadType":"str","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":90,"y":60,"wires":[["dc0cf304.97f7f"]]},{"id":"ce665598.897a48","type":"change","z":"fef497df.9b2318","name":"","rules":[{"t":"set","p":"persistant_settings","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1120,"y":100,"wires":[[]]},{"id":"ce5c6223.e3b43","type":"json","z":"fef497df.9b2318","name":"","property":"payload","action":"","pretty":false,"x":930,"y":100,"wires":[["ce665598.897a48"]]},{"id":"bc8bb57c.e1d608","type":"function","z":"fef497df.9b2318","name":"","func":"if(msg.clearAll === true){\n flow.set('persistant_settings', {});\n return [msg, {payload: {}}];\n}\n\nvar settings = flow.get('persistant_settings') || {};\n\nif(msg.topic == 'get'){\n msg.payload = settings[msg.payload] || null;\n return [msg, null]\n}else{\n settings[msg.topic] = msg.payload;\n flow.set('persistant_settings', settings);\n return [msg, {payload: settings}];\n}","outputs":2,"noerr":0,"x":210,"y":220,"wires":[[],["94a015a9.60b848"]]},{"id":"7a9490ef.80f9e","type":"file","z":"fef497df.9b2318","name":"","filename":"persist/settings.json","appendNewline":false,"createDir":true,"overwriteFile":"true","x":620,"y":260,"wires":[[]]},{"id":"98e2d44a.5d0b18","type":"change","z":"fef497df.9b2318","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"{}","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":780,"y":20,"wires":[["55a9c8bb.da0ed8","ce5c6223.e3b43"]]},{"id":"529d285b.f23c18","type":"debug","z":"b75708d7.395ed8","name":"","active":false,"console":"false","complete":"payload","x":770,"y":120,"wires":[]},{"id":"3d9f744e.c7c30c","type":"ui_gauge","z":"b75708d7.395ed8","name":"","group":"6ac7bac2.0e2fe4","order":2,"width":"6","height":"5","gtype":"gage","title":"","label":"°","format":"{{value}}°","min":"0","max":"40","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":750,"y":40,"wires":[]},{"id":"192906a3.821f39","type":"debug","z":"b75708d7.395ed8","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":250,"y":200,"wires":[]},{"id":"1224cbad.d1b8a4","type":"function","z":"b75708d7.395ed8","name":"Temp, Moisture og Humidity","func":"var m1 = {payload: msg.payload.split(\"-\")[0]};\nvar m2 = {payload: msg.payload.split(\"-\")[1]};\nvar m3 = {payload: msg.payload.split(\"-\")[2]};\nreturn [m1, m2, m3];","outputs":4,"noerr":0,"x":300,"y":140,"wires":[["529d285b.f23c18","3d9f744e.c7c30c","9edd6dc3.41217"],["52c4f1e.39c6c1","4bc310ca.a8289","c8d7bad5.e132c8"],["79e56b2b.4a9d64","9afe53ea.17604","ca426572.61ba58"],["b2c8ee25.2b4bd"]]},{"id":"28ed5a09.4405f6","type":"ui_text","z":"b75708d7.395ed8","group":"a2ae1942.c63e68","order":1,"width":"6","height":"2","name":"","label":"Value from Temperature, Moisture, Humidity and light","format":"{{msg.payload}}","layout":"col-center","x":360,"y":40,"wires":[]},{"id":"963d2d91.978f4","type":"ui_text","z":"b75708d7.395ed8","group":"fc1ec305.306f2","order":2,"width":"3","height":"2","name":"on","label":"","format":"
on","layout":"col-center","x":1290,"y":380,"wires":[]},{"id":"395ccd86.078d52","type":"ui_text","z":"b75708d7.395ed8","group":"fc1ec305.306f2","order":4,"width":"3","height":"2","name":"off","label":"","format":"
off","layout":"col-center","x":1290,"y":420,"wires":[]},{"id":"9afe53ea.17604","type":"ui_gauge","z":"b75708d7.395ed8","name":"","group":"f89ca7f0.35c6b8","order":1,"width":"6","height":"5","gtype":"gage","title":"","label":"%","format":"{{value}}%","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":750,"y":280,"wires":[]},{"id":"79e56b2b.4a9d64","type":"debug","z":"b75708d7.395ed8","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":770,"y":360,"wires":[]},{"id":"b2c8ee25.2b4bd","type":"switch","z":"b75708d7.395ed8","name":" Selects whether it is true or false","property":"payload","propertyType":"msg","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":830,"y":400,"wires":[["1b151340.b8d83d","3f145ea8.70ab92"],["25fa84ae.74a0ec","6a285fa9.21992"]]},{"id":"1b151340.b8d83d","type":"function","z":"b75708d7.395ed8","name":"Shows that the light is on","func":"msg.color = (msg.payload == \"ON\")?\"black\":\"lime\";\nreturn msg;","outputs":1,"noerr":0,"x":1110,"y":380,"wires":[["963d2d91.978f4"]]},{"id":"25fa84ae.74a0ec","type":"function","z":"b75708d7.395ed8","name":"Shows that the light is off","func":"msg.color = (msg.payload == \"OFF\")?\"black\":\"red\";\nreturn msg;","outputs":1,"noerr":0,"x":1110,"y":420,"wires":[["395ccd86.078d52"]]},{"id":"4e996b80.be7ea4","type":"mysql","z":"b75708d7.395ed8","mydb":"d1761ae2.063e48","name":"","x":440,"y":300,"wires":[[]]},{"id":"fcaf4553.ed8b98","type":"debug","z":"b75708d7.395ed8","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":450,"y":340,"wires":[]},{"id":"b77d1e02.949ba","type":"function","z":"b75708d7.395ed8","name":" Sending data to MYSQL","func":"var data = msg.payload.split('-');\nvar Temp = data[0];\nvar Moisture = data[1];\nvar Humidity = data[2];\nvar out = \"INSERT INTO nodered.node (Time,Temp,Moisture,Humidity) VALUES('\"+new Date().toISOString().slice(0, 19).replace('T', ' ')+\"','\"+Temp+\"','\"+Moisture+\"','\"+Humidity+\"')\";\nmsg.topic = out;\nreturn msg;\n","outputs":1,"noerr":0,"x":250,"y":320,"wires":[["4e996b80.be7ea4","fcaf4553.ed8b98"]]},{"id":"3b7768fc.f679b8","type":"ui_template","z":"b75708d7.395ed8","group":"2c308181.70cb1e","name":"","order":1,"width":"7","height":"3","format":"\n\n\n\n{{msg.payload[$index].\nTime}} {{msg.payload[$index].\nTemp}}° {{msg.payload[$index].\nMoisture}}% {{msg.payload[$index].\nHumidity}}%
List nr. TimeTemperature Moisture Humidity
{{$index}}
","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":500,"y":480,"wires":[[]]},{"id":"c6ade483.56ef48","type":"ui_button","z":"b75708d7.395ed8","name":"","group":"2c308181.70cb1e","order":2,"width":"0","height":"0","passthru":false,"label":"Update List","color":"","bgcolor":"red","icon":"","payload":"","payloadType":"str","topic":"SELECT * FROM nodered.node","x":170,"y":500,"wires":[["ea60d8c4.abcc68"]]},{"id":"ea60d8c4.abcc68","type":"mysql","z":"b75708d7.395ed8","mydb":"d1761ae2.063e48","name":"","x":340,"y":500,"wires":[["3b7768fc.f679b8","7f5dc142.eedf2"]]},{"id":"7f5dc142.eedf2","type":"debug","z":"b75708d7.395ed8","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":510,"y":520,"wires":[]},{"id":"3f145ea8.70ab92","type":"debug","z":"b75708d7.395ed8","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1070,"y":340,"wires":[]},{"id":"6a285fa9.21992","type":"debug","z":"b75708d7.395ed8","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1070,"y":460,"wires":[]},{"id":"52c4f1e.39c6c1","type":"ui_gauge","z":"b75708d7.395ed8","name":"","group":"c501859e.232898","order":2,"width":"7","height":"5","gtype":"gage","title":"","label":"%","format":"{{value}}%","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":750,"y":160,"wires":[]},{"id":"4bc310ca.a8289","type":"debug","z":"b75708d7.395ed8","name":"","active":false,"console":"false","complete":"payload","x":770,"y":240,"wires":[]},{"id":"30fea275.f28f2e","type":"udp in","z":"b75708d7.395ed8","name":"","iface":"","port":"60000","ipv":"udp4","multicast":"false","group":"","datatype":"utf8","x":60,"y":140,"wires":[["28ed5a09.4405f6","1224cbad.d1b8a4","192906a3.821f39","b77d1e02.949ba"]]},{"id":"4b8921e1.d3c9","type":"ui_chart","z":"5d1f8c70.660414","name":"","group":"c2aeb38.def745","order":1,"width":0,"height":0,"label":"","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"15","ymax":"30","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"x":750,"y":80,"wires":[[],[]]},{"id":"5e3d16a8.e4ff68","type":"ui_chart","z":"5d1f8c70.660414","name":"","group":"90dc7ac3.0b5728","order":1,"width":0,"height":0,"label":"","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"25","ymax":"50","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"x":750,"y":200,"wires":[[],[]]},{"id":"33ce4440.02397c","type":"ui_chart","z":"5d1f8c70.660414","name":"","group":"44c3274d.8b5918","order":1,"width":0,"height":0,"label":"","chartType":"line","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,"x":750,"y":320,"wires":[[],[]]},{"id":"9edd6dc3.41217","type":"ui_chart","z":"b75708d7.395ed8","name":"","group":"c2aeb38.def745","order":1,"width":0,"height":0,"label":"","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"15","ymax":"30","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"x":750,"y":80,"wires":[[],[]]},{"id":"c8d7bad5.e132c8","type":"ui_chart","z":"b75708d7.395ed8","name":"","group":"90dc7ac3.0b5728","order":1,"width":0,"height":0,"label":"","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"25","ymax":"50","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"x":750,"y":200,"wires":[[],[]]},{"id":"ca426572.61ba58","type":"ui_chart","z":"b75708d7.395ed8","name":"","group":"44c3274d.8b5918","order":1,"width":0,"height":0,"label":"","chartType":"line","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,"x":750,"y":320,"wires":[[],[]]}]