new to automation, follow me as i stumble to success

Home Assistant automation projects, questions, etc. go here.
mikeyB
LED-Curious
LED-Curious
Reactions:
Posts: 24
Joined: Wed Jan 19, 2022 11:45 pm

automating a small area, just getting all the monitoring equip online was a task enough. now im starting to get into the real work which will be telling everything how to work with each other.

hass.io sits on a pi4b , used a server to only manage that

i use another pi4 as dektop pc / remote access to server, also runs minor task of picking up files from some the equipment,im more of a function /fashion but i will shell out to make it where it looks good as well.

without further ado onto the show.

currently building a auto doser using jebao 3.? wifi auto dosers and a build i stole from agrowtek. pics to follow...eventually...hopefully,...

does anyone use this site anymore or am i a few years too late?
mikeyB
LED-Curious
LED-Curious
Reactions:
Posts: 24
Joined: Wed Jan 19, 2022 11:45 pm

talk about stumbling i did something to the system yesterday before leaving for work and ended up needing to do a full restore.....from 3 weeks ago.....

lets call it a trimming of fat.... gonna toss a full backup automation in here somewhere....

started playing with node red and made some code the whole system couldnt handle ... maybe its trying run desktop pc with pi4b... too many lines of file at once too fast..live and learn
mikeyB
LED-Curious
LED-Curious
Reactions:
Posts: 24
Joined: Wed Jan 19, 2022 11:45 pm

spent the morning playing around in node-red and came up with a high functioning monitoring system that enables a few switches . proof of concept i guess.. parts still coming that will help this building a long ..
mikeyB
LED-Curious
LED-Curious
Reactions:
Posts: 24
Joined: Wed Jan 19, 2022 11:45 pm

spent the morning playing around in node-red and came up with a high functioning monitoring system that enables a few switches . proof of concept i guess.. parts still coming that will help this building a long ..
mikeyB
LED-Curious
LED-Curious
Reactions:
Posts: 24
Joined: Wed Jan 19, 2022 11:45 pm

DDA4FC75-FFC2-4432-937A- CB3D75ED7EC2.jpeg
Finished setting up node red to handle the automation. Still waiting on parts…since I bought the wrong size 😦 the fittings won’t be here under next month….

Here’s something tho
Attachments
DDA4FC75-FFC2-4432-937A-CB3D75ED7EC2.jpeg
mikeyB
LED-Curious
LED-Curious
Reactions:
Posts: 24
Joined: Wed Jan 19, 2022 11:45 pm

Code: Select all

[{"id":"7c8093e112804a45","type":"tab","label":"Flow 1","disabled":false,"info":"","env":[]},{"id":"3d8dc278e7a2a5b7","type":"tail-file","z":"7c8093e112804a45","filename":"/config/grogreen.csv","createFile":false,"mode":"","encoding":"utf-8","split":true,"separator":"","fromBeginning":false,"flushAtEOF":false,"rememberLast":true,"limitSize":true,"maxBytes":"","skipBlank":true,"useTrim":true,"sendError":false,"interval":"","name":"my csv from above","x":290,"y":860,"wires":[["f54fe4d1babc2988"]]},{"id":"fbadbdea4a6246fa","type":"inject","z":"7c8093e112804a45","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"60","crontab":"","once":false,"onceDelay":0.1,"topic":"BlueData","payload":"{     \"topic\": \"tail-file-start\" }","payloadType":"json","x":130,"y":860,"wires":[["3d8dc278e7a2a5b7"]]},{"id":"f54fe4d1babc2988","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":450,"y":860,"wires":[["ca7da7ce8ee7f876"]]},{"id":"e8b6675cece2b790","type":"switch","z":"7c8093e112804a45","name":"Below 5.4","property":"payload[\"/config/grogreen.csv\"].col5","propertyType":"msg","rules":[{"t":"lt","v":"5.4","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":960,"y":700,"wires":[["a8e3720248d1d7ad"]]},{"id":"a338a63c73a8a9b6","type":"switch","z":"7c8093e112804a45","name":"Above 6.2","property":"payload[\"/config/grogreen.csv\"].col5","propertyType":"msg","rules":[{"t":"gt","v":"6.2","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":980,"y":800,"wires":[["6e28f868fbef1981"]]},{"id":"a8e3720248d1d7ad","type":"api-call-service","z":"7c8093e112804a45","name":"ch8 on","server":"a52fadfc.d75d","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.tyeb3d3b817c849d3947c5lf","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1090,"y":700,"wires":[["e2374444c0e4ec29"]]},{"id":"b65aeaaaa837116a","type":"api-call-service","z":"7c8093e112804a45","name":"ch8 off","server":"a52fadfc.d75d","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.tyeb3d3b817c849d3947c5lf","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1350,"y":700,"wires":[["c89ea2389c80664f"]]},{"id":"e2374444c0e4ec29","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":1220,"y":700,"wires":[["b65aeaaaa837116a"]]},{"id":"516663d4a242d337","type":"switch","z":"7c8093e112804a45","name":"Between 5.4 - 6.2","property":"payload[\"/config/grogreen.csv\"].col5","propertyType":"msg","rules":[{"t":"btwn","v":"5.4","vt":"num","v2":"6.2","v2t":"num"}],"checkall":"true","repair":false,"outputs":1,"x":990,"y":760,"wires":[["6fab8f33ae97b205"]]},{"id":"e221a018eb156be8","type":"switch","z":"7c8093e112804a45","name":"Below 1300 Ppm","property":"payload[\"/config/grogreen.csv\"].col4","propertyType":"msg","rules":[{"t":"lt","v":"1300","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":950,"y":1120,"wires":[["4f630cc4e0fd73b4","1a8ec483ecb2b575","6ac5e32941f13b5b","c3e4ae6ffe4d8eb5","f3468e510564d083","17b22c5c0901591e","e12f39669e9838b7"]]},{"id":"5a261aae7ee027f9","type":"switch","z":"7c8093e112804a45","name":"Above 1300 Ppm","property":"payload[\"/config/grogreen.csv\"].col4","propertyType":"msg","rules":[{"t":"btwn","v":"1300","vt":"num","v2":"2000","v2t":"num"}],"checkall":"true","repair":false,"outputs":1,"x":970,"y":1080,"wires":[["3e628c65f31d6bee"]]},{"id":"fa190306e8747576","type":"switch","z":"7c8093e112804a45","name":"Above 2300 Ppm","property":"payload[\"/config/grogreen.csv\"].col4","propertyType":"msg","rules":[{"t":"gt","v":"2300","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":1010,"y":980,"wires":[["c713a83020298766"]]},{"id":"458d96ac7caf326f","type":"change","z":"7c8093e112804a45","name":"1121","rules":[{"t":"set","p":"payload","pt":"msg","to":"System Msg (1121): Ppm's went below 1300, dosing system activated","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1590,"y":1120,"wires":[["e758886fed4e2b08"]]},{"id":"4f630cc4e0fd73b4","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":1150,"y":1120,"wires":[["d56e53e370fb54d8"]]},{"id":"1a8ec483ecb2b575","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":1150,"y":1180,"wires":[["eb37ae4531a8d01f"]]},{"id":"6ac5e32941f13b5b","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":1150,"y":1240,"wires":[["c2e4c2b780e41f48"]]},{"id":"c3e4ae6ffe4d8eb5","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":1150,"y":1300,"wires":[["54b1ef740f636584"]]},{"id":"f3468e510564d083","type":"api-call-service","z":"7c8093e112804a45","name":"ch 5","server":"a52fadfc.d75d","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.100149114c","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1150,"y":1360,"wires":[["c040850a4159a174"]]},{"id":"17b22c5c0901591e","type":"api-call-service","z":"7c8093e112804a45","name":"ch 6","server":"a52fadfc.d75d","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.1001491155","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1150,"y":1420,"wires":[["607394373a4d70ed"]]},{"id":"e12f39669e9838b7","type":"api-call-service","z":"7c8093e112804a45","name":"ch 7","server":"a52fadfc.d75d","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.tyeb3c25dcabae058fe9p0hr","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1150,"y":1480,"wires":[["369564a4ad5d6386"]]},{"id":"c7b1855ad0e74a44","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":1410,"y":1120,"wires":[["458d96ac7caf326f"]]},{"id":"562f90d9d01bf852","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":1410,"y":1180,"wires":[["458d96ac7caf326f"]]},{"id":"28758d5c9cbb8e11","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":1410,"y":1240,"wires":[["458d96ac7caf326f"]]},{"id":"37e8f70008508b87","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":1410,"y":1300,"wires":[["458d96ac7caf326f"]]},{"id":"26d26ebb8a5cb333","type":"api-call-service","z":"7c8093e112804a45","name":"ch 5","server":"a52fadfc.d75d","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.100149114c","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1410,"y":1360,"wires":[["458d96ac7caf326f"]]},{"id":"6a576509891e8f3c","type":"api-call-service","z":"7c8093e112804a45","name":"ch 6","server":"a52fadfc.d75d","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.1001491155","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1410,"y":1420,"wires":[["458d96ac7caf326f"]]},{"id":"c84f2c455bcba1a5","type":"api-call-service","z":"7c8093e112804a45","name":"ch 7","server":"a52fadfc.d75d","version":3,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.tyeb3c25dcabae058fe9p0hr","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1410,"y":1480,"wires":[["458d96ac7caf326f"]]},{"id":"d56e53e370fb54d8","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":1280,"y":1120,"wires":[["c7b1855ad0e74a44"]]},{"id":"eb37ae4531a8d01f","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":1280,"y":1180,"wires":[["562f90d9d01bf852"]]},{"id":"607394373a4d70ed","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":1280,"y":1420,"wires":[["6a576509891e8f3c"]]},{"id":"c040850a4159a174","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":1280,"y":1360,"wires":[["26d26ebb8a5cb333"]]},{"id":"54b1ef740f636584","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":1280,"y":1300,"wires":[["37e8f70008508b87"]]},{"id":"369564a4ad5d6386","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":1280,"y":1480,"wires":[["c84f2c455bcba1a5"]]},{"id":"c2e4c2b780e41f48","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":1280,"y":1240,"wires":[["28758d5c9cbb8e11"]]},{"id":"ed8a95c95dc4b3f2","type":"switch","z":"7c8093e112804a45","name":"Above 2000 Ppm","property":"payload[\"/config/grogreen.csv\"].col4","propertyType":"msg","rules":[{"t":"gt","v":"2000","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":990,"y":1020,"wires":[["fd1d69b360c2b974"]]},{"id":"fd1d69b360c2b974","type":"api-call-service","z":"7c8093e112804a45","name":"STOP ALL","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":1170,"y":1020,"wires":[["d46ad0cf150fafc4"]]},{"id":"21af0a14976f9476","type":"file","z":"7c8093e112804a45","name":"BlueLogs","filename":"/config/BlueLogs.csv","appendNewline":true,"createDir":true,"overwriteFile":"false","encoding":"none","x":1540,"y":880,"wires":[["dc721b77684d5411"]]},{"id":"e758886fed4e2b08","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":1410,"y":880,"wires":[["21af0a14976f9476"]]},{"id":"dc721b77684d5411","type":"debug","z":"7c8093e112804a45","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1690,"y":880,"wires":[]},{"id":"c89ea2389c80664f","type":"change","z":"7c8093e112804a45","name":"1133","rules":[{"t":"set","p":"payload","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":1470,"y":700,"wires":[["e758886fed4e2b08"]]},{"id":"d46ad0cf150fafc4","type":"change","z":"7c8093e112804a45","name":"1143","rules":[{"t":"set","p":"payload","pt":"msg","to":"System Msg(1143) Error within system, pumps may need calibrating","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1310,"y":1020,"wires":[["e758886fed4e2b08"]]},{"id":"889d364795ba430d","type":"inject","z":"7c8093e112804a45","name":"BlueLab ripper","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"15","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{     \"topic\": \"tail-file-start\" }","payloadType":"json","x":160,"y":740,"wires":[["b0969e83678e1fe8"]]},{"id":"09df4ae3e15bb55f","type":"file","z":"7c8093e112804a45","name":"Nf","filename":"/config/grogreen.csv","appendNewline":true,"createDir":true,"overwriteFile":"false","encoding":"none","x":470,"y":740,"wires":[[]]},{"id":"b0969e83678e1fe8","type":"tail-file","z":"7c8093e112804a45","filename":"/config/BlueLog/2022-01-23 154400.csv","createFile":false,"mode":"","encoding":"utf-8","split":true,"separator":"","fromBeginning":false,"flushAtEOF":false,"rememberLast":true,"limitSize":true,"maxBytes":"","skipBlank":true,"useTrim":true,"sendError":false,"interval":"","name":"CSV HERE","x":330,"y":740,"wires":[["09df4ae3e15bb55f"]]},{"id":"5c2884d159f3323c","type":"debug","z":"7c8093e112804a45","name":"join","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":590,"y":580,"wires":[]},{"id":"3e628c65f31d6bee","type":"change","z":"7c8093e112804a45","name":"1122","rules":[{"t":"set","p":"payload","pt":"msg","to":"System Msg (1122): Within Recommended Levels","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1310,"y":1080,"wires":[["e758886fed4e2b08"]]},{"id":"6fab8f33ae97b205","type":"change","z":"7c8093e112804a45","name":"1124","rules":[{"t":"set","p":"payload","pt":"msg","to":"System Msg(1124): Conditions are Optimal","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1290,"y":760,"wires":[["e758886fed4e2b08"]]},{"id":"9ec35ded97a42349","type":"change","z":"7c8093e112804a45","name":"1144","rules":[{"t":"set","p":"payload","pt":"msg","to":"System Msg(1144): Pump or probe may need attention","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1350,"y":800,"wires":[["e758886fed4e2b08"]]},{"id":"c713a83020298766","type":"change","z":"7c8093e112804a45","name":"1666","rules":[{"t":"set","p":"payload","pt":"msg","to":"System Msg(1666) Fucking all hell is breaking loose SHUT SHIT DOWN!)","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1310,"y":980,"wires":[["e758886fed4e2b08"]]},{"id":"99e8ae0773c77d16","type":"inject","z":"7c8093e112804a45","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"60","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":150,"y":800,"wires":[["0df7d0b6609d34a3"]]},{"id":"0df7d0b6609d34a3","type":"moment","z":"7c8093e112804a45","name":"","topic":"","input":"payload","inputType":"msg","inTz":"America/New_York","adjAmount":0,"adjType":"days","adjDir":"add","format":"DD.MM.YYYY HH:mm","locale":"C","output":"","outputType":"msg","outTz":"America/New_York","x":340,"y":800,"wires":[["86aaa2a44fdc6ccd"]]},{"id":"86aaa2a44fdc6ccd","type":"file","z":"7c8093e112804a45","name":"","filename":"/config/time.csv","appendNewline":true,"createDir":true,"overwriteFile":"false","encoding":"none","x":540,"y":800,"wires":[[]]},{"id":"fb7497fed9316a95","type":"inject","z":"7c8093e112804a45","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"60","crontab":"","once":false,"onceDelay":0.1,"topic":"time","payload":"{     \"topic\": \"tail-file-start\" }","payloadType":"json","x":130,"y":920,"wires":[["f4fbc397d21f6223"]]},{"id":"f4fbc397d21f6223","type":"tail-file","z":"7c8093e112804a45","filename":"/config/time.csv","createFile":false,"mode":"","encoding":"utf-8","split":true,"separator":"","fromBeginning":false,"flushAtEOF":false,"rememberLast":true,"limitSize":true,"maxBytes":"","skipBlank":true,"useTrim":true,"sendError":false,"interval":"","name":"","x":280,"y":920,"wires":[["d2596263d1174f94"]]},{"id":"ca7da7ce8ee7f876","type":"moment","z":"7c8093e112804a45","name":"d1","topic":"","input":"payload.col1","inputType":"msg","inTz":"America/New_York","adjAmount":0,"adjType":"days","adjDir":"add","format":"DD.MM.YYYY HH:mm","locale":"C","output":"payload.col1","outputType":"msg","outTz":"America/New_York","x":570,"y":860,"wires":[["22f7754c31a33517"]]},{"id":"22f7754c31a33517","type":"join","z":"7c8093e112804a45","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":690,"y":880,"wires":[["12b1037a1a9d35f8","8244c1e6c3feaf9d","5c2884d159f3323c"]]},{"id":"d2596263d1174f94","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":450,"y":920,"wires":[["22f7754c31a33517"]]},{"id":"8244c1e6c3feaf9d","type":"switch","z":"7c8093e112804a45","name":"","property":"payload[\"/config/grogreen.csv\"].col1","propertyType":"msg","rules":[{"t":"eq","v":"payload[\"/config/time.csv\"].col1","vt":"msg"}],"checkall":"true","repair":false,"outputs":1,"x":810,"y":860,"wires":[["a338a63c73a8a9b6","516663d4a242d337","e8b6675cece2b790","e221a018eb156be8","5a261aae7ee027f9","ed8a95c95dc4b3f2","fa190306e8747576","e01d7ef03a4a7a1a"]]},{"id":"12b1037a1a9d35f8","type":"switch","z":"7c8093e112804a45","name":"","property":"payload[\"/config/grogreen.csv\"].col1","propertyType":"msg","rules":[{"t":"neq","v":"payload[\"/config/time.csv\"].col1","vt":"msg"}],"checkall":"true","repair":false,"outputs":1,"x":810,"y":900,"wires":[["2ab3fe0fb7747a69"]]},{"id":"2ab3fe0fb7747a69","type":"change","z":"7c8093e112804a45","name":"time check","rules":[{"t":"set","p":"payload","pt":"msg","to":"The Date or Time does not match","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":970,"y":900,"wires":[["e758886fed4e2b08"]]},{"id":"6e28f868fbef1981","type":"api-call-service","z":"7c8093e112804a45","name":"","server":"","version":3,"debugenabled":false,"service_domain":"","service":"","entityId":"","data":"","dataType":"jsonata","mergecontext":null,"mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1150,"y":800,"wires":[["9ec35ded97a42349"]]},{"id":"e01d7ef03a4a7a1a","type":"debug","z":"7c8093e112804a45","name":"switch","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":810,"y":560,"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}]
mikeyB
LED-Curious
LED-Curious
Reactions:
Posts: 24
Joined: Wed Jan 19, 2022 11:45 pm

recoded the way the program finds the logs using a watch node on the directory - this way we can introduce a text box for user side to allow the user to give the program some direction.

it will then tail that file and make a new file for the monitoring system to be able to use from. This way im able to pull information from an unknown source file without ever searching for it and replacing it in every sensor... i may have done it a few times before automating it...

then to wrap it up nicely i made it so it only runs the dosing program once every 10 mins to allow for enough time to mix thoroughly. this way im not dosing ontop of a previous dose and things get out of control.

i believe this will function as needed but i can always come back and tweak

now if i could get pi to autostart bluelab and open server folder for it to save into this thing would really be something

new node-red flow

Code: Select all

 [{"id":"93519ca5df0c97a0","type":"tab","label":"BlueLog","disabled":false,"info":"","env":[]},{"id":"d3a197757b14f1f9","type":"api-call-service","z":"93519ca5df0c97a0","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":790,"y":600,"wires":[["946964bc0e5a01b9"]]},{"id":"301aeb4765a480a1","type":"api-call-service","z":"93519ca5df0c97a0","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":1050,"y":600,"wires":[["25b67075fd1d4e53"]]},{"id":"946964bc0e5a01b9","type":"delay","z":"93519ca5df0c97a0","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":920,"y":600,"wires":[["301aeb4765a480a1"]]},{"id":"90506135a028bafc","type":"change","z":"93519ca5df0c97a0","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":1210,"y":900,"wires":[["50465beb212943d6"]]},{"id":"acf036578a4ba54f","type":"api-call-service","z":"93519ca5df0c97a0","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":790,"y":900,"wires":[["37c91697c6a1c8b2"]]},{"id":"03a96c4759ced841","type":"api-call-service","z":"93519ca5df0c97a0","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":790,"y":960,"wires":[["6033eb3790e0d6fc"]]},{"id":"b111872f95dff349","type":"api-call-service","z":"93519ca5df0c97a0","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":790,"y":1020,"wires":[["079d06717a707c12"]]},{"id":"eaa5d704b75e143d","type":"api-call-service","z":"93519ca5df0c97a0","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":790,"y":1080,"wires":[["8941842801932bde"]]},{"id":"fd4a02bc91b1127a","type":"api-call-service","z":"93519ca5df0c97a0","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":790,"y":1140,"wires":[["0833e1b466e88ca3"]]},{"id":"ce6601773806f135","type":"api-call-service","z":"93519ca5df0c97a0","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":790,"y":1200,"wires":[["e4909075d2fbecab"]]},{"id":"542ba314dae7f410","type":"api-call-service","z":"93519ca5df0c97a0","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":790,"y":1260,"wires":[["b17fadbe0266ab9d"]]},{"id":"5b4f80bc40d0423e","type":"api-call-service","z":"93519ca5df0c97a0","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":1050,"y":900,"wires":[["90506135a028bafc"]]},{"id":"94ab048aec21024f","type":"api-call-service","z":"93519ca5df0c97a0","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":1050,"y":960,"wires":[["90506135a028bafc"]]},{"id":"dd7a65626c023833","type":"api-call-service","z":"93519ca5df0c97a0","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":1050,"y":1020,"wires":[["90506135a028bafc"]]},{"id":"7b9e9ef09f260346","type":"api-call-service","z":"93519ca5df0c97a0","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":1050,"y":1080,"wires":[["90506135a028bafc"]]},{"id":"b93376962b1fce1a","type":"api-call-service","z":"93519ca5df0c97a0","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":1050,"y":1140,"wires":[["90506135a028bafc"]]},{"id":"90179f32c7ee52dc","type":"api-call-service","z":"93519ca5df0c97a0","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":1050,"y":1200,"wires":[["90506135a028bafc"]]},{"id":"b2fff512533d3039","type":"api-call-service","z":"93519ca5df0c97a0","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":1050,"y":1260,"wires":[["90506135a028bafc"]]},{"id":"37c91697c6a1c8b2","type":"delay","z":"93519ca5df0c97a0","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":920,"y":900,"wires":[["5b4f80bc40d0423e"]]},{"id":"6033eb3790e0d6fc","type":"delay","z":"93519ca5df0c97a0","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":920,"y":960,"wires":[["94ab048aec21024f"]]},{"id":"e4909075d2fbecab","type":"delay","z":"93519ca5df0c97a0","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":920,"y":1200,"wires":[["90179f32c7ee52dc"]]},{"id":"0833e1b466e88ca3","type":"delay","z":"93519ca5df0c97a0","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":920,"y":1140,"wires":[["b93376962b1fce1a"]]},{"id":"8941842801932bde","type":"delay","z":"93519ca5df0c97a0","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":920,"y":1080,"wires":[["7b9e9ef09f260346"]]},{"id":"b17fadbe0266ab9d","type":"delay","z":"93519ca5df0c97a0","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":920,"y":1260,"wires":[["b2fff512533d3039"]]},{"id":"079d06717a707c12","type":"delay","z":"93519ca5df0c97a0","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":920,"y":1020,"wires":[["dd7a65626c023833"]]},{"id":"3ef50cb02f2ebc7d","type":"api-call-service","z":"93519ca5df0c97a0","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":1050,"y":800,"wires":[["72de91d13fa0b72c"]]},{"id":"f18bca772fa2be59","type":"file","z":"93519ca5df0c97a0","name":"BlueLogs","filename":"/config/BlueLogs.csv","appendNewline":true,"createDir":true,"overwriteFile":"false","encoding":"none","x":1500,"y":760,"wires":[["d9282b8d8789af27"]]},{"id":"50465beb212943d6","type":"csv","z":"93519ca5df0c97a0","name":"","sep":",","hdrin":"","hdrout":"none","multi":"one","ret":"\\n","temp":"","skip":"0","strings":true,"include_empty_strings":"","include_null_values":"","x":1370,"y":760,"wires":[["f18bca772fa2be59"]]},{"id":"d9282b8d8789af27","type":"debug","z":"93519ca5df0c97a0","name":"file","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1630,"y":760,"wires":[]},{"id":"25b67075fd1d4e53","type":"change","z":"93519ca5df0c97a0","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":1210,"y":600,"wires":[["50465beb212943d6"]]},{"id":"72de91d13fa0b72c","type":"change","z":"93519ca5df0c97a0","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":1210,"y":800,"wires":[["50465beb212943d6"]]},{"id":"99fae332d6d50405","type":"change","z":"93519ca5df0c97a0","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":1210,"y":860,"wires":[["50465beb212943d6"]]},{"id":"2852b849786420a7","type":"change","z":"93519ca5df0c97a0","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":1210,"y":660,"wires":[["50465beb212943d6"]]},{"id":"4399df194fdb45c3","type":"change","z":"93519ca5df0c97a0","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":1210,"y":700,"wires":[["50465beb212943d6"]]},{"id":"e77ea4fa219648fe","type":"change","z":"93519ca5df0c97a0","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":1210,"y":760,"wires":[["50465beb212943d6"]]},{"id":"67e4099af8f3f693","type":"api-call-service","z":"93519ca5df0c97a0","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":1050,"y":700,"wires":[["4399df194fdb45c3"]]},{"id":"f74f36d0b9d7a6af","type":"switch","z":"93519ca5df0c97a0","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":650,"y":820,"wires":[["e77ea4fa219648fe"],["3ef50cb02f2ebc7d"],["99fae332d6d50405"],["acf036578a4ba54f","03a96c4759ced841","b111872f95dff349","eaa5d704b75e143d","fd4a02bc91b1127a","ce6601773806f135","542ba314dae7f410"]]},{"id":"808ade57418bbe52","type":"switch","z":"93519ca5df0c97a0","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":650,"y":660,"wires":[["d3a197757b14f1f9"],["2852b849786420a7"],["67e4099af8f3f693"]]},{"id":"1ca0c6ab7b630ccf","type":"file","z":"93519ca5df0c97a0","name":"Nf","filename":"/config/grogreen.csv","appendNewline":false,"createDir":true,"overwriteFile":"false","encoding":"none","x":1030,"y":560,"wires":[["ca05e70a8db79d1c"]]},{"id":"ca05e70a8db79d1c","type":"debug","z":"93519ca5df0c97a0","name":"GroGreen","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1160,"y":560,"wires":[]},{"id":"c8b4af5ef92db976","type":"watch","z":"93519ca5df0c97a0","name":"watch","files":"/config/BlueLog/","recursive":"","x":130,"y":560,"wires":[["ab349c86b62d2d98"]]},{"id":"ab349c86b62d2d98","type":"change","z":"93519ca5df0c97a0","name":"change","rules":[{"t":"set","p":"filename","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":260,"y":560,"wires":[["31c3f61556706518"]]},{"id":"31c3f61556706518","type":"file in","z":"93519ca5df0c97a0","name":"","filename":"","format":"lines","chunk":false,"sendError":false,"encoding":"none","allProps":false,"x":400,"y":560,"wires":[["b5616e56516312b0"]]},{"id":"65628c4cfc212424","type":"function","z":"93519ca5df0c97a0","name":"last line","func":"let lines = msg.payload\nmsg.payload = lines[lines.length - 2]\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":780,"y":560,"wires":[["3bd806b33fc93f36"]]},{"id":"85e48cd225313a2c","type":"join","z":"93519ca5df0c97a0","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":650,"y":560,"wires":[["65628c4cfc212424"]]},{"id":"b5616e56516312b0","type":"csv","z":"93519ca5df0c97a0","name":"","sep":",","hdrin":"","hdrout":"none","multi":"one","ret":"\\n","temp":"","skip":"0","strings":true,"include_empty_strings":"","include_null_values":"","x":530,"y":560,"wires":[["85e48cd225313a2c"]]},{"id":"6a219fa91c72ccc3","type":"debug","z":"93519ca5df0c97a0","name":"2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":770,"y":740,"wires":[]},{"id":"3bd806b33fc93f36","type":"csv","z":"93519ca5df0c97a0","name":"","sep":",","hdrin":"","hdrout":"none","multi":"one","ret":"\\n","temp":"","skip":"0","strings":true,"include_empty_strings":"","include_null_values":"","x":910,"y":560,"wires":[["1ca0c6ab7b630ccf"]]},{"id":"ca818ef75acd0c4e","type":"inject","z":"93519ca5df0c97a0","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"600","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"payload","payloadType":"msg","x":90,"y":740,"wires":[["76f28a268965c4ab"]]},{"id":"76f28a268965c4ab","type":"file in","z":"93519ca5df0c97a0","name":"read","filename":"/config/grogreen.csv","format":"lines","chunk":false,"sendError":false,"encoding":"none","allProps":false,"x":210,"y":740,"wires":[["ee8ea31d7f899769"]]},{"id":"a1ba2dd1a00a515c","type":"function","z":"93519ca5df0c97a0","name":"last line","func":"let lines = msg.payload\nmsg.payload = lines[lines.length - 2]\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":580,"y":740,"wires":[["6a219fa91c72ccc3","808ade57418bbe52","f74f36d0b9d7a6af"]]},{"id":"d08b71d8e6bff1bd","type":"join","z":"93519ca5df0c97a0","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":450,"y":740,"wires":[["a1ba2dd1a00a515c"]]},{"id":"ee8ea31d7f899769","type":"csv","z":"93519ca5df0c97a0","name":"","sep":",","hdrin":"","hdrout":"none","multi":"one","ret":"\\n","temp":"","skip":"0","strings":true,"include_empty_strings":"","include_null_values":"","x":330,"y":740,"wires":[["d08b71d8e6bff1bd"]]},{"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}] 
mikeyB
LED-Curious
LED-Curious
Reactions:
Posts: 24
Joined: Wed Jan 19, 2022 11:45 pm

Might as well post build

Still have to fasten it all down but starting to figure out placement on this piece of 1/4” 5051 sheet I found for a steal
8BF2798C-65C2-434F-AB2F-BDD6AD18383E.jpeg
mikeyB
LED-Curious
LED-Curious
Reactions:
Posts: 24
Joined: Wed Jan 19, 2022 11:45 pm

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}] 
mikeyB
LED-Curious
LED-Curious
Reactions:
Posts: 24
Joined: Wed Jan 19, 2022 11:45 pm

Done
D3B4936E-8717-4098-A94A-BD09F16A8FA1.jpeg
Post Reply