added failsafe time check of file for water monitoring system vs current time. if the difference equals more than 2 it will stop the program . did this by extracting date from csv then reformatting it to YYYYMMDDHHmm for both csv file and current time. subtracting both values should leave you within 2 minutes of each other.
Code: Select all
[{"id":"7c8093e112804a45","type":"tab","label":"BlueLog","disabled":false,"info":"","env":[]},{"id":"2c0d0dd0f0d3acab","type":"inject","z":"7c8093e112804a45","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"300","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":950,"y":340,"wires":[["6cb061c2583d4350"]]},{"id":"e2e1d73cca438d04","type":"inject","z":"7c8093e112804a45","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"300","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"payload","payloadType":"msg","x":70,"y":380,"wires":[["79e38673010a89f7"]]},{"id":"79e38673010a89f7","type":"file in","z":"7c8093e112804a45","name":"read","filename":"/config/grogreen.csv","format":"lines","chunk":false,"sendError":false,"encoding":"none","allProps":false,"x":190,"y":380,"wires":[["ce3d1fadcee16e47"]]},{"id":"52148dcc131136a3","type":"function","z":"7c8093e112804a45","name":"last line","func":"let lines = msg.payload\nmsg.payload = lines[lines.length - 2]\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":560,"y":380,"wires":[["febfebc6f2f62b36"]]},{"id":"555964b74eb069bf","type":"join","z":"7c8093e112804a45","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":430,"y":380,"wires":[["52148dcc131136a3"]]},{"id":"ce3d1fadcee16e47","type":"csv","z":"7c8093e112804a45","name":"","sep":",","hdrin":"","hdrout":"none","multi":"one","ret":"\\n","temp":"","skip":"0","strings":true,"include_empty_strings":"","include_null_values":"","x":310,"y":380,"wires":[["555964b74eb069bf"]]},{"id":"6cb061c2583d4350","type":"moment","z":"7c8093e112804a45","name":"","topic":"","input":"","inputType":"msg","inTz":"America/New_York","adjAmount":0,"adjType":"days","adjDir":"add","format":"YYYYMMDDHHmm","locale":"C","output":"","outputType":"msg","outTz":"America/New_York","x":1140,"y":340,"wires":[["bca1a7e957f55e97","90c94c6d73037e83"]]},{"id":"b5a022e5c1e3efc7","type":"change","z":"7c8093e112804a45","name":"","rules":[{"t":"set","p":"complete","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1150,"y":380,"wires":[["bca1a7e957f55e97","152aeb34e3af6618"]]},{"id":"14c72076e4ec317d","type":"function","z":"7c8093e112804a45","name":"payload","func":"var content1 = msg.payload[0];\nvar content2 = msg.payload[1];\n\n{\nmsg.payload = (content1 - content2)\n}\n\nreturn msg","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1440,"y":360,"wires":[["006b3dac9984f20d","234d790affd83a5e"]]},{"id":"bca1a7e957f55e97","type":"join","z":"7c8093e112804a45","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"payload","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":1310,"y":360,"wires":[["14c72076e4ec317d","9f63e777a32a2de3"]]},{"id":"febfebc6f2f62b36","type":"change","z":"7c8093e112804a45","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.col1","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":720,"y":380,"wires":[["d948807f3b27cfd4"]]},{"id":"30ec5fc8fe958136","type":"change","z":"7c8093e112804a45","name":"time is out of range","rules":[{"t":"set","p":"payload","pt":"msg","to":"Time Check Failed","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1710,"y":460,"wires":[["633201f33b32a09c"]]},{"id":"d948807f3b27cfd4","type":"moment","z":"7c8093e112804a45","name":"","topic":"","input":"","inputType":"msg","inTz":"America/New_York","adjAmount":0,"adjType":"days","adjDir":"add","format":"YYYYMMDDHHmm","locale":"C","output":"","outputType":"msg","outTz":"America/New_York","x":920,"y":380,"wires":[["b5a022e5c1e3efc7"]]},{"id":"006b3dac9984f20d","type":"switch","z":"7c8093e112804a45","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"null","vt":"num"},{"t":"lte","v":"2","vt":"num"},{"t":"gte","v":"3","vt":"num"}],"checkall":"true","repair":false,"outputs":3,"x":1570,"y":360,"wires":[["cede1563199c4142"],["cede1563199c4142","7c68693e12ac2a28"],["30ec5fc8fe958136","cef0547fdff41564"]]},{"id":"33574a61cfea1dc3","type":"api-call-service","z":"7c8093e112804a45","name":"ch8 on","server":"a52fadfc.d75d","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.10013b653f_4","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2350,"y":180,"wires":[["19f123e90b79f7e5"]]},{"id":"bdff6f8d892a2c12","type":"api-call-service","z":"7c8093e112804a45","name":"ch8 off","server":"a52fadfc.d75d","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.10013b653f_4","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2610,"y":180,"wires":[["2fb23ec7b2522ee0"]]},{"id":"19f123e90b79f7e5","type":"delay","z":"7c8093e112804a45","name":"","pauseType":"delay","timeout":"3","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":2480,"y":180,"wires":[["bdff6f8d892a2c12"]]},{"id":"ff83731bc7056e8d","type":"change","z":"7c8093e112804a45","name":"1131","rules":[{"t":"set","p":"payload.col4","pt":"msg","to":"System Msg (1121): Ppm's went below 1300, dosing system activated","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":2770,"y":560,"wires":[["56f343f4e30fc792"]]},{"id":"854c7eb8d6c4de14","type":"api-call-service","z":"7c8093e112804a45","name":"ch1","server":"a52fadfc.d75d","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.1001207d06_1","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2350,"y":540,"wires":[["13e09ef12012dfc5"]]},{"id":"6f9688795f49a65a","type":"api-call-service","z":"7c8093e112804a45","name":"ch 2","server":"a52fadfc.d75d","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.1001207d06_2","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2350,"y":600,"wires":[["dc3a4dba575d993a"]]},{"id":"5ffc79b4fcf66381","type":"api-call-service","z":"7c8093e112804a45","name":"ch 3","server":"a52fadfc.d75d","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.1001207d06_3","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2350,"y":660,"wires":[["5bc4e00392c72f98"]]},{"id":"fd1edea28f82fd55","type":"api-call-service","z":"7c8093e112804a45","name":"ch 4","server":"a52fadfc.d75d","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.1001207d06_4","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2350,"y":720,"wires":[["12cf3190f53ab59b"]]},{"id":"d6de5ea05560dbfb","type":"api-call-service","z":"7c8093e112804a45","name":"ch 5","server":"a52fadfc.d75d","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.10013b653f_1","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2350,"y":780,"wires":[["0aeb1e8976b78de9"]]},{"id":"9929222d14fa05c1","type":"api-call-service","z":"7c8093e112804a45","name":"ch 6","server":"a52fadfc.d75d","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.10013b653f_2","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2350,"y":840,"wires":[["5875185ace6ec809"]]},{"id":"a6fe22226febbab9","type":"api-call-service","z":"7c8093e112804a45","name":"ch 7","server":"a52fadfc.d75d","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.10013b653f_3","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2350,"y":900,"wires":[["7a12703460e49855"]]},{"id":"ee2f1566da87d5d1","type":"api-call-service","z":"7c8093e112804a45","name":"ch1","server":"a52fadfc.d75d","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.1001207d06_1","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2610,"y":540,"wires":[["ff83731bc7056e8d"]]},{"id":"be6f748066efcb0a","type":"api-call-service","z":"7c8093e112804a45","name":"ch 2","server":"a52fadfc.d75d","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.1001207d06_2","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2610,"y":600,"wires":[["ff83731bc7056e8d"]]},{"id":"02a3377e89a724af","type":"api-call-service","z":"7c8093e112804a45","name":"ch 3","server":"a52fadfc.d75d","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.1001207d06_3","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2610,"y":660,"wires":[["ff83731bc7056e8d"]]},{"id":"b3b0dbe8172e0b99","type":"api-call-service","z":"7c8093e112804a45","name":"ch 4","server":"a52fadfc.d75d","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.1001207d06_4","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2610,"y":720,"wires":[["ff83731bc7056e8d"]]},{"id":"dc98f6527a84c7e1","type":"api-call-service","z":"7c8093e112804a45","name":"ch 5","server":"a52fadfc.d75d","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.10013b653f_1","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2610,"y":780,"wires":[["ff83731bc7056e8d"]]},{"id":"6d7cb5aa49ff0391","type":"api-call-service","z":"7c8093e112804a45","name":"ch 6","server":"a52fadfc.d75d","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.10013b653f_2","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2610,"y":840,"wires":[["ff83731bc7056e8d"]]},{"id":"7b66a58415b4934f","type":"api-call-service","z":"7c8093e112804a45","name":"ch 7","server":"a52fadfc.d75d","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.10013b653f_3","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2610,"y":900,"wires":[["ff83731bc7056e8d"]]},{"id":"13e09ef12012dfc5","type":"delay","z":"7c8093e112804a45","name":"","pauseType":"delay","timeout":"3","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":2480,"y":540,"wires":[["ee2f1566da87d5d1"]]},{"id":"dc3a4dba575d993a","type":"delay","z":"7c8093e112804a45","name":"","pauseType":"delay","timeout":"6","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":2480,"y":600,"wires":[["be6f748066efcb0a"]]},{"id":"5875185ace6ec809","type":"delay","z":"7c8093e112804a45","name":"","pauseType":"delay","timeout":"3","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":2480,"y":840,"wires":[["6d7cb5aa49ff0391"]]},{"id":"0aeb1e8976b78de9","type":"delay","z":"7c8093e112804a45","name":"","pauseType":"delay","timeout":"3","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":2480,"y":780,"wires":[["dc98f6527a84c7e1"]]},{"id":"12cf3190f53ab59b","type":"delay","z":"7c8093e112804a45","name":"","pauseType":"delay","timeout":"3","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":2480,"y":720,"wires":[["b3b0dbe8172e0b99"]]},{"id":"7a12703460e49855","type":"delay","z":"7c8093e112804a45","name":"","pauseType":"delay","timeout":"3","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":2480,"y":900,"wires":[["7b66a58415b4934f"]]},{"id":"5bc4e00392c72f98","type":"delay","z":"7c8093e112804a45","name":"","pauseType":"delay","timeout":"9","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":2480,"y":660,"wires":[["02a3377e89a724af"]]},{"id":"39cd54e15ef23c1b","type":"api-call-service","z":"7c8093e112804a45","name":"all off","server":"a52fadfc.d75d","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.1001207d06_1, switch.1001207d06_2, switch.1001207d06_3, switch.1001207d06_4","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2610,"y":460,"wires":[["dddfbe5b1e906333"]]},{"id":"4a27814670d0a983","type":"file","z":"7c8093e112804a45","name":"BlueLogs","filename":"/config/BlueLogs.csv","appendNewline":true,"createDir":true,"overwriteFile":"false","encoding":"none","x":3060,"y":380,"wires":[["173fc3a79bcaf689"]]},{"id":"56f343f4e30fc792","type":"csv","z":"7c8093e112804a45","name":"","sep":",","hdrin":"","hdrout":"none","multi":"one","ret":"\\n","temp":"","skip":"0","strings":true,"include_empty_strings":"","include_null_values":"","x":2930,"y":380,"wires":[["4a27814670d0a983"]]},{"id":"173fc3a79bcaf689","type":"debug","z":"7c8093e112804a45","name":"file","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":3190,"y":380,"wires":[]},{"id":"2fb23ec7b2522ee0","type":"change","z":"7c8093e112804a45","name":"1133","rules":[{"t":"set","p":"payload.col5","pt":"msg","to":"System Msg (1133): Ph went under 5.4, doser has been activated. Check status ASAP","tot":"str","dc":true}],"action":"","property":"","from":"","to":"","reg":false,"x":2770,"y":180,"wires":[["56f343f4e30fc792"]]},{"id":"dddfbe5b1e906333","type":"change","z":"7c8093e112804a45","name":"1141","rules":[{"t":"set","p":"payload.col4","pt":"msg","to":"System Msg(1143) Error within system, pumps may need calibrating","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":2770,"y":460,"wires":[["56f343f4e30fc792"]]},{"id":"22cdf4aca6efd98d","type":"change","z":"7c8093e112804a45","name":"1122","rules":[{"t":"set","p":"payload.col4","pt":"msg","to":"System Msg (1122): Within Recommended Levels","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":2770,"y":520,"wires":[["56f343f4e30fc792"]]},{"id":"7c7835a7245b31e9","type":"change","z":"7c8093e112804a45","name":"1124","rules":[{"t":"set","p":"payload.col5","pt":"msg","to":"System Msg(1124): Conditions are Optimal","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":2770,"y":240,"wires":[["56f343f4e30fc792"]]},{"id":"0e7f57d932d4ed0d","type":"change","z":"7c8093e112804a45","name":"1143","rules":[{"t":"set","p":"payload.col5","pt":"msg","to":"System Msg(1144): Pump or probe may need attention","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":2770,"y":280,"wires":[["56f343f4e30fc792"]]},{"id":"098accb377ea1b7a","type":"change","z":"7c8093e112804a45","name":"1666","rules":[{"t":"set","p":"payload.col4","pt":"msg","to":"System Msg(1666) Fucking all hell is breaking loose SHUT SHIT DOWN!)","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":2770,"y":420,"wires":[["56f343f4e30fc792"]]},{"id":"22a5c1e20aed6537","type":"api-call-service","z":"7c8093e112804a45","name":"ch8/off","server":"a52fadfc.d75d","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.10013b653f_4","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2610,"y":280,"wires":[["0e7f57d932d4ed0d"]]},{"id":"be5a318386a409ea","type":"switch","z":"7c8093e112804a45","name":"","property":"payload.col4","propertyType":"msg","rules":[{"t":"gt","v":"2300","vt":"num"},{"t":"gt","v":"2000","vt":"str"},{"t":"btwn","v":"1300","vt":"num","v2":"2000","v2t":"num"},{"t":"lt","v":"1300","vt":"num"}],"checkall":"true","repair":false,"outputs":4,"x":2210,"y":460,"wires":[["098accb377ea1b7a"],["39cd54e15ef23c1b"],["22cdf4aca6efd98d"],["854c7eb8d6c4de14","6f9688795f49a65a","5ffc79b4fcf66381","fd1edea28f82fd55","d6de5ea05560dbfb","9929222d14fa05c1","a6fe22226febbab9"]]},{"id":"90511cd094a4e4d1","type":"switch","z":"7c8093e112804a45","name":"","property":"payload.col5","propertyType":"msg","rules":[{"t":"lt","v":"5.4","vt":"str"},{"t":"btwn","v":"5.4","vt":"num","v2":"6.2","v2t":"num"},{"t":"gt","v":"6.2","vt":"num"}],"checkall":"true","repair":false,"outputs":3,"x":2190,"y":260,"wires":[["33574a61cfea1dc3"],["7c7835a7245b31e9"],["22a5c1e20aed6537"]]},{"id":"633201f33b32a09c","type":"change","z":"7c8093e112804a45","name":"1111","rules":[{"t":"set","p":"payload","pt":"msg","to":"System Msg(1111) Time is incorrect","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":2770,"y":380,"wires":[["56f343f4e30fc792"]]},{"id":"dce01a577dc8e303","type":"file","z":"7c8093e112804a45","name":"Nf","filename":"/config/grogreen.csv","appendNewline":false,"createDir":true,"overwriteFile":"false","encoding":"none","x":1150,"y":100,"wires":[["4d1462ba0527b4aa"]]},{"id":"4d1462ba0527b4aa","type":"debug","z":"7c8093e112804a45","name":"GroGreen","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1280,"y":100,"wires":[]},{"id":"246e87def9f28006","type":"watch","z":"7c8093e112804a45","name":"watch","files":"/config/BlueLog/","recursive":"","x":250,"y":100,"wires":[["a65bd17ab495da8a"]]},{"id":"a65bd17ab495da8a","type":"change","z":"7c8093e112804a45","name":"change","rules":[{"t":"set","p":"filename","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":100,"wires":[["a6b3e886adc63439"]]},{"id":"a6b3e886adc63439","type":"file in","z":"7c8093e112804a45","name":"","filename":"","format":"lines","chunk":false,"sendError":false,"encoding":"none","allProps":false,"x":520,"y":100,"wires":[["77bdc787b58a01e3"]]},{"id":"da3a5a6586e2bc5b","type":"function","z":"7c8093e112804a45","name":"last line","func":"let lines = msg.payload\nmsg.payload = lines[lines.length - 2]\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":900,"y":100,"wires":[["e07aa85a71006ab7"]]},{"id":"7e5f2afd9749fbae","type":"join","z":"7c8093e112804a45","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":770,"y":100,"wires":[["da3a5a6586e2bc5b"]]},{"id":"77bdc787b58a01e3","type":"csv","z":"7c8093e112804a45","name":"","sep":",","hdrin":"","hdrout":"none","multi":"one","ret":"\\n","temp":"","skip":"0","strings":true,"include_empty_strings":"","include_null_values":"","x":650,"y":100,"wires":[["7e5f2afd9749fbae"]]},{"id":"e07aa85a71006ab7","type":"csv","z":"7c8093e112804a45","name":"","sep":",","hdrin":"","hdrout":"none","multi":"one","ret":"\\n","temp":"","skip":"0","strings":true,"include_empty_strings":"","include_null_values":"","x":1030,"y":100,"wires":[["dce01a577dc8e303"]]},{"id":"cede1563199c4142","type":"file in","z":"7c8093e112804a45","name":"read","filename":"/config/grogreen.csv","format":"lines","chunk":false,"sendError":false,"encoding":"none","allProps":false,"x":1670,"y":260,"wires":[["f416ca389ddde5ff"]]},{"id":"e13a8877cd37615b","type":"function","z":"7c8093e112804a45","name":"last line","func":"let lines = msg.payload\nmsg.payload = lines[lines.length - 2]\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":2040,"y":260,"wires":[["90511cd094a4e4d1","be5a318386a409ea","9e5422e7d8ebc580"]]},{"id":"e20155e271a89ea1","type":"join","z":"7c8093e112804a45","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":1910,"y":260,"wires":[["e13a8877cd37615b"]]},{"id":"f416ca389ddde5ff","type":"csv","z":"7c8093e112804a45","name":"","sep":",","hdrin":"","hdrout":"none","multi":"one","ret":"\\n","temp":"","skip":"0","strings":true,"include_empty_strings":"","include_null_values":"","x":1790,"y":260,"wires":[["e20155e271a89ea1"]]},{"id":"9f63e777a32a2de3","type":"debug","z":"7c8093e112804a45","name":"3","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1450,"y":300,"wires":[]},{"id":"9e5422e7d8ebc580","type":"debug","z":"7c8093e112804a45","name":"5","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":2170,"y":140,"wires":[]},{"id":"cef0547fdff41564","type":"debug","z":"7c8093e112804a45","name":"6","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1710,"y":400,"wires":[]},{"id":"7c68693e12ac2a28","type":"change","z":"7c8093e112804a45","name":"2222","rules":[{"t":"set","p":"payload","pt":"msg","to":"Time Check has Passed","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":2770,"y":340,"wires":[["56f343f4e30fc792"]]},{"id":"90c94c6d73037e83","type":"debug","z":"7c8093e112804a45","name":"1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1270,"y":300,"wires":[]},{"id":"152aeb34e3af6618","type":"debug","z":"7c8093e112804a45","name":"2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1330,"y":440,"wires":[]},{"id":"234d790affd83a5e","type":"debug","z":"7c8093e112804a45","name":"4","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1760,"y":580,"wires":[]},{"id":"a52fadfc.d75d","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30}]