Hydro Light scheduler and temperature fan control

Simple light and temperature fan control for hydroponic garden,

uses; -dht sensor -Dashboard
-Light Scheduler
-Traffic

[{"id":"f13a824b.9d997","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"744418f2.6fce98","type":"light-scheduler-settings","z":"","name":"veg","latitude":"12","longitude":"12"},{"id":"7e742930.f21b88","type":"light-scheduler-settings","z":"","name":"flower","latitude":"12","longitude":"12"},{"id":"27dbc2b0.40fafe","type":"ui_tab","z":"f13a824b.9d997","name":"Home","icon":"dashboard"},{"id":"d8b67d23.ccc09","type":"ui_group","z":"f13a824b.9d997","name":"Temperature","tab":"27dbc2b0.40fafe","order":1,"disp":true,"width":"6","collapse":false},{"id":"4170421.ba773bc","type":"ui_group","z":"f13a824b.9d997","name":"Humitiy","tab":"27dbc2b0.40fafe","order":2,"disp":true,"width":"6","collapse":false},{"id":"8c9e0abe.e02378","type":"ui_group","z":"f13a824b.9d997","name":"Fans","tab":"27dbc2b0.40fafe","order":3,"disp":true,"width":"6","collapse":false},{"id":"ac6e3679.1bceb8","type":"ui_group","z":"f13a824b.9d997","name":"Lights","tab":"27dbc2b0.40fafe","order":4,"disp":true,"width":"6","collapse":false},{"id":"85a3f38.e59d61","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":"#0015d9","baseFont":"Arial Black,Arial Black,Gadget,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":"#0015d9","edited":true},"page-titlebar-backgroundColor":{"value":"#0015d9","edited":false},"page-backgroundColor":{"value":"#111111","edited":false},"page-sidebar-backgroundColor":{"value":"#000000","edited":false},"group-textColor":{"value":"#263bff","edited":false},"group-borderColor":{"value":"#555555","edited":false},"group-backgroundColor":{"value":"#333333","edited":false},"widget-textColor":{"value":"#eeeeee","edited":false},"widget-backgroundColor":{"value":"#0015d9","edited":false},"widget-borderColor":{"value":"#333333","edited":false},"base-font":{"value":"Arial Black,Arial Black,Gadget,sans-serif"}}},"site":{"name":"Node-RED Dashboard","hideToolbar":"true","allowSwipe":"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":"69a47912.980418","type":"ui_tab","z":"","name":"Configuration","icon":"dashboard","order":2},{"id":"6c7b6ccf.b6e2e4","type":"ui_tab","z":"","name":"Configuration","icon":"dashboard","order":2},{"id":"59bcff64.4dc7a","type":"inject","z":"f13a824b.9d997","name":"","topic":"","payload":"","payloadType":"date","repeat":"60","crontab":"","once":true,"onceDelay":0.1,"x":130,"y":100,"wires":[["21eaa79b.9a2988"]]},{"id":"a9f62e57.a13ee","type":"debug","z":"f13a824b.9d997","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":910,"y":220,"wires":[]},{"id":"21eaa79b.9a2988","type":"rpi-dht22","z":"f13a824b.9d997","name":"","topic":"rpi-dht22","dht":22,"pintype":"0","pin":"4","x":280,"y":100,"wires":[["a4b46028.bb242","d3be9a56.2f2328"]]},{"id":"a4b46028.bb242","type":"function","z":"f13a824b.9d997","name":"Temperature ","func":"msg.payload = msg.payload\nreturn msg;","outputs":1,"noerr":0,"x":450,"y":100,"wires":[["99f0a329.c566d","422494f4.1d61dc","7d13ff53.a43bf","50baa6d3.d13fb8"]]},{"id":"d3be9a56.2f2328","type":"function","z":"f13a824b.9d997","name":"humidity","func":"msg.payload = msg.humidity\nreturn msg;","outputs":1,"noerr":0,"x":420,"y":220,"wires":[["a9f62e57.a13ee","20eaf837.55be08","f2a2728.94f7e9"]]},{"id":"99f0a329.c566d","type":"debug","z":"f13a824b.9d997","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":910,"y":100,"wires":[]},{"id":"50baa6d3.d13fb8","type":"switch","z":"f13a824b.9d997","name":"Temperature","property":"payload","propertyType":"msg","rules":[{"t":"gt","v":"25","vt":"str"},{"t":"lt","v":"25","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":150,"y":420,"wires":[["ac647ef9.61a77"],["fd51d5d.8ac9c28"]]},{"id":"ac647ef9.61a77","type":"change","z":"f13a824b.9d997","name":"on","rules":[{"t":"set","p":"payload","pt":"msg","to":"1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":340,"y":380,"wires":[["bb3bc2a.213464","27617f9d.88488"]]},{"id":"fd51d5d.8ac9c28","type":"change","z":"f13a824b.9d997","name":"off","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":340,"y":460,"wires":[["bb3bc2a.213464","934fb732.4df9f8"]]},{"id":"bb3bc2a.213464","type":"function","z":"f13a824b.9d997","name":"Acitve low","func":"if (msg.payload==1) { \n    msg.payload=0;\n} else {\n    msg.payload=1;\n}\nreturn msg;","outputs":1,"noerr":0,"x":510,"y":420,"wires":[["9bf02061.cf96c","eced2f3a.1f534"]]},{"id":"27617f9d.88488","type":"debug","z":"f13a824b.9d997","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":510,"y":380,"wires":[]},{"id":"934fb732.4df9f8","type":"debug","z":"f13a824b.9d997","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":500,"y":460,"wires":[]},{"id":"9bf02061.cf96c","type":"debug","z":"f13a824b.9d997","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":720,"y":380,"wires":[]},{"id":"36877e68.6e8d62","type":"change","z":"f13a824b.9d997","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"0","fromt":"num","to":"on","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"1","fromt":"num","to":"off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":910,"y":420,"wires":[["be0b189f.1d0188","a7055741.1d43e8"]]},{"id":"be0b189f.1d0188","type":"debug","z":"f13a824b.9d997","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":1110,"y":360,"wires":[]},{"id":"efc9e2cc.04748","type":"function","z":"f13a824b.9d997","name":"Acitve low","func":"if (msg.payload==1) { \n    msg.payload=0;\n} else {\n    msg.payload=1;\n}\nreturn msg;","outputs":1,"noerr":0,"x":1100,"y":840,"wires":[[]]},{"id":"1a79e00f.2b549","type":"debug","z":"f13a824b.9d997","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":1110,"y":780,"wires":[]},{"id":"9953e2aa.1be4f","type":"light-scheduler","z":"f13a824b.9d997","settings":"744418f2.6fce98","events":"[{\"start\":{\"dow\":1,\"mod\":390},\"end\":{\"dow\":1,\"mod\":405}},{\"start\":{\"dow\":1,\"mod\":375},\"end\":{\"dow\":1,\"mod\":390}},{\"start\":{\"dow\":1,\"mod\":360},\"end\":{\"dow\":1,\"mod\":375}},{\"start\":{\"dow\":1,\"mod\":0},\"end\":{\"dow\":1,\"mod\":15}},{\"start\":{\"dow\":1,\"mod\":15},\"end\":{\"dow\":1,\"mod\":30}},{\"start\":{\"dow\":1,\"mod\":30},\"end\":{\"dow\":1,\"mod\":45}},{\"start\":{\"dow\":1,\"mod\":45},\"end\":{\"dow\":1,\"mod\":60}},{\"start\":{\"dow\":1,\"mod\":60},\"end\":{\"dow\":1,\"mod\":75}},{\"start\":{\"dow\":1,\"mod\":90},\"end\":{\"dow\":1,\"mod\":105}},{\"start\":{\"dow\":1,\"mod\":75},\"end\":{\"dow\":1,\"mod\":90}},{\"start\":{\"dow\":1,\"mod\":105},\"end\":{\"dow\":1,\"mod\":120}},{\"start\":{\"dow\":1,\"mod\":345},\"end\":{\"dow\":1,\"mod\":360}},{\"start\":{\"dow\":1,\"mod\":300},\"end\":{\"dow\":1,\"mod\":315}},{\"start\":{\"dow\":1,\"mod\":120},\"end\":{\"dow\":1,\"mod\":135}},{\"start\":{\"dow\":1,\"mod\":135},\"end\":{\"dow\":1,\"mod\":150}},{\"start\":{\"dow\":1,\"mod\":150},\"end\":{\"dow\":1,\"mod\":165}},{\"start\":{\"dow\":1,\"mod\":180},\"end\":{\"dow\":1,\"mod\":195}},{\"start\":{\"dow\":1,\"mod\":165},\"end\":{\"dow\":1,\"mod\":180}},{\"start\":{\"dow\":1,\"mod\":210},\"end\":{\"dow\":1,\"mod\":225}},{\"start\":{\"dow\":1,\"mod\":195},\"end\":{\"dow\":1,\"mod\":210}},{\"start\":{\"dow\":1,\"mod\":225},\"end\":{\"dow\":1,\"mod\":240}},{\"start\":{\"dow\":1,\"mod\":240},\"end\":{\"dow\":1,\"mod\":255}},{\"start\":{\"dow\":1,\"mod\":255},\"end\":{\"dow\":1,\"mod\":270}},{\"start\":{\"dow\":1,\"mod\":270},\"end\":{\"dow\":1,\"mod\":285}},{\"start\":{\"dow\":1,\"mod\":330},\"end\":{\"dow\":1,\"mod\":345}},{\"start\":{\"dow\":1,\"mod\":285},\"end\":{\"dow\":1,\"mod\":300}},{\"start\":{\"dow\":1,\"mod\":315},\"end\":{\"dow\":1,\"mod\":330}},{\"start\":{\"dow\":1,\"mod\":405},\"end\":{\"dow\":1,\"mod\":420}},{\"start\":{\"dow\":1,\"mod\":420},\"end\":{\"dow\":1,\"mod\":435}},{\"start\":{\"dow\":1,\"mod\":435},\"end\":{\"dow\":1,\"mod\":450}},{\"start\":{\"dow\":1,\"mod\":450},\"end\":{\"dow\":1,\"mod\":465}},{\"start\":{\"dow\":1,\"mod\":465},\"end\":{\"dow\":1,\"mod\":480}},{\"start\":{\"dow\":1,\"mod\":480},\"end\":{\"dow\":1,\"mod\":495}},{\"start\":{\"dow\":1,\"mod\":495},\"end\":{\"dow\":1,\"mod\":510}},{\"start\":{\"dow\":1,\"mod\":510},\"end\":{\"dow\":1,\"mod\":525}},{\"start\":{\"dow\":1,\"mod\":525},\"end\":{\"dow\":1,\"mod\":540}},{\"start\":{\"dow\":1,\"mod\":540},\"end\":{\"dow\":1,\"mod\":555}},{\"start\":{\"dow\":1,\"mod\":555},\"end\":{\"dow\":1,\"mod\":570}},{\"start\":{\"dow\":1,\"mod\":570},\"end\":{\"dow\":1,\"mod\":585}},{\"start\":{\"dow\":1,\"mod\":585},\"end\":{\"dow\":1,\"mod\":600}},{\"start\":{\"dow\":1,\"mod\":600},\"end\":{\"dow\":1,\"mod\":615}},{\"start\":{\"dow\":1,\"mod\":615},\"end\":{\"dow\":1,\"mod\":630}},{\"start\":{\"dow\":1,\"mod\":630},\"end\":{\"dow\":1,\"mod\":645}},{\"start\":{\"dow\":1,\"mod\":645},\"end\":{\"dow\":1,\"mod\":660}},{\"start\":{\"dow\":2,\"mod\":345},\"end\":{\"dow\":2,\"mod\":660}},{\"start\":{\"dow\":2,\"mod\":0},\"end\":{\"dow\":2,\"mod\":285}},{\"start\":{\"dow\":2,\"mod\":285},\"end\":{\"dow\":2,\"mod\":300}},{\"start\":{\"dow\":2,\"mod\":300},\"end\":{\"dow\":2,\"mod\":315}},{\"start\":{\"dow\":2,\"mod\":315},\"end\":{\"dow\":2,\"mod\":330}},{\"start\":{\"dow\":2,\"mod\":330},\"end\":{\"dow\":2,\"mod\":345}},{\"start\":{\"dow\":3,\"mod\":0},\"end\":{\"dow\":3,\"mod\":645}},{\"start\":{\"dow\":3,\"mod\":645},\"end\":{\"dow\":3,\"mod\":660}},{\"start\":{\"dow\":4,\"mod\":0},\"end\":{\"dow\":4,\"mod\":660}},{\"start\":{\"dow\":5,\"mod\":0},\"end\":{\"dow\":5,\"mod\":645}},{\"start\":{\"dow\":5,\"mod\":645},\"end\":{\"dow\":5,\"mod\":660}},{\"start\":{\"dow\":6,\"mod\":0},\"end\":{\"dow\":6,\"mod\":645}},{\"start\":{\"dow\":6,\"mod\":645},\"end\":{\"dow\":6,\"mod\":660}},{\"start\":{\"dow\":0,\"mod\":0},\"end\":{\"dow\":0,\"mod\":660}},{\"start\":{\"dow\":3,\"mod\":1020},\"end\":{\"dow\":4,\"mod\":0}},{\"start\":{\"dow\":4,\"mod\":1020},\"end\":{\"dow\":5,\"mod\":0}},{\"start\":{\"dow\":5,\"mod\":1020},\"end\":{\"dow\":6,\"mod\":0}},{\"start\":{\"dow\":1,\"mod\":1020},\"end\":{\"dow\":2,\"mod\":0}},{\"start\":{\"dow\":2,\"mod\":1020},\"end\":{\"dow\":3,\"mod\":0}},{\"start\":{\"dow\":6,\"mod\":1020},\"end\":{\"dow\":0,\"mod\":0}},{\"start\":{\"dow\":0,\"mod\":1020},\"end\":{\"dow\":1,\"mod\":0}}]","topic":"","name":"Vegation","onPayload":"1","onPayloadType":"str","offPayload":"0","offPayloadType":"str","onlyWhenDark":false,"sunElevationThreshold":6,"sunShowElevationInStatus":false,"outputfreq":"output.statechange.startup","x":900,"y":840,"wires":[["efc9e2cc.04748","1a79e00f.2b549"]]},{"id":"fb600dd8.4c86e","type":"change","z":"f13a824b.9d997","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"0","fromt":"num","to":"on","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"1","fromt":"num","to":"off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":910,"y":520,"wires":[["69ad2e0.73621d4","85abb103.26859"]]},{"id":"69ad2e0.73621d4","type":"debug","z":"f13a824b.9d997","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":1110,"y":460,"wires":[]},{"id":"75b18551.108a7c","type":"light-scheduler","z":"f13a824b.9d997","settings":"7e742930.f21b88","events":"[{\"start\":{\"dow\":1,\"mod\":390},\"end\":{\"dow\":1,\"mod\":405}},{\"start\":{\"dow\":1,\"mod\":375},\"end\":{\"dow\":1,\"mod\":390}},{\"start\":{\"dow\":1,\"mod\":360},\"end\":{\"dow\":1,\"mod\":375}},{\"start\":{\"dow\":1,\"mod\":0},\"end\":{\"dow\":1,\"mod\":15}},{\"start\":{\"dow\":1,\"mod\":15},\"end\":{\"dow\":1,\"mod\":30}},{\"start\":{\"dow\":1,\"mod\":30},\"end\":{\"dow\":1,\"mod\":45}},{\"start\":{\"dow\":1,\"mod\":45},\"end\":{\"dow\":1,\"mod\":60}},{\"start\":{\"dow\":1,\"mod\":60},\"end\":{\"dow\":1,\"mod\":75}},{\"start\":{\"dow\":1,\"mod\":90},\"end\":{\"dow\":1,\"mod\":105}},{\"start\":{\"dow\":1,\"mod\":75},\"end\":{\"dow\":1,\"mod\":90}},{\"start\":{\"dow\":1,\"mod\":105},\"end\":{\"dow\":1,\"mod\":120}},{\"start\":{\"dow\":1,\"mod\":345},\"end\":{\"dow\":1,\"mod\":360}},{\"start\":{\"dow\":1,\"mod\":300},\"end\":{\"dow\":1,\"mod\":315}},{\"start\":{\"dow\":1,\"mod\":120},\"end\":{\"dow\":1,\"mod\":135}},{\"start\":{\"dow\":1,\"mod\":135},\"end\":{\"dow\":1,\"mod\":150}},{\"start\":{\"dow\":1,\"mod\":150},\"end\":{\"dow\":1,\"mod\":165}},{\"start\":{\"dow\":1,\"mod\":180},\"end\":{\"dow\":1,\"mod\":195}},{\"start\":{\"dow\":1,\"mod\":165},\"end\":{\"dow\":1,\"mod\":180}},{\"start\":{\"dow\":1,\"mod\":210},\"end\":{\"dow\":1,\"mod\":225}},{\"start\":{\"dow\":1,\"mod\":195},\"end\":{\"dow\":1,\"mod\":210}},{\"start\":{\"dow\":1,\"mod\":225},\"end\":{\"dow\":1,\"mod\":240}},{\"start\":{\"dow\":1,\"mod\":240},\"end\":{\"dow\":1,\"mod\":255}},{\"start\":{\"dow\":1,\"mod\":255},\"end\":{\"dow\":1,\"mod\":270}},{\"start\":{\"dow\":1,\"mod\":270},\"end\":{\"dow\":1,\"mod\":285}},{\"start\":{\"dow\":1,\"mod\":330},\"end\":{\"dow\":1,\"mod\":345}},{\"start\":{\"dow\":1,\"mod\":285},\"end\":{\"dow\":1,\"mod\":300}},{\"start\":{\"dow\":1,\"mod\":315},\"end\":{\"dow\":1,\"mod\":330}},{\"start\":{\"dow\":1,\"mod\":405},\"end\":{\"dow\":1,\"mod\":420}},{\"start\":{\"dow\":1,\"mod\":420},\"end\":{\"dow\":1,\"mod\":435}},{\"start\":{\"dow\":1,\"mod\":435},\"end\":{\"dow\":1,\"mod\":450}},{\"start\":{\"dow\":1,\"mod\":450},\"end\":{\"dow\":1,\"mod\":465}},{\"start\":{\"dow\":1,\"mod\":465},\"end\":{\"dow\":1,\"mod\":480}},{\"start\":{\"dow\":1,\"mod\":480},\"end\":{\"dow\":1,\"mod\":495}},{\"start\":{\"dow\":1,\"mod\":495},\"end\":{\"dow\":1,\"mod\":510}},{\"start\":{\"dow\":1,\"mod\":510},\"end\":{\"dow\":1,\"mod\":525}},{\"start\":{\"dow\":1,\"mod\":525},\"end\":{\"dow\":1,\"mod\":540}},{\"start\":{\"dow\":1,\"mod\":540},\"end\":{\"dow\":1,\"mod\":555}},{\"start\":{\"dow\":1,\"mod\":555},\"end\":{\"dow\":1,\"mod\":570}},{\"start\":{\"dow\":1,\"mod\":570},\"end\":{\"dow\":1,\"mod\":585}},{\"start\":{\"dow\":1,\"mod\":585},\"end\":{\"dow\":1,\"mod\":600}},{\"start\":{\"dow\":1,\"mod\":600},\"end\":{\"dow\":1,\"mod\":615}},{\"start\":{\"dow\":1,\"mod\":615},\"end\":{\"dow\":1,\"mod\":630}},{\"start\":{\"dow\":1,\"mod\":630},\"end\":{\"dow\":1,\"mod\":645}},{\"start\":{\"dow\":1,\"mod\":645},\"end\":{\"dow\":1,\"mod\":660}},{\"start\":{\"dow\":2,\"mod\":345},\"end\":{\"dow\":2,\"mod\":660}},{\"start\":{\"dow\":2,\"mod\":0},\"end\":{\"dow\":2,\"mod\":285}},{\"start\":{\"dow\":2,\"mod\":285},\"end\":{\"dow\":2,\"mod\":300}},{\"start\":{\"dow\":2,\"mod\":300},\"end\":{\"dow\":2,\"mod\":315}},{\"start\":{\"dow\":2,\"mod\":315},\"end\":{\"dow\":2,\"mod\":330}},{\"start\":{\"dow\":2,\"mod\":330},\"end\":{\"dow\":2,\"mod\":345}},{\"start\":{\"dow\":3,\"mod\":0},\"end\":{\"dow\":3,\"mod\":645}},{\"start\":{\"dow\":3,\"mod\":645},\"end\":{\"dow\":3,\"mod\":660}},{\"start\":{\"dow\":4,\"mod\":0},\"end\":{\"dow\":4,\"mod\":660}},{\"start\":{\"dow\":5,\"mod\":0},\"end\":{\"dow\":5,\"mod\":645}},{\"start\":{\"dow\":5,\"mod\":645},\"end\":{\"dow\":5,\"mod\":660}},{\"start\":{\"dow\":6,\"mod\":0},\"end\":{\"dow\":6,\"mod\":645}},{\"start\":{\"dow\":6,\"mod\":645},\"end\":{\"dow\":6,\"mod\":660}},{\"start\":{\"dow\":0,\"mod\":0},\"end\":{\"dow\":0,\"mod\":660}},{\"start\":{\"dow\":1,\"mod\":1380},\"end\":{\"dow\":2,\"mod\":0}},{\"start\":{\"dow\":2,\"mod\":1380},\"end\":{\"dow\":3,\"mod\":0}},{\"start\":{\"dow\":3,\"mod\":1380},\"end\":{\"dow\":4,\"mod\":0}},{\"start\":{\"dow\":4,\"mod\":1380},\"end\":{\"dow\":5,\"mod\":0}},{\"start\":{\"dow\":5,\"mod\":1380},\"end\":{\"dow\":6,\"mod\":0}},{\"start\":{\"dow\":6,\"mod\":1380},\"end\":{\"dow\":0,\"mod\":0}},{\"start\":{\"dow\":0,\"mod\":1380},\"end\":{\"dow\":1,\"mod\":0}}]","topic":"","name":"Flower","onPayload":"1","onPayloadType":"str","offPayload":"0","offPayloadType":"str","onlyWhenDark":false,"sunElevationThreshold":6,"sunShowElevationInStatus":false,"outputfreq":"output.statechange.startup","x":890,"y":920,"wires":[["aed14ed2.27611","e9f7fad6.968948"]]},{"id":"aed14ed2.27611","type":"debug","z":"f13a824b.9d997","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1110,"y":1000,"wires":[]},{"id":"9b898e8c.2d8c5","type":"debug","z":"f13a824b.9d997","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":650,"y":920,"wires":[]},{"id":"a36d6a4e.75a728","type":"change","z":"f13a824b.9d997","name":"change for text output","rules":[{"t":"change","p":"payload","pt":"msg","from":"0","fromt":"num","to":"Vegetation","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"2","fromt":"num","to":"Flower","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"1","fromt":"num","to":"Off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":940,"wires":[["118a3a4d.6a59a6","9b898e8c.2d8c5"]]},{"id":"e9f7fad6.968948","type":"function","z":"f13a824b.9d997","name":"Acitve low","func":"if (msg.payload==1) { \n    msg.payload=0;\n} else {\n    msg.payload=1;\n}\nreturn msg;","outputs":1,"noerr":0,"x":1100,"y":920,"wires":[[]]},{"id":"4401fe07.190b4","type":"change","z":"f13a824b.9d997","name":"schedule only","rules":[{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"num","to":"schedule-only","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":720,"wires":[["c14f55d1.09b2d8","75b18551.108a7c"]]},{"id":"7d9cf5af.ce8b2c","type":"change","z":"f13a824b.9d997","name":"schedule only","rules":[{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"schedule-only","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":680,"wires":[["54d661d8.05368","9953e2aa.1be4f"]]},{"id":"54d661d8.05368","type":"debug","z":"f13a824b.9d997","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":950,"y":640,"wires":[]},{"id":"c14f55d1.09b2d8","type":"debug","z":"f13a824b.9d997","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":950,"y":720,"wires":[]},{"id":"eced2f3a.1f534","type":"ui_switch","z":"f13a824b.9d997","name":"","label":"Exhaust fan","group":"8c9e0abe.e02378","order":0,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"0","onvalueType":"num","onicon":"","oncolor":"","offvalue":"1","offvalueType":"num","officon":"","offcolor":"","x":740,"y":420,"wires":[["36877e68.6e8d62"]]},{"id":"9a268fb2.27bfc","type":"ui_switch","z":"f13a824b.9d997","name":"","label":"Intake fan","group":"8c9e0abe.e02378","order":0,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"0","onvalueType":"num","onicon":"","oncolor":"","offvalue":"1","offvalueType":"num","officon":"","offcolor":"","x":500,"y":520,"wires":[["fb600dd8.4c86e","1c1755e8.e3134a"]]},{"id":"a7055741.1d43e8","type":"ui_text","z":"f13a824b.9d997","group":"8c9e0abe.e02378","order":0,"width":0,"height":0,"name":"","label":"Exhaust fan","format":"{{msg.payload}}","layout":"row-center","x":1130,"y":400,"wires":[]},{"id":"85abb103.26859","type":"ui_text","z":"f13a824b.9d997","group":"8c9e0abe.e02378","order":0,"width":0,"height":0,"name":"","label":"Intake fan","format":"{{msg.payload}}","layout":"row-center","x":1120,"y":500,"wires":[]},{"id":"118a3a4d.6a59a6","type":"ui_text","z":"f13a824b.9d997","group":"ac6e3679.1bceb8","order":1,"width":0,"height":0,"name":"","label":"Lights cycle","format":"{{msg.payload}}","layout":"row-spread","x":690,"y":980,"wires":[]},{"id":"422494f4.1d61dc","type":"ui_gauge","z":"f13a824b.9d997","name":"Temperature","group":"d8b67d23.ccc09","order":0,"width":"0","height":"0","gtype":"gage","title":"Temperature","label":"°C","format":"{{value}}","min":0,"max":"55","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":630,"y":140,"wires":[]},{"id":"20eaf837.55be08","type":"ui_gauge","z":"f13a824b.9d997","name":"Humitiy","group":"4170421.ba773bc","order":0,"width":"0","height":"0","gtype":"gage","title":"Humitiy","label":"%","format":"{{value}}","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":620,"y":260,"wires":[]},{"id":"7d13ff53.a43bf","type":"ui_chart","z":"f13a824b.9d997","name":"","group":"d8b67d23.ccc09","order":0,"width":"0","height":"0","label":"","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"0","ymax":"55","removeOlder":"6","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"x":610,"y":180,"wires":[[],[]]},{"id":"f2a2728.94f7e9","type":"ui_chart","z":"f13a824b.9d997","name":"","group":"4170421.ba773bc","order":0,"width":"0","height":"0","label":"","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"0","ymax":"100","removeOlder":"6","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"x":610,"y":300,"wires":[[],[]]},{"id":"70fcffc5.d3398","type":"ui_button","z":"f13a824b.9d997","name":"","group":"ac6e3679.1bceb8","order":2,"width":0,"height":0,"passthru":false,"label":"Vegation 5pm - 11am","color":"","bgcolor":"","icon":"","payload":"0","payloadType":"num","topic":"","x":160,"y":700,"wires":[["d29ec3bf.7024b","a36d6a4e.75a728","8406aaf1.963b28"]]},{"id":"6f4d0144.c2a6e","type":"ui_button","z":"f13a824b.9d997","name":"","group":"ac6e3679.1bceb8","order":3,"width":0,"height":0,"passthru":false,"label":"Off","color":"","bgcolor":"","icon":"","payload":"1","payloadType":"num","topic":"","x":190,"y":760,"wires":[["cf3cfd5f.9355d","a36d6a4e.75a728","108150fe.cbdf5f"]]},{"id":"d29ec3bf.7024b","type":"change","z":"f13a824b.9d997","name":"Veg off","rules":[{"t":"change","p":"payload","pt":"msg","from":"0","fromt":"num","to":"off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":470,"y":700,"wires":[["9953e2aa.1be4f","7d9cf5af.ce8b2c"]]},{"id":"cf3cfd5f.9355d","type":"change","z":"f13a824b.9d997","name":"OFF","rules":[{"t":"change","p":"payload","pt":"msg","from":"1","fromt":"num","to":"off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":470,"y":760,"wires":[["9953e2aa.1be4f","75b18551.108a7c"]]},{"id":"56336755.f6d448","type":"change","z":"f13a824b.9d997","name":"Flower off","rules":[{"t":"change","p":"payload","pt":"msg","from":"2","fromt":"num","to":"off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":820,"wires":[["75b18551.108a7c","4401fe07.190b4"]]},{"id":"1ab8ebb2.22b5c4","type":"ui_button","z":"f13a824b.9d997","name":"","group":"ac6e3679.1bceb8","order":4,"width":0,"height":0,"passthru":false,"label":"Flower 11pm - 11am","color":"","bgcolor":"","icon":"","payload":"2","payloadType":"num","topic":"","x":160,"y":820,"wires":[["56336755.f6d448","a36d6a4e.75a728","8406aaf1.963b28"]]},{"id":"42805ecc.530e","type":"comment","z":"f13a824b.9d997","name":"Temp controlled exaust fan","info":"","x":150,"y":40,"wires":[]},{"id":"6fe8226f.218b9c","type":"comment","z":"f13a824b.9d997","name":"Light cycle","info":"","x":100,"y":580,"wires":[]},{"id":"e0e60a32.871a68","type":"inject","z":"f13a824b.9d997","name":"","topic":"","payload":"1","payloadType":"num","repeat":"1","crontab":"","once":true,"onceDelay":"","x":90,"y":1200,"wires":[["a4cecc1b.d38aa"]]},{"id":"1e582486.2f991b","type":"function","z":"f13a824b.9d997","name":"Seconds to DD:HH:MM:SS","func":" var totalNumberOfSeconds = msg.count;\n var days = parseInt( totalNumberOfSeconds / 86400 );\n var hours = parseInt (( totalNumberOfSeconds - ( days * 86400 )) / 3600  );\n var minutes = parseInt ((totalNumberOfSeconds - ((hours * 3600)+( days * 86400 ))) / 60 );\n var seconds = parseInt(totalNumberOfSeconds - ((hours * 3600) + (minutes * 60)+( days * 86400 )));\n var result = (days < 10 ? \"0\" + days : days) + \":\" + (hours < 10 ? \"0\" + hours : hours) + \":\" + (minutes < 10 ? \"0\" + minutes : minutes) + \":\" + (seconds  < 10 ? \"0\" + seconds : seconds);\n msg.payload=result;\n return msg;","outputs":1,"noerr":0,"x":660,"y":1200,"wires":[["75aebc0b.675664"]]},{"id":"75aebc0b.675664","type":"ui_text","z":"f13a824b.9d997","group":"ac6e3679.1bceb8","order":5,"width":0,"height":0,"name":"Cycle time","label":"Cycle time","format":"{{msg.payload}}","layout":"row-center","x":890,"y":1200,"wires":[]},{"id":"431431dc.4302b","type":"counter","z":"f13a824b.9d997","name":"Cycle","init":"0","step":"1","lower":null,"upper":null,"mode":"increment","outputs":"1","x":430,"y":1200,"wires":[["1e582486.2f991b"]]},{"id":"a4cecc1b.d38aa","type":"traffic","z":"f13a824b.9d997","name":"","property_allow":"payload","filter_allow":"reset","ignore_case_allow":false,"negate_allow":false,"send_allow":false,"property_stop":"payload","filter_stop":"stop","ignore_case_stop":true,"negate_stop":false,"send_stop":true,"default_start":false,"differ":false,"x":250,"y":1200,"wires":[["431431dc.4302b"]]},{"id":"761c9da4.6157d4","type":"function","z":"f13a824b.9d997","name":"msg object","func":"msg.reset = true;\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":1140,"wires":[["431431dc.4302b"]]},{"id":"7d2619df.9d5c28","type":"inject","z":"f13a824b.9d997","name":"","topic":"","payload":"1","payloadType":"num","repeat":"1","crontab":"","once":true,"onceDelay":"","x":90,"y":1260,"wires":[["83e6e627.5c99b8"]]},{"id":"5effd517.4bec9c","type":"function","z":"f13a824b.9d997","name":"Seconds to DD:HH:MM:SS","func":" var totalNumberOfSeconds = msg.count;\n var days = parseInt( totalNumberOfSeconds / 86400 );\n var hours = parseInt (( totalNumberOfSeconds - ( days * 86400 )) / 3600  );\n var minutes = parseInt ((totalNumberOfSeconds - ((hours * 3600)+( days * 86400 ))) / 60 );\n var seconds = parseInt(totalNumberOfSeconds - ((hours * 3600) + (minutes * 60)+( days * 86400 )));\n var result = (days < 10 ? \"0\" + days : days) + \":\" + (hours < 10 ? \"0\" + hours : hours) + \":\" + (minutes < 10 ? \"0\" + minutes : minutes) + \":\" + (seconds  < 10 ? \"0\" + seconds : seconds);\n msg.payload=result;\n return msg;","outputs":1,"noerr":0,"x":640,"y":1260,"wires":[["fcf2b43d.1d8c58"]]},{"id":"fcf2b43d.1d8c58","type":"ui_text","z":"f13a824b.9d997","group":"ac6e3679.1bceb8","order":7,"width":0,"height":0,"name":"Cycle time","label":"Total time","format":"{{msg.payload}}","layout":"row-center","x":890,"y":1260,"wires":[]},{"id":"83e6e627.5c99b8","type":"counter","z":"f13a824b.9d997","name":"Cycle","init":"0","step":"1","lower":null,"upper":null,"mode":"increment","outputs":"1","x":430,"y":1260,"wires":[["5effd517.4bec9c"]]},{"id":"8406aaf1.963b28","type":"change","z":"f13a824b.9d997","name":"Change to reset","rules":[{"t":"change","p":"payload","pt":"msg","from":"0","fromt":"num","to":"reset","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"2","fromt":"num","to":"reset","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"1","fromt":"num","to":"reset","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":240,"y":1000,"wires":[["761c9da4.6157d4","a4cecc1b.d38aa"]]},{"id":"108150fe.cbdf5f","type":"change","z":"f13a824b.9d997","name":"change off to stop","rules":[{"t":"change","p":"payload","pt":"msg","from":"1","fromt":"num","to":"stop","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":150,"y":1060,"wires":[["a4cecc1b.d38aa"]]},{"id":"d7a21dc1.be74b","type":"ui_button","z":"f13a824b.9d997","name":"","group":"ac6e3679.1bceb8","order":6,"width":0,"height":0,"passthru":false,"label":"Reset timer","color":"","bgcolor":"","icon":"","payload":"reset","payloadType":"str","topic":"","x":90,"y":1160,"wires":[["761c9da4.6157d4"]]},{"id":"97fb1501.05ee18","type":"comment","z":"f13a824b.9d997","name":"exhaust output","info":"","x":700,"y":340,"wires":[]},{"id":"182c55ba.887d4a","type":"comment","z":"f13a824b.9d997","name":"intake output","info":"","x":650,"y":620,"wires":[]},{"id":"1c1755e8.e3134a","type":"function","z":"f13a824b.9d997","name":"Acitve low","func":"if (msg.payload==1) { \n    msg.payload=0;\n} else {\n    msg.payload=1;\n}\nreturn msg;","outputs":1,"noerr":0,"x":640,"y":560,"wires":[[]]},{"id":"b17f53fc.f24d","type":"comment","z":"f13a824b.9d997","name":"Light output","info":"","x":1090,"y":880,"wires":[]},{"id":"ad9fbaa4.6dc818","type":"comment","z":"f13a824b.9d997","name":"Light cycle timer","info":"","x":100,"y":1120,"wires":[]}]

Flow Info

Created 6 years, 3 months ago
Rating: not yet rated

Actions

Rate:

Node Types

Core
  • change (x12)
  • comment (x6)
  • debug (x12)
  • function (x9)
  • inject (x3)
  • switch (x1)
Other

Tags

  • Hydro
  • light
  • timer
  • temperature
  • controlled
  • fan
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option