How to use "timer in dashboard"

Hello,
I'm trying to use the timer found at
"https://flows.nodered.org/flow/f24cb20846f57eec19ed617b25cb61ae".
I want to manage some devices when I'm on holidays.
Up to now I manage my device whith mqtt messages.

I have also download the Schedex Node and Dashboard palet
I have succeed to configure the start up time and stop time from my dashboard.
I can see the schedex node turning On or off in the flow window but no message are sent from Timer Node.
I have configured the subflow Timersettings with a number and two strings messages.

Is anyone has ever used this timer ? and is it possible to get an exemple for better understanding.
Best regards

if you search for schedex I think you'll find a number of examples.

no, the flow "timer in dashboard" use schedex but it's not the problem. The configuration of the subflow seems to be my concern. I don't understand how it works.

Maybe a little more info? Post your flow and maybe a more specific question?

1 Like

My project is to pilot shultters
all my project is here
https://drive.google.com/drive/folders/1pIyhlqEUdStUdou8DIqYJL-DCiJv0r7g

i would like to add this


to pilot my shutters from the dashboard

Instead of just linking to lengthy documentation (which is unlikely to be read), you would probably get more support if you summarize what you are trying to achieve, and what problems that you are encountering, here in this thread.
As @gerry has already asked, ask a more specific question.

I downloaded the flow you pointed to and looked at the webpage you provided. Your flow looks nothing like the webpage and I do not see any schedex node in your flow. I did not look at the ino file as that does not appear to be relevant to your question. You have buttons connected directly to MQTT nodes so I don't see any logic to run a timer.

Thanks for your answers.
My english is a bit rough. Sorry

In fact, today I have two methods of controlling my shutters.

  • Control by push buttons. (an up button and a down button)
  • an order by my phone in mqtt
    In both cases I send an impulse to my arduino card.
    My program detects the impulse and controls the ascent or descent of the shutter concerned.

When I am away for several days, I would have liked to schedule the opening and closing of my shutters during my absence.
An automatic mode should therefore be added.

The interface offered by "Timer in Dashboard" seems appropriate to me.

I tried to put a timer in the flow "volets" but nothing happens at the output of the "timer 1" node.
Nothing happens either at the output of the schedex node in the flow "timer in dashboard".
I'm lost

Here are all of my flow volets
[{"id":"2b700e69.140b12","type":"subflow","name":"Timer 1","info":"","category":"","in":[{"x":500,"y":320,"wires":[{"id":"518f71b3.e543c8"}]}],"out":[{"x":740,"y":320,"wires":[{"id":"518f71b3.e543c8","port":0}]}],"env":[{"name":"TimerNumber","type":"num","value":"1"},{"name":"PayloadON","type":"str","value":"VRAI"},{"name":"PayloadOFF","type":"str","value":"FAUX"}],"color":"#DDAA99"},{"id":"518f71b3.e543c8","type":"function","z":"2b700e69.140b12","name":"","func":"var x = env.get("TimerNumber"); \nvar y = env.get("PayloadON"); \nvar z = env.get("PayloadOFF"); \n\nflow.set("$parent.Timer"+x, x);\nflow.set("$parent.Payload"+x+"_on", y);\nflow.set("$parent.Timer"+x+"_off", z);\n\n\n\nmsg.payload = "Your timer " + x + " has been set";\n\nreturn msg;\n","outputs":1,"noerr":0,"x":600,"y":320,"wires":[]},{"id":"bc0ed67a.5bf018","type":"tab","label":"Volets","disabled":false,"info":"commande des volets\n"},{"id":"1cf1280e.09543","type":"mqtt out","z":"bc0ed67a.5bf018","name":"","topic":"Maison/Volet/Chambre/Montee","qos":"0","retain":"","broker":"e253a1d9.24e29","x":710,"y":100,"wires":},{"id":"82a22464.2a5a6","type":"mqtt out","z":"bc0ed67a.5bf018","name":"","topic":"Maison/Volet/Chambre/Descente","qos":"0","retain":"","broker":"e253a1d9.24e29","x":720,"y":160,"wires":},{"id":"5a834e56.4e3238","type":"ui_button","z":"bc0ed67a.5bf018","name":"","group":"4fc59ba6.81642c","order":6,"width":"2","height":"1","passthru":false,"label":"","color":"","bgcolor":"#34788F","icon":"fa-sort-down","payload":"true","payloadType":"bool","topic":"","x":90,"y":159,"wires":[["82a22464.2a5a6"]]},{"id":"41d3316e.c08ae8","type":"ui_button","z":"bc0ed67a.5bf018","name":"","group":"4fc59ba6.81642c","order":7,"width":"2","height":"1","passthru":false,"label":"","color":"#330033","bgcolor":"#DADBDD","icon":"fa-sort-up","payload":"true","payloadType":"bool","topic":"","x":90,"y":103,"wires":[["1cf1280e.09543"]]},{"id":"75a21497.48e164","type":"mqtt in","z":"bc0ed67a.5bf018","name":"","topic":"etatMonteeCh","qos":"0","broker":"e253a1d9.24e29","x":110,"y":200,"wires":[["ef7aa9e4.6acee8"]]},{"id":"39c68fe9.dcb7e8","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":8,"width":"1","height":"1","name":"","label":"","format":"<i class="fa fa-circle" style="font-size:24px;">","layout":"row-right","x":410,"y":200,"wires":},{"id":"4ccaac74.337f54","type":"mqtt in","z":"bc0ed67a.5bf018","name":"","topic":"etatDescenteCh","qos":"0","broker":"e253a1d9.24e29","x":120,"y":240,"wires":[["86dc020f.3b79"]]},{"id":"1d347333.a7c6ad","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":5,"width":"1","height":"1","name":"","label":"","format":"<i class="fa fa-circle" style="font-size:24px;">","layout":"row-left","x":410,"y":240,"wires":},{"id":"f31ff679.57b4f8","type":"ui_button","z":"bc0ed67a.5bf018","name":"","group":"4fc59ba6.81642c","order":37,"width":"2","height":"1","passthru":false,"label":"","color":"#330033","bgcolor":"#DADBDD","icon":"fa-sort-up","payload":"true","payloadType":"bool","topic":"","x":90,"y":420,"wires":[["162e78aa.afd9df"]]},{"id":"69ff2618.1c942","type":"ui_button","z":"bc0ed67a.5bf018","name":"","group":"4fc59ba6.81642c","order":36,"width":"2","height":"1","passthru":false,"label":"","color":"","bgcolor":"#34788F","icon":"fa-sort-down","payload":"true","payloadType":"bool","topic":"","x":90,"y":457,"wires":[["c39a0203.2f242"]]},{"id":"a7b4aece.b474","type":"mqtt in","z":"bc0ed67a.5bf018","name":"","topic":"etatDescenteJe","qos":"0","broker":"e253a1d9.24e29","x":120,"y":500,"wires":[["a07c7c7c.3c30c8"]]},{"id":"a6730e4d.744c6","type":"mqtt in","z":"bc0ed67a.5bf018","name":"","topic":"etatMonteeJe","qos":"0","broker":"e253a1d9.24e29","x":110,"y":540,"wires":[["34e6cbc4.2c2ddc"]]},{"id":"48bd68b1.6deed","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":35,"width":"1","height":"1","name":"","label":"","format":"<i class="fa fa-circle" style="font-size:24px;">","layout":"row-left","x":470,"y":500,"wires":},{"id":"f0f57bb9.ceb3e","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":38,"width":"1","height":"1","name":"","label":"","format":"<i class="fa fa-circle" style="font-size:24px;">","layout":"row-right","x":470,"y":540,"wires":},{"id":"162e78aa.afd9df","type":"mqtt out","z":"bc0ed67a.5bf018","name":"","topic":"Maison/Volet/Jeu/Montee","qos":"0","retain":"","broker":"e253a1d9.24e29","x":710,"y":420,"wires":},{"id":"c39a0203.2f242","type":"mqtt out","z":"bc0ed67a.5bf018","name":"","topic":"Maison/Volet/Jeu/Descente","qos":"0","retain":"","broker":"e253a1d9.24e29","x":710,"y":457,"wires":},{"id":"fbf505b3.c77ba8","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":2,"width":"3","height":"1","name":"","label":" Fermeture ","format":"","layout":"row-center","x":310,"y":20,"wires":},{"id":"5291d6e1.95d02","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":3,"width":"3","height":"1","name":"","label":" Ouverture ","format":"","layout":"row-center","x":470,"y":20,"wires":},{"id":"ef7aa9e4.6acee8","type":"function","z":"bc0ed67a.5bf018","name":"test","func":"msg.color = (msg.payload === "1")?"#24FB01":"#999999";\nreturn msg;","outputs":1,"noerr":0,"x":270,"y":200,"wires":[["39c68fe9.dcb7e8"]]},{"id":"86dc020f.3b79","type":"function","z":"bc0ed67a.5bf018","name":"test","func":"msg.color = (msg.payload === "1")?"#24FB01":"#999999";\nreturn msg;","outputs":1,"noerr":0,"x":270,"y":240,"wires":[["1d347333.a7c6ad"]]},{"id":"a07c7c7c.3c30c8","type":"function","z":"bc0ed67a.5bf018","name":"test","func":"msg.color = (msg.payload === "1")?"#24FB01":"#999999";\nreturn msg;","outputs":1,"noerr":0,"x":290,"y":500,"wires":[["48bd68b1.6deed"]]},{"id":"34e6cbc4.2c2ddc","type":"function","z":"bc0ed67a.5bf018","name":"test","func":"msg.color = (msg.payload === "1")?"#24FB01":"#999999";\nreturn msg;","outputs":1,"noerr":0,"x":290,"y":540,"wires":[["f0f57bb9.ceb3e"]]},{"id":"9e80312f.a00be","type":"ui_button","z":"bc0ed67a.5bf018","name":"","group":"4fc59ba6.81642c","order":12,"width":"2","height":"1","passthru":false,"label":"","color":"#330033","bgcolor":"#DADBDD","icon":"fa-sort-up","payload":"true","payloadType":"str","topic":"","x":90,"y":720,"wires":[["a3296386.02ebb"]]},{"id":"5e195967.46072","type":"ui_button","z":"bc0ed67a.5bf018","name":"","group":"4fc59ba6.81642c","order":11,"width":"2","height":"1","passthru":false,"label":"","color":"","bgcolor":"#34788F","icon":"fa-sort-down","payload":"true","payloadType":"str","topic":"","x":90,"y":760,"wires":[["3b41c65a.e81252"]]},{"id":"a3296386.02ebb","type":"mqtt out","z":"bc0ed67a.5bf018","name":"","topic":"Maison/Volet/Sdb/Montee","qos":"0","retain":"","broker":"e253a1d9.24e29","x":720,"y":720,"wires":},{"id":"3b41c65a.e81252","type":"mqtt out","z":"bc0ed67a.5bf018","name":"","topic":"Maison/Volet/Sdb/Descente","qos":"0","retain":"","broker":"e253a1d9.24e29","x":720,"y":760,"wires":},{"id":"a79c3b0c.85f1b","type":"mqtt in","z":"bc0ed67a.5bf018","name":"","topic":"etatDescenteSdb","qos":"0","broker":"e253a1d9.24e29","x":120,"y":800,"wires":[["75fcc32.bfcabbc"]]},{"id":"52049d4f.830a5c","type":"mqtt in","z":"bc0ed67a.5bf018","name":"","topic":"etatMonteeSdb","qos":"0","broker":"e253a1d9.24e29","x":120,"y":840,"wires":[["ec6eb96a.4b8868"]]},{"id":"75fcc32.bfcabbc","type":"function","z":"bc0ed67a.5bf018","name":"test","func":"msg.color = (msg.payload === "1")?"#24FB01":"#999999";\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":800,"wires":[["158fa6c1.0b4179"]]},{"id":"ec6eb96a.4b8868","type":"function","z":"bc0ed67a.5bf018","name":"test","func":"msg.color = (msg.payload === "1")?"#24FB01":"#999999";\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":840,"wires":[["136c88af.c0974f"]]},{"id":"158fa6c1.0b4179","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":10,"width":"1","height":"1","name":"","label":"","format":"<i class="fa fa-circle" style="font-size:24px;">","layout":"row-left","x":470,"y":800,"wires":},{"id":"136c88af.c0974f","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":13,"width":"1","height":"1","name":"","label":"","format":"<i class="fa fa-circle" style="font-size:24px;">","layout":"row-right","x":470,"y":840,"wires":},{"id":"7ddd86c1.2602b8","type":"ui_button","z":"bc0ed67a.5bf018","name":"","group":"4fc59ba6.81642c","order":17,"width":"2","height":"1","passthru":false,"label":"","color":"#330033","bgcolor":"#DADBDD","icon":"fa-sort-up","payload":"true","payloadType":"str","topic":"","x":110,"y":1000,"wires":[["1224429d.a3ac4d"]]},{"id":"6983a4d2.f2aac4","type":"ui_button","z":"bc0ed67a.5bf018","name":"","group":"4fc59ba6.81642c","order":16,"width":"2","height":"1","passthru":false,"label":"","color":"","bgcolor":"#34788F","icon":"fa-sort-down","payload":"true","payloadType":"str","topic":"","x":110,"y":1040,"wires":[["191aa5a.2267f5a"]]},{"id":"1224429d.a3ac4d","type":"mqtt out","z":"bc0ed67a.5bf018","name":"","topic":"Maison/Volet/Hall/Montee","qos":"0","retain":"","broker":"e253a1d9.24e29","x":740,"y":1000,"wires":},{"id":"191aa5a.2267f5a","type":"mqtt out","z":"bc0ed67a.5bf018","name":"","topic":"Maison/Volet/Hall/Descente","qos":"0","retain":"","broker":"e253a1d9.24e29","x":740,"y":1040,"wires":},{"id":"9f52ac3c.ff6f2","type":"mqtt in","z":"bc0ed67a.5bf018","name":"","topic":"etatDescenteHall","qos":"0","broker":"e253a1d9.24e29","x":140,"y":1080,"wires":[["ee20315c.aeccb8"]]},{"id":"ada15163.cd31b","type":"mqtt in","z":"bc0ed67a.5bf018","name":"","topic":"etatMonteeHall","qos":"0","broker":"e253a1d9.24e29","x":140,"y":1120,"wires":[["6f964217.9c87e4"]]},{"id":"ee20315c.aeccb8","type":"function","z":"bc0ed67a.5bf018","name":"test","func":"msg.color = (msg.payload === "1")?"#24FB01":"#999999";\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":1080,"wires":[["d374c0d3.d0f2"]]},{"id":"6f964217.9c87e4","type":"function","z":"bc0ed67a.5bf018","name":"test","func":"msg.color = (msg.payload === "1")?"#24FB01":"#999999";\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":1120,"wires":[["6d824e66.33ae1"]]},{"id":"d374c0d3.d0f2","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":15,"width":"1","height":"1","name":"","label":"","format":"<i class="fa fa-circle" style="font-size:24px;">","layout":"row-left","x":470,"y":1080,"wires":},{"id":"6d824e66.33ae1","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":18,"width":"1","height":"1","name":"","label":"","format":"<i class="fa fa-circle" style="font-size:24px;">","layout":"row-right","x":470,"y":1120,"wires":},{"id":"978f687d.a4f01","type":"ui_button","z":"bc0ed67a.5bf018","name":"","group":"4fc59ba6.81642c","order":22,"width":"2","height":"1","passthru":false,"label":"","color":"#330033","bgcolor":"#DADBDD","icon":"fa-sort-up","payload":"true","payloadType":"str","topic":"","x":110,"y":1260,"wires":[["5eb08f6c.d54cd8"]]},{"id":"7f94524d.07b0dc","type":"ui_button","z":"bc0ed67a.5bf018","name":"","group":"4fc59ba6.81642c","order":21,"width":"2","height":"1","passthru":false,"label":"","color":"","bgcolor":"#34788F","icon":"fa-sort-down","payload":"true","payloadType":"str","topic":"","x":110,"y":1300,"wires":[["fba1b2a4.41a9e8"]]},{"id":"5eb08f6c.d54cd8","type":"mqtt out","z":"bc0ed67a.5bf018","name":"","topic":"Maison/Volet/Cuisine/Montee","qos":"0","retain":"","broker":"e253a1d9.24e29","x":740,"y":1260,"wires":},{"id":"fba1b2a4.41a9e8","type":"mqtt out","z":"bc0ed67a.5bf018","name":"","topic":"Maison/Volet/Cuisine/Descente","qos":"","retain":"","broker":"e253a1d9.24e29","x":750,"y":1300,"wires":},{"id":"ef18b097.caf7a","type":"mqtt in","z":"bc0ed67a.5bf018","name":"","topic":"etatDescenteCuisine","qos":"0","broker":"e253a1d9.24e29","x":160,"y":1340,"wires":[["416d39.1d314ac8"]]},{"id":"c25df915.87091","type":"mqtt in","z":"bc0ed67a.5bf018","name":"","topic":"etatMonteeCuisine","qos":"0","broker":"e253a1d9.24e29","x":150,"y":1380,"wires":[["b20eb74f.5d9098"]]},{"id":"416d39.1d314ac8","type":"function","z":"bc0ed67a.5bf018","name":"test","func":"msg.color = (msg.payload === "1")?"#24FB01":"#999999";\nreturn msg;","outputs":1,"noerr":0,"x":350,"y":1340,"wires":[["94c45239.752ab8"]]},{"id":"b20eb74f.5d9098","type":"function","z":"bc0ed67a.5bf018","name":"test","func":"msg.color = (msg.payload === "1")?"#24FB01":"#999999";\nreturn msg;","outputs":1,"noerr":0,"x":350,"y":1380,"wires":[["1d8a9654.0a7caa"]]},{"id":"94c45239.752ab8","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":20,"width":"1","height":"1","name":"","label":"","format":"<i class="fa fa-circle" style="font-size:24px;">","layout":"row-left","x":530,"y":1340,"wires":},{"id":"1d8a9654.0a7caa","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":23,"width":"1","height":"1","name":"","label":"","format":"<i class="fa fa-circle" style="font-size:24px;">","layout":"row-right","x":530,"y":1380,"wires":},{"id":"28fcd00f.dfdc98","type":"ui_button","z":"bc0ed67a.5bf018","name":"","group":"4fc59ba6.81642c","order":27,"width":"2","height":"1","passthru":false,"label":"","color":"#330033","bgcolor":"#DADBDD","icon":"fa-sort-up","payload":"true","payloadType":"str","topic":"","x":110,"y":1540,"wires":[["f79ef0a9.099fd"]]},{"id":"24430d28.70f9ea","type":"ui_button","z":"bc0ed67a.5bf018","name":"","group":"4fc59ba6.81642c","order":26,"width":"2","height":"1","passthru":false,"label":"","color":"","bgcolor":"#34788F","icon":"fa-sort-down","payload":"true","payloadType":"str","topic":"","x":110,"y":1580,"wires":[["5ffe221f.3e143c"]]},{"id":"f79ef0a9.099fd","type":"mqtt out","z":"bc0ed67a.5bf018","name":"","topic":"Maison/Volet/Salle/Montee","qos":"0","retain":"","broker":"e253a1d9.24e29","x":740,"y":1540,"wires":},{"id":"5ffe221f.3e143c","type":"mqtt out","z":"bc0ed67a.5bf018","name":"","topic":"Maison/Volet/Salle/Descente","qos":"0","retain":"","broker":"e253a1d9.24e29","x":740,"y":1580,"wires":},{"id":"95e83f8e.4e51c8","type":"mqtt in","z":"bc0ed67a.5bf018","name":"","topic":"etatDescenteSalle","qos":"0","broker":"e253a1d9.24e29","x":150,"y":1620,"wires":[["57b0ecd4.1781ec"]]},{"id":"23c79a52.2fff46","type":"mqtt in","z":"bc0ed67a.5bf018","name":"","topic":"etatMonteeSalle","qos":"0","broker":"e253a1d9.24e29","x":140,"y":1660,"wires":[["3bbcf6a4.cc79aa"]]},{"id":"57b0ecd4.1781ec","type":"function","z":"bc0ed67a.5bf018","name":"test","func":"msg.color = (msg.payload === "1")?"#24FB01":"#999999";\nreturn msg;","outputs":1,"noerr":0,"x":350,"y":1620,"wires":[["ed134783.ce923"]]},{"id":"3bbcf6a4.cc79aa","type":"function","z":"bc0ed67a.5bf018","name":"test","func":"msg.color = (msg.payload === "1")?"#24FB01":"#999999";\nreturn msg;","outputs":1,"noerr":0,"x":350,"y":1660,"wires":[["807eb7eb.797d6"]]},{"id":"ed134783.ce923","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":25,"width":"1","height":"1","name":"","label":"","format":"<i class="fa fa-circle" style="font-size:24px;">","layout":"row-left","x":510,"y":1620,"wires":},{"id":"807eb7eb.797d6","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":28,"width":"1","height":"1","name":"","label":"","format":"<i class="fa fa-circle" style="font-size:24px;">","layout":"row-right","x":510,"y":1660,"wires":},{"id":"6cdb314a.3dd1e","type":"ui_button","z":"bc0ed67a.5bf018","name":"","group":"4fc59ba6.81642c","order":31,"width":"2","height":"1","passthru":false,"label":"","color":"","bgcolor":"#34788F","icon":"fa-sort-down","payload":"true","payloadType":"str","topic":"","x":110,"y":1820,"wires":[["c8dc7a74.76fb88"]]},{"id":"4d8f642.348cc9c","type":"ui_button","z":"bc0ed67a.5bf018","name":"","group":"4fc59ba6.81642c","order":32,"width":"2","height":"1","passthru":false,"label":"","color":"#330033","bgcolor":"#DADBDD","icon":"fa-sort-up","payload":"true","payloadType":"str","topic":"","x":110,"y":1780,"wires":[["2d12338b.b5499c"]]},{"id":"2d12338b.b5499c","type":"mqtt out","z":"bc0ed67a.5bf018","name":"","topic":"Maison/Volet/Salon/Montee","qos":"0","retain":"","broker":"e253a1d9.24e29","x":740,"y":1780,"wires":},{"id":"c8dc7a74.76fb88","type":"mqtt out","z":"bc0ed67a.5bf018","name":"","topic":"Maison/Volet/Salon/Descente","qos":"0","retain":"","broker":"e253a1d9.24e29","x":750,"y":1820,"wires":},{"id":"5ea2f812.653db8","type":"mqtt in","z":"bc0ed67a.5bf018","name":"","topic":"etatDescenteSalon","qos":"0","broker":"e253a1d9.24e29","x":150,"y":1860,"wires":[["f90d58e6.0743f"]]},{"id":"563a7bb1.5b56dc","type":"mqtt in","z":"bc0ed67a.5bf018","name":"","topic":"etatMonteeSalon","qos":"0","broker":"e253a1d9.24e29","x":140,"y":1900,"wires":[["ca2757ca.838068"]]},{"id":"f90d58e6.0743f","type":"function","z":"bc0ed67a.5bf018","name":"test","func":"msg.color = (msg.payload === "1")?"#24FB01":"#999999";\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":1860,"wires":[["406afcdf.d00b0c"]]},{"id":"ca2757ca.838068","type":"function","z":"bc0ed67a.5bf018","name":"test","func":"msg.color = (msg.payload === "1")?"#24FB01":"#999999";\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":1900,"wires":[["92ed183d.cf72f"]]},{"id":"406afcdf.d00b0c","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":30,"width":"1","height":"1","name":"","label":"","format":"<i class="fa fa-circle" style="font-size:24px;">","layout":"row-left","x":490,"y":1860,"wires":},{"id":"92ed183d.cf72f","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":33,"width":"1","height":"1","name":"","label":"","format":"<i class="fa fa-circle" style="font-size:24px;">","layout":"row-right","x":490,"y":1900,"wires":},{"id":"41b6606f.4cb318","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":1,"width":"2","height":"1","name":"","label":"Pièce","format":"{{msg.payload}}","layout":"row-center","x":610,"y":20,"wires":},{"id":"6af357c1.c0f518","type":"mqtt in","z":"bc0ed67a.5bf018","name":"","topic":"#","qos":"2","datatype":"auto","broker":"e253a1d9.24e29","x":250,"y":2020,"wires":[["9114f169.ebf1e"]]},{"id":"9114f169.ebf1e","type":"debug","z":"bc0ed67a.5bf018","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":420,"y":2020,"wires":},{"id":"b740457a.fbe1b8","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":4,"width":"2","height":"1","name":"","label":"Chambre","format":"{{msg.payload}}","layout":"row-spread","x":100,"y":60,"wires":},{"id":"7ca18a2f.2738d4","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":9,"width":"2","height":"1","name":"","label":"SdB","format":"{{msg.payload}}","layout":"row-spread","x":90,"y":680,"wires":},{"id":"86b09c34.492db","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":14,"width":"2","height":"1","name":"","label":"Hall1","format":"{{msg.payload}}","layout":"row-spread","x":110,"y":960,"wires":},{"id":"2d4a4de4.89d3f2","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":19,"width":"2","height":"1","name":"","label":"Cuisine","format":"{{msg.payload}}","layout":"row-spread","x":120,"y":1220,"wires":},{"id":"e43528de.14335","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":24,"width":"2","height":"1","name":"","label":"Salle","format":"{{msg.payload}}","layout":"row-spread","x":110,"y":1500,"wires":},{"id":"eff5ad14.d4809","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":29,"width":"2","height":"1","name":"","label":"Salon","format":"{{msg.payload}}","layout":"row-spread","x":110,"y":1740,"wires":},{"id":"2c29b372.be8b74","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":34,"width":"2","height":"1","name":"","label":"Jeux","format":"{{msg.payload}}","layout":"row-left","x":90,"y":380,"wires":},{"id":"76ae4630.14a578","type":"cpu","z":"bc0ed67a.5bf018","name":"Temperature","msgCore":false,"msgOverall":false,"msgArray":false,"msgTemp":true,"x":310,"y":2480,"wires":[["43c48a70.b1fe14"]]},{"id":"43c48a70.b1fe14","type":"ui_chart","z":"bc0ed67a.5bf018","name":"Temperature cpu","group":"e743627a.57aa","order":0,"width":0,"height":0,"label":"Tempėrature cpu","chartType":"line","legend":"false","xformat":"dd HH:mm","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"604800","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#00ff00","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"x":530,"y":2460,"wires":[,]},{"id":"15bed42e.3415cc","type":"inject","z":"bc0ed67a.5bf018","name":"","topic":"","payload":"","payloadType":"date","repeat":"3600","crontab":"","once":true,"onceDelay":0.1,"x":110,"y":2480,"wires":[["76ae4630.14a578"]]},{"id":"a7facfe7.29fae","type":"inject","z":"bc0ed67a.5bf018","name":"","topic":"","payload":"","payloadType":"date","repeat":"30","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":2520,"wires":[["3e56e682.cf670a"]]},{"id":"3e56e682.cf670a","type":"function","z":"bc0ed67a.5bf018","name":"","func":"var now = new Date();\n//var now = new Date(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate(), now.getUTCHours(), now.getUTCMinutes(), now.getUTCSeconds());\nvar hour = now.getHours();\nvar minute = now.getMinutes();\nmsg.payload = hour+":"+minute\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":2520,"wires":[["ef6f89d4.0cf878"]]},{"id":"ef6f89d4.0cf878","type":"ui_text","z":"bc0ed67a.5bf018","group":"e743627a.57aa","order":0,"width":0,"height":0,"name":"","label":"Heure :","format":"{{msg.payload}}","layout":"row-spread","x":520,"y":2520,"wires":},{"id":"b0b42b6e.016c28","type":"exec","z":"bc0ed67a.5bf018","command":"","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":350,"y":2400,"wires":[,,]},{"id":"55df71b0.6fe1d8","type":"ui_button","z":"bc0ed67a.5bf018","d":true,"name":"","group":"e743627a.57aa","order":0,"width":0,"height":0,"passthru":false,"label":"Reboot Rasberry","color":"","bgcolor":"","icon":"","payload":"sudo reboot","payloadType":"str","topic":"","x":130,"y":2400,"wires":[["b0b42b6e.016c28"]]},{"id":"865aadb5.a01e5","type":"subflow:2b700e69.140b12","z":"bc0ed67a.5bf018","name":"Timer 1","env":,"x":420,"y":2200,"wires":[["57e0f95.c2faf08"]]},{"id":"57e0f95.c2faf08","type":"debug","z":"bc0ed67a.5bf018","name":"sortii subflow","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":410,"y":2280,"wires":},{"id":"65649a8f.203324","type":"inject","z":"bc0ed67a.5bf018","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":320,"y":2140,"wires":[["865aadb5.a01e5"]]},{"id":"e253a1d9.24e29","type":"mqtt-broker","z":"","name":"raspi-wegui","broker":"10.3.141.1","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"4fc59ba6.81642c","type":"ui_group","z":"","name":"Volets Guilers","tab":"62c669cd.310e28","order":1,"disp":true,"width":"8","collapse":false},{"id":"e743627a.57aa","type":"ui_group","z":"","name":"Info","tab":"4d3c16b5.e1c138","order":2,"disp":true,"width":"6","collapse":false},{"id":"62c669cd.310e28","type":"ui_tab","z":"","name":"Maison Guilers volets","icon":"dashboard","order":1},{"id":"4d3c16b5.e1c138","type":"ui_tab","z":"","name":"Raspberry","icon":"dashboard","order":3}]

i send an other message because it to big if i send all my flows in one message

The second flow

[{"id":"2b700e69.140b12","type":"subflow","name":"Timer 1","info":"","category":"","in":[{"x":500,"y":320,"wires":[{"id":"518f71b3.e543c8"}]}],"out":[{"x":740,"y":320,"wires":[{"id":"518f71b3.e543c8","port":0}]}],"env":[{"name":"TimerNumber","type":"num","value":"1"},{"name":"PayloadON","type":"str","value":"VRAI"},{"name":"PayloadOFF","type":"str","value":"FAUX"}],"color":"#DDAA99"},{"id":"518f71b3.e543c8","type":"function","z":"2b700e69.140b12","name":"","func":"var x = env.get("TimerNumber"); \nvar y = env.get("PayloadON"); \nvar z = env.get("PayloadOFF"); \n\nflow.set("$parent.Timer"+x, x);\nflow.set("$parent.Payload"+x+"_on", y);\nflow.set("$parent.Timer"+x+"_off", z);\n\n\n\nmsg.payload = "Your timer " + x + " has been set";\n\nreturn msg;\n","outputs":1,"noerr":0,"x":600,"y":320,"wires":[]},{"id":"9e4101be.596b58","type":"tab","label":"Timer in Dashboard","disabled":false,"info":"A neat online timer made in Dashboard. You can link it with any automation setup in NodeRED, deploy multiple timers and add schedules to your devices. \nYou can customise the payload to suit your needs.\n

\n\nInstructions:\nYou can read all set up instructions here\n\n---\n\nFeatures:\n\n - Modular (as a subflow)\n - Unlimited timers per device\n - Supports “days of the week”\n - works offline\n - Dashboard interface\n - One button reset \n\nYou will need the following nodes:\n\n - node-red-dashboard\n - node-red-contrib-schedex\n---\n# Settings\n - PayloadON payload message sent on ON action\n - PayloadOFF payload message sent on OFF action\n - TimerNumber timer ID (unique for each timer)\n"},{"id":"c0df9110.97ce08","type":"schedex","z":"9e4101be.596b58","name":"Timer","passthroughunhandled":false,"suspended":false,"lat":"54.525671","lon":"-1.3113165","ontime":"","ontopic":"","onpayload":"TIMERVRAI","onoffset":"","onrandomoffset":0,"offtime":"","offtopic":"","offpayload":"TIMEROFF","offoffset":"","offrandomoffset":0,"mon":false,"tue":false,"wed":false,"thu":false,"fri":false,"sat":false,"sun":false,"x":1250,"y":500,"wires":[["ee2b9af1.599fb8"]]},{"id":"17242b47.229225","type":"ui_text_input","z":"9e4101be.596b58","name":"T2 On","label":"","group":"a04ff3db.7128b","order":2,"width":"4","height":"1","passthru":false,"mode":"time","delay":"10","topic":"Ton","x":550,"y":280,"wires":[["51d6a6db.8d0508"]]},{"id":"e011dbf6.549d4","type":"ui_button","z":"9e4101be.596b58","name":"Set ON","group":"a04ff3db.7128b","order":3,"width":"2","height":"1","passthru":false,"label":"{{msg.topic}}","color":"","bgcolor":"{{msg.color}}","icon":"","payload":"","payloadType":"str","topic":"buttonON","x":940,"y":220,"wires":[["9361389d.b7ab"]]},{"id":"e55774a4.bddf","type":"ui_text_input","z":"9e4101be.596b58","name":"T2 Off","label":"","group":"a04ff3db.7128b","order":4,"width":"4","height":"1","passthru":false,"mode":"time","delay":"10","topic":"Toff","x":550,"y":320,"wires":[["51d6a6db.8d0508"]]},{"id":"ff61d0cb.8b847","type":"ui_button","z":"9e4101be.596b58","name":"Set OFF","group":"a04ff3db.7128b","order":5,"width":"2","height":"1","passthru":false,"label":"{{msg.topic}}","color":"","bgcolor":"{{msg.color}}","icon":"","payload":"","payloadType":"str","topic":"buttonOFF","x":940,"y":360,"wires":[["9361389d.b7ab"]]},{"id":"c693a5ff.6d5378","type":"ui_button","z":"9e4101be.596b58","name":"Reset Button","group":"a04ff3db.7128b","order":6,"width":"6","height":"1","passthru":false,"label":"Reset","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":110,"y":520,"wires":[["8525455f.5eb128"]]},{"id":"51d6a6db.8d0508","type":"function","z":"9e4101be.596b58","name":"Set T2 On","func":"var z = flow.get("Timer1");\n\n//if timer on is set\nif(msg.topic === "Ton"){\n flow.set("timer"+z+"_on", msg.payload);\n msg.color = "red";\n msg.topic = "Press";\n return [msg, null];\n \n \n}\n\n//if timer off is set\nif(msg.topic === "Toff"){\n flow.set("timer"+z+"_off", msg.payload);\n msg.color = "red";\n msg.topic = "Press";\n return [null, msg];\n \n}\n\n// reboot detected\nif(msg.topic === "reboot"){\n msg.color = "grey";\n msg.topic = "Select Time";\n return [msg, msg];\n \n}","outputs":2,"noerr":0,"x":720,"y":300,"wires":[["e011dbf6.549d4"],["ff61d0cb.8b847"]]},{"id":"8525455f.5eb128","type":"function","z":"9e4101be.596b58","name":"Reset","func":"var z = flow.get("Timer1");\n\nvar timerlabel = "Timer "+ z;\nflow.set("$parent.timer"+z+"_on", 0);\nflow.set("$parent.timer"+z+"_off", 0);\nflow.set("$parent.T"+z+"on", null);\nflow.set("$parent.T"+z+"off", null);\n\nvar msg1 = {payload: "Timer "+z+" reset"};\nvar msg2 = {payload: 0};\nvar msg3 = {payload: "disabled",\n topic: timerlabel,\n color: "red"};\nvar msg4 = {color: "grey",\n topic: "Select Time",\n};\n\nvar msg5 = {payload:{suspended: true}};\nvar msg6 = {payload: true};\n\nreturn [msg1, msg2, msg3, msg4, msg5, msg6];","outputs":6,"noerr":0,"x":290,"y":520,"wires":[["d0854932.82435"],["e55774a4.bddf","17242b47.229225"],,["e011dbf6.549d4","ff61d0cb.8b847"],["c0df9110.97ce08"],["e45d52e5.3a0d18","fb83938.0d81c7","d6535a1d.8f80d","20ac689e.1568c8","7eeaf88d.3e26d8","1237fcb8.eabb9b","cb137c89.e8874"]]},{"id":"e45d52e5.3a0d18","type":"ui_switch","z":"9e4101be.596b58","name":"","label":"Mon","group":"a04ff3db.7128b","order":7,"width":"2","height":"1","passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":550,"y":560,"wires":[["56cebc4d.334ad4"]]},{"id":"fb83938.0d81c7","type":"ui_switch","z":"9e4101be.596b58","name":"","label":"Tue","group":"a04ff3db.7128b","order":8,"width":"2","height":"1","passthru":true,"decouple":"false","topic":"tue","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":550,"y":600,"wires":[["95ce390a.e3846"]]},{"id":"d6535a1d.8f80d","type":"ui_switch","z":"9e4101be.596b58","name":"","label":"Wed","group":"a04ff3db.7128b","order":9,"width":"2","height":"1","passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":550,"y":640,"wires":[["24e31b29.6e250c"]]},{"id":"20ac689e.1568c8","type":"ui_switch","z":"9e4101be.596b58","name":"","label":"Thu","group":"a04ff3db.7128b","order":10,"width":"2","height":"1","passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":550,"y":680,"wires":[["1a76ff38.ac4e11"]]},{"id":"7eeaf88d.3e26d8","type":"ui_switch","z":"9e4101be.596b58","name":"","label":"Fri","group":"a04ff3db.7128b","order":11,"width":"2","height":"1","passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":550,"y":720,"wires":[["897ffdaf.fb7c9"]]},{"id":"1237fcb8.eabb9b","type":"ui_switch","z":"9e4101be.596b58","name":"","label":"Sat","group":"a04ff3db.7128b","order":12,"width":"2","height":"1","passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":550,"y":760,"wires":[["d0414172.9de45"]]},{"id":"56cebc4d.334ad4","type":"function","z":"9e4101be.596b58","name":"Mon","func":"var z = flow.get("Timer1");\n\nvar x = msg.payload;\nflow.set("Monday"+z, x);\nmsg.payload = {mon: x};\n\nreturn msg;","outputs":1,"noerr":0,"x":710,"y":560,"wires":[["c0df9110.97ce08"]]},{"id":"95ce390a.e3846","type":"function","z":"9e4101be.596b58","name":"Tue","func":"var z = flow.get("Timer1");\n\nvar x = msg.payload;\nflow.set("Tuesday"+z, x);\nmsg.payload = {tue: x};\n\nreturn msg;","outputs":1,"noerr":0,"x":710,"y":600,"wires":[["c0df9110.97ce08"]]},{"id":"24e31b29.6e250c","type":"function","z":"9e4101be.596b58","name":"Wed","func":"var z = flow.get("Timer1");\n\nvar x = msg.payload;\nflow.set("Wednesday"+z, x);\nmsg.payload = {wed: x};\n\nreturn msg;","outputs":1,"noerr":0,"x":710,"y":640,"wires":[["c0df9110.97ce08"]]},{"id":"1a76ff38.ac4e11","type":"function","z":"9e4101be.596b58","name":"Thu","func":"var z = flow.get("Timer1");\n\nvar x = msg.payload;\nflow.set("Thursday"+z, x);\nmsg.payload = {thu: x};\n\nreturn msg;","outputs":1,"noerr":0,"x":710,"y":680,"wires":[["c0df9110.97ce08"]]},{"id":"897ffdaf.fb7c9","type":"function","z":"9e4101be.596b58","name":"Fri","func":"var z = flow.get("Timer1");\n\n\nvar x = msg.payload;\nflow.set("Friday"+z, x);\nmsg.payload = {fri: x};\n\nreturn msg;","outputs":1,"noerr":0,"x":710,"y":720,"wires":[["c0df9110.97ce08"]]},{"id":"d0414172.9de45","type":"function","z":"9e4101be.596b58","name":"Sat","func":"var z = flow.get("Timer1");\n\n\nvar x = msg.payload;\nflow.set("Saturday"+z, x);\nmsg.payload = {sat: x};\n\nreturn msg;","outputs":1,"noerr":0,"x":710,"y":760,"wires":[["c0df9110.97ce08"]]},{"id":"f068c12d.a45f2","type":"function","z":"9e4101be.596b58","name":"Sun","func":"var z = flow.get("Timer1");\n\n\nvar x = msg.payload;\nflow.set("Sunday"+z, x);\nmsg.payload = {sun: x};\n\nreturn msg;","outputs":1,"noerr":0,"x":710,"y":800,"wires":[["c0df9110.97ce08"]]},{"id":"6631504e.7d5578","type":"inject","z":"9e4101be.596b58","name":"","topic":"","payload":"Started!","payloadType":"str","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":810,"y":440,"wires":[["8abe80a3.c48aa8"]]},{"id":"8abe80a3.c48aa8","type":"function","z":"9e4101be.596b58","name":"Apply stored values ","func":"var z = flow.get("Timer1");\nvar pon = flow.get("PayloadON");\nvar poff = flow.get("PayloadOFF");\n\n\n// restore days\nvar mon = flow.get("Monday"+z);\nvar tue = flow.get("Tuesday"+z);\nvar wed = flow.get("Wednesday"+z);\nvar thu = flow.get("Thursday"+z);\nvar fri = flow.get("Friday"+z);\nvar sat = flow.get("Saturday"+z);\nvar sun = flow.get("Sunday"+z);\n\n//restore timers\nvar timeON = flow.get("T"+z+"on");\nvar timeOFF = flow.get("T"+z+"off");\nvar timerlabel = "Timer "+ z;\n\n\n\nvar msg1 = {payload: {ontime: "ontime " + timeON}, onpayload: pon,};\nvar msg2 = {payload: {offtime: "offtime " + timeOFF}, offpayload: poff,};\nvar msg3 = {topic: timerlabel};\nvar msg4 = {payload : { "mon": mon,\n "tue": tue,\n "wed": wed,\n "thu": thu,\n "fri": fri,\n "sat": sat,\n "sun": sun,}\n};\n \n \nreturn [msg1, msg2, msg3];","outputs":4,"noerr":0,"x":1030,"y":440,"wires":[["c0df9110.97ce08"],["c0df9110.97ce08"],,["c0df9110.97ce08"]]},{"id":"5d1e163f.a51fc","type":"comment","z":"9e4101be.596b58","name":"Reboot Fix","info":"","x":800,"y":400,"wires":},{"id":"7f7e7362.61a374","type":"inject","z":"9e4101be.596b58","name":"","topic":"reboot","payload":"Started!","payloadType":"str","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":540,"y":220,"wires":[["51d6a6db.8d0508"]]},{"id":"22b9739.baef60c","type":"comment","z":"9e4101be.596b58","name":"Set Button","info":"","x":520,"y":180,"wires":},{"id":"d0854932.82435","type":"ui_toast","z":"9e4101be.596b58","position":"top right","displayTime":"3","highlight":"","outputs":0,"ok":"OK","cancel":"","topic":"Timer 1","name":"","x":250,"y":400,"wires":},{"id":"9361389d.b7ab","type":"function","z":"9e4101be.596b58","name":"On button press","func":"var z = flow.get("Timer1");\nvar pon = flow.get("PayloadON");\nvar poff = flow.get("PayloadOFF");\n\nfunction calcTime(hh){\n var hours = ("0"+Math.floor((hh%86400)/3600)).slice(-2);\n var minutes = ("0"+Math.floor((hh%3600)/60)).slice(-2);\n return hours + ":" + minutes;\n}\n\nvar time = null;\nvar timerlabel = "Timer "+ z;\n\n\n// when button on is pressed\nif(msg.topic === "buttonON"){\n var t1 = flow.get("timer"+z+"_on")/1000;\n time = calcTime(t1);\n flow.set("T"+z+"on", time);\n //send to text element\n var msg1 = {payload: "SET", topic: timerlabel, color: "green"};\n //send to schedex\n var msg2 = {payload: {ontime: "ontime " + time,\n onpayload: pon,\n suspended: false},\n topic: "SET",\n color: "green"};\n return [msg1,msg2,null,null];\n}\n// when button off is pressed\nif(msg.topic === "buttonOFF"){\n var t2 = flow.get("timer"+z+"_off")/1000;\n time = calcTime(t2);\n flow.set("T"+z+"off", time);\n //send to text element\n var msg3 = {payload: "SET", topic: timerlabel, color: "green"};\n //send to schedex\n var msg4 = {payload: {offtime: "offtime " + time,\n offpayload: poff,\n suspended: false},\n topic: "SET",\n color: "green"};\n return [null,null,msg3,msg4];\n \n}\n\nreturn msg;","outputs":4,"noerr":0,"x":1140,"y":300,"wires":[,["c0df9110.97ce08","e011dbf6.549d4"],,["c0df9110.97ce08","ff61d0cb.8b847"]]},{"id":"fc2b8343.bd4e1","type":"inject","z":"9e4101be.596b58","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":170,"y":100,"wires":[["77ae11f2.cfb43"]]},{"id":"156904d5.316723","type":"debug","z":"9e4101be.596b58","name":"","active":true,"tosidebar":true,"console":true,"tostatus":true,"complete":"payload","targetType":"msg","x":740,"y":100,"wires":},{"id":"77ae11f2.cfb43","type":"subflow:2b700e69.140b12","z":"9e4101be.596b58","name":"Timer 1","env":[{"name":"PayloadON","value":"ON","type":"str"},{"name":"PayloadOFF","value":"OFF","type":"str"}],"x":430,"y":100,"wires":[["156904d5.316723"]],"icon":"node-red/cog.svg"},{"id":"cb137c89.e8874","type":"ui_switch","z":"9e4101be.596b58","name":"","label":"Sun","group":"a04ff3db.7128b","order":13,"width":"2","height":"1","passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":550,"y":800,"wires":[["f068c12d.a45f2"]]},{"id":"ee2b9af1.599fb8","type":"debug","z":"9e4101be.596b58","name":"","active":true,"tosidebar":true,"console":true,"tostatus":true,"complete":"true","targetType":"full","x":1380,"y":440,"wires":},{"id":"a04ff3db.7128b","type":"ui_group","z":"","name":"Evening","tab":"e5a38717.72e7c","order":2,"disp":true,"width":"6","collapse":false},{"id":"e5a38717.72e7c","type":"ui_tab","z":"","name":"Entry Light","icon":"dashboard","order":9}]

Your flows will not import. Please read how to post flows to the forum. It must be done in a certain format.

my first flow

[{"id":"2b700e69.140b12","type":"subflow","name":"Timer 1","info":"","category":"","in":[{"x":500,"y":320,"wires":[{"id":"518f71b3.e543c8"}]}],"out":[{"x":740,"y":320,"wires":[{"id":"518f71b3.e543c8","port":0}]}],"env":[{"name":"TimerNumber","type":"num","value":"1"},{"name":"PayloadON","type":"str","value":"VRAI"},{"name":"PayloadOFF","type":"str","value":"FAUX"}],"color":"#DDAA99"},{"id":"518f71b3.e543c8","type":"function","z":"2b700e69.140b12","name":"","func":"var x = env.get(\"TimerNumber\"); \nvar y = env.get(\"PayloadON\"); \nvar z = env.get(\"PayloadOFF\"); \n\nflow.set(\"$parent.Timer\"+x, x);\nflow.set(\"$parent.Payload\"+x+\"_on\", y);\nflow.set(\"$parent.Timer\"+x+\"_off\", z);\n\n\n\nmsg.payload = \"Your timer \" + x + \" has been set\";\n\nreturn msg;\n","outputs":1,"noerr":0,"x":600,"y":320,"wires":[[]]},{"id":"bc0ed67a.5bf018","type":"tab","label":"Volets","disabled":false,"info":"commande des volets\n"},{"id":"1cf1280e.09543","type":"mqtt out","z":"bc0ed67a.5bf018","name":"","topic":"Maison/Volet/Chambre/Montee","qos":"0","retain":"","broker":"e253a1d9.24e29","x":710,"y":100,"wires":[]},{"id":"82a22464.2a5a6","type":"mqtt out","z":"bc0ed67a.5bf018","name":"","topic":"Maison/Volet/Chambre/Descente","qos":"0","retain":"","broker":"e253a1d9.24e29","x":720,"y":160,"wires":[]},{"id":"5a834e56.4e3238","type":"ui_button","z":"bc0ed67a.5bf018","name":"","group":"4fc59ba6.81642c","order":6,"width":"2","height":"1","passthru":false,"label":"","color":"","bgcolor":"#34788F","icon":"fa-sort-down","payload":"true","payloadType":"bool","topic":"","x":90,"y":159,"wires":[["82a22464.2a5a6"]]},{"id":"41d3316e.c08ae8","type":"ui_button","z":"bc0ed67a.5bf018","name":"","group":"4fc59ba6.81642c","order":7,"width":"2","height":"1","passthru":false,"label":"","color":"#330033","bgcolor":"#DADBDD","icon":"fa-sort-up","payload":"true","payloadType":"bool","topic":"","x":90,"y":103,"wires":[["1cf1280e.09543"]]},{"id":"75a21497.48e164","type":"mqtt in","z":"bc0ed67a.5bf018","name":"","topic":"etatMonteeCh","qos":"0","broker":"e253a1d9.24e29","x":110,"y":200,"wires":[["ef7aa9e4.6acee8"]]},{"id":"39c68fe9.dcb7e8","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":8,"width":"1","height":"1","name":"","label":"","format":"<font color={{msg.color}} ><i class=\"fa fa-circle\" style=\"font-size:24px;\"></i></font>","layout":"row-right","x":410,"y":200,"wires":[]},{"id":"4ccaac74.337f54","type":"mqtt in","z":"bc0ed67a.5bf018","name":"","topic":"etatDescenteCh","qos":"0","broker":"e253a1d9.24e29","x":120,"y":240,"wires":[["86dc020f.3b79"]]},{"id":"1d347333.a7c6ad","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":5,"width":"1","height":"1","name":"","label":"","format":"<font color={{msg.color}} ><i class=\"fa fa-circle\" style=\"font-size:24px;\"></i></font>","layout":"row-left","x":410,"y":240,"wires":[]},{"id":"f31ff679.57b4f8","type":"ui_button","z":"bc0ed67a.5bf018","name":"","group":"4fc59ba6.81642c","order":37,"width":"2","height":"1","passthru":false,"label":"","color":"#330033","bgcolor":"#DADBDD","icon":"fa-sort-up","payload":"true","payloadType":"bool","topic":"","x":90,"y":420,"wires":[["162e78aa.afd9df"]]},{"id":"69ff2618.1c942","type":"ui_button","z":"bc0ed67a.5bf018","name":"","group":"4fc59ba6.81642c","order":36,"width":"2","height":"1","passthru":false,"label":"","color":"","bgcolor":"#34788F","icon":"fa-sort-down","payload":"true","payloadType":"bool","topic":"","x":90,"y":457,"wires":[["c39a0203.2f242"]]},{"id":"a7b4aece.b474","type":"mqtt in","z":"bc0ed67a.5bf018","name":"","topic":"etatDescenteJe","qos":"0","broker":"e253a1d9.24e29","x":120,"y":500,"wires":[["a07c7c7c.3c30c8"]]},{"id":"a6730e4d.744c6","type":"mqtt in","z":"bc0ed67a.5bf018","name":"","topic":"etatMonteeJe","qos":"0","broker":"e253a1d9.24e29","x":110,"y":540,"wires":[["34e6cbc4.2c2ddc"]]},{"id":"48bd68b1.6deed","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":35,"width":"1","height":"1","name":"","label":"","format":"<font color={{msg.color}} ><i class=\"fa fa-circle\" style=\"font-size:24px;\"></i></font>","layout":"row-left","x":470,"y":500,"wires":[]},{"id":"f0f57bb9.ceb3e","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":38,"width":"1","height":"1","name":"","label":"","format":"<font color={{msg.color}} ><i class=\"fa fa-circle\" style=\"font-size:24px;\"></i></font>","layout":"row-right","x":470,"y":540,"wires":[]},{"id":"162e78aa.afd9df","type":"mqtt out","z":"bc0ed67a.5bf018","name":"","topic":"Maison/Volet/Jeu/Montee","qos":"0","retain":"","broker":"e253a1d9.24e29","x":710,"y":420,"wires":[]},{"id":"c39a0203.2f242","type":"mqtt out","z":"bc0ed67a.5bf018","name":"","topic":"Maison/Volet/Jeu/Descente","qos":"0","retain":"","broker":"e253a1d9.24e29","x":710,"y":457,"wires":[]},{"id":"fbf505b3.c77ba8","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":2,"width":"3","height":"1","name":"","label":" Fermeture ","format":"","layout":"row-center","x":310,"y":20,"wires":[]},{"id":"5291d6e1.95d02","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":3,"width":"3","height":"1","name":"","label":" Ouverture   ","format":"","layout":"row-center","x":470,"y":20,"wires":[]},{"id":"ef7aa9e4.6acee8","type":"function","z":"bc0ed67a.5bf018","name":"test","func":"msg.color = (msg.payload === \"1\")?\"#24FB01\":\"#999999\";\nreturn msg;","outputs":1,"noerr":0,"x":270,"y":200,"wires":[["39c68fe9.dcb7e8"]]},{"id":"86dc020f.3b79","type":"function","z":"bc0ed67a.5bf018","name":"test","func":"msg.color = (msg.payload === \"1\")?\"#24FB01\":\"#999999\";\nreturn msg;","outputs":1,"noerr":0,"x":270,"y":240,"wires":[["1d347333.a7c6ad"]]},{"id":"a07c7c7c.3c30c8","type":"function","z":"bc0ed67a.5bf018","name":"test","func":"msg.color = (msg.payload === \"1\")?\"#24FB01\":\"#999999\";\nreturn msg;","outputs":1,"noerr":0,"x":290,"y":500,"wires":[["48bd68b1.6deed"]]},{"id":"34e6cbc4.2c2ddc","type":"function","z":"bc0ed67a.5bf018","name":"test","func":"msg.color = (msg.payload === \"1\")?\"#24FB01\":\"#999999\";\nreturn msg;","outputs":1,"noerr":0,"x":290,"y":540,"wires":[["f0f57bb9.ceb3e"]]},{"id":"9e80312f.a00be","type":"ui_button","z":"bc0ed67a.5bf018","name":"","group":"4fc59ba6.81642c","order":12,"width":"2","height":"1","passthru":false,"label":"","color":"#330033","bgcolor":"#DADBDD","icon":"fa-sort-up","payload":"true","payloadType":"str","topic":"","x":90,"y":720,"wires":[["a3296386.02ebb"]]},{"id":"5e195967.46072","type":"ui_button","z":"bc0ed67a.5bf018","name":"","group":"4fc59ba6.81642c","order":11,"width":"2","height":"1","passthru":false,"label":"","color":"","bgcolor":"#34788F","icon":"fa-sort-down","payload":"true","payloadType":"str","topic":"","x":90,"y":760,"wires":[["3b41c65a.e81252"]]},{"id":"a3296386.02ebb","type":"mqtt out","z":"bc0ed67a.5bf018","name":"","topic":"Maison/Volet/Sdb/Montee","qos":"0","retain":"","broker":"e253a1d9.24e29","x":720,"y":720,"wires":[]},{"id":"3b41c65a.e81252","type":"mqtt out","z":"bc0ed67a.5bf018","name":"","topic":"Maison/Volet/Sdb/Descente","qos":"0","retain":"","broker":"e253a1d9.24e29","x":720,"y":760,"wires":[]},{"id":"a79c3b0c.85f1b","type":"mqtt in","z":"bc0ed67a.5bf018","name":"","topic":"etatDescenteSdb","qos":"0","broker":"e253a1d9.24e29","x":120,"y":800,"wires":[["75fcc32.bfcabbc"]]},{"id":"52049d4f.830a5c","type":"mqtt in","z":"bc0ed67a.5bf018","name":"","topic":"etatMonteeSdb","qos":"0","broker":"e253a1d9.24e29","x":120,"y":840,"wires":[["ec6eb96a.4b8868"]]},{"id":"75fcc32.bfcabbc","type":"function","z":"bc0ed67a.5bf018","name":"test","func":"msg.color = (msg.payload === \"1\")?\"#24FB01\":\"#999999\";\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":800,"wires":[["158fa6c1.0b4179"]]},{"id":"ec6eb96a.4b8868","type":"function","z":"bc0ed67a.5bf018","name":"test","func":"msg.color = (msg.payload === \"1\")?\"#24FB01\":\"#999999\";\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":840,"wires":[["136c88af.c0974f"]]},{"id":"158fa6c1.0b4179","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":10,"width":"1","height":"1","name":"","label":"","format":"<font color={{msg.color}} ><i class=\"fa fa-circle\" style=\"font-size:24px;\"></i></font>","layout":"row-left","x":470,"y":800,"wires":[]},{"id":"136c88af.c0974f","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":13,"width":"1","height":"1","name":"","label":"","format":"<font color={{msg.color}} ><i class=\"fa fa-circle\" style=\"font-size:24px;\"></i></font>","layout":"row-right","x":470,"y":840,"wires":[]},{"id":"7ddd86c1.2602b8","type":"ui_button","z":"bc0ed67a.5bf018","name":"","group":"4fc59ba6.81642c","order":17,"width":"2","height":"1","passthru":false,"label":"","color":"#330033","bgcolor":"#DADBDD","icon":"fa-sort-up","payload":"true","payloadType":"str","topic":"","x":110,"y":1000,"wires":[["1224429d.a3ac4d"]]},{"id":"6983a4d2.f2aac4","type":"ui_button","z":"bc0ed67a.5bf018","name":"","group":"4fc59ba6.81642c","order":16,"width":"2","height":"1","passthru":false,"label":"","color":"","bgcolor":"#34788F","icon":"fa-sort-down","payload":"true","payloadType":"str","topic":"","x":110,"y":1040,"wires":[["191aa5a.2267f5a"]]},{"id":"1224429d.a3ac4d","type":"mqtt out","z":"bc0ed67a.5bf018","name":"","topic":"Maison/Volet/Hall/Montee","qos":"0","retain":"","broker":"e253a1d9.24e29","x":740,"y":1000,"wires":[]},{"id":"191aa5a.2267f5a","type":"mqtt out","z":"bc0ed67a.5bf018","name":"","topic":"Maison/Volet/Hall/Descente","qos":"0","retain":"","broker":"e253a1d9.24e29","x":740,"y":1040,"wires":[]},{"id":"9f52ac3c.ff6f2","type":"mqtt in","z":"bc0ed67a.5bf018","name":"","topic":"etatDescenteHall","qos":"0","broker":"e253a1d9.24e29","x":140,"y":1080,"wires":[["ee20315c.aeccb8"]]},{"id":"ada15163.cd31b","type":"mqtt in","z":"bc0ed67a.5bf018","name":"","topic":"etatMonteeHall","qos":"0","broker":"e253a1d9.24e29","x":140,"y":1120,"wires":[["6f964217.9c87e4"]]},{"id":"ee20315c.aeccb8","type":"function","z":"bc0ed67a.5bf018","name":"test","func":"msg.color = (msg.payload === \"1\")?\"#24FB01\":\"#999999\";\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":1080,"wires":[["d374c0d3.d0f2"]]},{"id":"6f964217.9c87e4","type":"function","z":"bc0ed67a.5bf018","name":"test","func":"msg.color = (msg.payload === \"1\")?\"#24FB01\":\"#999999\";\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":1120,"wires":[["6d824e66.33ae1"]]},{"id":"d374c0d3.d0f2","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":15,"width":"1","height":"1","name":"","label":"","format":"<font color={{msg.color}} ><i class=\"fa fa-circle\" style=\"font-size:24px;\"></i></font>","layout":"row-left","x":470,"y":1080,"wires":[]},{"id":"6d824e66.33ae1","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":18,"width":"1","height":"1","name":"","label":"","format":"<font color={{msg.color}} ><i class=\"fa fa-circle\" style=\"font-size:24px;\"></i></font>","layout":"row-right","x":470,"y":1120,"wires":[]},{"id":"978f687d.a4f01","type":"ui_button","z":"bc0ed67a.5bf018","name":"","group":"4fc59ba6.81642c","order":22,"width":"2","height":"1","passthru":false,"label":"","color":"#330033","bgcolor":"#DADBDD","icon":"fa-sort-up","payload":"true","payloadType":"str","topic":"","x":110,"y":1260,"wires":[["5eb08f6c.d54cd8"]]},{"id":"7f94524d.07b0dc","type":"ui_button","z":"bc0ed67a.5bf018","name":"","group":"4fc59ba6.81642c","order":21,"width":"2","height":"1","passthru":false,"label":"","color":"","bgcolor":"#34788F","icon":"fa-sort-down","payload":"true","payloadType":"str","topic":"","x":110,"y":1300,"wires":[["fba1b2a4.41a9e8"]]},{"id":"5eb08f6c.d54cd8","type":"mqtt out","z":"bc0ed67a.5bf018","name":"","topic":"Maison/Volet/Cuisine/Montee","qos":"0","retain":"","broker":"e253a1d9.24e29","x":740,"y":1260,"wires":[]},{"id":"fba1b2a4.41a9e8","type":"mqtt out","z":"bc0ed67a.5bf018","name":"","topic":"Maison/Volet/Cuisine/Descente","qos":"","retain":"","broker":"e253a1d9.24e29","x":750,"y":1300,"wires":[]},{"id":"ef18b097.caf7a","type":"mqtt in","z":"bc0ed67a.5bf018","name":"","topic":"etatDescenteCuisine","qos":"0","broker":"e253a1d9.24e29","x":160,"y":1340,"wires":[["416d39.1d314ac8"]]},{"id":"c25df915.87091","type":"mqtt in","z":"bc0ed67a.5bf018","name":"","topic":"etatMonteeCuisine","qos":"0","broker":"e253a1d9.24e29","x":150,"y":1380,"wires":[["b20eb74f.5d9098"]]},{"id":"416d39.1d314ac8","type":"function","z":"bc0ed67a.5bf018","name":"test","func":"msg.color = (msg.payload === \"1\")?\"#24FB01\":\"#999999\";\nreturn msg;","outputs":1,"noerr":0,"x":350,"y":1340,"wires":[["94c45239.752ab8"]]},{"id":"b20eb74f.5d9098","type":"function","z":"bc0ed67a.5bf018","name":"test","func":"msg.color = (msg.payload === \"1\")?\"#24FB01\":\"#999999\";\nreturn msg;","outputs":1,"noerr":0,"x":350,"y":1380,"wires":[["1d8a9654.0a7caa"]]},{"id":"94c45239.752ab8","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":20,"width":"1","height":"1","name":"","label":"","format":"<font color={{msg.color}} ><i class=\"fa fa-circle\" style=\"font-size:24px;\"></i></font>","layout":"row-left","x":530,"y":1340,"wires":[]},{"id":"1d8a9654.0a7caa","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":23,"width":"1","height":"1","name":"","label":"","format":"<font color={{msg.color}} ><i class=\"fa fa-circle\" style=\"font-size:24px;\"></i></font>","layout":"row-right","x":530,"y":1380,"wires":[]},{"id":"28fcd00f.dfdc98","type":"ui_button","z":"bc0ed67a.5bf018","name":"","group":"4fc59ba6.81642c","order":27,"width":"2","height":"1","passthru":false,"label":"","color":"#330033","bgcolor":"#DADBDD","icon":"fa-sort-up","payload":"true","payloadType":"str","topic":"","x":110,"y":1540,"wires":[["f79ef0a9.099fd"]]},{"id":"24430d28.70f9ea","type":"ui_button","z":"bc0ed67a.5bf018","name":"","group":"4fc59ba6.81642c","order":26,"width":"2","height":"1","passthru":false,"label":"","color":"","bgcolor":"#34788F","icon":"fa-sort-down","payload":"true","payloadType":"str","topic":"","x":110,"y":1580,"wires":[["5ffe221f.3e143c"]]},{"id":"f79ef0a9.099fd","type":"mqtt out","z":"bc0ed67a.5bf018","name":"","topic":"Maison/Volet/Salle/Montee","qos":"0","retain":"","broker":"e253a1d9.24e29","x":740,"y":1540,"wires":[]},{"id":"5ffe221f.3e143c","type":"mqtt out","z":"bc0ed67a.5bf018","name":"","topic":"Maison/Volet/Salle/Descente","qos":"0","retain":"","broker":"e253a1d9.24e29","x":740,"y":1580,"wires":[]},{"id":"95e83f8e.4e51c8","type":"mqtt in","z":"bc0ed67a.5bf018","name":"","topic":"etatDescenteSalle","qos":"0","broker":"e253a1d9.24e29","x":150,"y":1620,"wires":[["57b0ecd4.1781ec"]]},{"id":"23c79a52.2fff46","type":"mqtt in","z":"bc0ed67a.5bf018","name":"","topic":"etatMonteeSalle","qos":"0","broker":"e253a1d9.24e29","x":140,"y":1660,"wires":[["3bbcf6a4.cc79aa"]]},{"id":"57b0ecd4.1781ec","type":"function","z":"bc0ed67a.5bf018","name":"test","func":"msg.color = (msg.payload === \"1\")?\"#24FB01\":\"#999999\";\nreturn msg;","outputs":1,"noerr":0,"x":350,"y":1620,"wires":[["ed134783.ce923"]]},{"id":"3bbcf6a4.cc79aa","type":"function","z":"bc0ed67a.5bf018","name":"test","func":"msg.color = (msg.payload === \"1\")?\"#24FB01\":\"#999999\";\nreturn msg;","outputs":1,"noerr":0,"x":350,"y":1660,"wires":[["807eb7eb.797d6"]]},{"id":"ed134783.ce923","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":25,"width":"1","height":"1","name":"","label":"","format":"<font color={{msg.color}} ><i class=\"fa fa-circle\" style=\"font-size:24px;\"></i></font>","layout":"row-left","x":510,"y":1620,"wires":[]},{"id":"807eb7eb.797d6","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":28,"width":"1","height":"1","name":"","label":"","format":"<font color={{msg.color}} ><i class=\"fa fa-circle\" style=\"font-size:24px;\"></i></font>","layout":"row-right","x":510,"y":1660,"wires":[]},{"id":"6cdb314a.3dd1e","type":"ui_button","z":"bc0ed67a.5bf018","name":"","group":"4fc59ba6.81642c","order":31,"width":"2","height":"1","passthru":false,"label":"","color":"","bgcolor":"#34788F","icon":"fa-sort-down","payload":"true","payloadType":"str","topic":"","x":110,"y":1820,"wires":[["c8dc7a74.76fb88"]]},{"id":"4d8f642.348cc9c","type":"ui_button","z":"bc0ed67a.5bf018","name":"","group":"4fc59ba6.81642c","order":32,"width":"2","height":"1","passthru":false,"label":"","color":"#330033","bgcolor":"#DADBDD","icon":"fa-sort-up","payload":"true","payloadType":"str","topic":"","x":110,"y":1780,"wires":[["2d12338b.b5499c"]]},{"id":"2d12338b.b5499c","type":"mqtt out","z":"bc0ed67a.5bf018","name":"","topic":"Maison/Volet/Salon/Montee","qos":"0","retain":"","broker":"e253a1d9.24e29","x":740,"y":1780,"wires":[]},{"id":"c8dc7a74.76fb88","type":"mqtt out","z":"bc0ed67a.5bf018","name":"","topic":"Maison/Volet/Salon/Descente","qos":"0","retain":"","broker":"e253a1d9.24e29","x":750,"y":1820,"wires":[]},{"id":"5ea2f812.653db8","type":"mqtt in","z":"bc0ed67a.5bf018","name":"","topic":"etatDescenteSalon","qos":"0","broker":"e253a1d9.24e29","x":150,"y":1860,"wires":[["f90d58e6.0743f"]]},{"id":"563a7bb1.5b56dc","type":"mqtt in","z":"bc0ed67a.5bf018","name":"","topic":"etatMonteeSalon","qos":"0","broker":"e253a1d9.24e29","x":140,"y":1900,"wires":[["ca2757ca.838068"]]},{"id":"f90d58e6.0743f","type":"function","z":"bc0ed67a.5bf018","name":"test","func":"msg.color = (msg.payload === \"1\")?\"#24FB01\":\"#999999\";\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":1860,"wires":[["406afcdf.d00b0c"]]},{"id":"ca2757ca.838068","type":"function","z":"bc0ed67a.5bf018","name":"test","func":"msg.color = (msg.payload === \"1\")?\"#24FB01\":\"#999999\";\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":1900,"wires":[["92ed183d.cf72f"]]},{"id":"406afcdf.d00b0c","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":30,"width":"1","height":"1","name":"","label":"","format":"<font color={{msg.color}} ><i class=\"fa fa-circle\" style=\"font-size:24px;\"></i></font>","layout":"row-left","x":490,"y":1860,"wires":[]},{"id":"92ed183d.cf72f","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":33,"width":"1","height":"1","name":"","label":"","format":"<font color={{msg.color}} ><i class=\"fa fa-circle\" style=\"font-size:24px;\"></i></font>","layout":"row-right","x":490,"y":1900,"wires":[]},{"id":"41b6606f.4cb318","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":1,"width":"2","height":"1","name":"","label":"Pièce","format":"{{msg.payload}}","layout":"row-center","x":610,"y":20,"wires":[]},{"id":"6af357c1.c0f518","type":"mqtt in","z":"bc0ed67a.5bf018","name":"","topic":"#","qos":"2","datatype":"auto","broker":"e253a1d9.24e29","x":250,"y":2020,"wires":[["9114f169.ebf1e"]]},{"id":"9114f169.ebf1e","type":"debug","z":"bc0ed67a.5bf018","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":420,"y":2020,"wires":[]},{"id":"b740457a.fbe1b8","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":4,"width":"2","height":"1","name":"","label":"Chambre","format":"{{msg.payload}}","layout":"row-spread","x":100,"y":60,"wires":[]},{"id":"7ca18a2f.2738d4","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":9,"width":"2","height":"1","name":"","label":"SdB","format":"{{msg.payload}}","layout":"row-spread","x":90,"y":680,"wires":[]},{"id":"86b09c34.492db","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":14,"width":"2","height":"1","name":"","label":"Hall1","format":"{{msg.payload}}","layout":"row-spread","x":110,"y":960,"wires":[]},{"id":"2d4a4de4.89d3f2","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":19,"width":"2","height":"1","name":"","label":"Cuisine","format":"{{msg.payload}}","layout":"row-spread","x":120,"y":1220,"wires":[]},{"id":"e43528de.14335","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":24,"width":"2","height":"1","name":"","label":"Salle","format":"{{msg.payload}}","layout":"row-spread","x":110,"y":1500,"wires":[]},{"id":"eff5ad14.d4809","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":29,"width":"2","height":"1","name":"","label":"Salon","format":"{{msg.payload}}","layout":"row-spread","x":110,"y":1740,"wires":[]},{"id":"2c29b372.be8b74","type":"ui_text","z":"bc0ed67a.5bf018","group":"4fc59ba6.81642c","order":34,"width":"2","height":"1","name":"","label":"Jeux","format":"{{msg.payload}}","layout":"row-left","x":90,"y":380,"wires":[]},{"id":"76ae4630.14a578","type":"cpu","z":"bc0ed67a.5bf018","name":"Temperature","msgCore":false,"msgOverall":false,"msgArray":false,"msgTemp":true,"x":310,"y":2480,"wires":[["43c48a70.b1fe14"]]},{"id":"43c48a70.b1fe14","type":"ui_chart","z":"bc0ed67a.5bf018","name":"Temperature cpu","group":"e743627a.57aa","order":0,"width":0,"height":0,"label":"Tempėrature cpu","chartType":"line","legend":"false","xformat":"dd HH:mm","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"604800","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#00ff00","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"x":530,"y":2460,"wires":[[],[]]},{"id":"15bed42e.3415cc","type":"inject","z":"bc0ed67a.5bf018","name":"","topic":"","payload":"","payloadType":"date","repeat":"3600","crontab":"","once":true,"onceDelay":0.1,"x":110,"y":2480,"wires":[["76ae4630.14a578"]]},{"id":"a7facfe7.29fae","type":"inject","z":"bc0ed67a.5bf018","name":"","topic":"","payload":"","payloadType":"date","repeat":"30","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":2520,"wires":[["3e56e682.cf670a"]]},{"id":"3e56e682.cf670a","type":"function","z":"bc0ed67a.5bf018","name":"","func":"var now = new Date();\n//var now = new Date(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate(),  now.getUTCHours(), now.getUTCMinutes(), now.getUTCSeconds());\nvar hour    = now.getHours();\nvar minute  = now.getMinutes();\nmsg.payload = hour+\":\"+minute\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":2520,"wires":[["ef6f89d4.0cf878"]]},{"id":"ef6f89d4.0cf878","type":"ui_text","z":"bc0ed67a.5bf018","group":"e743627a.57aa","order":0,"width":0,"height":0,"name":"","label":"Heure :","format":"{{msg.payload}}","layout":"row-spread","x":520,"y":2520,"wires":[]},{"id":"b0b42b6e.016c28","type":"exec","z":"bc0ed67a.5bf018","command":"","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":350,"y":2400,"wires":[[],[],[]]},{"id":"55df71b0.6fe1d8","type":"ui_button","z":"bc0ed67a.5bf018","d":true,"name":"","group":"e743627a.57aa","order":0,"width":0,"height":0,"passthru":false,"label":"Reboot Rasberry","color":"","bgcolor":"","icon":"","payload":"sudo reboot","payloadType":"str","topic":"","x":130,"y":2400,"wires":[["b0b42b6e.016c28"]]},{"id":"865aadb5.a01e5","type":"subflow:2b700e69.140b12","z":"bc0ed67a.5bf018","name":"Timer 1","env":[],"x":420,"y":2200,"wires":[["57e0f95.c2faf08"]]},{"id":"57e0f95.c2faf08","type":"debug","z":"bc0ed67a.5bf018","name":"sortii subflow","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":410,"y":2280,"wires":[]},{"id":"65649a8f.203324","type":"inject","z":"bc0ed67a.5bf018","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":320,"y":2140,"wires":[["865aadb5.a01e5"]]},{"id":"e253a1d9.24e29","type":"mqtt-broker","z":"","name":"raspi-wegui","broker":"10.3.141.1","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"4fc59ba6.81642c","type":"ui_group","z":"","name":"Volets Guilers","tab":"62c669cd.310e28","order":1,"disp":true,"width":"8","collapse":false},{"id":"e743627a.57aa","type":"ui_group","z":"","name":"Info","tab":"4d3c16b5.e1c138","order":2,"disp":true,"width":"6","collapse":false},{"id":"62c669cd.310e28","type":"ui_tab","z":"","name":"Maison Guilers volets","icon":"dashboard","order":1},{"id":"4d3c16b5.e1c138","type":"ui_tab","z":"","name":"Raspberry","icon":"dashboard","order":3}]

my second flow

[{"id":"2b700e69.140b12","type":"subflow","name":"Timer 1","info":"","category":"","in":[{"x":500,"y":320,"wires":[{"id":"518f71b3.e543c8"}]}],"out":[{"x":740,"y":320,"wires":[{"id":"518f71b3.e543c8","port":0}]}],"env":[{"name":"TimerNumber","type":"num","value":"1"},{"name":"PayloadON","type":"str","value":"VRAI"},{"name":"PayloadOFF","type":"str","value":"FAUX"}],"color":"#DDAA99"},{"id":"518f71b3.e543c8","type":"function","z":"2b700e69.140b12","name":"","func":"var x = env.get(\"TimerNumber\"); \nvar y = env.get(\"PayloadON\"); \nvar z = env.get(\"PayloadOFF\"); \n\nflow.set(\"$parent.Timer\"+x, x);\nflow.set(\"$parent.Payload\"+x+\"_on\", y);\nflow.set(\"$parent.Timer\"+x+\"_off\", z);\n\n\n\nmsg.payload = \"Your timer \" + x + \" has been set\";\n\nreturn msg;\n","outputs":1,"noerr":0,"x":600,"y":320,"wires":[[]]},{"id":"9e4101be.596b58","type":"tab","label":"Timer in Dashboard","disabled":false,"info":"A neat online timer made in Dashboard.  You can link it with any automation setup in NodeRED, deploy multiple timers and add schedules to your devices. \nYou can customise the payload to suit your needs.\n![enter image description here](https://notenoughtech.com/wp-content/uploads/2019/11/YouTube-Thumb.jpg)\n\n**Instructions:**\nYou can read all [set up instructions here](https://notenoughtech.com/home-automation/nodered-home-automation/a-timer-in-nodered/)\n\n---\n\n**Features**:\n\n -   **Modular (as a subflow)**\n -   **Unlimited timers per device**\n -   **Supports “days of the week”**\n -   **works offline**\n -   **Dashboard interface**\n -   **One button reset**   \n\n**You will need the following nodes:**\n\n - node-red-dashboard\n - node-red-contrib-schedex\n---\n# Settings\n - **PayloadON** payload message sent on ON action\n - **PayloadOFF** payload message sent on OFF action\n - **TimerNumber** timer ID (unique for each timer)\n"},{"id":"c0df9110.97ce08","type":"schedex","z":"9e4101be.596b58","name":"Timer","passthroughunhandled":false,"suspended":false,"lat":"54.525671","lon":"-1.3113165","ontime":"","ontopic":"","onpayload":"TIMERVRAI","onoffset":"","onrandomoffset":0,"offtime":"","offtopic":"","offpayload":"TIMEROFF","offoffset":"","offrandomoffset":0,"mon":false,"tue":false,"wed":false,"thu":false,"fri":false,"sat":false,"sun":false,"x":1250,"y":500,"wires":[["ee2b9af1.599fb8"]]},{"id":"17242b47.229225","type":"ui_text_input","z":"9e4101be.596b58","name":"T2 On","label":"","group":"a04ff3db.7128b","order":2,"width":"4","height":"1","passthru":false,"mode":"time","delay":"10","topic":"Ton","x":550,"y":280,"wires":[["51d6a6db.8d0508"]]},{"id":"e011dbf6.549d4","type":"ui_button","z":"9e4101be.596b58","name":"Set ON","group":"a04ff3db.7128b","order":3,"width":"2","height":"1","passthru":false,"label":"{{msg.topic}}","color":"","bgcolor":"{{msg.color}}","icon":"","payload":"","payloadType":"str","topic":"buttonON","x":940,"y":220,"wires":[["9361389d.b7ab"]]},{"id":"e55774a4.bddf","type":"ui_text_input","z":"9e4101be.596b58","name":"T2 Off","label":"","group":"a04ff3db.7128b","order":4,"width":"4","height":"1","passthru":false,"mode":"time","delay":"10","topic":"Toff","x":550,"y":320,"wires":[["51d6a6db.8d0508"]]},{"id":"ff61d0cb.8b847","type":"ui_button","z":"9e4101be.596b58","name":"Set OFF","group":"a04ff3db.7128b","order":5,"width":"2","height":"1","passthru":false,"label":"{{msg.topic}}","color":"","bgcolor":"{{msg.color}}","icon":"","payload":"","payloadType":"str","topic":"buttonOFF","x":940,"y":360,"wires":[["9361389d.b7ab"]]},{"id":"c693a5ff.6d5378","type":"ui_button","z":"9e4101be.596b58","name":"Reset Button","group":"a04ff3db.7128b","order":6,"width":"6","height":"1","passthru":false,"label":"Reset","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":110,"y":520,"wires":[["8525455f.5eb128"]]},{"id":"51d6a6db.8d0508","type":"function","z":"9e4101be.596b58","name":"Set T2 On","func":"var z = flow.get(\"Timer1\");\n\n//if timer on is set\nif(msg.topic === \"Ton\"){\n    flow.set(\"timer\"+z+\"_on\", msg.payload);\n    msg.color = \"red\";\n    msg.topic = \"Press\";\n    return [msg, null];\n    \n    \n}\n\n//if timer off is set\nif(msg.topic === \"Toff\"){\n    flow.set(\"timer\"+z+\"_off\", msg.payload);\n    msg.color = \"red\";\n    msg.topic = \"Press\";\n    return [null, msg];\n    \n}\n\n// reboot detected\nif(msg.topic === \"reboot\"){\n    msg.color = \"grey\";\n    msg.topic = \"Select Time\";\n    return [msg, msg];\n    \n}","outputs":2,"noerr":0,"x":720,"y":300,"wires":[["e011dbf6.549d4"],["ff61d0cb.8b847"]]},{"id":"8525455f.5eb128","type":"function","z":"9e4101be.596b58","name":"Reset","func":"var z = flow.get(\"Timer1\");\n\nvar timerlabel = \"Timer \"+ z;\nflow.set(\"$parent.timer\"+z+\"_on\", 0);\nflow.set(\"$parent.timer\"+z+\"_off\", 0);\nflow.set(\"$parent.T\"+z+\"on\", null);\nflow.set(\"$parent.T\"+z+\"off\", null);\n\nvar msg1 = {payload: \"Timer \"+z+\" reset\"};\nvar msg2 = {payload: 0};\nvar msg3 = {payload: \"disabled\",\n            topic: timerlabel,\n            color: \"red\"};\nvar msg4 = {color: \"grey\",\n            topic: \"Select Time\",\n};\n\nvar msg5 = {payload:{suspended: true}};\nvar msg6 = {payload: true};\n\nreturn [msg1, msg2, msg3, msg4, msg5, msg6];","outputs":6,"noerr":0,"x":290,"y":520,"wires":[["d0854932.82435"],["e55774a4.bddf","17242b47.229225"],[],["e011dbf6.549d4","ff61d0cb.8b847"],["c0df9110.97ce08"],["e45d52e5.3a0d18","fb83938.0d81c7","d6535a1d.8f80d","20ac689e.1568c8","7eeaf88d.3e26d8","1237fcb8.eabb9b","cb137c89.e8874"]]},{"id":"e45d52e5.3a0d18","type":"ui_switch","z":"9e4101be.596b58","name":"","label":"Mon","group":"a04ff3db.7128b","order":7,"width":"2","height":"1","passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":550,"y":560,"wires":[["56cebc4d.334ad4"]]},{"id":"fb83938.0d81c7","type":"ui_switch","z":"9e4101be.596b58","name":"","label":"Tue","group":"a04ff3db.7128b","order":8,"width":"2","height":"1","passthru":true,"decouple":"false","topic":"tue","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":550,"y":600,"wires":[["95ce390a.e3846"]]},{"id":"d6535a1d.8f80d","type":"ui_switch","z":"9e4101be.596b58","name":"","label":"Wed","group":"a04ff3db.7128b","order":9,"width":"2","height":"1","passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":550,"y":640,"wires":[["24e31b29.6e250c"]]},{"id":"20ac689e.1568c8","type":"ui_switch","z":"9e4101be.596b58","name":"","label":"Thu","group":"a04ff3db.7128b","order":10,"width":"2","height":"1","passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":550,"y":680,"wires":[["1a76ff38.ac4e11"]]},{"id":"7eeaf88d.3e26d8","type":"ui_switch","z":"9e4101be.596b58","name":"","label":"Fri","group":"a04ff3db.7128b","order":11,"width":"2","height":"1","passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":550,"y":720,"wires":[["897ffdaf.fb7c9"]]},{"id":"1237fcb8.eabb9b","type":"ui_switch","z":"9e4101be.596b58","name":"","label":"Sat","group":"a04ff3db.7128b","order":12,"width":"2","height":"1","passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":550,"y":760,"wires":[["d0414172.9de45"]]},{"id":"56cebc4d.334ad4","type":"function","z":"9e4101be.596b58","name":"Mon","func":"var z = flow.get(\"Timer1\");\n\nvar x = msg.payload;\nflow.set(\"Monday\"+z, x);\nmsg.payload = {mon: x};\n\nreturn msg;","outputs":1,"noerr":0,"x":710,"y":560,"wires":[["c0df9110.97ce08"]]},{"id":"95ce390a.e3846","type":"function","z":"9e4101be.596b58","name":"Tue","func":"var z = flow.get(\"Timer1\");\n\nvar x = msg.payload;\nflow.set(\"Tuesday\"+z, x);\nmsg.payload = {tue: x};\n\nreturn msg;","outputs":1,"noerr":0,"x":710,"y":600,"wires":[["c0df9110.97ce08"]]},{"id":"24e31b29.6e250c","type":"function","z":"9e4101be.596b58","name":"Wed","func":"var z = flow.get(\"Timer1\");\n\nvar x = msg.payload;\nflow.set(\"Wednesday\"+z, x);\nmsg.payload = {wed: x};\n\nreturn msg;","outputs":1,"noerr":0,"x":710,"y":640,"wires":[["c0df9110.97ce08"]]},{"id":"1a76ff38.ac4e11","type":"function","z":"9e4101be.596b58","name":"Thu","func":"var z = flow.get(\"Timer1\");\n\nvar x = msg.payload;\nflow.set(\"Thursday\"+z, x);\nmsg.payload = {thu: x};\n\nreturn msg;","outputs":1,"noerr":0,"x":710,"y":680,"wires":[["c0df9110.97ce08"]]},{"id":"897ffdaf.fb7c9","type":"function","z":"9e4101be.596b58","name":"Fri","func":"var z = flow.get(\"Timer1\");\n\n\nvar x = msg.payload;\nflow.set(\"Friday\"+z, x);\nmsg.payload = {fri: x};\n\nreturn msg;","outputs":1,"noerr":0,"x":710,"y":720,"wires":[["c0df9110.97ce08"]]},{"id":"d0414172.9de45","type":"function","z":"9e4101be.596b58","name":"Sat","func":"var z = flow.get(\"Timer1\");\n\n\nvar x = msg.payload;\nflow.set(\"Saturday\"+z, x);\nmsg.payload = {sat: x};\n\nreturn msg;","outputs":1,"noerr":0,"x":710,"y":760,"wires":[["c0df9110.97ce08"]]},{"id":"f068c12d.a45f2","type":"function","z":"9e4101be.596b58","name":"Sun","func":"var z = flow.get(\"Timer1\");\n\n\nvar x = msg.payload;\nflow.set(\"Sunday\"+z, x);\nmsg.payload = {sun: x};\n\nreturn msg;","outputs":1,"noerr":0,"x":710,"y":800,"wires":[["c0df9110.97ce08"]]},{"id":"6631504e.7d5578","type":"inject","z":"9e4101be.596b58","name":"","topic":"","payload":"Started!","payloadType":"str","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":810,"y":440,"wires":[["8abe80a3.c48aa8"]]},{"id":"8abe80a3.c48aa8","type":"function","z":"9e4101be.596b58","name":"Apply stored values ","func":"var z = flow.get(\"Timer1\");\nvar pon = flow.get(\"PayloadON\");\nvar poff = flow.get(\"PayloadOFF\");\n\n\n// restore days\nvar mon = flow.get(\"Monday\"+z);\nvar tue = flow.get(\"Tuesday\"+z);\nvar wed = flow.get(\"Wednesday\"+z);\nvar thu = flow.get(\"Thursday\"+z);\nvar fri = flow.get(\"Friday\"+z);\nvar sat = flow.get(\"Saturday\"+z);\nvar sun = flow.get(\"Sunday\"+z);\n\n//restore timers\nvar timeON = flow.get(\"T\"+z+\"on\");\nvar timeOFF = flow.get(\"T\"+z+\"off\");\nvar timerlabel = \"Timer \"+ z;\n\n\n\nvar msg1 = {payload: {ontime: \"ontime \" + timeON}, onpayload: pon,};\nvar msg2 = {payload: {offtime: \"offtime \" + timeOFF}, offpayload: poff,};\nvar msg3 = {topic: timerlabel};\nvar msg4 = {payload : { \"mon\": mon,\n                \"tue\": tue,\n                \"wed\": wed,\n                \"thu\": thu,\n                \"fri\": fri,\n                \"sat\": sat,\n                \"sun\": sun,}\n};\n                     \n    \nreturn [msg1, msg2, msg3];","outputs":4,"noerr":0,"x":1030,"y":440,"wires":[["c0df9110.97ce08"],["c0df9110.97ce08"],[],["c0df9110.97ce08"]]},{"id":"5d1e163f.a51fc","type":"comment","z":"9e4101be.596b58","name":"Reboot Fix","info":"","x":800,"y":400,"wires":[]},{"id":"7f7e7362.61a374","type":"inject","z":"9e4101be.596b58","name":"","topic":"reboot","payload":"Started!","payloadType":"str","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":540,"y":220,"wires":[["51d6a6db.8d0508"]]},{"id":"22b9739.baef60c","type":"comment","z":"9e4101be.596b58","name":"Set Button","info":"","x":520,"y":180,"wires":[]},{"id":"d0854932.82435","type":"ui_toast","z":"9e4101be.596b58","position":"top right","displayTime":"3","highlight":"","outputs":0,"ok":"OK","cancel":"","topic":"Timer 1","name":"","x":250,"y":400,"wires":[]},{"id":"9361389d.b7ab","type":"function","z":"9e4101be.596b58","name":"On button press","func":"var z = flow.get(\"Timer1\");\nvar pon = flow.get(\"PayloadON\");\nvar poff = flow.get(\"PayloadOFF\");\n\nfunction calcTime(hh){\n    var hours = (\"0\"+Math.floor((hh%86400)/3600)).slice(-2);\n    var minutes = (\"0\"+Math.floor((hh%3600)/60)).slice(-2);\n    return hours + \":\" + minutes;\n}\n\nvar time = null;\nvar timerlabel = \"Timer \"+ z;\n\n\n// when button on is pressed\nif(msg.topic === \"buttonON\"){\n    var t1  = flow.get(\"timer\"+z+\"_on\")/1000;\n    time = calcTime(t1);\n    flow.set(\"T\"+z+\"on\", time);\n    //send to text element\n    var msg1 = {payload: \"SET\", topic: timerlabel, color: \"green\"};\n    //send to schedex\n    var msg2 = {payload: {ontime: \"ontime \" + time,\n                          onpayload: pon,\n                          suspended: false},\n                topic: \"SET\",\n                color:   \"green\"};\n    return [msg1,msg2,null,null];\n}\n// when button off is pressed\nif(msg.topic === \"buttonOFF\"){\n    var t2 = flow.get(\"timer\"+z+\"_off\")/1000;\n    time = calcTime(t2);\n    flow.set(\"T\"+z+\"off\", time);\n    //send to text element\n    var msg3 = {payload: \"SET\", topic: timerlabel, color: \"green\"};\n    //send to schedex\n    var msg4 = {payload: {offtime: \"offtime \" + time,\n                          offpayload: poff,\n                          suspended: false},\n                topic: \"SET\",\n                color:   \"green\"};\n    return [null,null,msg3,msg4];\n    \n}\n\nreturn msg;","outputs":4,"noerr":0,"x":1140,"y":300,"wires":[[],["c0df9110.97ce08","e011dbf6.549d4"],[],["c0df9110.97ce08","ff61d0cb.8b847"]]},{"id":"fc2b8343.bd4e1","type":"inject","z":"9e4101be.596b58","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":170,"y":100,"wires":[["77ae11f2.cfb43"]]},{"id":"156904d5.316723","type":"debug","z":"9e4101be.596b58","name":"","active":true,"tosidebar":true,"console":true,"tostatus":true,"complete":"payload","targetType":"msg","x":740,"y":100,"wires":[]},{"id":"77ae11f2.cfb43","type":"subflow:2b700e69.140b12","z":"9e4101be.596b58","name":"Timer 1","env":[{"name":"PayloadON","value":"ON","type":"str"},{"name":"PayloadOFF","value":"OFF","type":"str"}],"x":430,"y":100,"wires":[["156904d5.316723"]],"icon":"node-red/cog.svg"},{"id":"cb137c89.e8874","type":"ui_switch","z":"9e4101be.596b58","name":"","label":"Sun","group":"a04ff3db.7128b","order":13,"width":"2","height":"1","passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":550,"y":800,"wires":[["f068c12d.a45f2"]]},{"id":"ee2b9af1.599fb8","type":"debug","z":"9e4101be.596b58","name":"","active":true,"tosidebar":true,"console":true,"tostatus":true,"complete":"true","targetType":"full","x":1380,"y":440,"wires":[]},{"id":"a04ff3db.7128b","type":"ui_group","z":"","name":"Evening","tab":"e5a38717.72e7c","order":2,"disp":true,"width":"6","collapse":false},{"id":"e5a38717.72e7c","type":"ui_tab","z":"","name":"Entry Light","icon":"dashboard","order":9}]

Maybe this will help a little while I look at your flows. This flow will set timer to start in one minute then turn off one minute later.

[{"id":"4cc1efbf.24162","type":"schedex","z":"5ed23175.7ea6b8","name":"schedule","passthroughunhandled":false,"suspended":false,"lat":"50.30","lon":"-116.2","ontime":"sunrise","ontopic":"onTopic","onpayload":"on","onoffset":0,"onrandomoffset":0,"offtime":"sunset","offtopic":"offTopic","offpayload":"off","offoffset":0,"offrandomoffset":0,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"sun":true,"x":440,"y":140,"wires":[["5829f380.6fd71c"]]},{"id":"48a6be8.7be304","type":"inject","z":"5ed23175.7ea6b8","name":"on","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":"1","x":110,"y":140,"wires":[["d7dc9135.185f48"]]},{"id":"5829f380.6fd71c","type":"debug","z":"5ed23175.7ea6b8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":750,"y":140,"wires":[]},{"id":"d7dc9135.185f48","type":"function","z":"5ed23175.7ea6b8","name":"on","func":"let currentDate = new Date();\nlet day = currentDate.getDate();\nlet month = currentDate.getMonth() + 1;\nlet year = currentDate.getFullYear();\n\nlet currentTime = new Date();\nlet hours = currentTime.getHours();\nlet minutes = currentTime.getMinutes();\nlet seconds = currentTime.getSeconds();\nif (minutes < 10) {\n\t minutes = \"0\" + minutes;\n}\nif (seconds < 10) {\n    seconds = \"0\" + seconds;\n}\nlet z = hours + ':' + minutes + ':' + seconds;\nminutes = minutes + 2;\nlet w = hours + ':' + minutes;\nnode.status({fill:\"blue\",shape:\"dot\",text:w});\n\nontime = w;\n//clean up the msg.payload object\nmsg.payload = {};\n//setting ontime\nmsg.payload.ontime = ontime;\n//add other properties \n\nreturn msg;","outputs":1,"noerr":0,"x":250,"y":140,"wires":[["4cc1efbf.24162"]]},{"id":"eea7bd98.b6c548","type":"function","z":"5ed23175.7ea6b8","name":"off","func":"let currentDate = new Date();\nlet day = currentDate.getDate();\nlet month = currentDate.getMonth() + 1;\nlet year = currentDate.getFullYear();\n\nlet currentTime = new Date();\nlet hours = currentTime.getHours();\nlet minutes = currentTime.getMinutes();\nlet seconds = currentTime.getSeconds();\nif (minutes < 10) {\n\t minutes = \"0\" + minutes;\n}\nif (seconds < 10) {\n    seconds = \"0\" + seconds;\n}\nlet z = hours + ':' + minutes + ':' + seconds;\nminutes = minutes + 3;\nlet w = hours + ':' + minutes;\n\nnode.status({fill:\"blue\",shape:\"dot\",text:w});\n\nofftime = w;\n//clean up the msg.payload object\nmsg.payload = {};\n//setting ontime\nmsg.payload.offtime = offtime;\n//add other properties \n\nreturn msg;","outputs":1,"noerr":0,"x":250,"y":220,"wires":[["4cc1efbf.24162"]]},{"id":"40954924.edcd38","type":"inject","z":"5ed23175.7ea6b8","name":"off","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":"2","x":110,"y":220,"wires":[["eea7bd98.b6c548"]]},{"id":"b1ea8099.cbd26","type":"function","z":"5ed23175.7ea6b8","name":"Time","func":"let currentDate = new Date();\nlet day = currentDate.getDate();\nlet month = currentDate.getMonth() + 1;\nlet year = currentDate.getFullYear();\n\nlet currentTime = new Date();\nlet hours = currentTime.getHours();\nlet minutes = currentTime.getMinutes();\nlet seconds = currentTime.getSeconds();\nif (minutes < 10) {\n\t minutes = \"0\" + minutes;\n}\nif (seconds < 10) {\n    seconds = \"0\" + seconds;\n}\nlet z = hours + ':' + minutes + ':' + seconds;\n\nmsg.payload = z;\nnode.status({fill:\"blue\",shape:\"dot\",text:msg.payload});\nreturn msg;","outputs":1,"noerr":0,"x":430,"y":340,"wires":[[]]},{"id":"5123fa1d.58004c","type":"inject","z":"5ed23175.7ea6b8","name":"","topic":"","payload":"1","payloadType":"num","repeat":"1","crontab":"","once":true,"onceDelay":0.1,"x":90,"y":340,"wires":[["b1ea8099.cbd26"]]}]

Just to be clear can you ask your question again? After looking at your flow when the timer fires you get an undefined payload on the debug node and a payload of "off", when the timer turns off you get an undefined payload. Is that not what you see? If that is the case you will need to define what your on payload should be and your off payload and make sure your code sets that.

it's exactly my problem.
I don't see where or how to define payloadOn and payloadOff.
If I read the documentation just give a timer number
and define the payloadOn and the payloadOff.
I tried to define this data by several places but always without success.

try this, it will set the time for a timer one minute from deploy then off in one more minute. It sets on topic and the day. This should demonstrate the different types of messages you need to send to the timer. From here you should be able to go through your code and set the messages you need.

[{"id":"4cc1efbf.24162","type":"schedex","z":"5ed23175.7ea6b8","name":"schedule","passthroughunhandled":false,"suspended":false,"lat":"50.30","lon":"-116.2","ontime":"sunrise","ontopic":"onTopic","onpayload":"on","onoffset":0,"onrandomoffset":0,"offtime":"sunset","offtopic":"offTopic","offpayload":"off","offoffset":0,"offrandomoffset":0,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"sun":true,"x":440,"y":140,"wires":[["5829f380.6fd71c"]]},{"id":"48a6be8.7be304","type":"inject","z":"5ed23175.7ea6b8","name":"on","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":"1","x":110,"y":140,"wires":[["d7dc9135.185f48"]]},{"id":"5829f380.6fd71c","type":"debug","z":"5ed23175.7ea6b8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":750,"y":140,"wires":[]},{"id":"d7dc9135.185f48","type":"function","z":"5ed23175.7ea6b8","name":"on","func":"let currentDate = new Date();\nlet day = currentDate.getDate();\nlet month = currentDate.getMonth() + 1;\nlet year = currentDate.getFullYear();\n\nlet currentTime = new Date();\nlet hours = currentTime.getHours();\nlet minutes = currentTime.getMinutes();\nlet seconds = currentTime.getSeconds();\nif (minutes < 10) {\n\t minutes = \"0\" + minutes;\n}\nif (seconds < 10) {\n    seconds = \"0\" + seconds;\n}\nlet z = hours + ':' + minutes + ':' + seconds;\nminutes = minutes + 2;\nlet w = hours + ':' + minutes;\nnode.status({fill:\"blue\",shape:\"dot\",text:w});\n\nontime = w;\n//clean up the msg.payload object\nmsg.payload = {};\n//setting ontime\nmsg.payload.ontime = ontime;\n//add other properties \n\nreturn msg;","outputs":1,"noerr":0,"x":250,"y":140,"wires":[["4cc1efbf.24162"]]},{"id":"eea7bd98.b6c548","type":"function","z":"5ed23175.7ea6b8","name":"off","func":"let currentDate = new Date();\nlet day = currentDate.getDate();\nlet month = currentDate.getMonth() + 1;\nlet year = currentDate.getFullYear();\n\nlet currentTime = new Date();\nlet hours = currentTime.getHours();\nlet minutes = currentTime.getMinutes();\nlet seconds = currentTime.getSeconds();\nif (minutes < 10) {\n\t minutes = \"0\" + minutes;\n}\nif (seconds < 10) {\n    seconds = \"0\" + seconds;\n}\nlet z = hours + ':' + minutes + ':' + seconds;\nminutes = minutes + 3;\nlet w = hours + ':' + minutes;\n\nnode.status({fill:\"blue\",shape:\"dot\",text:w});\n\nofftime = w;\n//clean up the msg.payload object\nmsg.payload = {};\n//setting ontime\nmsg.payload.offtime = offtime;\n//add other properties \n\nreturn msg;","outputs":1,"noerr":0,"x":250,"y":220,"wires":[["4cc1efbf.24162"]]},{"id":"40954924.edcd38","type":"inject","z":"5ed23175.7ea6b8","name":"off","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":"2","x":110,"y":220,"wires":[["eea7bd98.b6c548"]]},{"id":"b1ea8099.cbd26","type":"function","z":"5ed23175.7ea6b8","name":"Time","func":"let currentDate = new Date();\nlet day = currentDate.getDate();\nlet month = currentDate.getMonth() + 1;\nlet year = currentDate.getFullYear();\n\nlet currentTime = new Date();\nlet hours = currentTime.getHours();\nlet minutes = currentTime.getMinutes();\nlet seconds = currentTime.getSeconds();\nif (minutes < 10) {\n\t minutes = \"0\" + minutes;\n}\nif (seconds < 10) {\n    seconds = \"0\" + seconds;\n}\nlet z = hours + ':' + minutes + ':' + seconds;\n\nmsg.payload = z;\nnode.status({fill:\"blue\",shape:\"dot\",text:msg.payload});\nreturn msg;","outputs":1,"noerr":0,"x":970,"y":240,"wires":[[]]},{"id":"5123fa1d.58004c","type":"inject","z":"5ed23175.7ea6b8","name":"","topic":"","payload":"1","payloadType":"num","repeat":"1","crontab":"","once":true,"onceDelay":0.1,"x":630,"y":240,"wires":[["b1ea8099.cbd26"]]},{"id":"df01aefd.d81e78","type":"function","z":"5ed23175.7ea6b8","name":"msg payload on","func":"let on = 'timeron';\n//clean up the msg.payload object\nmsg.payload = {};\n//setting ontime\nmsg.payload.onpayload = on;\n//add other properties \nnode.status({fill:\"blue\",shape:\"dot\",text:msg.payload.onpayload});\n\nreturn msg;","outputs":1,"noerr":0,"x":340,"y":300,"wires":[["4cc1efbf.24162"]]},{"id":"6431d99f.c3f9d","type":"inject","z":"5ed23175.7ea6b8","name":"on payload","topic":"on payload","payload":"1","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":"3","x":110,"y":300,"wires":[["df01aefd.d81e78"]]},{"id":"47c6e78.21a8b98","type":"inject","z":"5ed23175.7ea6b8","name":"off payload","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":"4","x":130,"y":360,"wires":[["5e1dcc9a.2621c4"]]},{"id":"5e1dcc9a.2621c4","type":"function","z":"5ed23175.7ea6b8","name":"msg payload off","func":"let off = 'timeroff';\n//clean up the msg.payload object\nmsg.payload = {};\n//setting ontime\nmsg.payload.offpayload = off;\n//add other properties \nnode.status({fill:\"blue\",shape:\"dot\",text:msg.payload.offpayload});\n\nreturn msg;\n","outputs":1,"noerr":0,"x":340,"y":360,"wires":[["4cc1efbf.24162"]]},{"id":"8ee889f7.62c4b8","type":"inject","z":"5ed23175.7ea6b8","name":"set day sunday","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":"6","x":120,"y":440,"wires":[["94d3e2b7.510cd"]]},{"id":"94d3e2b7.510cd","type":"function","z":"5ed23175.7ea6b8","name":"set sunday","func":"\nmsg.payload = {};\n//setting ontime\nmsg.payload.sun = true;\n//add other properties \nnode.status({fill:\"blue\",shape:\"dot\",text:msg.payload.sun});\n\nreturn msg;\n","outputs":1,"noerr":0,"x":350,"y":440,"wires":[["4cc1efbf.24162"]]},{"id":"fb609b65.8a70b","type":"function","z":"5ed23175.7ea6b8","name":"msg topic on","func":"\nmsg.payload = {};\n//setting ontime\nmsg.payload.ontopic = 'setTopicOn';\n//add other properties \nnode.status({fill:\"blue\",shape:\"dot\",text:msg.payload.ontopic});\n\nreturn msg;","outputs":1,"noerr":0,"x":400,"y":540,"wires":[["4cc1efbf.24162"]]},{"id":"174bd1cf.09a32e","type":"inject","z":"5ed23175.7ea6b8","name":"set on topic","topic":"set topic on","payload":"1","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":"7","x":130,"y":540,"wires":[["fb609b65.8a70b"]]}]

hello
all is right now, some variables in timer flow where wrong.
thanks for your help.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.