Hello everyone,
First, sorry for disturbing them. I got a Project with Raspberry Pi. We have 6 LED's and 3 Fan's. I have a 3 floors. i have to put 2 LED's and 1 Fan to one floor. I control them with Relay. but i have to put timer to my flow. i want to open first floors LED's for 16 hours, after 16 hours shutdown automaticly for 8 hours. And i want to edit on Dashboard timer. im new on Node-Red. So i decided to open a topic on Node-RED forum. here is my codes ;
[{"id":"1f5d7d4b.787083","type":"ui_button","z":"6c51481f.cfa668","name":"","group":"4069eec3.05255","order":12,"width":0,"height":0,"passthru":false,"label":"[ON]","tooltip":"","color":"","bgcolor":"","icon":"","payload":"false","payloadType":"bool","topic":"","x":95,"y":46,"wires":[["1a9a8ab7.57fcc5"]]},{"id":"5efe9c97.1b7484","type":"ui_button","z":"6c51481f.cfa668","name":"","group":"4069eec3.05255","order":13,"width":0,"height":0,"passthru":false,"label":"[OFF]","tooltip":"","color":"","bgcolor":"","icon":"","payload":"true","payloadType":"bool","topic":"","x":95,"y":106,"wires":[["1a9a8ab7.57fcc5"]]},{"id":"1a9a8ab7.57fcc5","type":"function","z":"6c51481f.cfa668","name":"","func":"global.set(\"led1\",msg.payload)\nif (msg.payload===false){\n \n msg.payload=\"on\"\n \n \n}\nif (msg.payload===true){\n \n msg.payload=\"off\"\n \n \n}\nreturn msg;","outputs":1,"noerr":0,"x":324,"y":69,"wires":[["c0ec0fe2.61c0c"]]},{"id":"6d745252.b3582c","type":"inject","z":"6c51481f.cfa668","name":"","topic":"","payload":"led1","payloadType":"global","repeat":"1","crontab":"","once":false,"onceDelay":0.1,"x":135,"y":186,"wires":[["2c0086b8.b0caea"]]},{"id":"2c0086b8.b0caea","type":"rpi-gpio out","z":"6c51481f.cfa668","name":"","pin":"11","set":"","level":"0","freq":"","out":"out","x":345,"y":186,"wires":[]},{"id":"6c10f25b.5bfb1c","type":"ui_button","z":"6c51481f.cfa668","name":"","group":"469c68d8.89be68","order":2,"width":0,"height":0,"passthru":false,"label":"[ON]","tooltip":"","color":"","bgcolor":"","icon":"","payload":"false","payloadType":"bool","topic":"","x":95,"y":286,"wires":[["104761de.ebcc0e"]]},{"id":"507168b.297dc98","type":"ui_button","z":"6c51481f.cfa668","name":"","group":"469c68d8.89be68","order":3,"width":0,"height":0,"passthru":false,"label":"[OFF]","tooltip":"","color":"","bgcolor":"","icon":"","payload":"true","payloadType":"bool","topic":"","x":95,"y":346,"wires":[["104761de.ebcc0e"]]},{"id":"5853a063.308cd","type":"ui_button","z":"6c51481f.cfa668","name":"","group":"8d32fd18.01bdd","order":2,"width":0,"height":0,"passthru":false,"label":"[ON]","tooltip":"","color":"","bgcolor":"","icon":"","payload":"false","payloadType":"bool","topic":"","x":95,"y":506,"wires":[["6f4aea44.1d1594"]]},{"id":"c8be4b2c.0ce8a8","type":"ui_button","z":"6c51481f.cfa668","name":"","group":"8d32fd18.01bdd","order":3,"width":0,"height":0,"passthru":false,"label":"[OFF]","tooltip":"","color":"","bgcolor":"","icon":"","payload":"true","payloadType":"bool","topic":"","x":95,"y":566,"wires":[["6f4aea44.1d1594"]]},{"id":"b31d4a48.2eb548","type":"ui_button","z":"6c51481f.cfa668","name":"","group":"f5d378a.d832388","order":3,"width":0,"height":0,"passthru":false,"label":"[OFF]","tooltip":"","color":"","bgcolor":"","icon":"","payload":"true","payloadType":"bool","topic":"","x":755,"y":126,"wires":[["c7bfbe20.95caf"]]},{"id":"a0728bb8.02fbb8","type":"ui_button","z":"6c51481f.cfa668","name":"","group":"f5d378a.d832388","order":2,"width":0,"height":0,"passthru":false,"label":"[ON]","tooltip":"","color":"","bgcolor":"","icon":"","payload":"false","payloadType":"bool","topic":"","x":755,"y":46,"wires":[["c7bfbe20.95caf"]]},{"id":"5ecb9c9b.e9de44","type":"ui_button","z":"6c51481f.cfa668","name":"","group":"8ac97811.c31df8","order":2,"width":0,"height":0,"passthru":false,"label":"[ON]","tooltip":"","color":"","bgcolor":"","icon":"","payload":"false","payloadType":"bool","topic":"","x":755,"y":306,"wires":[["ffb827ca.844cf8"]]},{"id":"104761de.ebcc0e","type":"function","z":"6c51481f.cfa668","name":"","func":"global.set(\"led2\",msg.payload)\nif (msg.payload===false){\n \n msg.payload=\"on\"\n \n \n}\nif (msg.payload===true){\n \n msg.payload=\"off\"\n \n \n}\nreturn msg;","outputs":1,"noerr":0,"x":295,"y":306,"wires":[["f328808e.bd2ba"]]},{"id":"6f4aea44.1d1594","type":"function","z":"6c51481f.cfa668","name":"","func":"global.set(\"led3\",msg.payload)\nif (msg.payload===false){\n \n msg.payload=\"on\"\n \n \n}\nif (msg.payload===true){\n \n msg.payload=\"off\"\n \n \n}\nreturn msg;","outputs":1,"noerr":0,"x":219,"y":530,"wires":[["1d12565e.906f7a"]]},{"id":"ffb827ca.844cf8","type":"function","z":"6c51481f.cfa668","name":"","func":"global.set(\"fan2\",msg.payload)\nif (msg.payload===false){\n \n msg.payload=\"on\"\n \n \n}\nif (msg.payload===true){\n \n msg.payload=\"off\"\n \n \n}\nreturn msg;","outputs":1,"noerr":0,"x":955,"y":326,"wires":[["9979396e.8e9e28"]]},{"id":"c7bfbe20.95caf","type":"function","z":"6c51481f.cfa668","name":"","func":"global.set(\"fan1\",msg.payload)\nif (msg.payload===false){\n \n msg.payload=\"on\"\n \n \n}\nif (msg.payload===true){\n \n msg.payload=\"off\"\n \n \n}\nreturn msg;","outputs":1,"noerr":0,"x":955,"y":86,"wires":[["337f73bb.58256c"]]},{"id":"cf2d03ee.85df6","type":"function","z":"6c51481f.cfa668","name":"","func":"global.set(\"fan3\",msg.payload)\nif (msg.payload===false){\n \n msg.payload=\"on\"\n \n \n}\nif (msg.payload===true){\n \n msg.payload=\"off\"\n \n \n}\nreturn msg;","outputs":1,"noerr":0,"x":975,"y":566,"wires":[["1a385d61.624cc3"]]},{"id":"c8c73780.e25528","type":"ui_button","z":"6c51481f.cfa668","name":"","group":"8ac97811.c31df8","order":3,"width":0,"height":0,"passthru":false,"label":"[OFF]","tooltip":"","color":"","bgcolor":"","icon":"","payload":"true","payloadType":"bool","topic":"","x":755,"y":366,"wires":[["ffb827ca.844cf8"]]},{"id":"90c1732e.c5c79","type":"ui_button","z":"6c51481f.cfa668","name":"","group":"bc038a73.730a78","order":2,"width":0,"height":0,"passthru":false,"label":"[ON]","tooltip":"","color":"","bgcolor":"","icon":"","payload":"false","payloadType":"bool","topic":"","x":755,"y":526,"wires":[["cf2d03ee.85df6"]]},{"id":"48f52e22.9d982","type":"inject","z":"6c51481f.cfa668","name":"","topic":"","payload":"led2","payloadType":"global","repeat":"1","crontab":"","once":false,"onceDelay":0.1,"x":135,"y":406,"wires":[["5c97d709.eb3438"]]},{"id":"5c97d709.eb3438","type":"rpi-gpio out","z":"6c51481f.cfa668","name":"","pin":"7","set":"","level":"0","freq":"","out":"out","x":335,"y":406,"wires":[]},{"id":"6f48eaf6.e4eb04","type":"inject","z":"6c51481f.cfa668","name":"","topic":"","payload":"led3","payloadType":"global","repeat":"1","crontab":"","once":false,"onceDelay":0.1,"x":160,"y":669,"wires":[["8560478.09eaeb8"]]},{"id":"8560478.09eaeb8","type":"rpi-gpio out","z":"6c51481f.cfa668","name":"","pin":"12","set":"","level":"0","freq":"","out":"out","x":429,"y":668,"wires":[]},{"id":"e3aba709.874858","type":"ui_button","z":"6c51481f.cfa668","name":"","group":"bc038a73.730a78","order":3,"width":0,"height":0,"passthru":false,"label":"[OFF]","tooltip":"","color":"","bgcolor":"","icon":"","payload":"true","payloadType":"bool","topic":"","x":755,"y":586,"wires":[["cf2d03ee.85df6"]]},{"id":"f4fcd63e.0d0428","type":"inject","z":"6c51481f.cfa668","name":"","topic":"","payload":"fan1","payloadType":"global","repeat":"1","crontab":"","once":false,"onceDelay":0.1,"x":795,"y":206,"wires":[["588672a0.4989fc"]]},{"id":"588672a0.4989fc","type":"rpi-gpio out","z":"6c51481f.cfa668","name":"","pin":"13","set":"","level":"0","freq":"","out":"out","x":992,"y":206,"wires":[]},{"id":"c3fc56df.494c48","type":"inject","z":"6c51481f.cfa668","name":"","topic":"","payload":"fan2","payloadType":"global","repeat":"1","crontab":"","once":false,"onceDelay":0.1,"x":795,"y":426,"wires":[["4561be20.98814"]]},{"id":"89733c24.89389","type":"inject","z":"6c51481f.cfa668","name":"","topic":"","payload":"fan3","payloadType":"global","repeat":"1","crontab":"","once":false,"onceDelay":0.1,"x":795,"y":666,"wires":[["749cff71.a799a"]]},{"id":"4561be20.98814","type":"rpi-gpio out","z":"6c51481f.cfa668","name":"","pin":"16","set":"","level":"0","freq":"","out":"out","x":995,"y":426,"wires":[\*]},{"id":"749cff71.a799a","type":"rpi-gpio out","z":"6c51481f.cfa668","name":"","pin":"18","set":"","level":"0","freq":"","out":"out","x":1005,"y":666,"wires":[\*]},{"id":"c0ec0fe2.61c0c","type":"ui_text","z":"6c51481f.cfa668","group":"4069eec3.05255","order":2,"width":0,"height":0,"name":"","label":"Status :","format":"{{msg.payload}}","layout":"row-spread","x":539,"y":72,"wires":[]},{"id":"f328808e.bd2ba","type":"ui_text","z":"6c51481f.cfa668","group":"469c68d8.89be68","order":1,"width":0,"height":0,"name":"","label":"Status :","format":"{{msg.payload}}","layout":"row-spread","x":465,"y":306,"wires":[]},{"id":"1d12565e.906f7a","type":"ui_text","z":"6c51481f.cfa668","group":"8d32fd18.01bdd","order":1,"width":0,"height":0,"name":"","label":"Status : ","format":"{{msg.payload}}","layout":"row-spread","x":467,"y":528,"wires":[]},{"id":"337f73bb.58256c","type":"ui_text","z":"6c51481f.cfa668","group":"f5d378a.d832388","order":1,"width":0,"height":0,"name":"","label":"Status :","format":"{{msg.payload}}","layout":"row-spread","x":1125,"y":86,"wires":[]},{"id":"9979396e.8e9e28","type":"ui_text","z":"6c51481f.cfa668","group":"8ac97811.c31df8","order":1,"width":0,"height":0,"name":"","label":"Status : ","format":"{{msg.payload}}","layout":"row-spread","x":1125,"y":326,"wires":[]},{"id":"1a385d61.624cc3","type":"ui_text","z":"6c51481f.cfa668","group":"bc038a73.730a78","order":1,"width":0,"height":0,"name":"","label":"Status :","format":"{{msg.payload}}","layout":"row-spread","x":1125,"y":566,"wires":[\*]},{"id":"4069eec3.05255","type":"ui_group","z":"","name":"LED #1","tab":"aab1f09b.782d7","order":2,"disp":true,"width":"6","collapse":false},{"id":"469c68d8.89be68","type":"ui_group","z":"","name":"LED #2","tab":"efa6183c.7a4718","order":1,"disp":true,"width":"6","collapse":false},{"id":"8d32fd18.01bdd","type":"ui_group","z":"","name":"LED #3","tab":"b08815eb.8f37d8","order":1,"disp":true,"width":"6","collapse":false},{"id":"f5d378a.d832388","type":"ui_group","z":"","name":"FAN #1","tab":"aab1f09b.782d7","disp":true,"width":"6","collapse":false},{"id":"8ac97811.c31df8","type":"ui_group","z":"","name":"FAN #2","tab":"efa6183c.7a4718","order":2,"disp":true,"width":"6","collapse":false},{"id":"bc038a73.730a78","type":"ui_group","z":"","name":"FAN #3","tab":"b08815eb.8f37d8","order":2,"disp":true,"width":"6","collapse":false},{"id":"aab1f09b.782d7","type":"ui_tab","z":"","name":"KAT #1","icon":"dashboard","order":2,"disabled":false,"hidden":false},{"id":"efa6183c.7a4718","type":"ui_tab","z":"","name":"KAT #2","icon":"dashboard","order":3,"disabled":false,"hidden":false},{"id":"b08815eb.8f37d8","type":"ui_tab","z":"","name":"KAT #3","icon":"dashboard","order":4,"disabled":false,"hidden":false}]