Eztimer node configurer

Hello, I am a newbie on node-red. I try to use Eztimer node for timer but the debugger sends the comment not suitable for my code. for example, I turn off the schedule for Thursday It send back the string"Scheduled 'ON' (time of day) for Mon Jul 20, 2020, 15:14:20 GMT+0700".

[{"id":"c731efe.bfd0f1","type":"tab","label":"Timer2","disabled":false,"info":""},{"id":"5ee3e31d.7fb11c","type":"ui_text_input","z":"c731efe.bfd0f1","name":"Off Time","label":"Hẹn giờ tắt","tooltip":"","group":"cd83cd75.5b19c","order":5,"width":3,"height":1,"passthru":true,"mode":"text","delay":300,"topic":"off_time","x":60,"y":360,"wires":[["d675eaaf.f1d558"]]},{"id":"54e9a046.e4987","type":"eztimer","z":"c731efe.bfd0f1","name":"","debug":true,"autoname":" - ","tag":"eztimer","suspended":false,"sendEventsOnSuspend":false,"lat":"21.02422","lon":"105.79562","timerType":"1","startupMessage":false,"ontype":"2","ontimesun":"dawn","ontimetod":"","onpropertytype":"msg","onproperty":"payload","onvaluetype":"num","onvalue":1,"onoffset":"0","onrandomoffset":0,"onsuppressrepeats":false,"offtype":"2","offtimesun":"dusk","offtimetod":"","offduration":"00:01:00","offpropertytype":"msg","offproperty":"payload","offvaluetype":"num","offvalue":0,"offoffset":0,"offrandomoffset":0,"offsuppressrepeats":false,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"sun":true,"x":510,"y":300,"wires":[["3c57f3af.50cbac","740028a2.a819b8"]]},{"id":"b325ab72.acb4c8","type":"ui_text","z":"c731efe.bfd0f1","group":"cd83cd75.5b19c","order":9,"width":6,"height":1,"name":"Switch State","label":"Debug window","format":"{{msg.payload}}","layout":"row-spread","x":530,"y":380,"wires":},{"id":"87883135.a16d8","type":"ui_text_input","z":"c731efe.bfd0f1","name":"On Time","label":"Hẹn giờ bật","tooltip":"","group":"cd83cd75.5b19c","order":4,"width":3,"height":1,"passthru":true,"mode":"text","delay":"300","topic":"on_time","x":60,"y":320,"wires":[["d675eaaf.f1d558"]]},{"id":"619bef5.333bb1","type":"ui_button","z":"c731efe.bfd0f1","name":"Submit","group":"cd83cd75.5b19c","order":7,"width":6,"height":1,"passthru":false,"label":"Xác nhận","tooltip":"","color":"","bgcolor":"","icon":"","payload":"1","payloadType":"str","topic":"submit","x":60,"y":400,"wires":[["d675eaaf.f1d558"]]},{"id":"d675eaaf.f1d558","type":"function","z":"c731efe.bfd0f1","name":"Main","func":"var payload=msg.payload;\nvar topic=msg.topic;\n\nfunction checktime(time)\n{\n var error_flag=false;\n var a=time.split(":"); \n node.log(a)\n if(a.length <2)\n error_flag=true;\n if(parseInt(a[0])>23)\n error_flag=true;\n if(parseInt(a[1])>=60)\n error_flag=true;\n if(parseInt(a[2])>=60)\n error_flag=true;\n\nreturn error_flag; \n}\nif (topic=="on_time")\n{\n flow.set("on_time",msg.payload);\n \n \n}\nif (topic=="off_time")\n \n{\n flow.set("off_time",msg.payload);\n\n}\nif (topic=="submit")\n \n{\n var on_time= flow.get("on_time");\n var off_time= flow.get("off_time");\n var error_flag=false;\n if(checktime(on_time)) //ok\n error_flag=true;\n if(checktime(off_time)) //ok\n error_flag=true;\n \n\n\n if(!error_flag)\n {\n newpayload={};\n newpayload.ontime=on_time;\n newpayload.offtime=off_time;\n msg.payload=newpayload;\n var msg2={};\n msg2.payload=" Đặt timer thành công ";\n return[msg,msg2];\n}\nelse\n{\n var msg1={};\n msg1.payload="Bạn nhập sai định dạng UTP";\n return [null,msg1]; \n}\n}","outputs":2,"noerr":0,"x":290,"y":340,"wires":[["54e9a046.e4987"],["b325ab72.acb4c8"]]},{"id":"29cbec57.e573d4","type":"inject","z":"c731efe.bfd0f1","name":"","topic":"","payload":"","payloadType":"date","repeat":"1","crontab":"","once":true,"onceDelay":0.1,"x":110,"y":760,"wires":[["2d5127a2.1908e8"]]},{"id":"2d5127a2.1908e8","type":"function","z":"c731efe.bfd0f1","name":"Format Time","func":"\nvar d =new Date(msg.payload);\nmsg.payload=d.getHours()+":"+d.getMinutes()+":"+d.getSeconds();\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":740,"wires":[["6dc2d1fc.414f6"]]},{"id":"6dc2d1fc.414f6","type":"ui_text","z":"c731efe.bfd0f1","group":"cd83cd75.5b19c","order":2,"width":4,"height":1,"name":"Current Time","label":"Đồng hồ","format":"{{msg.payload}}","layout":"row-spread","x":530,"y":780,"wires":},{"id":"c20e6acb.955338","type":"ui_button","z":"c731efe.bfd0f1","name":"Start/Stop","group":"b21f3262.f21fc","order":11,"width":2,"height":1,"passthru":false,"label":"Swich","tooltip":"","color":"","bgcolor":"{{colour}}","icon":"fa-bullseye ","payload":"1","payloadType":"str","topic":"Start/Stop","x":620,"y":620,"wires":[["8da5b45b.a71548","29d559aa.f17b76"]]},{"id":"8da5b45b.a71548","type":"function","z":"c731efe.bfd0f1","name":"switch button","func":"var x = msg.payload;\nvar count=context.get('counter') || 0;\nif (x =='1'){\n count += 1;\n}\nelse {\n count -= 1;\n}\n x= count;\ncontext.set('counter',count);\nvar y=x%2;\nif( y=='0' ) {\n msg= { payload : 1 }\n}\nif (y=='1'){\n msg= { payload: 0 }\n}\n\nreturn msg;","outputs":1,"noerr":0,"x":490,"y":500,"wires":[]},{"id":"3c57f3af.50cbac","type":"modbus-write","z":"c731efe.bfd0f1","name":"bat/tat","showStatusActivities":false,"showErrors":false,"unitid":"","dataType":"Coil","adr":"792","quantity":"1","server":"cdd49c4a.ddd6","x":770,"y":540,"wires":[,]},{"id":"ceb6b081.1f4ce","type":"ui_button","z":"c731efe.bfd0f1","name":"On/Off","group":"b21f3262.f21fc","order":7,"width":2,"height":2,"passthru":false,"label":"{{label}}","tooltip":"","color":"","bgcolor":"{{colour}}","icon":"fa-power-off bigIcon","payload":"1","payloadType":"str","topic":"","x":930,"y":900,"wires":[]},{"id":"84119ff0.0ed39","type":"switch","z":"c731efe.bfd0f1","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":150,"y":600,"wires":[["b1d6be7a.4e3ce"],["242e2624.ae0cba"]]},{"id":"b1d6be7a.4e3ce","type":"change","z":"c731efe.bfd0f1","name":"","rules":[{"t":"set","p":"colour","pt":"msg","to":"green","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":580,"wires":[["c20e6acb.955338"]]},{"id":"29d559aa.f17b76","type":"trigger","z":"c731efe.bfd0f1","op1":"1","op2":"0","op1type":"str","op2type":"str","duration":"500","extend":false,"units":"ms","reset":"","bytopic":"all","name":"","x":220,"y":520,"wires":[["84119ff0.0ed39"]]},{"id":"242e2624.ae0cba","type":"change","z":"c731efe.bfd0f1","name":"","rules":[{"t":"set","p":"colour","pt":"msg","to":"DarkCyan","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":340,"y":660,"wires":[["c20e6acb.955338"]]},{"id":"f690b514.305528","type":"ui_date_picker","z":"c731efe.bfd0f1","name":"","label":"Ngày","group":"cd83cd75.5b19c","order":1,"width":4,"height":1,"passthru":true,"topic":"","x":450,"y":100,"wires":[]},{"id":"a144259f.4b5628","type":"function","z":"c731efe.bfd0f1","name":"","func":"var x=msg.payload;\nvar y={sun:false};\nvar z={sun:true};\nif(x==1)\n{ msg.payload=y}\nif(x===0)\n{msg.payload=z}\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":140,"wires":[["54e9a046.e4987"]]},{"id":"2b4e9824.5ecc68","type":"ui_switch","z":"c731efe.bfd0f1","name":"","label":"Mon","tooltip":"","group":"cd83cd75.5b19c","order":11,"width":2,"height":1,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"1","onvalueType":"num","onicon":"","oncolor":"","offvalue":"0","offvalueType":"num","officon":"","offcolor":"","x":170,"y":140,"wires":[["a144259f.4b5628"]]},{"id":"740028a2.a819b8","type":"debug","z":"c731efe.bfd0f1","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":680,"y":260,"wires":},{"id":"fab5e4dc.5569d8","type":"function","z":"c731efe.bfd0f1","name":"","func":"var x=msg.payload;\nvar y={tue:false};\nvar z={tue:true};\nif(x==1)\n{ msg.payload=z}\nif(x===0)\n{msg.payload=y}\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":200,"wires":[["54e9a046.e4987"]]},{"id":"2908857b.afc1ea","type":"ui_switch","z":"c731efe.bfd0f1","name":"","label":"tue","tooltip":"","group":"cd83cd75.5b19c","order":11,"width":2,"height":1,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"1","onvalueType":"num","onicon":"","oncolor":"","offvalue":"0","offvalueType":"num","officon":"","offcolor":"","x":170,"y":200,"wires":[["fab5e4dc.5569d8"]]},{"id":"5e42cc7b.b11174","type":"function","z":"c731efe.bfd0f1","name":"","func":"var x=msg.payload;\nif(x===0)\n{ msg.payload={thu:false}}\nif(x===1)\n{msg.payload={thu:true}}\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":260,"wires":[["54e9a046.e4987"]]},{"id":"836639aa.c9b1d8","type":"ui_switch","z":"c731efe.bfd0f1","name":"","label":"thu","tooltip":"","group":"cd83cd75.5b19c","order":11,"width":2,"height":1,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"1","onvalueType":"num","onicon":"","oncolor":"","offvalue":"0","offvalueType":"num","officon":"","offcolor":"","x":170,"y":260,"wires":[["5e42cc7b.b11174"]]},{"id":"cece9aa4.db49e8","type":"inject","z":"c731efe.bfd0f1","name":"","topic":"","payload":"info","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":510,"y":160,"wires":[["54e9a046.e4987"]]},{"id":"cd83cd75.5b19c","type":"ui_group","z":"","name":"Hẹn giờ bật tắt","tab":"37ed9127.f8b51e","order":1,"disp":true,"width":10,"collapse":false},{"id":"b21f3262.f21fc","type":"ui_group","z":"","name":"Bảng điều khiển","tab":"a92b9918.690338","order":4,"disp":true,"width":"7","collapse":true},{"id":"cdd49c4a.ddd6","type":"modbus-client","z":"","name":"","clienttype":"tcp","bufferCommands":true,"stateLogEnabled":true,"queueLogEnabled":true,"tcpHost":"192.168.1.41","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttyUSB","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","unit_id":"1","commandDelay":"1","clientTimeout":"1000","reconnectOnTimeout":true,"reconnectTimeout":"2000","parallelUnitIdsAllowed":true},{"id":"37ed9127.f8b51e","type":"ui_tab","z":"","name":"Bảng lịch trình","icon":"dashboard","order":4,"disabled":false,"hidden":false},{"id":"a92b9918.690338","type":"ui_tab","z":"","name":"Bảng điều khiển","icon":"computer","disabled":false,"hidden":false}]

Please read how to post code.

There is a thread on how to do that.

What you posted is not the way.

Look at the top of of the edit screen and look for the </> button.

Click it and paste the cod then.

And....

Why are you using this node? The standard inject node can do what I believe you are wanting to do.

[{"id":"c731efe.bfd0f1","type":"tab","label":"Timer2","disabled":false,"info":""},{"id":"5ee3e31d.7fb11c","type":"ui_text_input","z":"c731efe.bfd0f1","name":"Off Time","label":"Hẹn giờ tắt","tooltip":"","group":"cd83cd75.5b19c","order":5,"width":3,"height":1,"passthru":true,"mode":"text","delay":300,"topic":"off_time","x":60,"y":360,"wires":[["d675eaaf.f1d558"]]},{"id":"54e9a046.e4987","type":"eztimer","z":"c731efe.bfd0f1","name":"","debug":true,"autoname":" - ","tag":"eztimer","suspended":false,"sendEventsOnSuspend":false,"lat":"21.02422","lon":"105.79562","timerType":"1","startupMessage":false,"ontype":"2","ontimesun":"dawn","ontimetod":"","onpropertytype":"msg","onproperty":"payload","onvaluetype":"num","onvalue":1,"onoffset":"0","onrandomoffset":0,"onsuppressrepeats":false,"offtype":"2","offtimesun":"dusk","offtimetod":"","offduration":"00:01:00","offpropertytype":"msg","offproperty":"payload","offvaluetype":"num","offvalue":0,"offoffset":0,"offrandomoffset":0,"offsuppressrepeats":false,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"sun":true,"x":510,"y":300,"wires":[["3c57f3af.50cbac","740028a2.a819b8"]]},{"id":"b325ab72.acb4c8","type":"ui_text","z":"c731efe.bfd0f1","group":"cd83cd75.5b19c","order":9,"width":6,"height":1,"name":"Switch State","label":"Debug window","format":"{{msg.payload}}","layout":"row-spread","x":530,"y":380,"wires":[]},{"id":"87883135.a16d8","type":"ui_text_input","z":"c731efe.bfd0f1","name":"On Time","label":"Hẹn giờ bật","tooltip":"","group":"cd83cd75.5b19c","order":4,"width":3,"height":1,"passthru":true,"mode":"text","delay":"300","topic":"on_time","x":60,"y":320,"wires":[["d675eaaf.f1d558"]]},{"id":"619bef5.333bb1","type":"ui_button","z":"c731efe.bfd0f1","name":"Submit","group":"cd83cd75.5b19c","order":7,"width":6,"height":1,"passthru":false,"label":"Xác nhận","tooltip":"","color":"","bgcolor":"","icon":"","payload":"1","payloadType":"str","topic":"submit","x":60,"y":400,"wires":[["d675eaaf.f1d558"]]},{"id":"d675eaaf.f1d558","type":"function","z":"c731efe.bfd0f1","name":"Main","func":"var payload=msg.payload;\nvar topic=msg.topic;\n\nfunction checktime(time)\n{\n    var error_flag=false;\n   var a=time.split(\":\"); \n   node.log(a)\n   if(a.length <2)\n     error_flag=true;\n   if(parseInt(a[0])>23)\n     error_flag=true;\n   if(parseInt(a[1])>=60)\n     error_flag=true;\n    if(parseInt(a[2])>=60)\n     error_flag=true;\n\nreturn error_flag;  \n}\nif (topic==\"on_time\")\n{\n  flow.set(\"on_time\",msg.payload);\n  \n    \n}\nif (topic==\"off_time\")\n \n{\n     flow.set(\"off_time\",msg.payload);\n\n}\nif (topic==\"submit\")\n \n{\n  var on_time= flow.get(\"on_time\");\n  var off_time= flow.get(\"off_time\");\n  var error_flag=false;\n  if(checktime(on_time)) //ok\n    error_flag=true;\n  if(checktime(off_time)) //ok\n    error_flag=true;\n  \n\n\n  if(!error_flag)\n  {\n      newpayload={};\n      newpayload.ontime=on_time;\n      newpayload.offtime=off_time;\n      msg.payload=newpayload;\n      var msg2={};\n      msg2.payload=\" Đặt timer thành công \";\n   return[msg,msg2];\n}\nelse\n{\n    var msg1={};\n    msg1.payload=\"Bạn nhập sai định dạng UTP\";\n   return [null,msg1]; \n}\n}","outputs":2,"noerr":0,"x":290,"y":340,"wires":[["54e9a046.e4987"],["b325ab72.acb4c8"]]},{"id":"29cbec57.e573d4","type":"inject","z":"c731efe.bfd0f1","name":"","topic":"","payload":"","payloadType":"date","repeat":"1","crontab":"","once":true,"onceDelay":0.1,"x":110,"y":760,"wires":[["2d5127a2.1908e8"]]},{"id":"2d5127a2.1908e8","type":"function","z":"c731efe.bfd0f1","name":"Format Time","func":"\nvar d =new Date(msg.payload);\nmsg.payload=d.getHours()+\":\"+d.getMinutes()+\":\"+d.getSeconds();\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":740,"wires":[["6dc2d1fc.414f6"]]},{"id":"6dc2d1fc.414f6","type":"ui_text","z":"c731efe.bfd0f1","group":"cd83cd75.5b19c","order":2,"width":4,"height":1,"name":"Current Time","label":"Đồng hồ","format":"{{msg.payload}}","layout":"row-spread","x":530,"y":780,"wires":[]},{"id":"c20e6acb.955338","type":"ui_button","z":"c731efe.bfd0f1","name":"Start/Stop","group":"b21f3262.f21fc","order":11,"width":2,"height":1,"passthru":false,"label":"Swich","tooltip":"","color":"","bgcolor":"{{colour}}","icon":"fa-bullseye ","payload":"1","payloadType":"str","topic":"Start/Stop","x":620,"y":620,"wires":[["8da5b45b.a71548","29d559aa.f17b76"]]},{"id":"8da5b45b.a71548","type":"function","z":"c731efe.bfd0f1","name":"switch button","func":"var x = msg.payload;\nvar count=context.get('counter') || 0;\nif (x =='1'){\n    count += 1;\n}\nelse {\n    count -= 1;\n}\n x= count;\ncontext.set('counter',count);\nvar y=x%2;\nif( y=='0' ) {\n   msg= { payload : 1 }\n}\nif (y=='1'){\n    msg= { payload: 0 }\n}\n\nreturn msg;","outputs":1,"noerr":0,"x":490,"y":500,"wires":[[]]},{"id":"3c57f3af.50cbac","type":"modbus-write","z":"c731efe.bfd0f1","name":"bat/tat","showStatusActivities":false,"showErrors":false,"unitid":"","dataType":"Coil","adr":"792","quantity":"1","server":"cdd49c4a.ddd6","x":770,"y":540,"wires":[[],[]]},{"id":"ceb6b081.1f4ce","type":"ui_button","z":"c731efe.bfd0f1","name":"On/Off","group":"b21f3262.f21fc","order":7,"width":2,"height":2,"passthru":false,"label":"{{label}}","tooltip":"","color":"","bgcolor":"{{colour}}","icon":"fa-power-off bigIcon","payload":"1","payloadType":"str","topic":"","x":930,"y":900,"wires":[[]]},{"id":"84119ff0.0ed39","type":"switch","z":"c731efe.bfd0f1","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":150,"y":600,"wires":[["b1d6be7a.4e3ce"],["242e2624.ae0cba"]]},{"id":"b1d6be7a.4e3ce","type":"change","z":"c731efe.bfd0f1","name":"","rules":[{"t":"set","p":"colour","pt":"msg","to":"green","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":580,"wires":[["c20e6acb.955338"]]},{"id":"29d559aa.f17b76","type":"trigger","z":"c731efe.bfd0f1","op1":"1","op2":"0","op1type":"str","op2type":"str","duration":"500","extend":false,"units":"ms","reset":"","bytopic":"all","name":"","x":220,"y":520,"wires":[["84119ff0.0ed39"]]},{"id":"242e2624.ae0cba","type":"change","z":"c731efe.bfd0f1","name":"","rules":[{"t":"set","p":"colour","pt":"msg","to":"DarkCyan","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":340,"y":660,"wires":[["c20e6acb.955338"]]},{"id":"f690b514.305528","type":"ui_date_picker","z":"c731efe.bfd0f1","name":"","label":"Ngày","group":"cd83cd75.5b19c","order":1,"width":4,"height":1,"passthru":true,"topic":"","x":450,"y":100,"wires":[[]]},{"id":"a144259f.4b5628","type":"function","z":"c731efe.bfd0f1","name":"","func":"var x=msg.payload;\nvar y={sun:false};\nvar z={sun:true};\nif(x==1)\n{ msg.payload=y}\nif(x===0)\n{msg.payload=z}\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":140,"wires":[["54e9a046.e4987"]]},{"id":"2b4e9824.5ecc68","type":"ui_switch","z":"c731efe.bfd0f1","name":"","label":"Mon","tooltip":"","group":"cd83cd75.5b19c","order":11,"width":2,"height":1,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"1","onvalueType":"num","onicon":"","oncolor":"","offvalue":"0","offvalueType":"num","officon":"","offcolor":"","x":170,"y":140,"wires":[["a144259f.4b5628"]]},{"id":"740028a2.a819b8","type":"debug","z":"c731efe.bfd0f1","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":680,"y":260,"wires":[]},{"id":"fab5e4dc.5569d8","type":"function","z":"c731efe.bfd0f1","name":"","func":"var x=msg.payload;\nvar y={tue:false};\nvar z={tue:true};\nif(x==1)\n{ msg.payload=z}\nif(x===0)\n{msg.payload=y}\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":200,"wires":[["54e9a046.e4987"]]},{"id":"2908857b.afc1ea","type":"ui_switch","z":"c731efe.bfd0f1","name":"","label":"tue","tooltip":"","group":"cd83cd75.5b19c","order":11,"width":2,"height":1,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"1","onvalueType":"num","onicon":"","oncolor":"","offvalue":"0","offvalueType":"num","officon":"","offcolor":"","x":170,"y":200,"wires":[["fab5e4dc.5569d8"]]},{"id":"5e42cc7b.b11174","type":"function","z":"c731efe.bfd0f1","name":"","func":"var x=msg.payload;\nif(x===0)\n{ msg.payload={thu:false}}\nif(x===1)\n{msg.payload={thu:true}}\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":260,"wires":[["54e9a046.e4987"]]},{"id":"836639aa.c9b1d8","type":"ui_switch","z":"c731efe.bfd0f1","name":"","label":"thu","tooltip":"","group":"cd83cd75.5b19c","order":11,"width":2,"height":1,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"1","onvalueType":"num","onicon":"","oncolor":"","offvalue":"0","offvalueType":"num","officon":"","offcolor":"","x":170,"y":260,"wires":[["5e42cc7b.b11174"]]},{"id":"cece9aa4.db49e8","type":"inject","z":"c731efe.bfd0f1","name":"","topic":"","payload":"info","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":510,"y":160,"wires":[["54e9a046.e4987"]]},{"id":"cd83cd75.5b19c","type":"ui_group","z":"","name":"Hẹn giờ bật tắt","tab":"37ed9127.f8b51e","order":1,"disp":true,"width":10,"collapse":false},{"id":"b21f3262.f21fc","type":"ui_group","z":"","name":"Bảng điều khiển","tab":"a92b9918.690338","order":4,"disp":true,"width":"7","collapse":true},{"id":"cdd49c4a.ddd6","type":"modbus-client","z":"","name":"","clienttype":"tcp","bufferCommands":true,"stateLogEnabled":true,"queueLogEnabled":true,"tcpHost":"192.168.1.41","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttyUSB","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","unit_id":"1","commandDelay":"1","clientTimeout":"1000","reconnectOnTimeout":true,"reconnectTimeout":"2000","parallelUnitIdsAllowed":true},{"id":"37ed9127.f8b51e","type":"ui_tab","z":"","name":"Bảng lịch trình","icon":"dashboard","order":4,"disabled":false,"hidden":false},{"id":"a92b9918.690338","type":"ui_tab","z":"","name":"Bảng điều khiển","icon":"computer","disabled":false,"hidden":false}]

Maybe try node-red-contrib-cron-plus node.

That may be better.

It has two outputs (if selected) and may better suit your needs.

1 Like

But I want to configure the timer by button or text input node on the dashboard can Inject node do it.

The node I suggested supports that.

It also comes with example scripts.

Though it uses inject nodes in the example, the payloads can be put in buttons so you can control it from the Dashboard.

Have a look. I think it has an advantage over the node you are using in that the node I suggested has the option for 2 outputs. I am not sure the node you use does.

2 Likes

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