Externally Adjustable Scheduler

Externally Adjustable Scheduler

todo : description

[{"id":"1997fcbc.c84d73","type":"tab","label":"Timer","disabled":false,"info":""},{"id":"44ecf87a.9d10a","type":"schedex","z":"1997fcbc.c84d73","name":"Mon","suspended":false,"lat":"","lon":"","ontime":"07:28","ontopic":"","onpayload":"Mon On","onoffset":0,"onrandomoffset":0,"offtime":"","offtopic":"","offpayload":"Mon Off","offoffset":0,"offrandomoffset":0,"mon":true,"tue":false,"wed":false,"thu":false,"fri":false,"sat":false,"sun":false,"x":1070,"y":460,"wires":[["b3e3466.5c183b8"]]},{"id":"6b3325ba.72f7fc","type":"function","z":"1997fcbc.c84d73","name":"buffer-to-string","func":"msg.payload = msg.payload.toString('utf-8');\nreturn msg;","outputs":1,"noerr":0,"x":460,"y":780,"wires":[["d4ce7ef6.afbc5"]]},{"id":"b3e3466.5c183b8","type":"tcp out","z":"1997fcbc.c84d73","host":"192.168.1.12","port":"7000","beserver":"client","base64":false,"end":false,"name":"test device","x":1650,"y":760,"wires":[]},{"id":"713e1759.6aa4b","type":"tcp in","z":"1997fcbc.c84d73","name":"","server":"server","host":"","port":"7001","datamode":"stream","datatype":"buffer","newline":"\\n","topic":"","base64":false,"x":280,"y":780,"wires":[["6b3325ba.72f7fc"]]},{"id":"bac572a1.0c5a8","type":"file in","z":"1997fcbc.c84d73","name":"","filename":"C:\\mon-on-time.txt","format":"utf8","chunk":false,"sendError":false,"x":790,"y":340,"wires":[["44ecf87a.9d10a"]]},{"id":"6a6cb84a.8d4148","type":"inject","z":"1997fcbc.c84d73","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"x":571,"y":340,"wires":[["bac572a1.0c5a8"]]},{"id":"92cc1470.ea9c88","type":"file in","z":"1997fcbc.c84d73","name":"","filename":"C:\\mon-off-time.txt","format":"utf8","chunk":false,"sendError":false,"x":788,"y":375,"wires":[["44ecf87a.9d10a"]]},{"id":"50291dc4.86912c","type":"inject","z":"1997fcbc.c84d73","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"x":569,"y":375,"wires":[["92cc1470.ea9c88"]]},{"id":"62090be7.6fd5d4","type":"file","z":"1997fcbc.c84d73","name":"","filename":"C:\\mon-on-time.txt","appendNewline":false,"createDir":false,"overwriteFile":"true","x":1290,"y":400,"wires":[]},{"id":"6820a0cf.4b7c2","type":"file","z":"1997fcbc.c84d73","name":"","filename":"C:\\mon-off-time.txt","appendNewline":false,"createDir":false,"overwriteFile":"true","x":1290,"y":440,"wires":[]},{"id":"4265f630.67277","type":"schedex","z":"1997fcbc.c84d73","name":"Tue","suspended":false,"lat":"","lon":"","ontime":"07:28","ontopic":"","onpayload":"Tue On","onoffset":0,"onrandomoffset":0,"offtime":"","offtopic":"","offpayload":"Tue Off","offoffset":0,"offrandomoffset":0,"mon":false,"tue":true,"wed":false,"thu":false,"fri":false,"sat":false,"sun":false,"x":1070,"y":580,"wires":[["b3e3466.5c183b8"]]},{"id":"17790ad8.59cd25","type":"schedex","z":"1997fcbc.c84d73","name":"Wed","suspended":false,"lat":"","lon":"","ontime":"07:28","ontopic":"","onpayload":"Wed On","onoffset":0,"onrandomoffset":0,"offtime":"","offtopic":"","offpayload":"Wed Off","offoffset":0,"offrandomoffset":0,"mon":false,"tue":false,"wed":true,"thu":false,"fri":false,"sat":false,"sun":false,"x":1070,"y":720,"wires":[["b3e3466.5c183b8"]]},{"id":"d63a8b3a.b25a08","type":"schedex","z":"1997fcbc.c84d73","name":"Thu","suspended":false,"lat":"","lon":"","ontime":"07:28","ontopic":"","onpayload":"Thu On","onoffset":0,"onrandomoffset":0,"offtime":"","offtopic":"","offpayload":"Thu Off","offoffset":0,"offrandomoffset":0,"mon":false,"tue":false,"wed":false,"thu":true,"fri":false,"sat":false,"sun":false,"x":1070,"y":860,"wires":[["b3e3466.5c183b8"]]},{"id":"ffcd71f0.547fb8","type":"schedex","z":"1997fcbc.c84d73","name":"Fri","suspended":false,"lat":"","lon":"","ontime":"07:28","ontopic":"","onpayload":"Fri On","onoffset":0,"onrandomoffset":0,"offtime":"","offtopic":"","offpayload":"Fri Off","offoffset":0,"offrandomoffset":0,"mon":false,"tue":false,"wed":false,"thu":false,"fri":true,"sat":false,"sun":false,"x":1070,"y":1000,"wires":[["b3e3466.5c183b8"]]},{"id":"d4ce7ef6.afbc5","type":"switch","z":"1997fcbc.c84d73","name":"day?","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"mon","vt":"str"},{"t":"cont","v":"tue","vt":"str"},{"t":"cont","v":"wed","vt":"str"},{"t":"cont","v":"thu","vt":"str"},{"t":"cont","v":"fri","vt":"str"}],"checkall":"true","outputs":5,"x":630,"y":780,"wires":[["27af7f8.7e715"],["c789ee58.e72ff"],["a13ec862.7f5858"],["b179c831.bb8228"],["7542d54a.5aee9c"]]},{"id":"27af7f8.7e715","type":"function","z":"1997fcbc.c84d73","name":"remove mon","func":"msg.payload = msg.payload.replace(\"mon \", \"\");\nreturn msg;","outputs":1,"noerr":0,"x":830,"y":740,"wires":[["44ecf87a.9d10a","2685909f.94aa68"]]},{"id":"2685909f.94aa68","type":"switch","z":"1997fcbc.c84d73","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"ontime","vt":"str"},{"t":"cont","v":"offtime","vt":"str"}],"checkall":"true","outputs":2,"x":1050,"y":420,"wires":[["62090be7.6fd5d4"],["6820a0cf.4b7c2"]]},{"id":"91d6bc9f.412e08","type":"file in","z":"1997fcbc.c84d73","name":"","filename":"C:\\tue-on-time.txt","format":"utf8","chunk":false,"sendError":false,"x":790,"y":460,"wires":[["4265f630.67277"]]},{"id":"408015d0.ffb364","type":"inject","z":"1997fcbc.c84d73","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"x":571,"y":460,"wires":[["91d6bc9f.412e08"]]},{"id":"61ee3cf1.48aacc","type":"file in","z":"1997fcbc.c84d73","name":"","filename":"C:\\tue-off-time.txt","format":"utf8","chunk":false,"sendError":false,"x":788,"y":495,"wires":[["4265f630.67277"]]},{"id":"3920ab14.aea664","type":"inject","z":"1997fcbc.c84d73","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"x":569,"y":495,"wires":[["61ee3cf1.48aacc"]]},{"id":"c789ee58.e72ff","type":"function","z":"1997fcbc.c84d73","name":"remove tue","func":"msg.payload = msg.payload.replace(\"tue \", \"\");\nreturn msg;","outputs":1,"noerr":0,"x":830,"y":780,"wires":[["ac78d619.70a37","4265f630.67277"]]},{"id":"ac78d619.70a37","type":"switch","z":"1997fcbc.c84d73","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"ontime","vt":"str"},{"t":"cont","v":"offtime","vt":"str"}],"checkall":"true","outputs":2,"x":1050,"y":540,"wires":[["13f17aa0.319485"],["7092937a.93cca4"]]},{"id":"13f17aa0.319485","type":"file","z":"1997fcbc.c84d73","name":"","filename":"C:\\tue-on-time.txt","appendNewline":false,"createDir":false,"overwriteFile":"true","x":1290,"y":520,"wires":[]},{"id":"7092937a.93cca4","type":"file","z":"1997fcbc.c84d73","name":"","filename":"C:\\tue-off-time.txt","appendNewline":false,"createDir":false,"overwriteFile":"true","x":1290,"y":560,"wires":[]},{"id":"a13ec862.7f5858","type":"function","z":"1997fcbc.c84d73","name":"remove wed","func":"msg.payload = msg.payload.replace(\"wed \", \"\");\nreturn msg;","outputs":1,"noerr":0,"x":830,"y":820,"wires":[["45aa69a9.b0c73","17790ad8.59cd25"]]},{"id":"e64a9aeb.945e1","type":"file in","z":"1997fcbc.c84d73","name":"","filename":"C:\\wed-on-time.txt","format":"utf8","chunk":false,"sendError":false,"x":790,"y":580,"wires":[["17790ad8.59cd25"]]},{"id":"61633393.60a784","type":"inject","z":"1997fcbc.c84d73","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"x":571,"y":580,"wires":[["e64a9aeb.945e1"]]},{"id":"57052.45e97faec","type":"file in","z":"1997fcbc.c84d73","name":"","filename":"C:\\wed-off-time.txt","format":"utf8","chunk":false,"sendError":false,"x":788,"y":615,"wires":[["17790ad8.59cd25"]]},{"id":"d3c51fcd.1a6338","type":"inject","z":"1997fcbc.c84d73","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"x":569,"y":615,"wires":[["57052.45e97faec"]]},{"id":"1205eb9b.751eec","type":"file","z":"1997fcbc.c84d73","name":"","filename":"C:\\wed-on-time.txt","appendNewline":false,"createDir":false,"overwriteFile":"true","x":1290,"y":660,"wires":[]},{"id":"a5c7876.89cf1f8","type":"file","z":"1997fcbc.c84d73","name":"","filename":"C:\\wed-off-time.txt","appendNewline":false,"createDir":false,"overwriteFile":"true","x":1290,"y":700,"wires":[]},{"id":"45aa69a9.b0c73","type":"switch","z":"1997fcbc.c84d73","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"ontime","vt":"str"},{"t":"cont","v":"offtime","vt":"str"}],"checkall":"true","outputs":2,"x":1050,"y":680,"wires":[["1205eb9b.751eec"],["a5c7876.89cf1f8"]]},{"id":"b179c831.bb8228","type":"function","z":"1997fcbc.c84d73","name":"remove thu","func":"msg.payload = msg.payload.replace(\"thu \", \"\");\nreturn msg;","outputs":1,"noerr":0,"x":830,"y":860,"wires":[["a40e8e78.a5558","d63a8b3a.b25a08"]]},{"id":"7c20bedc.c0bb2","type":"file in","z":"1997fcbc.c84d73","name":"","filename":"C:\\thu-on-time.txt","format":"utf8","chunk":false,"sendError":false,"x":790,"y":980,"wires":[["d63a8b3a.b25a08"]]},{"id":"aa7dc7e4.dc9f2","type":"inject","z":"1997fcbc.c84d73","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"x":571,"y":980,"wires":[["7c20bedc.c0bb2"]]},{"id":"a057e96a.92f508","type":"file in","z":"1997fcbc.c84d73","name":"","filename":"C:\\thu-off-time.txt","format":"utf8","chunk":false,"sendError":false,"x":788,"y":1015,"wires":[["d63a8b3a.b25a08"]]},{"id":"fc35a7.29f59a58","type":"inject","z":"1997fcbc.c84d73","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"x":569,"y":1015,"wires":[["a057e96a.92f508"]]},{"id":"9dc575c0.2f7f18","type":"file","z":"1997fcbc.c84d73","name":"","filename":"C:\\thu-on-time.txt","appendNewline":false,"createDir":false,"overwriteFile":"true","x":1290,"y":800,"wires":[]},{"id":"5e27fe20.7456e","type":"file","z":"1997fcbc.c84d73","name":"","filename":"C:\\thu-off-time.txt","appendNewline":false,"createDir":false,"overwriteFile":"true","x":1290,"y":840,"wires":[]},{"id":"a40e8e78.a5558","type":"switch","z":"1997fcbc.c84d73","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"ontime","vt":"str"},{"t":"cont","v":"offtime","vt":"str"}],"checkall":"true","outputs":2,"x":1050,"y":820,"wires":[["9dc575c0.2f7f18"],["5e27fe20.7456e"]]},{"id":"95370f9c.71e29","type":"file in","z":"1997fcbc.c84d73","name":"","filename":"C:\\fri-on-time.txt","format":"utf8","chunk":false,"sendError":false,"x":790,"y":1100,"wires":[["ffcd71f0.547fb8"]]},{"id":"4368cca5.0c2acc","type":"inject","z":"1997fcbc.c84d73","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"x":571,"y":1100,"wires":[["95370f9c.71e29"]]},{"id":"611c04a4.fba95c","type":"file in","z":"1997fcbc.c84d73","name":"","filename":"C:\\fri-off-time.txt","format":"utf8","chunk":false,"sendError":false,"x":788,"y":1135,"wires":[["ffcd71f0.547fb8"]]},{"id":"c81ec444.470de","type":"inject","z":"1997fcbc.c84d73","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"x":569,"y":1135,"wires":[["611c04a4.fba95c"]]},{"id":"d3452575.3d6af8","type":"file","z":"1997fcbc.c84d73","name":"","filename":"C:\\fri-on-time.txt","appendNewline":false,"createDir":false,"overwriteFile":"true","x":1290,"y":940,"wires":[]},{"id":"32808a2b.0de17e","type":"file","z":"1997fcbc.c84d73","name":"","filename":"C:\\fri-off-time.txt","appendNewline":false,"createDir":false,"overwriteFile":"true","x":1290,"y":980,"wires":[]},{"id":"a98752d2.e20bb","type":"switch","z":"1997fcbc.c84d73","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"ontime","vt":"str"},{"t":"cont","v":"offtime","vt":"str"}],"checkall":"true","outputs":2,"x":1050,"y":960,"wires":[["d3452575.3d6af8"],["32808a2b.0de17e"]]},{"id":"7542d54a.5aee9c","type":"function","z":"1997fcbc.c84d73","name":"remove fri","func":"msg.payload = msg.payload.replace(\"fri \", \"\");\nreturn msg;","outputs":1,"noerr":0,"x":820,"y":900,"wires":[["a98752d2.e20bb"]]},{"id":"34cb3fb1.ee9268","type":"comment","z":"1997fcbc.c84d73","name":"Note","info":"All on/off schedule files are saved in drive C.","x":530,"y":260,"wires":[]}]

Flow Info

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

Owner

Actions

Rate:

Node Types

Core
  • comment (x1)
  • file (x10)
  • file in (x10)
  • function (x6)
  • inject (x10)
  • switch (x6)
  • tcp in (x1)
  • tcp out (x1)
Other

Tags

  • schedex
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option