[{"id":"d4fcb5d8.d0c898","type":"tab","label":"IIOT","disabled":false,"info":""},{"id":"60b86120.ec43","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":"#00b350","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":"#00b350","edited":true},"page-titlebar-backgroundColor":{"value":"#00b350","edited":false},"page-backgroundColor":{"value":"#111111","edited":false},"page-sidebar-backgroundColor":{"value":"#ffffff","edited":false},"group-textColor":{"value":"#00ff72","edited":false},"group-borderColor":{"value":"#555555","edited":false},"group-backgroundColor":{"value":"#333333","edited":false},"widget-textColor":{"value":"#eeeeee","edited":false},"widget-backgroundColor":{"value":"#00b350","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":"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":"c1927236.ddc94","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false},{"id":"332e430b.a4886c","type":"mqtt-broker","z":"","name":"NodeRedMqtt","broker":"broker.shiftr.io","port":"1883","clientid":"NodeRedMqtt","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"88ba6b52.d37108","type":"ui_group","z":"","name":"Default","tab":"","order":1,"disp":true,"width":"6","collapse":false},{"id":"9bd8c091.367f3","type":"ui_group","z":"","name":"Broker","tab":"","order":2,"disp":true,"width":"12","collapse":false},{"id":"fa23dc93.dba4a","type":"ui_group","z":"","name":"MQTT","tab":"c1927236.ddc94","order":2,"disp":true,"width":"16","collapse":false},{"id":"cafef8e8.beb278","type":"ui_group","z":"","name":"Brightness","tab":"c1927236.ddc94","order":3,"disp":true,"width":"4","collapse":true},{"id":"b62ae15a.98151","type":"ui_group","z":"","name":"Temp","tab":"c1927236.ddc94","order":5,"disp":true,"width":"4","collapse":true},{"id":"f6e97993.f5ed88","type":"ui_group","z":"","name":"Hum","tab":"c1927236.ddc94","order":6,"disp":true,"width":"4","collapse":true},{"id":"c597c1af.f08e1","type":"ui_group","z":"","name":"Valve","tab":"c1927236.ddc94","order":4,"disp":true,"width":"4","collapse":true},{"id":"4fbd411f.e1c01","type":"MySQLdatabase","z":"","host":"127.0.0.1","port":"3306","db":"arduino","tz":""},{"id":"e38ce8b.2735718","type":"ui_spacer","name":"spacer","group":"c597c1af.f08e1","order":4,"width":"4","height":"2"},{"id":"91d35e5d.a71b","type":"ui_spacer","name":"spacer","group":"b62ae15a.98151","order":5,"width":"4","height":1},{"id":"59137a11.f64894","type":"websocket-client","z":"","path":"","tls":"","wholemsg":"false"},{"id":"b3c6294a.3102d8","type":"nora-config","z":"","name":"nora config","group":"GOOGLE"},{"id":"6cf6e018.e3465","type":"ui_spacer","name":"spacer","group":"f6e97993.f5ed88","order":2,"width":"4","height":1},{"id":"a329a58c.291e68","type":"mqtt out","z":"d4fcb5d8.d0c898","name":"","topic":"","qos":"","retain":"","broker":"332e430b.a4886c","x":490,"y":20,"wires":[]},{"id":"50411432.b7267c","type":"ui_switch","z":"d4fcb5d8.d0c898","name":"light_digital","label":"light_digital","tooltip":"","group":"cafef8e8.beb278","order":1,"width":"3","height":"1","passthru":true,"decouple":"false","topic":"light","style":"","onvalue":"1","onvalueType":"str","onicon":"","oncolor":"","offvalue":"0","offvalueType":"str","officon":"","offcolor":"","x":110,"y":20,"wires":[["a329a58c.291e68","59cf19a4.d357a8"]]},{"id":"35f6e84.0642718","type":"mqtt out","z":"d4fcb5d8.d0c898","name":"","topic":"","qos":"","retain":"","broker":"332e430b.a4886c","x":470,"y":140,"wires":[]},{"id":"fd46d2c3.02265","type":"ui_switch","z":"d4fcb5d8.d0c898","name":"valve_100%","label":"valve_100%","tooltip":"","group":"c597c1af.f08e1","order":1,"width":"3","height":"1","passthru":true,"decouple":"false","topic":"valve_open","style":"","onvalue":"100","onvalueType":"str","onicon":"","oncolor":"","offvalue":"0","offvalueType":"str","officon":"","offcolor":"","x":270,"y":140,"wires":[["b67dd67b.b788a8"]]},{"id":"98b3163d.16b2f8","type":"ui_slider","z":"d4fcb5d8.d0c898","name":"","label":"open_valve%","tooltip":"","group":"c597c1af.f08e1","order":2,"width":"4","height":"1","passthru":true,"outs":"end","topic":"valve_open","min":"0","max":"100","step":"10","x":100,"y":540,"wires":[["f664d936.f092d8"]]},{"id":"71607f32.1d134","type":"ui_template","z":"d4fcb5d8.d0c898","group":"fa23dc93.dba4a","name":"shiftr","order":1,"width":"16","height":"8","format":"","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":1190,"y":20,"wires":[[]]},{"id":"8ee4ae82.547bc","type":"debug","z":"d4fcb5d8.d0c898","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":490,"y":540,"wires":[]},{"id":"f664d936.f092d8","type":"function","z":"d4fcb5d8.d0c898","name":"Percent_String","func":"msg.payload = String(msg.payload)\nreturn msg;","outputs":1,"noerr":0,"x":260,"y":540,"wires":[["c7541db6.7de3f"]]},{"id":"c57094f1.acbc18","type":"ui_slider","z":"d4fcb5d8.d0c898","name":"light_pwm","label":"light_pwm","tooltip":"","group":"cafef8e8.beb278","order":2,"width":"4","height":"1","passthru":true,"outs":"end","topic":"","min":"0","max":"255","step":"1","x":120,"y":80,"wires":[["afec4e99.e11e7"]]},{"id":"efc87913.eefc48","type":"mqtt out","z":"d4fcb5d8.d0c898","name":"","topic":"pwm","qos":"","retain":"","broker":"332e430b.a4886c","x":310,"y":80,"wires":[]},{"id":"e33ad5ff.fe91d8","type":"mqtt in","z":"d4fcb5d8.d0c898","name":"","topic":"temp","qos":"2","datatype":"auto","broker":"332e430b.a4886c","x":50,"y":660,"wires":[["1239f806.640a68"]]},{"id":"fa7c8f96.05db9","type":"mqtt in","z":"d4fcb5d8.d0c898","name":"","topic":"hum","qos":"2","datatype":"auto","broker":"332e430b.a4886c","x":50,"y":600,"wires":[["8c699724.e56c38"]]},{"id":"a02dc7e1.8a5cc8","type":"ui_slider","z":"d4fcb5d8.d0c898","name":"wanted_temp","label":"wanted_temp","tooltip":"","group":"b62ae15a.98151","order":1,"width":"3","height":"1","passthru":true,"outs":"end","topic":"","min":"15","max":"30","step":1,"x":340,"y":720,"wires":[["657c243e.37b78c"]]},{"id":"cd4899e7.1dbe18","type":"ui_text","z":"d4fcb5d8.d0c898","group":"b62ae15a.98151","order":2,"width":"1","height":"1","name":"C","label":"","format":"{{msg.payload}}","layout":"col-center","x":1350,"y":440,"wires":[]},{"id":"6d0e122.58c68ec","type":"ui_text","z":"d4fcb5d8.d0c898","group":"cafef8e8.beb278","order":3,"width":"1","height":"1","name":"pwm","label":"","format":"{{msg.payload}}","layout":"col-center","x":1370,"y":620,"wires":[]},{"id":"a075f02.40d6a1","type":"ui_text","z":"d4fcb5d8.d0c898","group":"c597c1af.f08e1","order":3,"width":"1","height":"1","name":"%","label":"","format":"{{msg.payload}}","layout":"col-center","x":1330,"y":20,"wires":[]},{"id":"8a0e5270.e7d01","type":"ui_text_input","z":"d4fcb5d8.d0c898","name":"light_on_time","label":"light_on_time","tooltip":"","group":"cafef8e8.beb278","order":4,"width":"4","height":"1","passthru":true,"mode":"time","delay":300,"topic":"","x":110,"y":300,"wires":[["d1248ae1.4e52b8","c0550f06.194f9"]]},{"id":"5d601714.195eb8","type":"ui_text_input","z":"d4fcb5d8.d0c898","name":"light_off_time","label":"light_off_time","tooltip":"","group":"cafef8e8.beb278","order":5,"width":"4","height":"1","passthru":true,"mode":"time","delay":300,"topic":"","x":110,"y":340,"wires":[["51df18e2.2fd2c8","e9d74004.c54a5"]]},{"id":"f5b40add.159158","type":"ui_text_input","z":"d4fcb5d8.d0c898","name":"heat_on_time","label":"heat_on_time","tooltip":"","group":"b62ae15a.98151","order":3,"width":"4","height":"1","passthru":true,"mode":"time","delay":300,"topic":"","x":120,"y":380,"wires":[["a54872ef.ed9c","75879eb2.18c01"]]},{"id":"eec4c4a.b55af38","type":"ui_text_input","z":"d4fcb5d8.d0c898","name":"heat_off_time","label":"heat_off_time","tooltip":"","group":"b62ae15a.98151","order":4,"width":"4","height":"1","passthru":true,"mode":"time","delay":300,"topic":"","x":120,"y":420,"wires":[["6ae66f06.e2401","892e04f7.0c3d28"]]},{"id":"d1248ae1.4e52b8","type":"function","z":"d4fcb5d8.d0c898","name":"on_override_String","func":"msg.payload = \"on_override \" + String(msg.payload/60000)\nglobal.set(\"light_start\",String(msg.payload/60000))\nreturn msg;","outputs":1,"noerr":0,"x":270,"y":300,"wires":[["3d7d2064.783ce"]]},{"id":"51df18e2.2fd2c8","type":"function","z":"d4fcb5d8.d0c898","name":"off_override_String","func":"msg.payload = \"off_override \" + String(msg.payload/60000)\nglobal.set(\"light_stop\",String(msg.payload/60000))\nreturn msg;","outputs":1,"noerr":0,"x":270,"y":340,"wires":[["3d7d2064.783ce"]]},{"id":"a54872ef.ed9c","type":"function","z":"d4fcb5d8.d0c898","name":"on_override_String","func":"msg.payload = \"on_override \" + String(msg.payload/60000)\nreturn msg;","outputs":1,"noerr":0,"x":270,"y":380,"wires":[["bf3598d6.beaa68"]]},{"id":"6ae66f06.e2401","type":"function","z":"d4fcb5d8.d0c898","name":"off_override_String","func":"msg.payload = \"off_override \" + String(msg.payload/60000)\nreturn msg;","outputs":1,"noerr":0,"x":290,"y":420,"wires":[["bf3598d6.beaa68"]]},{"id":"3d7d2064.783ce","type":"bigtimer","z":"d4fcb5d8.d0c898","outtopic":"light","outpayload1":"1","outpayload2":"0","name":"Light_T","comment":"","lat":"55.4038","lon":"10.4024","starttime":"0","endtime":"0","starttime2":0,"endtime2":0,"startoff":0,"endoff":0,"startoff2":0,"endoff2":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,"day6":0,"month6":0,"d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":0,"xmonth1":0,"xday2":0,"xmonth2":0,"xday3":0,"xmonth3":0,"xday4":0,"xmonth4":0,"xday5":0,"xmonth5":0,"xday6":0,"xmonth6":0,"xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"repeat":false,"atstart":false,"odd":false,"even":false,"x":460,"y":320,"wires":[[],["601e5514.7754ac"],[]]},{"id":"bf3598d6.beaa68","type":"bigtimer","z":"d4fcb5d8.d0c898","outtopic":"valve_open","outpayload1":"100","outpayload2":"0","name":"Heat_T","comment":"","lat":"55.4038","lon":"10.4024","starttime":"0","endtime":"0","starttime2":0,"endtime2":0,"startoff":0,"endoff":0,"startoff2":0,"endoff2":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,"day6":0,"month6":0,"d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":0,"xmonth1":0,"xday2":0,"xmonth2":0,"xday3":0,"xmonth3":0,"xday4":0,"xmonth4":0,"xday5":0,"xmonth5":0,"xday6":0,"xmonth6":0,"xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"repeat":false,"atstart":false,"odd":false,"even":false,"x":480,"y":400,"wires":[["bdfa9011.38551"],[],[]]},{"id":"598f1a2a.fff2f4","type":"ui_slider","z":"d4fcb5d8.d0c898","name":"fade_time_min","label":"fade_min","tooltip":"","group":"cafef8e8.beb278","order":6,"width":"3","height":"1","passthru":true,"outs":"end","topic":"","min":0,"max":"60","step":1,"x":120,"y":260,"wires":[["fb83e2e4.07955"]]},{"id":"6a6de4f5.bd23ec","type":"ui_text","z":"d4fcb5d8.d0c898","group":"cafef8e8.beb278","order":7,"width":"1","height":"1","name":"min","label":"","format":"{{msg.payload}}","layout":"col-center","x":390,"y":260,"wires":[]},{"id":"fb83e2e4.07955","type":"function","z":"d4fcb5d8.d0c898","name":"fade_global","func":"global.set(\"fade\");\nglobal.set(\"fade_min\",msg.payload);\nvar1 = global.get(\"light_stop\")- global.get(\"light_start\");\nif(var1 >global.get(\"fade_min\"))\nglobal.set(\"fade_min\",var1);\nreturn msg\n","outputs":1,"noerr":0,"x":270,"y":260,"wires":[["6a6de4f5.bd23ec","b102ffd.c97ed"]]},{"id":"601e5514.7754ac","type":"function","z":"d4fcb5d8.d0c898","name":"FadePWM","func":"var ObtainedData = global.get(\"fade\")\nif (msg.payload > 0 )\nvar2 = ObtainedData + (255/global.get(\"fade_min\"));\nelse \nvar2 = 0;\nif (global.get(\"fade\") > (255-msg.payload))\nglobal.set(\"fade\",255);\nelse\nglobal.set(\"fade\",var2);\nmsg.payload = (global.get(\"fade\"));\nreturn msg;","outputs":1,"noerr":0,"x":590,"y":320,"wires":[["95c9b487.118f68"]]},{"id":"95c9b487.118f68","type":"calculator","z":"d4fcb5d8.d0c898","name":"Round","inputMsgField":"payload","outputMsgField":"payload","operation":"round","constant":"","x":690,"y":320,"wires":[["cc67b739.0410f8"]]},{"id":"5552762c.022f48","type":"ui_gauge","z":"d4fcb5d8.d0c898","name":"Brightness","group":"cafef8e8.beb278","order":8,"width":"4","height":"2","gtype":"donut","title":"","label":"pwm","format":"{{value}}","min":0,"max":"255","colors":["#e68a00","#e6a800","#e1d423"],"seg1":"","seg2":"","x":1230,"y":620,"wires":[]},{"id":"59cf19a4.d357a8","type":"function","z":"d4fcb5d8.d0c898","name":"Digital to pwm","func":"msg.payload = msg.payload * 255\nreturn msg;","outputs":1,"noerr":0,"x":260,"y":20,"wires":[["906123de.253ea"]]},{"id":"6c37d96a.f35858","type":"ui_chart","z":"d4fcb5d8.d0c898","name":"","group":"f6e97993.f5ed88","order":4,"width":0,"height":0,"label":"Hum Last 10m","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"20","ymax":"100","removeOlder":"10","removeOlderPoints":"","removeOlderUnit":"60","cutout":0,"useOneColor":false,"colors":["#1f77b4","#afc8e9","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":1240,"y":280,"wires":[[]]},{"id":"de48de92.491d6","type":"ui_chart","z":"d4fcb5d8.d0c898","name":"","group":"b62ae15a.98151","order":7,"width":0,"height":0,"label":"Temp Last 10m","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"10","ymax":"30","removeOlder":"10","removeOlderPoints":"","removeOlderUnit":"60","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":1240,"y":480,"wires":[[]]},{"id":"f3421c00.d996e","type":"ui_chart","z":"d4fcb5d8.d0c898","name":"","group":"b62ae15a.98151","order":8,"width":0,"height":0,"label":"Temp Last Hour","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"10","ymax":"30","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":1240,"y":520,"wires":[[]]},{"id":"e6bbf446.51ce68","type":"ui_chart","z":"d4fcb5d8.d0c898","name":"","group":"f6e97993.f5ed88","order":5,"width":0,"height":0,"label":"Hum Last Hour","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"20","ymax":"100","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":1240,"y":320,"wires":[[]]},{"id":"78471f09.1f10e","type":"ui_chart","z":"d4fcb5d8.d0c898","name":"","group":"b62ae15a.98151","order":9,"width":0,"height":0,"label":"Temp Last 24H","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"10","ymax":"30","removeOlder":"24","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":1240,"y":560,"wires":[[]]},{"id":"984ab565.080658","type":"ui_chart","z":"d4fcb5d8.d0c898","name":"","group":"f6e97993.f5ed88","order":6,"width":0,"height":0,"label":"Hum Last 24H","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"20","ymax":"100","removeOlder":"24","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":1240,"y":360,"wires":[[]]},{"id":"70d47f4a.33b7e","type":"ui_chart","z":"d4fcb5d8.d0c898","name":"","group":"cafef8e8.beb278","order":9,"width":0,"height":0,"label":"Brightness Last 10m","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"0","ymax":"260","removeOlder":"10","removeOlderPoints":"","removeOlderUnit":"60","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":1260,"y":660,"wires":[[]]},{"id":"fd29be9c.d03fd","type":"ui_chart","z":"d4fcb5d8.d0c898","name":"","group":"cafef8e8.beb278","order":10,"width":0,"height":0,"label":"Brightness Last Hour","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"0","ymax":"260","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":1260,"y":700,"wires":[[]]},{"id":"ea8b5e35.50393","type":"ui_chart","z":"d4fcb5d8.d0c898","name":"","group":"cafef8e8.beb278","order":11,"width":0,"height":0,"label":"BrightnessLast 24H","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"0","ymax":"260","removeOlder":"24","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":1250,"y":740,"wires":[[]]},{"id":"c420b80b.70b808","type":"ui_chart","z":"d4fcb5d8.d0c898","name":"","group":"c597c1af.f08e1","order":7,"width":0,"height":0,"label":"Valve open Last 10m","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"0","ymax":"100","removeOlder":"10","removeOlderPoints":"","removeOlderUnit":"60","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":1260,"y":100,"wires":[[]]},{"id":"3e999db4.b333e2","type":"ui_chart","z":"d4fcb5d8.d0c898","name":"","group":"c597c1af.f08e1","order":8,"width":0,"height":0,"label":"Valve open Last Hour","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"0","ymax":"100","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":1260,"y":140,"wires":[[]]},{"id":"15810e.caba2ef2","type":"ui_chart","z":"d4fcb5d8.d0c898","name":"","group":"c597c1af.f08e1","order":9,"width":0,"height":0,"label":"Valve open Last 24H","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"0","ymax":"100","removeOlder":"24","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":1260,"y":180,"wires":[[]]},{"id":"89484ba.099cfb8","type":"ui_gauge","z":"d4fcb5d8.d0c898","name":"Thermostat","group":"c597c1af.f08e1","order":6,"width":"4","height":"3","gtype":"donut","title":"","label":"%","format":"{{value}}","min":0,"max":"100","colors":["#0017e6","#00e649","#e12323"],"seg1":"","seg2":"","x":1230,"y":60,"wires":[]},{"id":"73bb65f4.47917c","type":"ui_gauge","z":"d4fcb5d8.d0c898","name":"Temp","group":"b62ae15a.98151","order":6,"width":"4","height":"3","gtype":"donut","title":"","label":"C","format":"{{value}}","min":"10","max":"30","colors":["#0400e6","#0fe600","#e12323"],"seg1":"","seg2":"","x":1210,"y":440,"wires":[]},{"id":"6f2bb493.e897ac","type":"ui_gauge","z":"d4fcb5d8.d0c898","name":"Hum","group":"f6e97993.f5ed88","order":1,"width":"4","height":"3","gtype":"donut","title":"","label":"%","format":"{{value}}","min":"20","max":"100","colors":["#0400e6","#0fe600","#e12323"],"seg1":"","seg2":"","x":1210,"y":240,"wires":[]},{"id":"4054c219.29854c","type":"inject","z":"d4fcb5d8.d0c898","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"20","crontab":"","once":false,"onceDelay":0.1,"x":230,"y":600,"wires":[["e03b2934.824e38"]]},{"id":"e03b2934.824e38","type":"function","z":"d4fcb5d8.d0c898","name":"Insert_mysql","func":"var TEMP = global.get(\"current_temp\");\nvar HUM = global.get(\"current_hum\");\nvar VALVE = global.get(\"valve\");\nvar PWM = global.get(\"pwm\");\nvar LIGHT_START_MIN = global.get(\"light\");\nvar LIGHT_END_MIN = global.get(\"dark\");\nvar HEAT_START_MIN = global.get(\"heat\");\nvar HEAT_END_MIN = global.get(\"cold\");\n\n\nvar out = \"INSERT INTO arduino.iiot_db (TIME,TEMP,HUM,VALVE,PWM,LIGHT_START_MIN,LIGHT_END_MIN,HEAT_START_MIN,HEAT_END_MIN) VALUES('\"+new Date().toISOString().slice(0, 19).replace('T', ' ')+\"','\"+TEMP+\"','\"+HUM+\"','\"+VALVE+\"','\"+PWM+\"','\"+LIGHT_START_MIN+\"','\"+LIGHT_END_MIN+\"','\"+HEAT_START_MIN+\"','\"+HEAT_END_MIN+\"')\";\nmsg.topic = out; \nreturn msg;\n","outputs":1,"noerr":0,"x":350,"y":600,"wires":[["8107ed7d.966c4"]]},{"id":"dd917129.3e6ef","type":"mysql","z":"d4fcb5d8.d0c898","mydb":"4fbd411f.e1c01","name":"iiot_db","x":550,"y":600,"wires":[["bd22d55d.e0bca8"]]},{"id":"1b495299.2b56bd","type":"function","z":"d4fcb5d8.d0c898","name":"GlobalTemp","func":"global.set(\"current_temp\",msg.payload);\n","outputs":1,"noerr":0,"x":950,"y":380,"wires":[[]]},{"id":"dd320e6c.97566","type":"function","z":"d4fcb5d8.d0c898","name":"GlobalHum","func":"global.set(\"current_hum\",msg.payload);\n","outputs":1,"noerr":0,"x":950,"y":440,"wires":[[]]},{"id":"38ab624a.10f1ee","type":"function","z":"d4fcb5d8.d0c898","name":"GlobalPwm","func":"global.set(\"pwm\",msg.payload)\nreturn msg;","outputs":1,"noerr":0,"x":950,"y":260,"wires":[["7e493791.bd0538"]]},{"id":"8107ed7d.966c4","type":"link out","z":"d4fcb5d8.d0c898","name":"SQL_OUT","links":["8946784e.4433c8"],"x":435,"y":600,"wires":[]},{"id":"8946784e.4433c8","type":"link in","z":"d4fcb5d8.d0c898","name":"SQL_IN","links":["8107ed7d.966c4","a33d725a.53ec1"],"x":495,"y":600,"wires":[["dd917129.3e6ef"]]},{"id":"9655e13e.0a402","type":"link in","z":"d4fcb5d8.d0c898","name":"PWM_IN","links":["7e493791.bd0538","cc67b739.0410f8"],"x":255,"y":80,"wires":[["efc87913.eefc48"]]},{"id":"cc67b739.0410f8","type":"link out","z":"d4fcb5d8.d0c898","name":"PWM_OUT","links":["15673f3c.7482a1","93a1856.be4fe78","9655e13e.0a402","9eb8c35e.6a283","b087aecd.bd32f"],"x":755,"y":320,"wires":[]},{"id":"15673f3c.7482a1","type":"link in","z":"d4fcb5d8.d0c898","name":"PWM_IN2","links":["906123de.253ea","afec4e99.e11e7","c3806f5b.97bf9","cc67b739.0410f8"],"x":1155,"y":620,"wires":[["5552762c.022f48"]]},{"id":"afec4e99.e11e7","type":"link out","z":"d4fcb5d8.d0c898","name":"PWM_OUT2","links":["15673f3c.7482a1","93a1856.be4fe78","9eb8c35e.6a283","b087aecd.bd32f","d5881b21.de49a8","f1e6537a.58961"],"x":195,"y":80,"wires":[]},{"id":"f1e6537a.58961","type":"link in","z":"d4fcb5d8.d0c898","name":"PWM_IN2","links":["afec4e99.e11e7","c3806f5b.97bf9"],"x":1315,"y":620,"wires":[["6d0e122.58c68ec"]]},{"id":"93a1856.be4fe78","type":"link in","z":"d4fcb5d8.d0c898","name":"PWM_IN2","links":["afec4e99.e11e7","cc67b739.0410f8","c3806f5b.97bf9"],"x":875,"y":260,"wires":[["38ab624a.10f1ee"]]},{"id":"9eb8c35e.6a283","type":"link in","z":"d4fcb5d8.d0c898","name":"PWM_IN2","links":["7e493791.bd0538","906123de.253ea","afec4e99.e11e7","c3806f5b.97bf9","cc67b739.0410f8"],"x":1155,"y":700,"wires":[["fd29be9c.d03fd"]]},{"id":"b087aecd.bd32f","type":"link in","z":"d4fcb5d8.d0c898","name":"PWM_IN2","links":["7e493791.bd0538","906123de.253ea","afec4e99.e11e7","c3806f5b.97bf9","cc67b739.0410f8"],"x":1155,"y":660,"wires":[["70d47f4a.33b7e"]]},{"id":"d1ec4b0e.c68078","type":"link in","z":"d4fcb5d8.d0c898","name":"VALVE_IN","links":["3877ecb8.8b79b4"],"x":15,"y":540,"wires":[["98b3163d.16b2f8"]]},{"id":"3877ecb8.8b79b4","type":"link out","z":"d4fcb5d8.d0c898","name":"VALVE_OUT","links":["d1ec4b0e.c68078"],"x":755,"y":380,"wires":[]},{"id":"b67dd67b.b788a8","type":"link out","z":"d4fcb5d8.d0c898","name":"VALVE_OUT2","links":["b95ec0c8.e072e","b21b76c6.be7078","4a0a7ebf.14503","b40f94d8.33fed8","c723daf4.47fd48","383f1bb2.5aac54","cdb02752.526c48"],"x":355,"y":140,"wires":[]},{"id":"b95ec0c8.e072e","type":"link in","z":"d4fcb5d8.d0c898","name":"VALVE_IN2","links":["7c79f75.5c9c108","b67dd67b.b788a8","c7541db6.7de3f"],"x":415,"y":140,"wires":[["35f6e84.0642718"]]},{"id":"4a0a7ebf.14503","type":"link in","z":"d4fcb5d8.d0c898","name":"VALVE_IN2","links":["7c79f75.5c9c108","b67dd67b.b788a8","c7541db6.7de3f"],"x":1155,"y":100,"wires":[["c420b80b.70b808"]]},{"id":"b40f94d8.33fed8","type":"link in","z":"d4fcb5d8.d0c898","name":"VALVE_IN2","links":["7c79f75.5c9c108","b67dd67b.b788a8","c7541db6.7de3f"],"x":1155,"y":140,"wires":[["3e999db4.b333e2"]]},{"id":"c723daf4.47fd48","type":"link in","z":"d4fcb5d8.d0c898","name":"VALVE_IN2","links":["7c79f75.5c9c108","b67dd67b.b788a8","c7541db6.7de3f"],"x":1155,"y":180,"wires":[["15810e.caba2ef2"]]},{"id":"383f1bb2.5aac54","type":"link in","z":"d4fcb5d8.d0c898","name":"VALVE_IN2","links":["7c79f75.5c9c108","b67dd67b.b788a8","c7541db6.7de3f"],"x":1155,"y":60,"wires":[["89484ba.099cfb8","dd740b7d.3c8948"]]},{"id":"c7541db6.7de3f","type":"link out","z":"d4fcb5d8.d0c898","name":"VALVE_OUT3","links":["383f1bb2.5aac54","4a0a7ebf.14503","b40f94d8.33fed8","b95ec0c8.e072e","c723daf4.47fd48","bf68970e.4b2988","ff27849a.1af748","cdb02752.526c48"],"x":355,"y":540,"wires":[]},{"id":"bf68970e.4b2988","type":"link in","z":"d4fcb5d8.d0c898","name":"VALVE_IN2","links":["c7541db6.7de3f"],"x":415,"y":540,"wires":[["8ee4ae82.547bc"]]},{"id":"ff27849a.1af748","type":"link in","z":"d4fcb5d8.d0c898","name":"VALVE_IN2","links":["c7541db6.7de3f"],"x":1275,"y":20,"wires":[["a075f02.40d6a1"]]},{"id":"d5881b21.de49a8","type":"link in","z":"d4fcb5d8.d0c898","name":"PWM_IN2","links":["7e493791.bd0538","906123de.253ea","afec4e99.e11e7","c3806f5b.97bf9"],"x":1155,"y":740,"wires":[["ea8b5e35.50393"]]},{"id":"906123de.253ea","type":"link out","z":"d4fcb5d8.d0c898","name":"PWM_OUT4","links":["15673f3c.7482a1","9eb8c35e.6a283","b087aecd.bd32f","d5881b21.de49a8","871ca9f3.267d58"],"x":355,"y":20,"wires":[]},{"id":"8c699724.e56c38","type":"link out","z":"d4fcb5d8.d0c898","name":"HUM_OUT","links":["1c90c599.baed4a","fbfbfb46.0aedb8","1a61e184.ba950e","9cb2b87e.357738","e49aee7a.ccfce"],"x":115,"y":600,"wires":[]},{"id":"1a61e184.ba950e","type":"link in","z":"d4fcb5d8.d0c898","name":"HUM_IN","links":["8c699724.e56c38"],"x":1155,"y":360,"wires":[["984ab565.080658"]]},{"id":"e49aee7a.ccfce","type":"link in","z":"d4fcb5d8.d0c898","name":"HUM_IN","links":["8c699724.e56c38"],"x":875,"y":440,"wires":[["dd320e6c.97566"]]},{"id":"9cb2b87e.357738","type":"link in","z":"d4fcb5d8.d0c898","name":"HUM_IN","links":["8c699724.e56c38"],"x":1155,"y":240,"wires":[["6f2bb493.e897ac"]]},{"id":"fbfbfb46.0aedb8","type":"link in","z":"d4fcb5d8.d0c898","name":"HUM_IN","links":["8c699724.e56c38"],"x":1155,"y":320,"wires":[["e6bbf446.51ce68"]]},{"id":"1c90c599.baed4a","type":"link in","z":"d4fcb5d8.d0c898","name":"HUM_IN","links":["8c699724.e56c38"],"x":1155,"y":280,"wires":[["6c37d96a.f35858"]]},{"id":"1239f806.640a68","type":"link out","z":"d4fcb5d8.d0c898","name":"TEMP_OUT","links":["eae84676.5ff588","c0f912e8.819c3","6ac4deb0.6594c","2650cea3.46f512","6fd478e6.4075b8","6e88dc1c.6feb24"],"x":115,"y":660,"wires":[]},{"id":"eae84676.5ff588","type":"link in","z":"d4fcb5d8.d0c898","name":"TEMP_IN","links":["1239f806.640a68"],"x":1155,"y":480,"wires":[["de48de92.491d6"]]},{"id":"c0f912e8.819c3","type":"link in","z":"d4fcb5d8.d0c898","name":"TEMP_IN","links":["1239f806.640a68"],"x":1155,"y":520,"wires":[["f3421c00.d996e"]]},{"id":"6ac4deb0.6594c","type":"link in","z":"d4fcb5d8.d0c898","name":"TEMP_IN","links":["1239f806.640a68"],"x":1155,"y":560,"wires":[["78471f09.1f10e"]]},{"id":"2650cea3.46f512","type":"link in","z":"d4fcb5d8.d0c898","name":"TEMP_IN","links":["1239f806.640a68"],"x":875,"y":380,"wires":[["1b495299.2b56bd"]]},{"id":"6fd478e6.4075b8","type":"link in","z":"d4fcb5d8.d0c898","name":"TEMP_IN","links":["1239f806.640a68"],"x":1155,"y":440,"wires":[["73bb65f4.47917c"]]},{"id":"7e493791.bd0538","type":"link out","z":"d4fcb5d8.d0c898","name":"PWM_OUT5","links":["d5881b21.de49a8","9eb8c35e.6a283","b087aecd.bd32f","9655e13e.0a402","c0f5fef3.25732"],"x":1035,"y":260,"wires":[]},{"id":"7ec883ea.52ef8c","type":"function","z":"d4fcb5d8.d0c898","name":"GlobalValve","func":"global.set(\"valve\",msg.payload)\n","outputs":1,"noerr":0,"x":950,"y":320,"wires":[[]]},{"id":"cdb02752.526c48","type":"link in","z":"d4fcb5d8.d0c898","name":"VALVE_IN2","links":["7c79f75.5c9c108","b67dd67b.b788a8","c7541db6.7de3f"],"x":875,"y":320,"wires":[["7ec883ea.52ef8c"]]},{"id":"6d69a849.909f98","type":"function","z":"d4fcb5d8.d0c898","name":"Global_LightTime","func":"global.set(\"light\",msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":950,"y":20,"wires":[[]]},{"id":"6fdca1e.0ca886","type":"function","z":"d4fcb5d8.d0c898","name":"Global_DarkTime","func":"global.set(\"dark\",msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":950,"y":80,"wires":[[]]},{"id":"6ec7c833.25f838","type":"function","z":"d4fcb5d8.d0c898","name":"Global_HeatTime","func":"global.set(\"heat\",msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":950,"y":140,"wires":[[]]},{"id":"c7c5567a.711488","type":"function","z":"d4fcb5d8.d0c898","name":"Global_ColdTime","func":"global.set(\"cold\",msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":950,"y":200,"wires":[[]]},{"id":"c0550f06.194f9","type":"link out","z":"d4fcb5d8.d0c898","name":"light_time_out","links":["9d4554d3.79aac8"],"x":195,"y":300,"wires":[]},{"id":"e9d74004.c54a5","type":"link out","z":"d4fcb5d8.d0c898","name":"light_time_out2","links":["9e1c2c64.6dfc9"],"x":195,"y":340,"wires":[]},{"id":"75879eb2.18c01","type":"link out","z":"d4fcb5d8.d0c898","name":"heat_on_out","links":["737ed3d1.87657c"],"x":195,"y":380,"wires":[]},{"id":"892e04f7.0c3d28","type":"link out","z":"d4fcb5d8.d0c898","name":"heat_off_out","links":["842c26e7.6e70f8"],"x":215,"y":420,"wires":[]},{"id":"9d4554d3.79aac8","type":"link in","z":"d4fcb5d8.d0c898","name":"light_time_in","links":["c0550f06.194f9"],"x":855,"y":20,"wires":[["6d69a849.909f98"]]},{"id":"9e1c2c64.6dfc9","type":"link in","z":"d4fcb5d8.d0c898","name":"light_time_in2","links":["e9d74004.c54a5"],"x":855,"y":80,"wires":[["6fdca1e.0ca886"]]},{"id":"737ed3d1.87657c","type":"link in","z":"d4fcb5d8.d0c898","name":"heat_on_in","links":["75879eb2.18c01"],"x":855,"y":140,"wires":[["6ec7c833.25f838"]]},{"id":"842c26e7.6e70f8","type":"link in","z":"d4fcb5d8.d0c898","name":"heat_off_in","links":["892e04f7.0c3d28"],"x":855,"y":200,"wires":[["c7c5567a.711488"]]},{"id":"a33d725a.53ec1","type":"link out","z":"d4fcb5d8.d0c898","name":"SQL_OUT2","links":["8946784e.4433c8"],"x":435,"y":660,"wires":[]},{"id":"bd22d55d.e0bca8","type":"ui_template","z":"d4fcb5d8.d0c898","group":"fa23dc93.dba4a","name":"","order":1,"width":"16","height":"7","format":"\n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n\n \n \n \n \n \n \n\n
IndexTIMETEMPHUMVALVEPWMLIGHTONLIGHTOFFHEATONHEATOFF
{{$index}}{{msg.payload[$index].TIME}}{{msg.payload[$index].TEMP}}{{msg.payload[$index].HUM}}{{msg.payload[$index].VALVE}}{{msg.payload[$index].PWM}}{{msg.payload[$index].LIGHT_START_MIN}}{{msg.payload[$index].LIGHT_END_MIN}}{{msg.payload[$index].HEAT_START_MIN}}{{msg.payload[$index].HEAT_END_MIN}}
\n\n\n","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":660,"y":600,"wires":[[]]},{"id":"588faba.e59e354","type":"ui_button","z":"d4fcb5d8.d0c898","name":"SELECT*FROM arduino.iiot_db","group":"fa23dc93.dba4a","order":2,"width":0,"height":0,"passthru":false,"label":"import_db","tooltip":"","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"SELECT*FROM arduino.iiot_db","x":290,"y":660,"wires":[["a33d725a.53ec1"]]},{"id":"dc0c20ae.18c96","type":"function","z":"d4fcb5d8.d0c898","name":"GlobalWantTemp","func":"global.set(\"wanted_temp\",msg.payload);\n","outputs":1,"noerr":0,"x":970,"y":500,"wires":[[]]},{"id":"594cf3d5.b8acdc","type":"nora-light","z":"d4fcb5d8.d0c898","devicename":"Light","lightcolor":false,"brightnesscontrol":true,"passthru":false,"statepayload":false,"brightnessoverride":"","roomhint":"","name":"","nora":"b3c6294a.3102d8","topic":"light","onvalue":"true","onvalueType":"bool","offvalue":"false","offvalueType":"bool","x":70,"y":200,"wires":[["5cac9f65.5bebe"]]},{"id":"657c243e.37b78c","type":"link out","z":"d4fcb5d8.d0c898","name":"OUT_WANT_TEMP","links":["54be5c4f.e15e24","10d51a3c.0be3b6"],"x":435,"y":720,"wires":[]},{"id":"54be5c4f.e15e24","type":"link in","z":"d4fcb5d8.d0c898","name":"WANT_TEMP_IN","links":["657c243e.37b78c"],"x":875,"y":500,"wires":[["dc0c20ae.18c96"]]},{"id":"10d51a3c.0be3b6","type":"link in","z":"d4fcb5d8.d0c898","name":"WANT_TEMP_IN","links":["657c243e.37b78c"],"x":1295,"y":440,"wires":[["cd4899e7.1dbe18"]]},{"id":"8dfe7ba9.1bf6f8","type":"ui_gauge","z":"d4fcb5d8.d0c898","name":"","group":"f6e97993.f5ed88","order":3,"width":0,"height":0,"gtype":"gage","title":"Temp_Diff","label":"C","format":"{{value}}","min":"-10","max":10,"colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":1360,"y":240,"wires":[]},{"id":"d49ff68e.4dcba8","type":"calculator","z":"d4fcb5d8.d0c898","name":"","inputMsgField":"payload","outputMsgField":"payload","operation":"round","constant":"","x":720,"y":660,"wires":[["9e97926e.d82f4"]]},{"id":"9e916b83.9c6f58","type":"function","z":"d4fcb5d8.d0c898","name":"ToDiffGauge","func":"var diff = 0;\nif (global.get(\"wanted_temp\")> 0)\ndiff = global.get(\"wanted_temp\") - global.get(\"current_temp\") \nelse\ndiff = 0;\nglobal.set(\"diff_temp\",diff)\nmsg.payload = global.get(\"diff_temp\")\nreturn msg","outputs":1,"noerr":0,"x":580,"y":660,"wires":[["d49ff68e.4dcba8"]]},{"id":"6e88dc1c.6feb24","type":"link in","z":"d4fcb5d8.d0c898","name":"TEMP_IN","links":["1239f806.640a68"],"x":495,"y":660,"wires":[["9e916b83.9c6f58"]]},{"id":"9e97926e.d82f4","type":"function","z":"d4fcb5d8.d0c898","name":"OUT","func":"global.set(\"diff_temp\",msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":850,"y":660,"wires":[["28e6fdee.516062"]]},{"id":"28e6fdee.516062","type":"link out","z":"d4fcb5d8.d0c898","name":"TEMP_OUT2","links":["1ce23506.01efab"],"x":915,"y":660,"wires":[]},{"id":"1ce23506.01efab","type":"link in","z":"d4fcb5d8.d0c898","name":"TEMP_IN2","links":["28e6fdee.516062"],"x":1295,"y":240,"wires":[["8dfe7ba9.1bf6f8"]]},{"id":"bdfa9011.38551","type":"function","z":"d4fcb5d8.d0c898","name":"ChangeValveDiff","func":"var setting = 0;\nif (global.get(\"diff_temp\") >= 2 && msg.payload == 100 )\nsetting = 100;\nelse if (global.get(\"diff_temp\") == 1 && msg.payload == 100 )\nsetting = 50;\nelse\nsetting = 0;\nmsg.payload = setting;\nreturn msg;","outputs":1,"noerr":0,"x":650,"y":380,"wires":[["3877ecb8.8b79b4"]]},{"id":"661dcb80.f15894","type":"bigtimer","z":"d4fcb5d8.d0c898","outtopic":"","outpayload1":"","outpayload2":"off_override 5000","name":"SunUp_override","comment":"","lat":"55.4038","lon":"10.4024","starttime":"5004","endtime":"5003","starttime2":"5004","endtime2":"5003","startoff":0,"endoff":0,"startoff2":0,"endoff2":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,"day6":0,"month6":0,"d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":0,"xmonth1":0,"xday2":0,"xmonth2":0,"xday3":0,"xmonth3":0,"xday4":0,"xmonth4":0,"xday5":0,"xmonth5":0,"xday6":0,"xmonth6":0,"xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"repeat":false,"atstart":false,"odd":false,"even":false,"x":120,"y":480,"wires":[["3d7d2064.783ce"],[],[]]},{"id":"c9cc647e.09dfe8","type":"nora-thermostat","z":"d4fcb5d8.d0c898","devicename":"Thermostat","roomhint":"","name":"","modes":"off,heat,cool,on","unit":"C","topic":"","passthru":false,"nora":"b3c6294a.3102d8","x":70,"y":720,"wires":[["f4409840.adf1b8"]]},{"id":"86884fff.38755","type":"nora-light","z":"d4fcb5d8.d0c898","devicename":"Valve","lightcolor":false,"brightnesscontrol":true,"passthru":false,"statepayload":false,"brightnessoverride":"","roomhint":"","name":"","nora":"b3c6294a.3102d8","topic":"valve_open","onvalue":"true","onvalueType":"bool","offvalue":"false","offvalueType":"bool","x":70,"y":140,"wires":[["7c79f75.5c9c108"]]},{"id":"871ca9f3.267d58","type":"link in","z":"d4fcb5d8.d0c898","name":"PWM_IN","links":["906123de.253ea"],"x":55,"y":80,"wires":[["c57094f1.acbc18"]]},{"id":"5cac9f65.5bebe","type":"function","z":"d4fcb5d8.d0c898","name":"Google_PWM","func":"msg.payload = msg.payload*2.55\nreturn msg;","outputs":1,"noerr":0,"x":220,"y":200,"wires":[["19db5c99.237d53"]]},{"id":"19db5c99.237d53","type":"calculator","z":"d4fcb5d8.d0c898","name":"","inputMsgField":"payload","outputMsgField":"payload","operation":"round","constant":"","x":380,"y":200,"wires":[["c3806f5b.97bf9"]]},{"id":"c3806f5b.97bf9","type":"link out","z":"d4fcb5d8.d0c898","name":"GOOGLE_PWM","links":["15673f3c.7482a1","93a1856.be4fe78","9eb8c35e.6a283","b087aecd.bd32f","d5881b21.de49a8","f1e6537a.58961"],"x":475,"y":200,"wires":[]},{"id":"7c79f75.5c9c108","type":"link out","z":"d4fcb5d8.d0c898","name":"Google_Valve","links":["cdb02752.526c48","383f1bb2.5aac54","4a0a7ebf.14503","b40f94d8.33fed8","c723daf4.47fd48","b95ec0c8.e072e"],"x":135,"y":140,"wires":[]},{"id":"f4409840.adf1b8","type":"Input Split","z":"d4fcb5d8.d0c898","name":"setpoint","inputProps":["payload.setpoint"],"outputs":1,"x":190,"y":720,"wires":[["a02dc7e1.8a5cc8"]]},{"id":"b102ffd.c97ed","type":"debug","z":"d4fcb5d8.d0c898","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":580,"y":260,"wires":[]},{"id":"dd740b7d.3c8948","type":"debug","z":"d4fcb5d8.d0c898","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1370,"y":60,"wires":[]}]