SHARE
TWEET

node190619

smort Jun 19th, 2019 (edited) 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [{"id":"b2ff4bbb.08e61","type":"tab","label":"Brucontrol interface","disabled":false,"info":""},{"id":"437615b9.a7c5f4","type":"tab","label":"Brewfather","disabled":false,"info":""},{"id":"81394fa6.f9523","type":"ui_group","z":"","name":"Quick Start","tab":"6529e313.74108c","order":1,"disp":true,"width":"6"},{"id":"b642e71.9697318","type":"ui_group","z":"","name":"1","tab":"4ede131f.f2e09c","order":1,"disp":false,"width":"6"},{"id":"b914fb40.bc5c78","type":"ui_group","z":"","name":"5","tab":"4ede131f.f2e09c","order":5,"disp":false,"width":"6"},{"id":"4a85df35.41e16","type":"ui_group","z":"","name":"6","tab":"4ede131f.f2e09c","order":6,"disp":false,"width":"6"},{"id":"19fab5c2.199ffa","type":"ui_group","z":"","name":"Cloud Settings","tab":"6529e313.74108c","order":2,"disp":true,"width":"6"},{"id":"307e2bd0.e69514","type":"ui_group","z":"","name":"2","tab":"4ede131f.f2e09c","order":2,"disp":false,"width":"6"},{"id":"8de27cf2.dbd6a","type":"ui_group","z":"","name":"3","tab":"4ede131f.f2e09c","order":3,"disp":false,"width":"6"},{"id":"6acae0b0.a184","type":"ui_group","z":"","name":"Set SG Calibration Points (SG only)","tab":"75f710f5.16d2e","order":2,"disp":true,"width":"6"},{"id":"b8d3bbbf.2c9cb8","type":"ui_group","z":"","name":"4","tab":"4ede131f.f2e09c","order":4,"disp":false,"width":"6"},{"id":"ab6da67f.a47fa8","type":"ui_group","z":"","name":"8","tab":"4ede131f.f2e09c","order":8,"disp":false,"width":"6"},{"id":"a510f969.f28538","type":"ui_group","z":"","name":"7","tab":"4ede131f.f2e09c","order":7,"disp":false,"width":"6"},{"id":"82607108.c5be8","type":"ui_group","z":"","name":"Tilt Pi Settings","tab":"6529e313.74108c","order":3,"disp":true,"width":"6"},{"id":"eb4ab3d5.7b3f1","type":"ui_group","z":"","name":"Calibrate","tab":"75f710f5.16d2e","order":1,"disp":true,"width":"6"},{"id":"5ca7d250.c3938c","type":"ui_group","z":"","name":"Time","tab":"c9c26b4a.4cde78","order":1,"disp":true,"width":"6"},{"id":"c8854cd2.f1773","type":"ui_group","z":"","name":"App Admin (Tilt Pi v.2.1)","tab":"c9c26b4a.4cde78","order":4,"disp":true,"width":"6"},{"id":"6529e313.74108c","type":"ui_tab","z":"","name":"Logging","icon":"fa-line-chart","order":2},{"id":"4ede131f.f2e09c","type":"ui_tab","z":"","name":"Tilt Pi","icon":"fa-tachometer","order":1},{"id":"75f710f5.16d2e","type":"ui_tab","z":"","name":"Calibration","icon":"fa-bullseye","order":3},{"id":"c9c26b4a.4cde78","type":"ui_tab","z":"","name":"System","icon":"fa-clock-o","order":4},{"id":"5fec9a11.37a164","type":"ui_base","theme":{"name":"theme-custom","lightTheme":{"default":"#0094CE","baseColor":"#0094CE","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":false,"reset":false},"darkTheme":{"default":"#097479","baseColor":"#097479","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":true,"reset":false},"customTheme":{"name":"","default":"#4B7930","baseColor":"#666666","baseFont":"Tahoma,Geneva,sans-serif","reset":false},"themeState":{"base-color":{"default":"#4B7930","value":"#4B7930","edited":false},"page-titlebar-backgroundColor":{"value":"#666666","edited":false},"page-backgroundColor":{"value":"#111111","edited":false},"page-sidebar-backgroundColor":{"value":"#000000","edited":false},"group-textColor":{"value":"#8c8c8c","edited":false},"group-borderColor":{"value":"#555555","edited":false},"group-backgroundColor":{"value":"#333333","edited":false},"widget-textColor":{"value":"#eeeeee","edited":false},"widget-backgroundColor":{"value":"#666666","edited":false},"widget-borderColor":{"value":"#333333","edited":false},"base-font":{"value":"Tahoma,Geneva,sans-serif"}}},"site":{"name":"Tilt Pi","hideToolbar":"false","allowSwipe":"false","dateFormat":"DD/MM/YYYY","sizes":{"sx":48,"sy":53,"gx":6,"gy":6,"cx":6,"cy":6,"px":0,"py":0}}},{"id":"c12bcb12.dbd0d8","type":"ui_group","z":"","name":"Set Temp. Calibration Points","tab":"75f710f5.16d2e","order":4,"disp":true,"width":"6"},{"id":"b0619070.ac95d","type":"ui_group","z":"","name":"Tilt Pi Display Units","tab":"c9c26b4a.4cde78","order":2,"disp":true,"width":"6"},{"id":"7e458eda.984cd","type":"ui_group","z":"","name":"Raspberry Pi","tab":"c9c26b4a.4cde78","order":5,"disp":false,"width":"6"},{"id":"2f8a7619.951f3a","type":"ui_group","z":"","name":"Filter Tilt by Signal Strength","tab":"c9c26b4a.4cde78","order":3,"disp":true,"width":"6"},{"id":"822d1243.fc995","type":"ui_link","z":"","name":"Tilt Shop","link":"http://tilthydrometer.com","icon":"open_in_browser","target":"newtab","order":5},{"id":"78854e6d.2c0dc8","type":"ui_tab","z":"","name":"Home","icon":"dashboard"},{"id":"7473ae41.ca29a","type":"mqtt-broker","z":"","name":"","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"cb53ad95.b0444","type":"ui_group","z":"","name":"Default","tab":"78854e6d.2c0dc8","disp":true,"width":"6","collapse":false},{"id":"b0c614ef.a6e19","type":"ui_base","theme":{"name":"theme-light","lightTheme":{"default":"#0094CE","baseColor":"#0094CE","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":true,"reset":false},"darkTheme":{"default":"#097479","baseColor":"#097479","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":false},"customTheme":{"name":"Untitled Theme 1","default":"#4B7930","baseColor":"#4B7930","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"},"themeState":{"base-color":{"default":"#0094CE","value":"#0094CE","edited":false},"page-titlebar-backgroundColor":{"value":"#0094CE","edited":false},"page-backgroundColor":{"value":"#fafafa","edited":false},"page-sidebar-backgroundColor":{"value":"#ffffff","edited":false},"group-textColor":{"value":"#1bbfff","edited":false},"group-borderColor":{"value":"#ffffff","edited":false},"group-backgroundColor":{"value":"#ffffff","edited":false},"widget-textColor":{"value":"#111111","edited":false},"widget-backgroundColor":{"value":"#0094ce","edited":false},"widget-borderColor":{"value":"#ffffff","edited":false},"base-font":{"value":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"}},"angularTheme":{"primary":"indigo","accents":"blue","warn":"red","background":"grey"}},"site":{"name":"Node-RED Dashboard","hideToolbar":"false","allowSwipe":"false","lockMenu":"false","allowTempTheme":"true","dateFormat":"DD/MM/YYYY","sizes":{"sx":48,"sy":48,"gx":6,"gy":6,"cx":6,"cy":6,"px":0,"py":0}}},{"id":"7d421431.ea807c","type":"ui_group","z":"","name":"Quick Start","tab":"38bfe566.8fab62","order":1,"disp":true,"width":"6"},{"id":"44b5623e.bebdbc","type":"ui_group","z":"","name":"1","tab":"7f58929c.5a83e4","order":1,"disp":false,"width":"6"},{"id":"ad9f3d15.024af","type":"ui_group","z":"","name":"5","tab":"7f58929c.5a83e4","order":5,"disp":false,"width":"6"},{"id":"882a6b0e.427ac8","type":"ui_group","z":"","name":"6","tab":"7f58929c.5a83e4","order":6,"disp":false,"width":"6"},{"id":"2922e563.886812","type":"ui_group","z":"","name":"Cloud Settings","tab":"38bfe566.8fab62","order":2,"disp":true,"width":"6"},{"id":"ade31e3f.e0957","type":"ui_group","z":"","name":"2","tab":"7f58929c.5a83e4","order":2,"disp":false,"width":"6"},{"id":"e2d95eb6.947a1","type":"ui_group","z":"","name":"3","tab":"7f58929c.5a83e4","order":3,"disp":false,"width":"6"},{"id":"93fb9ff3.7c0d28","type":"ui_group","z":"","name":"Set SG Calibration Points (SG only)","tab":"aea54140.2932e","order":2,"disp":true,"width":"6"},{"id":"dcfd8b5d.ba6b18","type":"ui_group","z":"","name":"4","tab":"7f58929c.5a83e4","order":4,"disp":false,"width":"6"},{"id":"7d4ac73d.1d292","type":"ui_group","z":"","name":"8","tab":"7f58929c.5a83e4","order":8,"disp":false,"width":"6"},{"id":"d9b841d6.303ec8","type":"ui_group","z":"","name":"7","tab":"7f58929c.5a83e4","order":7,"disp":false,"width":"6"},{"id":"8ef91bbc.88dd6","type":"ui_group","z":"","name":"Tilt Pi Settings","tab":"38bfe566.8fab62","order":3,"disp":true,"width":"6"},{"id":"d4fe3f73.5ce878","type":"ui_group","z":"","name":"Calibrate","tab":"aea54140.2932e","order":1,"disp":true,"width":"6"},{"id":"f236d951.4007d8","type":"ui_group","z":"","name":"Time","tab":"39bb1b1f.1ea40c","order":1,"disp":true,"width":"6"},{"id":"f3f0e4a9.c9479","type":"ui_group","z":"","name":"App Admin (Tilt Pi v.2.1)","tab":"39bb1b1f.1ea40c","order":4,"disp":true,"width":"6"},{"id":"38bfe566.8fab62","type":"ui_tab","z":"","name":"Logging","icon":"fa-line-chart","order":2},{"id":"7f58929c.5a83e4","type":"ui_tab","z":"","name":"Tilt Pi","icon":"fa-tachometer","order":1},{"id":"aea54140.2932e","type":"ui_tab","z":"","name":"Calibration","icon":"fa-bullseye","order":3},{"id":"39bb1b1f.1ea40c","type":"ui_tab","z":"","name":"System","icon":"fa-clock-o","order":4},{"id":"eb1f9809.d6ba8","type":"ui_group","z":"","name":"Set Temp. Calibration Points","tab":"aea54140.2932e","order":4,"disp":true,"width":"6"},{"id":"4795b6b1.6d612","type":"ui_group","z":"","name":"Tilt Pi Display Units","tab":"39bb1b1f.1ea40c","order":2,"disp":true,"width":"6"},{"id":"157701e6.218f96","type":"ui_group","z":"","name":"Raspberry Pi","tab":"39bb1b1f.1ea40c","order":5,"disp":false,"width":"6"},{"id":"6699d5fe.98b4bc","type":"ui_group","z":"","name":"Filter Tilt by Signal Strength","tab":"39bb1b1f.1ea40c","order":3,"disp":true,"width":"6"},{"id":"6224b5cc.68a32c","type":"ui_link","z":"","name":"Tilt Shop","link":"http://tilthydrometer.com","icon":"open_in_browser","target":"newtab","order":5},{"id":"ab0af9be.0e5f7","type":"mqtt-broker","z":"","name":"","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"1fcc17b.89250e8","type":"tcp out","z":"b2ff4bbb.08e61","host":"","port":"","beserver":"reply","base64":false,"end":false,"name":"To BC","x":870,"y":960,"wires":[]},{"id":"98655d9a.2ea7c","type":"tcp in","z":"b2ff4bbb.08e61","name":"From BC","server":"server","host":"","port":"5000","datamode":"stream","datatype":"utf8","newline":"","topic":"","base64":false,"x":60,"y":980,"wires":[["468280c6.bbc74","932a990f.7ce77","25f3ce00.28bfea","ca730e13.05b7c"]]},{"id":"641383d1.5866f4","type":"change","z":"b2ff4bbb.08e61","name":"200","rules":[{"t":"set","p":"payload","pt":"msg","to":"$floor(msg.payload.DS18B20.Temperature*100)","tot":"jsonata"},{"t":"set","p":"200","pt":"flow","to":"payload","tot":"msg"},{"t":"set","p":"topic","pt":"msg","to":"200","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1010,"y":620,"wires":[["bb6f0304.c32328"]]},{"id":"dd39360a.b23ff8","type":"inject","z":"b2ff4bbb.08e61","name":"Analog in","topic":"","payload":"123454","payloadType":"str","repeat":"1","crontab":"","once":true,"onceDelay":0.1,"x":1290,"y":40,"wires":[["17bb011a.6130e7","2a341d2b.5be31a","45b2b4bf.a2b124","87ad5d50.a5cc6","6fc0f985.61217","fe132d1c.e6ee5","cebc142a.7db868","22ac277a.499c68","8df2967b.c3c948","8d9d9417.99429","bd895070.7cb798","5361e0c6.40452","4d9d23ba.0c1d44","8577b6cd.d04688","4941be5d.955198","fc20a9b.f9022d8","6d5047a6.55864","fa60dcc5.891b7","a885c717.2f1b68","bf8ed4b.1984fa8","efb72e5f.2be97"]]},{"id":"6d5047a6.55864","type":"change","z":"b2ff4bbb.08e61","name":"100","rules":[{"t":"set","p":"100","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1370,"y":160,"wires":[[]]},{"id":"8d9d9417.99429","type":"change","z":"b2ff4bbb.08e61","name":"205","rules":[{"t":"set","p":"205","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1670,"y":40,"wires":[[]]},{"id":"bd895070.7cb798","type":"change","z":"b2ff4bbb.08e61","name":"206","rules":[{"t":"set","p":"206","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1670,"y":160,"wires":[[]]},{"id":"5361e0c6.40452","type":"change","z":"b2ff4bbb.08e61","name":"207","rules":[{"t":"set","p":"207","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1670,"y":200,"wires":[[]]},{"id":"4d9d23ba.0c1d44","type":"change","z":"b2ff4bbb.08e61","name":"208","rules":[{"t":"set","p":"208","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1670,"y":240,"wires":[[]]},{"id":"8577b6cd.d04688","type":"change","z":"b2ff4bbb.08e61","name":"209","rules":[{"t":"set","p":"209","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1670,"y":280,"wires":[[]]},{"id":"17bb011a.6130e7","type":"change","z":"b2ff4bbb.08e61","name":"101","rules":[{"t":"set","p":"101","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1370,"y":200,"wires":[[]]},{"id":"2a341d2b.5be31a","type":"change","z":"b2ff4bbb.08e61","name":"102","rules":[{"t":"set","p":"102","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1370,"y":240,"wires":[[]]},{"id":"45b2b4bf.a2b124","type":"change","z":"b2ff4bbb.08e61","name":"103","rules":[{"t":"set","p":"103","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1370,"y":280,"wires":[[]]},{"id":"87ad5d50.a5cc6","type":"change","z":"b2ff4bbb.08e61","name":"104","rules":[{"t":"set","p":"104","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1370,"y":320,"wires":[[]]},{"id":"6fc0f985.61217","type":"change","z":"b2ff4bbb.08e61","name":"105","rules":[{"t":"set","p":"105","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1370,"y":360,"wires":[[]]},{"id":"fe132d1c.e6ee5","type":"change","z":"b2ff4bbb.08e61","name":"106","rules":[{"t":"set","p":"106","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1370,"y":400,"wires":[[]]},{"id":"cebc142a.7db868","type":"change","z":"b2ff4bbb.08e61","name":"107","rules":[{"t":"set","p":"107","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1370,"y":440,"wires":[[]]},{"id":"22ac277a.499c68","type":"change","z":"b2ff4bbb.08e61","name":"108","rules":[{"t":"set","p":"108","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1370,"y":480,"wires":[[]]},{"id":"8df2967b.c3c948","type":"change","z":"b2ff4bbb.08e61","name":"109","rules":[{"t":"set","p":"109","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1370,"y":520,"wires":[[]]},{"id":"4941be5d.955198","type":"change","z":"b2ff4bbb.08e61","name":"110","rules":[{"t":"set","p":"110","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1490,"y":160,"wires":[[]]},{"id":"fc20a9b.f9022d8","type":"change","z":"b2ff4bbb.08e61","name":"111","rules":[{"t":"set","p":"111","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1490,"y":200,"wires":[[]]},{"id":"fa60dcc5.891b7","type":"change","z":"b2ff4bbb.08e61","name":"112","rules":[{"t":"set","p":"112","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1490,"y":240,"wires":[[]]},{"id":"a885c717.2f1b68","type":"change","z":"b2ff4bbb.08e61","name":"113","rules":[{"t":"set","p":"113","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1490,"y":280,"wires":[[]]},{"id":"bf8ed4b.1984fa8","type":"change","z":"b2ff4bbb.08e61","name":"114","rules":[{"t":"set","p":"114","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1490,"y":320,"wires":[[]]},{"id":"efb72e5f.2be97","type":"change","z":"b2ff4bbb.08e61","name":"115","rules":[{"t":"set","p":"115","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1490,"y":360,"wires":[[]]},{"id":"7e4bbc0f.79f514","type":"http in","z":"437615b9.a7c5f4","name":"","url":"/brewfather","method":"post","upload":false,"swaggerDoc":"","x":80,"y":20,"wires":[["5cd71c5b.7c1fdc","60395960.115e78","23b476b5.08874a","efa64072.039c1"]]},{"id":"5cd71c5b.7c1fdc","type":"function","z":"437615b9.a7c5f4","name":"BF to BC","func":"flow.set('recipe' , msg.payload.recipe.fermentation)\nflow.set('fbeername' , msg.payload.recipe.name)\n\n\nfunction time_convert(num)\n { \n  var hours = Math.floor(num / 60);  \n  var minutes = num % 60;\n  return + hours + \":\" + minutes + \":00\";         \n}\n\nvar hopstand\nvar hopstandtemp\nif (msg.payload.recipe.hopStandMinutes > 0) {\n    hopstand = true\n    hopstandtemp = msg.payload.recipe.avgWeightedHopstandTemp\n}\nelse {\n    hopstandtemp = 0\n    hopstand = false\n}\n\nvar firstwort\nif (msg.payload.recipe.hops[0].use == \"First Wort\")  {\n    firstwort = true\n}  \nelse {\n    firstwort = false\n}\n\n\nvar hoptime=[];\nfor(var x=0;x<msg.payload.boilStepsCount;x++){\n     hoptime[x]= msg.payload.recipe.hops[x].time;\n    }\nhoptime.push(0,0,0,0,0,0,0,0,0,0);\nhoptime.length = 10\n\nvar mashtime=[];\nfor(var y=0;y<msg.payload.mashStepsCount;y++){\n     mashtime[y]= msg.payload.recipe.mash.steps[y].stepTime;\n    }\nmashtime.push(0,0,0,0,0);\nmashtime.length = 5\n\nvar mashsteps = msg.payload.mashStepsCount - 1;\nvar mashtemp=[];\nfor(var z=0;z<msg.payload.mashStepsCount;z++){\n     mashtemp[z]= msg.payload.recipe.mash.steps[z].stepTemp;\n    }\nmashtemp.push(mashtemp[mashsteps], mashtemp[mashsteps], mashtemp[mashsteps], mashtemp[mashsteps], mashtemp[mashsteps], mashtemp[mashsteps])\nmashtemp.length = 6\n\nmsg.payload = [ \n\n{ \"Name\": \"Preboil volume\", \"Value\": msg.payload.recipe.boilSize } , \n{ \"Name\": \"HLT volume\" , \"Value\": msg.payload.recipe.data.hltWaterAmount } , \n{ \"Name\": \"Sparge volume\" , \"Value\": msg.payload.recipe.data.spargeWaterAmount } , \n{ \"Name\": \"Strike temp\" , \"Value\": msg.payload.recipe.data.strikeTemp } , \n{ \"Name\": \"Mash volume\" , \"Value\": msg.payload.recipe.data.mashWaterAmount } , \n{ \"Name\": \"Mash temp\" , \"Value\": mashtemp[0] } ,\n{ \"Name\": \"Mash temp1\" , \"Value\": mashtemp[1] } , \n{ \"Name\": \"Mash temp2\" , \"Value\": mashtemp[2] } ,\n{ \"Name\": \"Mash temp3\" , \"Value\": mashtemp[3] } ,\n{ \"Name\": \"Mash temp4\" , \"Value\": mashtemp[4] } ,\n{ \"Name\": \"Mash temp5\" , \"Value\": mashtemp[5] } ,\n{ \"Name\": \"Mash time1\" , \"Value\": time_convert(mashtime[0]) } ,\n{ \"Name\": \"Mash time2\" , \"Value\": time_convert(mashtime[1]) } ,\n{ \"Name\": \"Mash time3\" , \"Value\": time_convert(mashtime[2]) } ,\n{ \"Name\": \"Mash time4\" , \"Value\": time_convert(mashtime[3]) } ,\n{ \"Name\": \"Mash time5\" , \"Value\": time_convert(mashtime[4]) } ,\n{ \"Name\": \"Hop time0\" , \"Value\": time_convert(hoptime[0]) } ,\n{ \"Name\": \"Hop time1\" , \"Value\": time_convert(hoptime[1]) } ,\n{ \"Name\": \"Hop time2\" , \"Value\": time_convert(hoptime[2]) } ,\n{ \"Name\": \"Hop time3\" , \"Value\": time_convert(hoptime[3]) } ,\n{ \"Name\": \"Hop time4\" , \"Value\": time_convert(hoptime[4]) } ,\n{ \"Name\": \"Hop time5\" , \"Value\": time_convert(hoptime[5]) } ,\n{ \"Name\": \"Hop time6\" , \"Value\": time_convert(hoptime[7]) } ,\n{ \"Name\": \"Hop time8\" , \"Value\": time_convert(hoptime[8]) } ,\n{ \"Name\": \"Hop time9\" , \"Value\": time_convert(hoptime[9]) } ,\n{ \"Name\": \"Boil time\" , \"Value\": time_convert(msg. payload.recipe.boilTime) } ,\n{ \"Name\": \"Hopstand temp\" , \"Value\": hopstandtemp } ,\n{ \"Name\": \"First wort\" , \"Value\": firstwort } ,\n{ \"Name\": \"Recipe received\" , \"Value\": msg.payload._timestamp } ,\n{ \"Name\": \"Status\" , \"Value\": msg.payload.recipe.name }\n\n];\n\nreturn msg;","outputs":1,"noerr":0,"x":260,"y":20,"wires":[["5d22cbcd.3f80a4"]]},{"id":"5d22cbcd.3f80a4","type":"http request","z":"437615b9.a7c5f4","name":"","method":"PUT","ret":"txt","url":"http://192.168.77.246:8000/globals","tls":"","x":450,"y":20,"wires":[[]]},{"id":"b1c4ee20.c5caf8","type":"http in","z":"437615b9.a7c5f4","name":"","url":"/Fermenter","method":"get","upload":false,"swaggerDoc":"","x":80,"y":60,"wires":[["9da925a2.e6eb6"]]},{"id":"60395960.115e78","type":"http response","z":"437615b9.a7c5f4","name":"","statusCode":"200","headers":{},"x":440,"y":60,"wires":[]},{"id":"9da925a2.e6eb6","type":"function","z":"437615b9.a7c5f4","name":"Fermenter","func":"msg.payload = [flow.get('recipe'),flow.get('fbeername')]\nreturn msg;","outputs":1,"noerr":0,"x":270,"y":60,"wires":[["60395960.115e78"]]},{"id":"cbd5eb16.35a0f","type":"tcp in","z":"437615b9.a7c5f4","name":"F1","server":"server","host":"","port":"8886","datamode":"single","datatype":"utf8","newline":"","topic":"F1","base64":false,"x":50,"y":140,"wires":[["86aead8c.980a5"]]},{"id":"86aead8c.980a5","type":"json","z":"437615b9.a7c5f4","name":"","property":"payload","action":"obj","pretty":false,"x":170,"y":140,"wires":[["6df8d545.32ca6c"]]},{"id":"36d7c887.e358e8","type":"mqtt out","z":"b2ff4bbb.08e61","name":"Fcool2 ctrl","topic":"cmnd/Fcool/POWER2","qos":"","retain":"","broker":"7473ae41.ca29a","x":550,"y":100,"wires":[]},{"id":"e94284e7.2b2a68","type":"switch","z":"b2ff4bbb.08e61","name":"Out","property":"topic","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"2","vt":"str"},{"t":"eq","v":"3","vt":"str"},{"t":"eq","v":"4","vt":"str"},{"t":"eq","v":"5","vt":"str"},{"t":"eq","v":"6","vt":"str"},{"t":"eq","v":"7","vt":"str"},{"t":"eq","v":"8","vt":"str"},{"t":"eq","v":"9","vt":"str"},{"t":"eq","v":"10","vt":"str"},{"t":"eq","v":"11","vt":"str"},{"t":"eq","v":"12","vt":"str"},{"t":"eq","v":"13","vt":"str"},{"t":"eq","v":"14","vt":"str"},{"t":"eq","v":"15","vt":"str"},{"t":"eq","v":"16","vt":"str"},{"t":"eq","v":"17","vt":"str"},{"t":"eq","v":"18","vt":"str"},{"t":"eq","v":"19","vt":"str"},{"t":"eq","v":"20","vt":"str"},{"t":"eq","v":"21","vt":"str"},{"t":"eq","v":"22","vt":"str"},{"t":"eq","v":"23","vt":"str"}],"checkall":"true","repair":false,"outputs":23,"x":70,"y":180,"wires":[[],[],[],["c1da1e2e.05adb8"],[],["31f78007.d9b448"],["c28662c7.a7ea1"],["ab7bcdce.39a708"],[],[],["7637ddc9.888764","e5da679f.8a98b"],[],[],[],[],["5b472365.0956ac","fa16943.55992e8"],["b645bc25.a9c0c","80a02e0.5e3545"],[],[],[],[],[],[]]},{"id":"75f77007.7b6a4","type":"mqtt out","z":"b2ff4bbb.08e61","name":"Fcool1 ctrl","topic":"cmnd/Fcool/POWER1","qos":"","retain":"","broker":"7473ae41.ca29a","x":550,"y":60,"wires":[]},{"id":"57ec97ef.27c94","type":"mqtt in","z":"b2ff4bbb.08e61","name":"Cooler temp","topic":"tele/cooler/SENSOR","qos":"2","datatype":"json","broker":"7473ae41.ca29a","x":730,"y":620,"wires":[["641383d1.5866f4"]]},{"id":"f7da946c.6da088","type":"mqtt out","z":"b2ff4bbb.08e61","name":"Cooler ctrl","topic":"cmnd/cooler/POWER","qos":"","retain":"","broker":"7473ae41.ca29a","x":550,"y":320,"wires":[]},{"id":"c2a4beaa.41db48","type":"mqtt out","z":"b2ff4bbb.08e61","name":"4ch L1","topic":"cmnd/4ch/POWER1","qos":"","retain":"","broker":"7473ae41.ca29a","x":570,"y":20,"wires":[]},{"id":"925fd397.62cb5","type":"mqtt in","z":"b2ff4bbb.08e61","name":"Freezer temp","topic":"tele/freezer/SENSOR","qos":"2","datatype":"json","broker":"7473ae41.ca29a","x":730,"y":580,"wires":[["a06f145a.14d9b8"]]},{"id":"e94488ac.b15ce","type":"mqtt out","z":"b2ff4bbb.08e61","name":"Freezer ctrl","topic":"cmnd/freezer/POWER","qos":"","retain":"","broker":"7473ae41.ca29a","x":550,"y":220,"wires":[]},{"id":"4f072eb2.208fb","type":"mqtt in","z":"b2ff4bbb.08e61","name":"Cooler feedback","topic":"stat/cooler/POWER","qos":"2","datatype":"auto","broker":"7473ae41.ca29a","x":740,"y":420,"wires":[["bc1e0cea.441558"]]},{"id":"bc1e0cea.441558","type":"change","z":"b2ff4bbb.08e61","name":"16","rules":[{"t":"change","p":"payload","pt":"msg","from":"ON","fromt":"str","to":"1","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"OFF","fromt":"str","to":"0","tot":"num"},{"t":"set","p":"16","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1010,"y":420,"wires":[[]]},{"id":"d3c526c2.432d18","type":"mqtt in","z":"b2ff4bbb.08e61","name":"4ch L1 feedback","topic":"stat/4ch/POWER1","qos":"2","datatype":"auto","broker":"7473ae41.ca29a","x":740,"y":20,"wires":[["88ec5d80.7bd8e8"]]},{"id":"88ec5d80.7bd8e8","type":"change","z":"b2ff4bbb.08e61","name":"4","rules":[{"t":"change","p":"payload","pt":"msg","from":"ON","fromt":"str","to":"1","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"OFF","fromt":"str","to":"0","tot":"num"},{"t":"set","p":"4","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1010,"y":20,"wires":[[]]},{"id":"563d4427.3d1c9c","type":"mqtt in","z":"b2ff4bbb.08e61","name":"Fcool1 feedback","topic":"stat/Fcool/POWER1","qos":"2","datatype":"auto","broker":"7473ae41.ca29a","x":740,"y":100,"wires":[["8d251464.8ecc"]]},{"id":"8d251464.8ecc","type":"change","z":"b2ff4bbb.08e61","name":"6","rules":[{"t":"change","p":"payload","pt":"msg","from":"ON","fromt":"str","to":"1","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"OFF","fromt":"str","to":"0","tot":"num"},{"t":"set","p":"6","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1010,"y":100,"wires":[[]]},{"id":"1a1aebea.ed63ec","type":"mqtt in","z":"b2ff4bbb.08e61","name":"Fcool2 feedback","topic":"stat/Fcool/POWER2","qos":"2","datatype":"auto","broker":"7473ae41.ca29a","x":740,"y":180,"wires":[["71371b60.8a79dc"]]},{"id":"71371b60.8a79dc","type":"change","z":"b2ff4bbb.08e61","name":"7","rules":[{"t":"change","p":"payload","pt":"msg","from":"ON","fromt":"str","to":"1","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"OFF","fromt":"str","to":"0","tot":"num"},{"t":"set","p":"7","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1010,"y":180,"wires":[[]]},{"id":"6253fcde.9433c4","type":"rbe","z":"b2ff4bbb.08e61","name":"","func":"rbe","gap":"","start":"","inout":"out","property":"payload","x":730,"y":920,"wires":[["e94284e7.2b2a68"]]},{"id":"a06f145a.14d9b8","type":"change","z":"b2ff4bbb.08e61","name":"201","rules":[{"t":"set","p":"payload","pt":"msg","to":"$floor(msg.payload.DS18B20.Temperature*100)\t","tot":"jsonata"},{"t":"set","p":"201","pt":"flow","to":"payload","tot":"msg"},{"t":"set","p":"topic","pt":"msg","to":"201","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1010,"y":580,"wires":[["bb6f0304.c32328"]]},{"id":"ad6079a7.ce93a","type":"change","z":"b2ff4bbb.08e61","name":"11","rules":[{"t":"change","p":"payload","pt":"msg","from":"ON","fromt":"str","to":"1","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"OFF","fromt":"str","to":"0","tot":"num"},{"t":"set","p":"11","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1010,"y":340,"wires":[[]]},{"id":"ee5a4b53.3b7498","type":"mqtt in","z":"b2ff4bbb.08e61","name":"Freezer feedback","topic":"stat/freezer/POWER","qos":"2","datatype":"auto","broker":"7473ae41.ca29a","x":740,"y":340,"wires":[["ad6079a7.ce93a"]]},{"id":"bb6f0304.c32328","type":"function","z":"b2ff4bbb.08e61","name":"Hysteresis","func":"var port =  msg.topic\nvar value = msg.payload\nvar delay;\nvar flush = {};\nvar coolmode;\nvar output;\nvar on;\nvar off;\nvar pin = flow.get(String(port)+\"pin\")\nvar target = flow.get(String(port)+\"target\")\nvar onoffset = flow.get(String(port)+\"onoffset\")\nvar cooling = flow.get(String(pin));\nvar activelow = flow.get(String(port)+\"activelow\")\nvar ondelay = flow.get(String(port)+\"ondelay\")\n\nif (activelow === 1) {\n    on = 0\n    off = 1\n}\nelse {\n    on = 1\n    off = 0\n}\n\nif (onoffset > target) {\n    coolmode = true\n}\n\nif (value >= onoffset && coolmode === true){\noutput = on\n}\nif (value <= onoffset && value > target && cooling === 1 && coolmode === true) {\n  output = on \n}\nif (value <= target && coolmode === true){\n    output = off\nmsg.flush = flush\nnode.send(msg.flush)\n}\n\nif (flow.get(String(pin)+\"disabled\") === 1) {\noutput = off\nmsg.flush = flush\nnode.send(msg.flush)\n}\n\nmsg.topic = pin\nmsg.payload = output\nmsg.delay = ondelay\nreturn msg;","outputs":1,"noerr":0,"x":530,"y":940,"wires":[["6253fcde.9433c4"]]},{"id":"2b196c8.86dc794","type":"mqtt out","z":"b2ff4bbb.08e61","name":"Steam ctrl","topic":"cmnd/steam/POWER","qos":"","retain":"","broker":"7473ae41.ca29a","x":550,"y":140,"wires":[]},{"id":"cf6f3408.cb3d","type":"mqtt in","z":"b2ff4bbb.08e61","name":"Steam feedback","topic":"stat/steam/POWER","qos":"2","datatype":"auto","broker":"7473ae41.ca29a","x":740,"y":260,"wires":[["913a3f0b.f19418"]]},{"id":"913a3f0b.f19418","type":"change","z":"b2ff4bbb.08e61","name":"8","rules":[{"t":"change","p":"payload","pt":"msg","from":"ON","fromt":"str","to":"1","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"OFF","fromt":"str","to":"0","tot":"num"},{"t":"set","p":"8","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1010,"y":260,"wires":[[]]},{"id":"5b472365.0956ac","type":"falling-edge","z":"b2ff4bbb.08e61","name":"Stop","threshold":"1","x":270,"y":320,"wires":[["f7da946c.6da088"]]},{"id":"fa16943.55992e8","type":"delay","z":"b2ff4bbb.08e61","name":"ONdelay","pauseType":"delayv","timeout":"0","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":280,"y":280,"wires":[["a877fda0.40eca"]]},{"id":"e5da679f.8a98b","type":"falling-edge","z":"b2ff4bbb.08e61","name":"Stop","threshold":"1","x":270,"y":220,"wires":[["e94488ac.b15ce"]]},{"id":"7637ddc9.888764","type":"delay","z":"b2ff4bbb.08e61","name":"ONdelay","pauseType":"delayv","timeout":"0","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":280,"y":180,"wires":[["62674ccb.f8ed9c"]]},{"id":"468280c6.bbc74","type":"string","z":"b2ff4bbb.08e61","name":"first","methods":[{"name":"getLeftMost","params":[{"type":"str","value":"?"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":230,"y":1040,"wires":[["ff1815eb.b334c","df4cfda0.a7ad48"]]},{"id":"932a990f.7ce77","type":"string","z":"b2ff4bbb.08e61","name":"last","methods":[{"name":"delLeftMost","params":[{"type":"str","value":"?"}]},{"name":"ensureLeft","params":[{"type":"str","value":"?"}]},{"name":"delRightMost","params":[{"type":"str","value":"!"}]},{"name":"delRightMost","params":[{"type":"str","value":"!"}]},{"name":"delRightMost","params":[{"type":"str","value":"!"}]},{"name":"delRightMost","params":[{"type":"str","value":";"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":230,"y":1080,"wires":[["597e2d94.262864"]]},{"id":"ff1815eb.b334c","type":"split","z":"b2ff4bbb.08e61","name":"","splt":"!","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":370,"y":1000,"wires":[["f8fbcb2.87d1b38"]]},{"id":"597e2d94.262864","type":"split","z":"b2ff4bbb.08e61","name":"","splt":"?","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":370,"y":1080,"wires":[["1edecc16.888c54"]]},{"id":"df4cfda0.a7ad48","type":"join","z":"b2ff4bbb.08e61","name":"","mode":"custom","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":"","joinerType":"str","accumulate":false,"timeout":"0.1","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":710,"y":1040,"wires":[["56887ab.9376c04"]]},{"id":"1edecc16.888c54","type":"function","z":"b2ff4bbb.08e61","name":"feedback","func":"if (msg.payload.length > 0) {\n  var  pin = msg.payload\n\n    msg.payload = \"?\"+String(pin)+\"=\"+String(flow.get(pin));\n    \nreturn msg;\n}","outputs":1,"noerr":0,"x":520,"y":1080,"wires":[["df4cfda0.a7ad48"]]},{"id":"f8fbcb2.87d1b38","type":"function","z":"b2ff4bbb.08e61","name":"pin config","func":"if (msg.payload.length > 0) {\nvar input = msg.payload.split(\",\");\nvar pin = parseInt(input[0])\nvar config = parseInt(input[1])\nvar state;\n\nflow.set(String(pin)+\"disabled\", 0);\n\nif (config == 1) {\n    var one ={};\n  one.topic = pin\n  state = parseInt(input[2])\n  one.payload = state \n  return [one, null, null];\n}\nif (config == 5) {\n    five = {};\n    five.topic = \"newconfig\"\n    pin = parseInt(input[0])\n    config = parseInt(input[1])\n    var port = parseInt(input[2])\n    var target = parseInt(input[3])\n    var onoffset = parseInt(input[4])\n    var ondelay = parseInt(input[5]) * 1000\n    var activelow = parseInt(input[6])\n    var value = parseInt(flow.get(String(port)))\n    flow.set(String(port)+\"pin\", pin);\n    flow.set(String(port)+\"target\", target);\n    flow.set(String(port)+\"onoffset\", onoffset);\n    flow.set(String(port)+\"activelow\", activelow);\n    flow.set(String(port)+\"ondelay\", ondelay);\n    five.payload = [pin, config, port, target, onoffset, ondelay, activelow]\n    return [null, five, null];\n}\nif (config == 7) {\n    var seven = {};\n  seven.topic = pin\n  state = parseInt(input[2])\n  seven.payload = state \n  return [null, null, seven];\n}\n}","outputs":3,"noerr":0,"x":520,"y":1000,"wires":[["6253fcde.9433c4"],[],["6253fcde.9433c4"]]},{"id":"f5cd4ad8.3e7d38","type":"split","z":"b2ff4bbb.08e61","name":"","splt":"/","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":370,"y":900,"wires":[["8ec6fb61.8728b8"]]},{"id":"8ec6fb61.8728b8","type":"function","z":"b2ff4bbb.08e61","name":"disable pins","func":"\nif (msg.payload.length > 0) {\nvar input = msg.payload;\nvar pin = input;\nflow.set(String(pin)+\"disabled\", 1);\nmsg.topic = pin;\nmsg.payload = 0;\nreturn msg;\n}\n\n","outputs":1,"noerr":0,"x":530,"y":900,"wires":[["6253fcde.9433c4","e94284e7.2b2a68"]]},{"id":"56887ab.9376c04","type":"string","z":"b2ff4bbb.08e61","name":"","methods":[{"name":"ensureRight","params":[{"type":"str","value":";"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":730,"y":960,"wires":[["1fcc17b.89250e8","3cac4b16.68df34"]]},{"id":"25f3ce00.28bfea","type":"switch","z":"b2ff4bbb.08e61","name":"keepalive","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"*","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":380,"y":960,"wires":[["56887ab.9376c04"]]},{"id":"3cac4b16.68df34","type":"debug","z":"b2ff4bbb.08e61","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":890,"y":1000,"wires":[]},{"id":"af53b13f.326b9","type":"change","z":"b2ff4bbb.08e61","name":"rbe reset","rules":[{"t":"set","p":"reset","pt":"msg","to":"on","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":520,"y":860,"wires":[["6253fcde.9433c4"]]},{"id":"edabda2a.6b2fe8","type":"inject","z":"b2ff4bbb.08e61","name":"","topic":"","payload":"","payloadType":"date","repeat":"600","crontab":"","once":true,"onceDelay":"60","x":250,"y":860,"wires":[["af53b13f.326b9"]]},{"id":"a877fda0.40eca","type":"delay","z":"b2ff4bbb.08e61","name":"limit","pauseType":"rate","timeout":"0","timeoutUnits":"seconds","rate":"1","nbRateUnits":"60","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":410,"y":280,"wires":[["f7da946c.6da088"]]},{"id":"62674ccb.f8ed9c","type":"delay","z":"b2ff4bbb.08e61","name":"limit","pauseType":"rate","timeout":"0","timeoutUnits":"seconds","rate":"1","nbRateUnits":"60","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":410,"y":180,"wires":[["e94488ac.b15ce"]]},{"id":"ca730e13.05b7c","type":"function","z":"b2ff4bbb.08e61","name":"disable","func":"var str = msg.payload\nif (str.indexOf(\"/\") >= 0) {\n   var firstq =  str.indexOf(\"?\")\n   var firstw = str.indexOf(\"!\")\n   var slashpart\n   if (firstq >= 0 || firstw >= 0) {\n    if (firstw > firstq) {\n    slashpart = str.slice(0, firstw)\n    }\n    if (firstq > firstw) {\n        if (firstw > -1) { \n        slashpart = str.slice(0, firstw)\n        }\n        if (firstw == -1) { \n   slashpart = str.slice(0, firstq)\n        }\n    }\n    msg.payload = slashpart\n   return msg;\n   }\n   else {\n    msg.payload = str\n   }\n   return msg;\n}\n","outputs":1,"noerr":0,"x":240,"y":900,"wires":[["f5cd4ad8.3e7d38"]]},{"id":"c1da1e2e.05adb8","type":"delay","z":"b2ff4bbb.08e61","name":"limit","pauseType":"rate","timeout":"0","timeoutUnits":"seconds","rate":"1","nbRateUnits":"2","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":270,"y":20,"wires":[["c2a4beaa.41db48"]]},{"id":"ab7bcdce.39a708","type":"delay","z":"b2ff4bbb.08e61","name":"limit","pauseType":"rate","timeout":"0","timeoutUnits":"seconds","rate":"1","nbRateUnits":"2","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":410,"y":140,"wires":[["2b196c8.86dc794"]]},{"id":"1f120b4.c56cff5","type":"switch","z":"437615b9.a7c5f4","name":"","property":"payload","propertyType":"msg","rules":[{"t":"istype","v":"number","vt":"number"},{"t":"istype","v":"string","vt":"string"}],"checkall":"true","repair":false,"outputs":2,"x":410,"y":140,"wires":[["191217a1.74ff68"],["4fc0ff6.31fca8"]]},{"id":"6df8d545.32ca6c","type":"split","z":"437615b9.a7c5f4","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"topic","x":290,"y":140,"wires":[["1f120b4.c56cff5"]]},{"id":"4f99aa24.7ec0d4","type":"debug","z":"437615b9.a7c5f4","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":750,"y":200,"wires":[]},{"id":"c3f453af.f00418","type":"inject","z":"437615b9.a7c5f4","name":"Fusion config","topic":"fusion-configuration","payload":"{\"outputTopic\":\"F1\",\"inputTopics\":[\"beer\",\"name\",\"temp\",\"ext_temp\",\"aux_temp\",\"temp_unit\",\"pressure\",\"pressure_unit\",\"gravity\",\"temperature\",\"comment\"],\"allowUndefined\":true,\"onlyPayloads\":true}","payloadType":"json","repeat":"","crontab":"","once":true,"onceDelay":"2","x":440,"y":100,"wires":[["4fc0ff6.31fca8"]]},{"id":"4fc0ff6.31fca8","type":"fusion","z":"437615b9.a7c5f4","name":"","x":670,"y":140,"wires":[["4f99aa24.7ec0d4"]]},{"id":"191217a1.74ff68","type":"aggregator","z":"437615b9.a7c5f4","name":"median","topic":"","intervalCount":"60","intervalUnits":"s","submitIncompleteInterval":true,"submitPerTopic":true,"aggregationType":"median","x":540,"y":140,"wires":[["4fc0ff6.31fca8"]]},{"id":"73724099.d54698","type":"delay","z":"437615b9.a7c5f4","name":"limit","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"15","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":810,"y":140,"wires":[[]]},{"id":"e70e2273.283988","type":"tcp in","z":"437615b9.a7c5f4","name":"iSpindelRed","server":"server","host":"","port":"8891","datamode":"single","datatype":"utf8","newline":"","topic":"iSpindelRed","base64":false,"x":70,"y":300,"wires":[[]]},{"id":"7cb32a8b.7ca5c4","type":"tcp in","z":"437615b9.a7c5f4","name":"iSpindelGreen","server":"server","host":"","port":"8892","datamode":"single","datatype":"utf8","newline":"","topic":"iSpindelGreen","base64":false,"x":70,"y":360,"wires":[["75f21305.3e7034"]]},{"id":"ae818adf.5fd0b8","type":"tcp in","z":"437615b9.a7c5f4","name":"iSpindelBlue","server":"server","host":"","port":"8893","datamode":"single","datatype":"utf8","newline":"","topic":"iSpindelBlue","base64":false,"x":70,"y":420,"wires":[[]]},{"id":"75f21305.3e7034","type":"json","z":"437615b9.a7c5f4","name":"","property":"payload","action":"","pretty":false,"x":270,"y":360,"wires":[["37e5173e.dbbc18","339200ea.862f38"]]},{"id":"37e5173e.dbbc18","type":"split","z":"437615b9.a7c5f4","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"topic","x":390,"y":360,"wires":[["324f93e9.8a84fc","ce973dd4.7d9a4"]]},{"id":"324f93e9.8a84fc","type":"change","z":"437615b9.a7c5f4","name":"","rules":[{"t":"change","p":"topic","pt":"msg","from":"name","fromt":"str","to":"comment","tot":"str"},{"t":"change","p":"topic","pt":"msg","from":"temperature","fromt":"str","to":"aux_temp","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":540,"y":360,"wires":[["1f120b4.c56cff5"]]},{"id":"1a2653f2.600e1c","type":"tcp in","z":"437615b9.a7c5f4","name":"iSpindelBlack","server":"server","host":"","port":"8894","datamode":"single","datatype":"utf8","newline":"","topic":"iSpindelBlack","base64":false,"x":70,"y":480,"wires":[[]]},{"id":"20c38af1.43ba0e","type":"tcp in","z":"437615b9.a7c5f4","name":"iSpindelWhite","server":"server","host":"","port":"8895","datamode":"single","datatype":"utf8","newline":"","topic":"iSpindelWhite","base64":false,"x":70,"y":540,"wires":[[]]},{"id":"ce973dd4.7d9a4","type":"switch","z":"437615b9.a7c5f4","name":"","property":"topic","propertyType":"msg","rules":[{"t":"eq","v":"angle","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":510,"y":400,"wires":[["23e6ca27.881bfe"]]},{"id":"23e6ca27.881bfe","type":"aggregator","z":"437615b9.a7c5f4","name":"average","topic":"","intervalCount":"60","intervalUnits":"s","submitIncompleteInterval":false,"submitPerTopic":true,"aggregationType":"geometricMean","x":640,"y":400,"wires":[["339200ea.862f38"]]},{"id":"339200ea.862f38","type":"debug","z":"437615b9.a7c5f4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":790,"y":400,"wires":[]},{"id":"23b476b5.08874a","type":"debug","z":"437615b9.a7c5f4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":670,"y":20,"wires":[]},{"id":"811d834f.6d8518","type":"mqtt out","z":"b2ff4bbb.08e61","name":"Fridge1 ctrl","topic":"cmnd/Fridge1/POWER","qos":"","retain":"","broker":"7473ae41.ca29a","x":550,"y":400,"wires":[]},{"id":"80a02e0.5e3545","type":"falling-edge","z":"b2ff4bbb.08e61","name":"Stop","threshold":"1","x":270,"y":400,"wires":[["811d834f.6d8518"]]},{"id":"b645bc25.a9c0c","type":"delay","z":"b2ff4bbb.08e61","name":"ONdelay","pauseType":"delayv","timeout":"0","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":280,"y":360,"wires":[["a11594f1.f68e7"]]},{"id":"a11594f1.f68e7","type":"delay","z":"b2ff4bbb.08e61","name":"limit","pauseType":"rate","timeout":"0","timeoutUnits":"seconds","rate":"1","nbRateUnits":"60","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":410,"y":360,"wires":[["811d834f.6d8518"]]},{"id":"7e36c077.1f1ad","type":"mqtt in","z":"b2ff4bbb.08e61","name":"Fridge1 temp","topic":"tele/Fridge1/SENSOR","qos":"2","datatype":"json","broker":"7473ae41.ca29a","x":730,"y":660,"wires":[["5165e4c1.86cd8c"]]},{"id":"5165e4c1.86cd8c","type":"change","z":"b2ff4bbb.08e61","name":"202","rules":[{"t":"set","p":"payload","pt":"msg","to":"$floor(msg.payload.DS18B20.Temperature*100)\t","tot":"jsonata"},{"t":"set","p":"202","pt":"flow","to":"payload","tot":"msg"},{"t":"set","p":"topic","pt":"msg","to":"202","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1010,"y":660,"wires":[["bb6f0304.c32328"]]},{"id":"b6f39ed8.fb5df","type":"change","z":"b2ff4bbb.08e61","name":"17","rules":[{"t":"change","p":"payload","pt":"msg","from":"ON","fromt":"str","to":"1","tot":"num"},{"t":"change","p":"payload","pt":"msg","from":"OFF","fromt":"str","to":"0","tot":"num"},{"t":"set","p":"17","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1010,"y":500,"wires":[[]]},{"id":"851f35cf.375588","type":"mqtt in","z":"b2ff4bbb.08e61","name":"Fridge1 feedback","topic":"stat/Fridge1/POWER","qos":"2","datatype":"auto","broker":"7473ae41.ca29a","x":740,"y":500,"wires":[["b6f39ed8.fb5df"]]},{"id":"31f78007.d9b448","type":"delay","z":"b2ff4bbb.08e61","name":"limit","pauseType":"rate","timeout":"0","timeoutUnits":"seconds","rate":"1","nbRateUnits":"2","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":410,"y":60,"wires":[["75f77007.7b6a4"]]},{"id":"c28662c7.a7ea1","type":"delay","z":"b2ff4bbb.08e61","name":"limit","pauseType":"rate","timeout":"0","timeoutUnits":"seconds","rate":"1","nbRateUnits":"2","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":410,"y":100,"wires":[["36d7c887.e358e8"]]},{"id":"efa64072.039c1","type":"debug","z":"437615b9.a7c5f4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":280,"y":100,"wires":[]},{"id":"2378dea3.db1552","type":"mqtt in","z":"b2ff4bbb.08e61","name":"Fridge1 state","topic":"tele/Fridge1/STATE","qos":"2","datatype":"json","broker":"7473ae41.ca29a","x":730,"y":540,"wires":[["8da4a884.43e79"]]},{"id":"8da4a884.43e79","type":"change","z":"b2ff4bbb.08e61","name":"Power","rules":[{"t":"move","p":"payload.POWER","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":870,"y":540,"wires":[["b6f39ed8.fb5df"]]},{"id":"408bf038.bcdc38","type":"mqtt in","z":"b2ff4bbb.08e61","name":"Cooler state","topic":"tele/cooler/STATE","qos":"2","datatype":"json","broker":"7473ae41.ca29a","x":730,"y":460,"wires":[["3bf8bbfc.32948c"]]},{"id":"3bf8bbfc.32948c","type":"change","z":"b2ff4bbb.08e61","name":"Power","rules":[{"t":"move","p":"payload.POWER","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":870,"y":460,"wires":[["bc1e0cea.441558"]]},{"id":"25e18c15.02b89c","type":"mqtt in","z":"b2ff4bbb.08e61","name":"Freezer state","topic":"tele/freezer/STATE","qos":"2","datatype":"json","broker":"7473ae41.ca29a","x":730,"y":380,"wires":[["c62159f8.9ee8e"]]},{"id":"c62159f8.9ee8e","type":"change","z":"b2ff4bbb.08e61","name":"Power","rules":[{"t":"move","p":"payload.POWER","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":870,"y":380,"wires":[["ad6079a7.ce93a"]]},{"id":"ca86dbb4.958fd","type":"mqtt in","z":"b2ff4bbb.08e61","name":"Steam state","topic":"tele/steam/STATE","qos":"2","datatype":"json","broker":"7473ae41.ca29a","x":730,"y":300,"wires":[["d7d4ffc6.14867"]]},{"id":"d7d4ffc6.14867","type":"change","z":"b2ff4bbb.08e61","name":"Power","rules":[{"t":"move","p":"payload.POWER","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":870,"y":300,"wires":[["913a3f0b.f19418"]]},{"id":"d4438bf9.b0f548","type":"mqtt in","z":"b2ff4bbb.08e61","name":"Fcool2 state","topic":"tele/Fcool/STATE","qos":"2","datatype":"json","broker":"7473ae41.ca29a","x":730,"y":220,"wires":[["f2945d54.c38a7"]]},{"id":"f2945d54.c38a7","type":"change","z":"b2ff4bbb.08e61","name":"Power","rules":[{"t":"move","p":"payload.POWER2","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":870,"y":220,"wires":[["71371b60.8a79dc"]]},{"id":"8f0967a8.02be6","type":"mqtt in","z":"b2ff4bbb.08e61","name":"Fcool1 state","topic":"tele/Fcool/STATE","qos":"2","datatype":"json","broker":"7473ae41.ca29a","x":730,"y":140,"wires":[["fbed67ef.1bd85"]]},{"id":"fbed67ef.1bd85","type":"change","z":"b2ff4bbb.08e61","name":"Power","rules":[{"t":"move","p":"payload.POWER1","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":870,"y":140,"wires":[["8d251464.8ecc"]]},{"id":"fc6bd9e3.8d9","type":"mqtt in","z":"b2ff4bbb.08e61","name":"4ch L1 state","topic":"tele/4ch/STATE","qos":"2","datatype":"json","broker":"7473ae41.ca29a","x":730,"y":60,"wires":[["cdb6d1de.157c78"]]},{"id":"cdb6d1de.157c78","type":"change","z":"b2ff4bbb.08e61","name":"Power","rules":[{"t":"move","p":"payload.POWER1","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":870,"y":60,"wires":[["88ec5d80.7bd8e8"]]}]
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top