diff --git a/.gitignore b/.gitignore
index a5649bb..12b43be 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,3 @@
*.backup
.DS_Store
flows_brew2_cred.json
-package.json
diff --git a/flows_brew2.json b/flows_brew2.json
index b36f05b..12c38c2 100644
--- a/flows_brew2.json
+++ b/flows_brew2.json
@@ -1 +1 @@
-[{"id":"cae39ee2.e2c898","type":"tab","label":"Temperatures","disabled":false,"info":"Temperature readings, triggered every 2 \nseconds (note that the PID algorith has this \nfrequency hard coded into it, and those \nfunctions will need to be modified if the \ntrigger frequency is changed). Also smoothing \nand formating for temperature display."},{"id":"28484198.eb083e","type":"tab","label":"Mash buttons","disabled":false,"info":"Buttons for mash control. These also display \nstate."},{"id":"cdc1c9a3.021f58","type":"tab","label":"Mash controller","disabled":false,"info":"Everything related to mash/RIMS PID control, in\naddition to interlock features to prevent RIMS\nuse when pump is inactive or when the boil \nelement is in use."},{"id":"4ef08725.8fbdd","type":"tab","label":"PID outputs","disabled":false,"info":"This flow displays output from the PID \nalgorithm. This can be useful for tuning \npurposes."},{"id":"70d4070b.e447b8","type":"tab","label":"Boil buttons","disabled":false,"info":"Buttons related to controlling the boil.\nThese buttons also display state."},{"id":"1e878673.29136a","type":"tab","label":"Boil controller","disabled":false,"info":"PID functionality, as well as an interlock \nscheme to prevent multiple elements from being\nused at one time."},{"id":"44130c7e.f0c1fc","type":"tab","label":"Element outputs","disabled":false,"info":"Routing to GPIO, as well as displays for element\noutput in duty % and watts."},{"id":"2d8e58d.7555ca8","type":"tab","label":"Pump control","disabled":false,"info":"This flow provides a button to turn a pump on \nand off. The colour of the pump button reflects\nits status. The pump has one restriction in that \nit can not be turned off while RIMS is active.\nSuch attempts are blocked, with a notification\nprovided to the user."},{"id":"b764cb6a.5d4448","type":"tab","label":"UI","disabled":false,"info":"This tab contains a collection of UI features.\n* CSS overide to ensure dashboard is only 1 or 2 columns\n* Centre \"group\" titles\n* Navigation buttons\n* Bolts indicating element activity"},{"id":"b2a662aa.2b752","type":"tab","label":"Volume","disabled":true,"info":"A pressure sensor is read by an analog input\nboard. The pressure reading is then converted\nto cmH20 and volume and displayed."},{"id":"7fa64790.3f4f4","type":"ui_base","theme":{"name":"theme-light","lightTheme":{"default":"#0094CE","baseColor":"#77bb40","baseFont":"Tahoma,Geneva,sans-serif","edited":true,"reset":false},"darkTheme":{"default":"#097479","baseColor":"#094779","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":true,"reset":false},"customTheme":{"name":"Untitled Theme 1","default":"#4B7930","baseColor":"#32A359","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","reset":false},"themeState":{"base-color":{"default":"#0094CE","value":"#77bb40","edited":true},"page-titlebar-backgroundColor":{"value":"#77bb40","edited":true},"page-backgroundColor":{"value":"#fafafa","edited":true},"page-sidebar-backgroundColor":{"value":"#ffffff","edited":false},"group-textColor":{"value":"#9fd077","edited":true},"group-borderColor":{"value":"#ffffff","edited":true},"group-backgroundColor":{"value":"#ffffff","edited":true},"widget-textColor":{"value":"#111111","edited":true},"widget-backgroundColor":{"value":"#77bb40","edited":true},"widget-borderColor":{"value":"#ffffff","edited":true},"base-font":{"value":"Tahoma,Geneva,sans-serif"}},"angularTheme":{"primary":"indigo","accents":"blue","warn":"red","background":"grey"}},"site":{"name":"brew2","hideToolbar":"true","allowSwipe":"false","allowTempTheme":"false","dateFormat":"DD/MM/YYYY","sizes":{"sx":45,"sy":45,"gx":5,"gy":5,"cx":5,"cy":5,"px":5,"py":5},"lockMenu":"false"}},{"id":"bde8848e.1d357","type":"ui_tab","z":"","name":"Brew","icon":"","order":1,"disabled":false,"hidden":true},{"id":"f6e1ef23.f6f118","type":"ui_group","z":"","name":"MASH","tab":"bde8848e.1d357","order":1,"disp":true,"width":"6","collapse":false},{"id":"9fe30f36.92cc2","type":"ui_group","z":"","name":"BOIL","tab":"bde8848e.1d357","order":2,"disp":true,"width":"6","collapse":false},{"id":"f3e4e5c9.37f76","type":"ui_group","z":"","name":"BOIL SETTINGS","tab":"4adcb434.78650c","order":2,"disp":true,"width":"6","collapse":false},{"id":"321aaa6a.377d5e","type":"ui_group","z":"","name":"MASH SETTINGS","tab":"f33d4d52.4eb478","order":2,"disp":true,"width":"6","collapse":false},{"id":"f33d4d52.4eb478","type":"ui_tab","z":"","name":"Mash Settings","icon":"","order":2,"disabled":false,"hidden":true},{"id":"4adcb434.78650c","type":"ui_tab","z":"","name":"Boil Settings","icon":"","order":3,"disabled":false,"hidden":true},{"id":"d40a07ee.aef4c8","type":"ui_spacer","name":"spacer","group":"f3e4e5c9.37f76","order":12,"width":"6","height":1},{"id":"e7bea373.db6ff","type":"ui_spacer","name":"spacer","group":"f3e4e5c9.37f76","order":10,"width":"6","height":1},{"id":"a727758.4406208","type":"ui_spacer","name":"spacer","group":"321aaa6a.377d5e","order":23,"width":"6","height":1},{"id":"ee71929f.5165","type":"ui_spacer","name":"spacer","group":"f3e4e5c9.37f76","order":1,"width":1,"height":1},{"id":"e0027dad.ce1ab","type":"ui_spacer","name":"spacer","group":"f3e4e5c9.37f76","order":3,"width":1,"height":1},{"id":"c7dbe94d.2b3738","type":"ui_spacer","name":"spacer","group":"f3e4e5c9.37f76","order":4,"width":1,"height":1},{"id":"9d39816a.73695","type":"ui_spacer","name":"spacer","group":"f3e4e5c9.37f76","order":7,"width":1,"height":1},{"id":"f7965945.9488d8","type":"ui_spacer","name":"spacer","group":"f3e4e5c9.37f76","order":6,"width":1,"height":1},{"id":"65121f6a.d0f13","type":"ui_spacer","name":"spacer","group":"f3e4e5c9.37f76","order":9,"width":1,"height":1},{"id":"eee28e32.85e428","type":"ui_spacer","name":"spacer","group":"f3e4e5c9.37f76","order":16,"width":"6","height":1},{"id":"7311bc5c.585f8c","type":"ui_group","z":"","name":"PUMP","tab":"bde8848e.1d357","order":3,"disp":false,"width":"6","collapse":false},{"id":"c85b00d0.83335","type":"ui_spacer","name":"spacer","group":"f6e1ef23.f6f118","order":3,"width":1,"height":1},{"id":"316350b6.1b9c","type":"ui_spacer","name":"spacer","group":"f6e1ef23.f6f118","order":5,"width":1,"height":1},{"id":"c14ce771.46f9b8","type":"ui_spacer","name":"spacer","group":"f6e1ef23.f6f118","order":8,"width":1,"height":1},{"id":"906fc327.7270e","type":"ui_spacer","name":"spacer","group":"f6e1ef23.f6f118","order":9,"width":6,"height":1},{"id":"a77aeab1.f128d8","type":"ui_spacer","name":"spacer","group":"f6e1ef23.f6f118","order":21,"width":6,"height":1},{"id":"992a6538.82412","type":"ui_spacer","name":"spacer","group":"9fe30f36.92cc2","order":3,"width":1,"height":1},{"id":"285414c9.469bf4","type":"ui_spacer","name":"spacer","group":"9fe30f36.92cc2","order":5,"width":1,"height":1},{"id":"eac69de0.0ec08","type":"ui_spacer","name":"spacer","group":"9fe30f36.92cc2","order":8,"width":1,"height":1},{"id":"132f9a87.74275d","type":"ui_spacer","name":"spacer","group":"9fe30f36.92cc2","order":9,"width":6,"height":1},{"id":"f7418565.694118","type":"ui_spacer","name":"spacer","group":"9fe30f36.92cc2","order":15,"width":6,"height":1},{"id":"68a9b625.a1df38","type":"ui_spacer","name":"spacer","group":"7311bc5c.585f8c","order":1,"width":1,"height":1},{"id":"84f64c25.7945e8","type":"ui_spacer","name":"spacer","group":"7311bc5c.585f8c","order":3,"width":1,"height":1},{"id":"7fa5d2fb.efeb04","type":"ui_text","z":"cae39ee2.e2c898","group":"9fe30f36.92cc2","order":10,"width":2,"height":1,"name":"BK temperature display","label":"Kettle","format":"{{msg.payload | number:1}}°C","layout":"col-center","x":450,"y":120,"wires":[]},{"id":"ba5b776f.cbd1c8","type":"smooth","z":"cae39ee2.e2c898","name":"","property":"payload","action":"mean","count":"5","round":"2","mult":"single","x":360,"y":80,"wires":[["7fa5d2fb.efeb04"]]},{"id":"59ad46d5.3e9648","type":"widgetlords-analog-in","z":"b2a662aa.2b752","name":"Mash Volume Raw","channel":"0","chipenable":"0","interval":"1000","x":130,"y":60,"wires":[["a4e3eea3.f3eb5"]]},{"id":"a4e3eea3.f3eb5","type":"range","z":"b2a662aa.2b752","minin":"0","maxin":"4096","minout":"0","maxout":"61.2","action":"scale","round":false,"property":"payload","name":"cmH₂O","x":180,"y":100,"wires":[["d9cde29d.b507b8"]]},{"id":"d9cde29d.b507b8","type":"smooth","z":"b2a662aa.2b752","name":"","property":"payload","action":"mean","count":"5","round":"2","mult":"single","x":220,"y":140,"wires":[["19f82bf2.0c68e4"]]},{"id":"25e729a4.95b7fe","type":"function","z":"b2a662aa.2b752","name":"Volume conversion","func":"msg.payload = 1.89 + (msg.payload * 21.5 * 21.5 * 3.141526 / 1000);\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":220,"wires":[["303cf1e8.cf7276"]]},{"id":"9bc8c2a5.7262b8","type":"ui_text","z":"b2a662aa.2b752","group":"f6e1ef23.f6f118","order":10,"width":3,"height":1,"name":"Mash volume display","label":"Volume","format":"{{msg.payload}}l H₂O","layout":"col-center","x":420,"y":300,"wires":[]},{"id":"19f82bf2.0c68e4","type":"function","z":"b2a662aa.2b752","name":"WC calibration","func":"msg.payload = -11.182129 + 1.392048*msg.payload \nreturn msg;","outputs":1,"noerr":0,"x":280,"y":180,"wires":[["25e729a4.95b7fe","b1b77e03.c2822"]]},{"id":"303cf1e8.cf7276","type":"function","z":"b2a662aa.2b752","name":"Minimum volume","func":"if(msg.payload <= 12.0){\n msg.payload = \"<12.0\"\n} else {\n msg.payload = msg.payload.toFixed(1);\n}\nreturn msg;","outputs":1,"noerr":0,"x":370,"y":260,"wires":[["9bc8c2a5.7262b8"]]},{"id":"32fe6811.8055a8","type":"rpi-gpio out","z":"2d8e58d.7555ca8","name":"Pump GPIO","pin":"11","set":true,"level":"0","freq":"1","out":"out","x":510,"y":480,"wires":[]},{"id":"10f77280.873376","type":"inject","z":"1e878673.29136a","name":"Default Element Duty","topic":"","payload":"100","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":"0.1","x":160,"y":220,"wires":[["91b3f0e4.35708"]]},{"id":"59b941a3.ab6d08","type":"change","z":"1e878673.29136a","name":"bk_lock=true","rules":[{"t":"set","p":"bk_lock","pt":"global","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":750,"y":1280,"wires":[[]]},{"id":"d3ab8458.31cd","type":"change","z":"1e878673.29136a","name":"bk_on = bk_try","rules":[{"t":"set","p":"bk_on","pt":"global","to":"bk_try","tot":"flow"},{"t":"set","p":"payload","pt":"msg","to":"bk_try","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":1300,"wires":[["a6f48df.c6b5d7","45708f26.3186e"]]},{"id":"a6f48df.c6b5d7","type":"switch","z":"1e878673.29136a","name":"bk_on","property":"bk_on","propertyType":"global","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":590,"y":1300,"wires":[["59b941a3.ab6d08"],["d7e61db5.6a8ad8"]]},{"id":"b4c8849.8c2ce78","type":"switch","z":"1e878673.29136a","name":"Check rims_lock","property":"rims_lock","propertyType":"global","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":210,"y":1280,"wires":[["506d5f20.cd229"],["d3ab8458.31cd"]]},{"id":"59bfa59f.c292f4","type":"ui_toast","z":"1e878673.29136a","position":"top right","displayTime":"5","highlight":"","outputs":0,"ok":"OK","cancel":"","topic":"","name":"","x":470,"y":1220,"wires":[]},{"id":"506d5f20.cd229","type":"change","z":"1e878673.29136a","name":"Element lock message","rules":[{"t":"set","p":"payload","pt":"msg","to":"Can not access boil kettle element controls while RIMS element is active","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":1260,"wires":[["59bfa59f.c292f4"]]},{"id":"7bc5e770.8a03d","type":"change","z":"cdc1c9a3.021f58","name":"","rules":[{"t":"set","p":"inner_p","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":500,"wires":[[]]},{"id":"ad2f3a20.1034f","type":"change","z":"cdc1c9a3.021f58","name":"","rules":[{"t":"set","p":"inner_i","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":580,"wires":[["b1cf141f.84ac9"]]},{"id":"93be5173.c7aa2","type":"change","z":"cdc1c9a3.021f58","name":"","rules":[{"t":"set","p":"inner_d","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":660,"wires":[[]]},{"id":"7eae3e81.46ee88","type":"change","z":"cdc1c9a3.021f58","name":"","rules":[{"t":"set","p":"mash_target","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":400,"wires":[[]]},{"id":"a173c222.e1b86","type":"function","z":"cdc1c9a3.021f58","name":"Cascade PID - main","func":"// brew2 Cascade PID algorithm\n// Justin Angevaare\n// Nov. 2019\n\n// Manually specify update interval\nmsg.interval = 2000;\n\n//\n// Begin Outer Control Loop\n//\n// Output from Outer Control will be the target RIMS delta T\n// Calculate outer error\nmsg.mash_target = flow.get('mash_target')\nmsg.outer_error = msg.mash_target - flow.get('mash_temp');\n\n// Update outer integrator\n// For purposes of integrator, bound error by [-1, 1]\nmsg.outer_integrator = flow.get('outer_integrator');\nmsg.outer_integrator += (msg.interval/1000) * Math.max(Math.min(msg.outer_error, 1), -1);\n\n// Bound total outer integrator by absolute maximum\nmsg.outer_integrator = Math.max(Math.min(msg.outer_integrator, flow.get('outer_integrator_max')), -flow.get('outer_integrator_max'));\n\n// Output updated integrator to flow context\nflow.set('outer_integrator', msg.outer_integrator);\n\n// Calculate proportional action\nmsg.outer_output = msg.outer_error * flow.get('outer_p');\n\n// Calculate intergral action\nmsg.outer_output += msg.outer_integrator * flow.get('outer_i');\n\n// Calculate derivative action\nmsg.outer_derivative = (msg.outer_error - flow.get('last_outer_error'))/(msg.interval/1000);\nmsg.outer_output += msg.outer_derivative * flow.get('outer_d');\n\n// Bound outer_output by [0.0, max_output]\nmsg.outer_output = Math.max(Math.min(msg.outer_output, flow.get('outer_max')), 0.0);\n\n// Set inner_target\nmsg.inner_target = msg.mash_target + msg.outer_output\n\n// Output updated last_outer_error to flow context\nmsg.last_outer_error = msg.outer_error;\nflow.set('last_outer_error', msg.last_outer_error);\n\n//\n// Begin Inner Control Loop\n// Output from inner control loop will be RIMS element duty %\n// Calculate inner error\nmsg.inner_error = msg.inner_target - flow.get('rims_temp');\n\n// Update inner integrator\n// For purposes of integrator, bound error by [-1, 1]\nmsg.inner_integrator = flow.get('inner_integrator');\nmsg.inner_integrator += (msg.interval/1000) * Math.max(Math.min(msg.inner_error, 1), -1);\n\n// Bound total inner integrator by absolute maximum\nmsg.inner_integrator = Math.max(Math.min(msg.inner_integrator, flow.get('inner_integrator_max')), -flow.get('inner_integrator_max'));\n\n// Output updated integrator to flow context\nflow.set('inner_integrator', msg.inner_integrator);\n\n// Calculate proportional action\nmsg.inner_output = msg.inner_error * flow.get('inner_p');\n\n// Calculate intergral action\nmsg.inner_output += msg.inner_integrator * flow.get('inner_i');\n\n// Calculate derivative action\nmsg.inner_derivative = (msg.inner_error - flow.get('last_inner_error'))/(msg.interval/1000);\nmsg.inner_output += msg.inner_derivative * flow.get('inner_d');\n\n// Bound inner_output by [0.0, max_output]\nmsg.inner_output = Math.max(Math.min(msg.inner_output, flow.get('inner_max')), 0.0);\n\n// Output updated last_inner_error to flow context\nmsg.last_inner_error = msg.inner_error;\nflow.set('last_inner_error', msg.last_inner_error);\n\n// Set payload to element output\nmsg.payload = msg.inner_output;\n\nreturn msg;","outputs":1,"noerr":0,"x":440,"y":200,"wires":[["d067663f.365a9","cfaeaee6.2a6ab"]]},{"id":"5bc7112c.6ca358","type":"change","z":"cdc1c9a3.021f58","name":"global.rims_lock, rims_on, rims_limiter = false","rules":[{"t":"set","p":"rims_lock","pt":"global","to":"false","tot":"bool"},{"t":"set","p":"rims_on","pt":"global","to":"false","tot":"bool"},{"t":"set","p":"rims_limiter","pt":"global","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":1300,"wires":[["9bd31a5b.f45448"]]},{"id":"26a7870c.b8ea4","type":"change","z":"cdc1c9a3.021f58","name":"Lock message","rules":[{"t":"set","p":"payload","pt":"msg","to":"Can not access RIMS element controls while boil kettle element is active","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":1480,"wires":[["2e4ea9b.ece48d6"]]},{"id":"2e4ea9b.ece48d6","type":"ui_toast","z":"cdc1c9a3.021f58","position":"top right","displayTime":"5","highlight":"","outputs":0,"ok":"OK","cancel":"","topic":"","name":"","x":670,"y":1540,"wires":[]},{"id":"6bfc6616.0a03","type":"switch","z":"cdc1c9a3.021f58","name":"Check bk_lock","property":"bk_lock","propertyType":"global","rules":[{"t":"true"},{"t":"false"}],"checkall":"false","repair":false,"outputs":2,"x":360,"y":1580,"wires":[["26a7870c.b8ea4","3cad8f0a.a02778"],["25ac40a0.3587f8"]]},{"id":"3d6a8f69.ac96","type":"change","z":"cdc1c9a3.021f58","name":"rims_try = payload","rules":[{"t":"set","p":"rims_try","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":330,"y":1520,"wires":[["6bfc6616.0a03"]]},{"id":"253becb4.eb09fc","type":"change","z":"cdc1c9a3.021f58","name":"rims_on = rims_try","rules":[{"t":"set","p":"rims_on","pt":"global","to":"rims_try","tot":"flow"},{"t":"set","p":"payload","pt":"msg","to":"rims_try","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":630,"y":1620,"wires":[["d6a6fe13.0dee2","9ae6b3bc.013dd8"]]},{"id":"d6a6fe13.0dee2","type":"switch","z":"cdc1c9a3.021f58","name":"","property":"rims_on","propertyType":"global","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":810,"y":1660,"wires":[["bce4461c.3e13c"],["e0211c1f.5c199"]]},{"id":"bce4461c.3e13c","type":"change","z":"cdc1c9a3.021f58","name":"rims_lock = true","rules":[{"t":"set","p":"rims_lock","pt":"global","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":980,"y":1640,"wires":[[]]},{"id":"ac7ff251.12f97","type":"change","z":"cdc1c9a3.021f58","name":"rims_lock = false","rules":[{"t":"set","p":"rims_lock","pt":"global","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1030,"y":1720,"wires":[["395c51b.611aa2e"]]},{"id":"e0211c1f.5c199","type":"delay","z":"cdc1c9a3.021f58","name":"","pauseType":"delay","timeout":"3","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":960,"y":1680,"wires":[["ac7ff251.12f97"]]},{"id":"6c4d238a.3d5554","type":"switch","z":"cdc1c9a3.021f58","name":"rims_on switch","property":"rims_on","propertyType":"global","rules":[{"t":"true"}],"checkall":"false","repair":false,"outputs":1,"x":220,"y":200,"wires":[["a173c222.e1b86"]]},{"id":"d7e61db5.6a8ad8","type":"delay","z":"1e878673.29136a","name":"","pauseType":"delay","timeout":"3","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":740,"y":1320,"wires":[["b08647e3.136be8"]]},{"id":"b08647e3.136be8","type":"change","z":"1e878673.29136a","name":"bk_lock = false","rules":[{"t":"set","p":"bk_lock","pt":"global","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":800,"y":1360,"wires":[["7eb452a8.843114"]]},{"id":"324b69ce.251146","type":"ui_text","z":"cdc1c9a3.021f58","group":"321aaa6a.377d5e","order":3,"width":"2","height":"1","name":"Mash target","label":"Target","format":"{{payload | number:1}}°C","layout":"col-center","x":610,"y":360,"wires":[]},{"id":"e34426e3.0824","type":"smooth","z":"cae39ee2.e2c898","name":"","property":"payload","action":"mean","count":"5","round":"2","mult":"single","x":360,"y":400,"wires":[["5af59d82.5bc6dc"]]},{"id":"2b38bf4e.64a19","type":"smooth","z":"cae39ee2.e2c898","name":"","property":"payload","action":"mean","count":"5","round":"2","mult":"single","x":360,"y":220,"wires":[["96c9f49f.26944"]]},{"id":"96c9f49f.26944","type":"ui_text","z":"cae39ee2.e2c898","group":"f6e1ef23.f6f118","order":18,"width":"3","height":1,"name":"RIMS temperature display","label":"Heater","format":"{{msg.payload | number:1}}°C","layout":"col-center","x":450,"y":260,"wires":[]},{"id":"5af59d82.5bc6dc","type":"ui_text","z":"cae39ee2.e2c898","group":"f6e1ef23.f6f118","order":15,"width":"3","height":1,"name":"MLT temperature display","label":"MLT","format":"{{msg.payload | number:1}}°C","layout":"col-center","x":450,"y":440,"wires":[]},{"id":"33b1f220.5f8056","type":"link out","z":"cae39ee2.e2c898","name":"RIMS temperature","links":["d20fe142.9dfcb8"],"x":535,"y":180,"wires":[]},{"id":"7eb452a8.843114","type":"link out","z":"1e878673.29136a","name":"Bolt update","links":["93befc16.2ca578","b05b4104.4b7748","a0d524b2.529a4","f8471ffc.3e73c","c315e88a.988b48"],"x":775,"y":1400,"wires":[]},{"id":"45708f26.3186e","type":"link out","z":"1e878673.29136a","name":"Bolt update","links":["93befc16.2ca578","b05b4104.4b7748","a0d524b2.529a4","f8471ffc.3e73c","c315e88a.988b48"],"x":555,"y":1340,"wires":[]},{"id":"395c51b.611aa2e","type":"link out","z":"cdc1c9a3.021f58","name":"Bolt update","links":["93befc16.2ca578","b05b4104.4b7748","a0d524b2.529a4","f8471ffc.3e73c","c315e88a.988b48"],"x":1175,"y":1720,"wires":[]},{"id":"9ae6b3bc.013dd8","type":"link out","z":"cdc1c9a3.021f58","name":"Bolt update","links":["93befc16.2ca578","b05b4104.4b7748","a0d524b2.529a4","f8471ffc.3e73c","c315e88a.988b48"],"x":775,"y":1620,"wires":[]},{"id":"b1b77e03.c2822","type":"function","z":"b2a662aa.2b752","name":"Minimum WC","func":"if(msg.payload <= 5.0){\n msg.payload = \"<5.0\"\n} else {\n msg.payload = msg.payload.toFixed(1);\n}\nreturn msg;","outputs":1,"noerr":0,"x":620,"y":260,"wires":[["1f2642b8.afc335"]]},{"id":"1f2642b8.afc335","type":"ui_text","z":"b2a662aa.2b752","group":"f6e1ef23.f6f118","order":11,"width":3,"height":1,"name":"Mash WC display","label":"Water column","format":"{{msg.payload}} cmH₂O","layout":"col-center","x":670,"y":300,"wires":[]},{"id":"780c3724.2e43a","type":"inject","z":"cdc1c9a3.021f58","name":"Default Inner Kp","topic":"","payload":"20.0","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":"0.1","x":160,"y":460,"wires":[["6d5d45c8.ade6ec","7bc5e770.8a03d"]]},{"id":"16f886ce.38ae51","type":"inject","z":"cdc1c9a3.021f58","name":"Default Inner Ki","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":160,"y":540,"wires":[["97c18bd5.c5eb58","ad2f3a20.1034f"]]},{"id":"1e869377.fbf4ad","type":"inject","z":"cdc1c9a3.021f58","name":"Default Inner Kd","topic":"","payload":"30","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":160,"y":620,"wires":[["6a1e701c.88014","93be5173.c7aa2"]]},{"id":"b8c19fef.ae0d88","type":"inject","z":"cdc1c9a3.021f58","name":"Default Target","topic":"","payload":"70","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":160,"y":340,"wires":[["159ea120.ea187f","64f4ecd7.223dac"]]},{"id":"55776d2d.6c074c","type":"inject","z":"cdc1c9a3.021f58","name":"Default Inner Limit","topic":"","payload":"30","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":170,"y":700,"wires":[["15d16967.4afe17","1b35e9ba.06cc26"]]},{"id":"15d16967.4afe17","type":"ui_numeric","z":"cdc1c9a3.021f58","name":"","label":"Output limiter","tooltip":"","group":"321aaa6a.377d5e","order":22,"width":"6","height":"1","wrap":false,"passthru":true,"topic":"","format":"{{value | number:0}}٪","min":"1","max":"99","step":1,"x":200,"y":740,"wires":[["1b35e9ba.06cc26"]]},{"id":"1b35e9ba.06cc26","type":"change","z":"cdc1c9a3.021f58","name":"","rules":[{"t":"set","p":"inner_limit","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":410,"y":740,"wires":[["eab00f4b.29e27"]]},{"id":"460819bf.fa184","type":"change","z":"cdc1c9a3.021f58","name":"","rules":[{"t":"set","p":"rims_limiter","pt":"global","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":480,"y":1220,"wires":[["668f2b46.52004c"]]},{"id":"3516d1c2.6cbd6e","type":"sensor-ds18b20","z":"cae39ee2.e2c898","name":"BK","sensorid":"28-0000062eaf09","timer":"2","repeat":false,"x":310,"y":40,"wires":[["ba5b776f.cbd1c8","737daba5.b4f1e4"]]},{"id":"c83a56a2.7af0c8","type":"sensor-ds18b20","z":"cae39ee2.e2c898","name":"RIMS","sensorid":"28-0000062eb892","timer":"2","repeat":false,"x":310,"y":180,"wires":[["2b38bf4e.64a19","33b1f220.5f8056","6920821b.3fc50c"]],"outputLabels":["temp"]},{"id":"598eede.4742214","type":"sensor-ds18b20","z":"cae39ee2.e2c898","name":"MLT","sensorid":"28-000007c0cb12","timer":"2","repeat":false,"x":310,"y":360,"wires":[["e34426e3.0824","86751c96.8bee98","5d183b5d.0387cc"]]},{"id":"9699ad48.47c208","type":"inject","z":"cae39ee2.e2c898","name":"","topic":"","payload":"","payloadType":"date","repeat":"2","crontab":"","once":true,"onceDelay":0.1,"x":110,"y":40,"wires":[["c83a56a2.7af0c8","3516d1c2.6cbd6e","598eede.4742214","ae5f9dd0.0698a"]]},{"id":"bc1c0af.df72bf8","type":"ui_numeric","z":"1e878673.29136a","name":"","label":"P","tooltip":"","group":"f3e4e5c9.37f76","order":2,"width":"4","height":"1","wrap":false,"passthru":true,"topic":"","format":"{{value | number:1}}","min":0,"max":"99.8","step":"0.2","x":150,"y":420,"wires":[["8413d749.f67dd"]]},{"id":"a72bad9f.2b8f58","type":"ui_numeric","z":"1e878673.29136a","name":"","label":"I","tooltip":"","group":"f3e4e5c9.37f76","order":5,"width":"4","height":"1","wrap":false,"passthru":true,"topic":"","format":"{{value | number:1}}","min":0,"max":"100","step":"0.2","x":150,"y":520,"wires":[["83e362d5.df1928"]]},{"id":"c11d5a46.884ae8","type":"ui_numeric","z":"1e878673.29136a","name":"","label":"D","tooltip":"","group":"f3e4e5c9.37f76","order":8,"width":"4","height":"1","wrap":false,"passthru":true,"topic":"","format":"{{value | number:1}}","min":0,"max":"100","step":"0.2","x":150,"y":620,"wires":[["41bb19e8.68968"]]},{"id":"8413d749.f67dd","type":"change","z":"1e878673.29136a","name":"","rules":[{"t":"set","p":"p","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":320,"y":420,"wires":[[]]},{"id":"83e362d5.df1928","type":"change","z":"1e878673.29136a","name":"set flow.i","rules":[{"t":"set","p":"i","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":320,"y":520,"wires":[[]]},{"id":"41bb19e8.68968","type":"change","z":"1e878673.29136a","name":"","rules":[{"t":"set","p":"d","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":320,"y":620,"wires":[[]]},{"id":"c6145809.208b2","type":"inject","z":"1e878673.29136a","name":"Default P","topic":"","payload":"20.0","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":120,"y":380,"wires":[["bc1c0af.df72bf8","8413d749.f67dd"]]},{"id":"f015cf49.0765e","type":"inject","z":"1e878673.29136a","name":"Default I","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":120,"y":480,"wires":[["a72bad9f.2b8f58","83e362d5.df1928"]]},{"id":"bc1104a1.bb44","type":"inject","z":"1e878673.29136a","name":"Default D","topic":"","payload":"30","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":120,"y":580,"wires":[["c11d5a46.884ae8","41bb19e8.68968"]]},{"id":"3a5d8e4a.d39622","type":"inject","z":"1e878673.29136a","name":"Default BK Target","topic":"","payload":"70","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":150,"y":260,"wires":[["8c14934e.2efe18"]]},{"id":"90bd87f9.3e6418","type":"function","z":"1e878673.29136a","name":"BK PID","func":"// Note that the algorithm provided below assumes a 1 second iteration time\n// Justin Angevaare\n// May 2018\n\n// Set temperature\nmsg.temperature = msg.payload;\n\n// Well that node doesn't work... do manually\nmsg.interval = 2000\n\n// Calculate error\nmsg.error = flow.get('bk_target') - msg.temperature;\n\n// Set output max\nmsg.max_output = 100\n \n// Calculate integrator max\nmsg.integrator_max = msg.max_output/flow.get('i');\n\n// Update integrator\n// For purposes of integrator, bound error by [-1, 1]\nmsg.integrator = flow.get('integrator');\nmsg.integrator += (msg.interval/1000) * Math.max(Math.min(msg.error, 1), -1);\n\n// Bound total integrator by absolute maximum\nmsg.integrator = Math.max(Math.min(msg.integrator, msg.integrator_max), -msg.integrator_max);\n\n// Output updated integrator to flow context\nflow.set('integrator', msg.integrator);\n\n// Calculate proportional action\nmsg.output = msg.error * flow.get('p');\n\n// Calculate intergral action\nmsg.output += msg.integrator * flow.get('i');\n\n// Calculate derivative action\nmsg.derivative = (msg.error - flow.get('last_error'))/(msg.interval/1000);\nmsg.output += msg.derivative * flow.get('d');\n\n// Bound output by [0, max_output]\nmsg.output = Math.max(Math.min(msg.output, msg.max_output), 0);\n\n// Output updated last_error to flow context\nmsg.last_error = msg.error;\nflow.set('last_error', msg.last_error);\n\n// Set payload to element output\nmsg.payload = msg.output;\nreturn msg;","outputs":1,"noerr":0,"x":480,"y":80,"wires":[["be52847e.467fe8","fd3d823.f4d7d8"]]},{"id":"eed429e6.df64c8","type":"switch","z":"1e878673.29136a","name":"bk_pid switch","property":"bk_pid","propertyType":"global","rules":[{"t":"true"},{"t":"false"}],"checkall":"false","repair":false,"outputs":2,"x":300,"y":100,"wires":[["90bd87f9.3e6418"],["898bd7d9.a004f"]]},{"id":"898bd7d9.a004f","type":"change","z":"1e878673.29136a","name":"payload = bk_manual_duty","rules":[{"t":"set","p":"payload","pt":"msg","to":"bk_manual_duty","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":540,"y":120,"wires":[["be52847e.467fe8"]]},{"id":"8a024057.0ec2b8","type":"link in","z":"1e878673.29136a","name":"BK PID temperature input","links":["737daba5.b4f1e4"],"x":55,"y":100,"wires":[["611bae86.6497c"]]},{"id":"737daba5.b4f1e4","type":"link out","z":"cae39ee2.e2c898","name":"BK raw temperature","links":["8a024057.0ec2b8"],"x":535,"y":40,"wires":[]},{"id":"2ede74f0.2bc45c","type":"change","z":"1e878673.29136a","name":"","rules":[{"t":"set","p":"bk_target","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":260,"wires":[[]]},{"id":"be52847e.467fe8","type":"link out","z":"1e878673.29136a","name":"PID or Manual Duty","links":["84dd404a.ab7a7"],"x":715,"y":80,"wires":[]},{"id":"60d387fc.ef7d08","type":"change","z":"1e878673.29136a","name":"bk_pid, bk_try = true","rules":[{"t":"set","p":"bk_pid","pt":"global","to":"true","tot":"bool"},{"t":"set","p":"bk_try","pt":"flow","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":220,"y":900,"wires":[["19bbbdcd.af992a"]]},{"id":"3fab212d.7b19fe","type":"change","z":"1e878673.29136a","name":"bk_pid = false, bk_try = true","rules":[{"t":"set","p":"bk_pid","pt":"global","to":"false","tot":"bool"},{"t":"set","p":"bk_try","pt":"flow","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":240,"y":940,"wires":[["89c8425f.410c68"]]},{"id":"9ab73503.8e0a8","type":"change","z":"1e878673.29136a","name":"bk_pid, bk_try = false","rules":[{"t":"set","p":"bk_pid","pt":"global","to":"false","tot":"bool"},{"t":"set","p":"bk_try","pt":"flow","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":220,"y":860,"wires":[["37ca9313.112484"]]},{"id":"89c8425f.410c68","type":"link out","z":"1e878673.29136a","name":"Boil Try Output","links":["39f5e6bb.c2001a"],"x":435,"y":940,"wires":[]},{"id":"39f5e6bb.c2001a","type":"link in","z":"1e878673.29136a","name":"Boil Try Input","links":["89c8425f.410c68","19bbbdcd.af992a","37ca9313.112484"],"x":55,"y":1280,"wires":[["b4c8849.8c2ce78"]]},{"id":"611bae86.6497c","type":"switch","z":"1e878673.29136a","name":"bk_on","property":"bk_on","propertyType":"global","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":150,"y":100,"wires":[["eed429e6.df64c8"]]},{"id":"da1a9a4c.d64808","type":"change","z":"1e878673.29136a","name":"","rules":[{"t":"set","p":"bk_manual_duty","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":630,"y":180,"wires":[[]]},{"id":"af559447.163748","type":"change","z":"1e878673.29136a","name":"payload = 0","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":190,"y":1100,"wires":[["8a2f00e7.8fabc8"]]},{"id":"8a2f00e7.8fabc8","type":"link out","z":"1e878673.29136a","name":"Off Duty","links":["84dd404a.ab7a7"],"x":435,"y":1100,"wires":[]},{"id":"be75bc65.2c4a58","type":"link out","z":"1e878673.29136a","name":"Boil PID display","links":["5285e8f7.b9ad08","eda67ad.0cd1d88","48ae8805.06b6a"],"x":435,"y":1020,"wires":[]},{"id":"e7777c2f.7d6a58","type":"rpi-gpio out","z":"44130c7e.f0c1fc","name":"BK GPIO","pin":"13","set":false,"level":"0","freq":"1","out":"pwm","x":300,"y":240,"wires":[]},{"id":"84dd404a.ab7a7","type":"link in","z":"44130c7e.f0c1fc","name":"BK GPIO","links":["8a2f00e7.8fabc8","be52847e.467fe8"],"x":175,"y":260,"wires":[["e7777c2f.7d6a58","b51e8334.d588b8","909fce1e.6368d"]]},{"id":"b51e8334.d588b8","type":"range","z":"44130c7e.f0c1fc","minin":"0","maxin":"100","minout":"0","maxout":"5.5","action":"scale","round":false,"property":"payload","name":"Duty to watts","x":310,"y":280,"wires":[["c0e8b26f.6046d8"]]},{"id":"c0e8b26f.6046d8","type":"ui_text","z":"44130c7e.f0c1fc","group":"9fe30f36.92cc2","order":6,"width":3,"height":1,"name":"Element output","label":" ","format":"{{payload | number:2}} kw","layout":"row-left","x":360,"y":320,"wires":[]},{"id":"d067663f.365a9","type":"link out","z":"cdc1c9a3.021f58","name":"RIMS GPIO","links":["24145682.3f917a"],"x":615,"y":220,"wires":[]},{"id":"872bc41f.72b268","type":"rpi-gpio out","z":"44130c7e.f0c1fc","name":"RIMS GPIO","pin":"15","set":false,"level":"0","freq":"1","out":"pwm","x":310,"y":40,"wires":[]},{"id":"96ebaee4.146928","type":"range","z":"44130c7e.f0c1fc","minin":"0","maxin":"100","minout":"0","maxout":"5.5","action":"scale","round":false,"property":"payload","name":"Duty to watts","x":315,"y":80,"wires":[["15c06eb9.6944a1"]]},{"id":"15c06eb9.6944a1","type":"ui_text","z":"44130c7e.f0c1fc","group":"f6e1ef23.f6f118","order":6,"width":3,"height":1,"name":"Element output","label":" ","format":"{{payload | number:2}} kw","layout":"row-left","x":360,"y":120,"wires":[]},{"id":"24145682.3f917a","type":"link in","z":"44130c7e.f0c1fc","name":"RIMS GPIO","links":["d067663f.365a9","f9ae67d0.ea6dc"],"x":175,"y":60,"wires":[["872bc41f.72b268","96ebaee4.146928","4530fdb0.e1c884"]]},{"id":"7c7078cd.dce6c","type":"change","z":"cdc1c9a3.021f58","name":"duty = 0","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":300,"y":1420,"wires":[["f9ae67d0.ea6dc"]]},{"id":"f9ae67d0.ea6dc","type":"link out","z":"cdc1c9a3.021f58","name":"RIMS GPIO","links":["79ad6d21.240f2c","24145682.3f917a"],"x":575,"y":1420,"wires":[]},{"id":"40c0028.2cc017c","type":"change","z":"cdc1c9a3.021f58","name":"Zero everything","rules":[{"t":"set","p":"last_inner_error","pt":"msg","to":"0.0","tot":"num"},{"t":"set","p":"last_inner_error","pt":"flow","to":"0.0","tot":"num"},{"t":"set","p":"inner_integrator","pt":"msg","to":"0.0","tot":"num"},{"t":"set","p":"inner_integrator","pt":"flow","to":"0.0","tot":"num"},{"t":"set","p":"inner_derivative","pt":"msg","to":"0.0","tot":"num"},{"t":"set","p":"last_outer_error","pt":"msg","to":"0.0","tot":"num"},{"t":"set","p":"last_outer_error","pt":"flow","to":"0.0","tot":"num"},{"t":"set","p":"outer_integrator","pt":"msg","to":"0.0","tot":"num"},{"t":"set","p":"outer_integrator","pt":"flow","to":"0.0","tot":"num"},{"t":"set","p":"outer_derivative","pt":"msg","to":"0.0","tot":"num"},{"t":"set","p":"outer_output","pt":"flow","to":"0.0","tot":"num"},{"t":"set","p":"outer_output","pt":"msg","to":"0.0","tot":"num"},{"t":"set","p":"inner_target","pt":"msg","to":"mash_target","tot":"flow"},{"t":"set","p":"inner_target","pt":"flow","to":"mash_target","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":320,"y":1380,"wires":[["488e4b0e.1f641c"]]},{"id":"488e4b0e.1f641c","type":"link out","z":"cdc1c9a3.021f58","name":"Mash PID display","links":["3f2878d3.94f4e"],"x":575,"y":1380,"wires":[]},{"id":"cfaeaee6.2a6ab","type":"link out","z":"cdc1c9a3.021f58","name":"Mash PID display","links":["3f2878d3.94f4e"],"x":615,"y":180,"wires":[]},{"id":"1ed4390c.ecfcff","type":"change","z":"1e878673.29136a","name":"","rules":[{"t":"set","p":"last_error","pt":"msg","to":"0","tot":"num"},{"t":"set","p":"integrator","pt":"msg","to":"0","tot":"num"},{"t":"set","p":"derivative","pt":"msg","to":"0","tot":"num"},{"t":"set","p":"last_error","pt":"flow","to":"last_error","tot":"msg"},{"t":"set","p":"integrator","pt":"flow","to":"integrator","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":200,"y":1020,"wires":[["be75bc65.2c4a58"]]},{"id":"fd3d823.f4d7d8","type":"link out","z":"1e878673.29136a","name":"Boil PID display","links":["5285e8f7.b9ad08","eda67ad.0cd1d88","48ae8805.06b6a"],"x":595,"y":40,"wires":[]},{"id":"909fce1e.6368d","type":"ui_text","z":"44130c7e.f0c1fc","group":"f3e4e5c9.37f76","order":11,"width":"0","height":"0","name":"BK Element duty","label":"Element duty","format":"{{payload | number:0}}﹪","layout":"row-spread","x":370,"y":360,"wires":[]},{"id":"4530fdb0.e1c884","type":"ui_text","z":"44130c7e.f0c1fc","group":"321aaa6a.377d5e","order":15,"width":"2","height":"1","name":"RIMS Element duty","label":"Output","format":"{{payload | number:0}}٪","layout":"col-center","x":370,"y":160,"wires":[]},{"id":"b64090c1.73319","type":"link in","z":"cdc1c9a3.021f58","name":"Button click","links":["15d83e9d.b3ff21","2625d95d.2ed98e"],"x":175,"y":1520,"wires":[["3d6a8f69.ac96"]]},{"id":"b3e11a30.e34f4","type":"link in","z":"cdc1c9a3.021f58","name":"Off button","links":["15d83e9d.b3ff21","83772e32.d03bd"],"x":175,"y":1380,"wires":[["40c0028.2cc017c"]]},{"id":"83772e32.d03bd","type":"link out","z":"cdc1c9a3.021f58","name":"Initializations","links":["123ff4f9.df085b","987c2900.a5a87","ac538d8e.a1ade8","b3e11a30.e34f4"],"x":335,"y":1140,"wires":[]},{"id":"cdda2c94.7b455","type":"change","z":"28484198.eb083e","name":"pid - off colour","rules":[{"t":"set","p":"colour","pt":"msg","to":"grey","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":500,"y":360,"wires":[["dec1e90e.4f61d8"]]},{"id":"16c19a69.97a5ce","type":"change","z":"28484198.eb083e","name":"pid - on colour","rules":[{"t":"set","p":"colour","pt":"msg","to":"#424242","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":500,"y":320,"wires":[["dec1e90e.4f61d8"]]},{"id":"debb8cb1.a556c","type":"switch","z":"28484198.eb083e","name":"","property":"rims_on","propertyType":"global","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":330,"y":340,"wires":[["16c19a69.97a5ce"],["cdda2c94.7b455"]]},{"id":"dec1b3f8.d47b88","type":"delay","z":"28484198.eb083e","name":"delay","pauseType":"delay","timeout":"0.2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":290,"y":300,"wires":[["debb8cb1.a556c"]]},{"id":"dec1e90e.4f61d8","type":"link out","z":"28484198.eb083e","name":"PID button colour","links":["3f94bf0f.96a108"],"x":635,"y":340,"wires":[]},{"id":"ce284fe7.1336c","type":"change","z":"28484198.eb083e","name":"off colour","rules":[{"t":"set","p":"colour","pt":"msg","to":"#424242","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":480,"y":560,"wires":[["14559bfb.7a00fc"]]},{"id":"675f200d.3f3d7","type":"change","z":"28484198.eb083e","name":"on colour","rules":[{"t":"set","p":"colour","pt":"msg","to":"grey","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":480,"y":520,"wires":[["14559bfb.7a00fc"]]},{"id":"fe56cee0.8eff5","type":"switch","z":"28484198.eb083e","name":"","property":"rims_on","propertyType":"global","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":330,"y":540,"wires":[["675f200d.3f3d7"],["ce284fe7.1336c"]]},{"id":"df71f8cd.61f3a","type":"delay","z":"28484198.eb083e","name":"delay","pauseType":"delay","timeout":"0.2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":290,"y":500,"wires":[["fe56cee0.8eff5"]]},{"id":"14559bfb.7a00fc","type":"link out","z":"28484198.eb083e","name":"Off button colour","links":["1935f939.d4427f","6757c9a6.827aa"],"x":595,"y":540,"wires":[]},{"id":"d8dd142c.9e7828","type":"link in","z":"28484198.eb083e","name":"Button click","links":["15d83e9d.b3ff21","2625d95d.2ed98e","2aa6a038.2a82b"],"x":175,"y":500,"wires":[["df71f8cd.61f3a"]]},{"id":"248d281f.81767","type":"ui_button","z":"28484198.eb083e","name":"","group":"f6e1ef23.f6f118","order":7,"width":2,"height":1,"passthru":false,"label":"Off","tooltip":"","color":"","bgcolor":"{{colour}}","icon":"","payload":"false","payloadType":"bool","topic":"","x":290,"y":140,"wires":[["15d83e9d.b3ff21"]]},{"id":"70f94901.25c828","type":"ui_button","z":"28484198.eb083e","name":"","group":"f6e1ef23.f6f118","order":2,"width":2,"height":1,"passthru":false,"label":"PID","tooltip":"","color":"","bgcolor":"{{colour}}","icon":"","payload":"true","payloadType":"bool","topic":"","x":290,"y":60,"wires":[["2625d95d.2ed98e"]]},{"id":"15d83e9d.b3ff21","type":"link out","z":"28484198.eb083e","name":"Off button","links":["b64090c1.73319","b3e11a30.e34f4","813395b5.016e08","3bd0c075.6fa628","f9982093.cfdf88","c51c4031.66a098","9f46c607.caf24","76148b82.79985c","44d0cd2b.83654c","ac538d8e.a1ade8","e3cf13ac.ca50d","97f42632.921388","d8dd142c.9e7828","b962c91e.b3c32","b53ebaf1.4996f"],"x":415,"y":140,"wires":[]},{"id":"2625d95d.2ed98e","type":"link out","z":"28484198.eb083e","name":"PID button","links":["54c27116.f0fbb8","65b11f55.0036b","966c3ae9.d0b678","6fd789be.f20e6","67fe4219.31feac","d8dd142c.9e7828","ac9b0385.1a096","1163aa6f.a466a6","ac5a3184.ad004","c443490d.703ff","4aeae28e.9f0d7c","b962c91e.b3c32","b64090c1.73319","b53ebaf1.4996f"],"x":415,"y":60,"wires":[]},{"id":"3f94bf0f.96a108","type":"link in","z":"28484198.eb083e","name":"PID button colour","links":["1b75113e.ca613f","dec1e90e.4f61d8","f531277b.da7808","32f18cc9.4aa03c","e7895fc9.f785","58885f0e.86303"],"x":175,"y":60,"wires":[["70f94901.25c828"]]},{"id":"6757c9a6.827aa","type":"link in","z":"28484198.eb083e","name":"Off button colour","links":["b3d5d6d9.8bfc8","14559bfb.7a00fc","4a0e3c04.89c144"],"x":175,"y":140,"wires":[["248d281f.81767"]]},{"id":"33933972.9ffc16","type":"link in","z":"1e878673.29136a","name":"PID button","links":["89ce3e25.3ad2f8","d888b85c.c0ab6"],"x":55,"y":900,"wires":[["60d387fc.ef7d08"]]},{"id":"19bbbdcd.af992a","type":"link out","z":"1e878673.29136a","name":"Boil Try Output","links":["39f5e6bb.c2001a"],"x":435,"y":900,"wires":[]},{"id":"37ca9313.112484","type":"link out","z":"1e878673.29136a","name":"Boil Try Output","links":["39f5e6bb.c2001a"],"x":435,"y":860,"wires":[]},{"id":"480aa2e0.59a21c","type":"link in","z":"1e878673.29136a","name":"Manual button","links":["ed41478a.5a2028","1777733d.a2553d"],"x":55,"y":940,"wires":[["3fab212d.7b19fe"]]},{"id":"5b459ac7.37d744","type":"link in","z":"1e878673.29136a","name":"Manual button","links":["ed41478a.5a2028","1777733d.a2553d"],"x":55,"y":980,"wires":[["1ed4390c.ecfcff"]]},{"id":"f142f115.fa1378","type":"link in","z":"1e878673.29136a","name":"Off button","links":["308e6b59.254394","11c18a22.2ff07e","fd8c477a.99a1a"],"x":55,"y":860,"wires":[["9ab73503.8e0a8"]]},{"id":"7d106986.7fb6f","type":"link in","z":"1e878673.29136a","name":"Off button","links":["badc88d8.0fe308","d068c868.178e4","308e6b59.254394","11c18a22.2ff07e","fd8c477a.99a1a"],"x":55,"y":1100,"wires":[["af559447.163748"]]},{"id":"af6b29fe.fa767","type":"inject","z":"1e878673.29136a","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":130,"y":740,"wires":[["badc88d8.0fe308"]]},{"id":"344f76f6.ebc892","type":"link in","z":"1e878673.29136a","name":"Off button","links":["308e6b59.254394","badc88d8.0fe308","11c18a22.2ff07e","fd8c477a.99a1a"],"x":55,"y":1020,"wires":[["1ed4390c.ecfcff"]]},{"id":"badc88d8.0fe308","type":"link out","z":"1e878673.29136a","name":"Off button - initialization","links":["7d106986.7fb6f","1ae66216.83043e","344f76f6.ebc892"],"x":315,"y":740,"wires":[]},{"id":"b88cba12.513d28","type":"ui_button","z":"70d4070b.e447b8","name":"","group":"9fe30f36.92cc2","order":4,"width":2,"height":1,"passthru":false,"label":"Manual","tooltip":"","color":"","bgcolor":"{{colour}}","icon":"","payload":"true","payloadType":"bool","topic":"","x":300,"y":100,"wires":[["1777733d.a2553d"]]},{"id":"1e35f86a.7e2a1","type":"ui_button","z":"70d4070b.e447b8","name":"","group":"9fe30f36.92cc2","order":2,"width":2,"height":1,"passthru":false,"label":"PID","tooltip":"","color":"","bgcolor":"{{colour}}","icon":"","payload":"true","payloadType":"bool","topic":"","x":290,"y":60,"wires":[["d888b85c.c0ab6"]]},{"id":"8bc792af.daced","type":"ui_button","z":"70d4070b.e447b8","name":"","group":"9fe30f36.92cc2","order":7,"width":2,"height":1,"passthru":false,"label":"Off","tooltip":"","color":"","bgcolor":"{{colour}}","icon":"","payload":"false","payloadType":"bool","topic":"","x":290,"y":140,"wires":[["308e6b59.254394"]]},{"id":"21b9adad.6a31aa","type":"link in","z":"70d4070b.e447b8","name":"PID button colour","links":["d09e22b.7beaee","cd8fd53.01d4928"],"x":175,"y":60,"wires":[["1e35f86a.7e2a1"]]},{"id":"fb88d45f.879888","type":"link in","z":"70d4070b.e447b8","name":"Manual button colour","links":["d4afc2dc.99b19"],"x":175,"y":100,"wires":[["b88cba12.513d28"]]},{"id":"3973098.f4c3476","type":"link in","z":"70d4070b.e447b8","name":"Off button colour","links":["8caf0a44.8225e8"],"x":175,"y":140,"wires":[["8bc792af.daced"]]},{"id":"d888b85c.c0ab6","type":"link out","z":"70d4070b.e447b8","name":"PID button","links":["33933972.9ffc16","42c201b8.408ae","5c7f7e7d.580358","bc121ca4.f4dcb"],"x":415,"y":60,"wires":[]},{"id":"1777733d.a2553d","type":"link out","z":"70d4070b.e447b8","name":"Manual button","links":["42c201b8.408ae","480aa2e0.59a21c","5b459ac7.37d744","5c7f7e7d.580358","bc121ca4.f4dcb"],"x":415,"y":100,"wires":[]},{"id":"308e6b59.254394","type":"link out","z":"70d4070b.e447b8","name":"Off button","links":["344f76f6.ebc892","42c201b8.408ae","5c7f7e7d.580358","7d106986.7fb6f","bc121ca4.f4dcb","f142f115.fa1378"],"x":415,"y":140,"wires":[]},{"id":"ac538d8e.a1ade8","type":"link in","z":"cdc1c9a3.021f58","name":"Off button","links":["15d83e9d.b3ff21","83772e32.d03bd"],"x":175,"y":1420,"wires":[["7c7078cd.dce6c"]]},{"id":"eb2a7a8.6e8a388","type":"delay","z":"70d4070b.e447b8","name":"delay","pauseType":"delay","timeout":"0.2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":290,"y":300,"wires":[["a9b48397.bd1d6"]]},{"id":"d09e22b.7beaee","type":"link out","z":"70d4070b.e447b8","name":"PID button colour","links":["21b9adad.6a31aa"],"x":735,"y":320,"wires":[]},{"id":"42c201b8.408ae","type":"link in","z":"70d4070b.e447b8","name":"Button click","links":["1777733d.a2553d","308e6b59.254394","d888b85c.c0ab6","11c18a22.2ff07e","fd8c477a.99a1a"],"x":175,"y":300,"wires":[["eb2a7a8.6e8a388"]]},{"id":"52abed07.da9014","type":"change","z":"70d4070b.e447b8","name":"off colour","rules":[{"t":"set","p":"colour","pt":"msg","to":"grey","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":600,"y":440,"wires":[["d4afc2dc.99b19"]]},{"id":"cd261b4c.bceff","type":"change","z":"70d4070b.e447b8","name":"on colour","rules":[{"t":"set","p":"colour","pt":"msg","to":"#424242","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":600,"y":400,"wires":[["d4afc2dc.99b19"]]},{"id":"307effd0.9d5ad8","type":"switch","z":"70d4070b.e447b8","name":"","property":"bk_on","propertyType":"global","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":330,"y":440,"wires":[["363dc3d2.07ca2c"],["52abed07.da9014"]]},{"id":"b82abc3.485d64","type":"delay","z":"70d4070b.e447b8","name":"delay","pauseType":"delay","timeout":"0.2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":290,"y":400,"wires":[["307effd0.9d5ad8"]]},{"id":"d4afc2dc.99b19","type":"link out","z":"70d4070b.e447b8","name":"Manual button colour","links":["fb88d45f.879888"],"x":715,"y":420,"wires":[]},{"id":"eb77bcef.798078","type":"change","z":"70d4070b.e447b8","name":"off colour","rules":[{"t":"set","p":"colour","pt":"msg","to":"#424242","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":560,"wires":[["8caf0a44.8225e8"]]},{"id":"a6b86af0.976658","type":"change","z":"70d4070b.e447b8","name":"on colour","rules":[{"t":"set","p":"colour","pt":"msg","to":"grey","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":520,"wires":[["8caf0a44.8225e8"]]},{"id":"41dc7d89.cd143c","type":"switch","z":"70d4070b.e447b8","name":"","property":"bk_on","propertyType":"global","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":310,"y":540,"wires":[["a6b86af0.976658"],["eb77bcef.798078"]]},{"id":"238dec24.1a0fb4","type":"delay","z":"70d4070b.e447b8","name":"delay","pauseType":"delay","timeout":"0.2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":290,"y":500,"wires":[["41dc7d89.cd143c"]]},{"id":"8caf0a44.8225e8","type":"link out","z":"70d4070b.e447b8","name":"Off button colour","links":["3973098.f4c3476","3e0efd1.4d98882","c98ea849.baf91"],"x":575,"y":540,"wires":[]},{"id":"363dc3d2.07ca2c","type":"switch","z":"70d4070b.e447b8","name":"","property":"bk_pid","propertyType":"global","rules":[{"t":"false"},{"t":"true"}],"checkall":"true","repair":false,"outputs":2,"x":450,"y":420,"wires":[["cd261b4c.bceff"],["52abed07.da9014"]]},{"id":"a9b48397.bd1d6","type":"switch","z":"70d4070b.e447b8","name":"","property":"bk_on","propertyType":"global","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":330,"y":340,"wires":[["835c1ca.3f2fae"],["7dfcdd32.cd104c"]]},{"id":"835c1ca.3f2fae","type":"switch","z":"70d4070b.e447b8","name":"","property":"bk_pid","propertyType":"global","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":470,"y":320,"wires":[["929d9b44.2019c"],["7dfcdd32.cd104c"]]},{"id":"929d9b44.2019c","type":"change","z":"70d4070b.e447b8","name":"on colour","rules":[{"t":"set","p":"colour","pt":"msg","to":"#424242","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":300,"wires":[["d09e22b.7beaee"]]},{"id":"7dfcdd32.cd104c","type":"change","z":"70d4070b.e447b8","name":"off colour","rules":[{"t":"set","p":"colour","pt":"msg","to":"grey","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":340,"wires":[["d09e22b.7beaee"]]},{"id":"1ae66216.83043e","type":"link in","z":"1e878673.29136a","name":"Off button - initialization","links":["badc88d8.0fe308"],"x":55,"y":820,"wires":[["e3b8324b.0dcfb8"]]},{"id":"e3b8324b.0dcfb8","type":"change","z":"1e878673.29136a","name":"bk_lock, bk_on, bk_pid, bk_try = false","rules":[{"t":"set","p":"bk_lock","pt":"global","to":"false","tot":"bool"},{"t":"set","p":"bk_on","pt":"global","to":"false","tot":"bool"},{"t":"set","p":"bk_pid","pt":"global","to":"false","tot":"bool"},{"t":"set","p":"bk_try","pt":"flow","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":270,"y":820,"wires":[[]]},{"id":"bc121ca4.f4dcb","type":"link in","z":"70d4070b.e447b8","name":"Button click","links":["1777733d.a2553d","308e6b59.254394","d888b85c.c0ab6","11c18a22.2ff07e","fd8c477a.99a1a"],"x":175,"y":400,"wires":[["b82abc3.485d64"]]},{"id":"5c7f7e7d.580358","type":"link in","z":"70d4070b.e447b8","name":"Button click","links":["1777733d.a2553d","308e6b59.254394","d888b85c.c0ab6","11c18a22.2ff07e","fd8c477a.99a1a"],"x":175,"y":500,"wires":[["238dec24.1a0fb4"]]},{"id":"b962c91e.b3c32","type":"link in","z":"28484198.eb083e","name":"Button click","links":["15d83e9d.b3ff21","2625d95d.2ed98e","2aa6a038.2a82b"],"x":175,"y":300,"wires":[["dec1b3f8.d47b88"]]},{"id":"ab75cafe.2d25a8","type":"link in","z":"28484198.eb083e","name":"Button initialization","links":["343a6d3e.3643d2","e63a332.88bf8d","f51c265.a6e8358"],"x":175,"y":540,"wires":[["fe56cee0.8eff5"]]},{"id":"8f9871f2.d7aad","type":"link in","z":"28484198.eb083e","name":"Button initialization","links":["dad1a3f8.75b93","e63a332.88bf8d","343a6d3e.3643d2"],"x":175,"y":340,"wires":[["debb8cb1.a556c"]]},{"id":"29bf3a90.6f689e","type":"link in","z":"70d4070b.e447b8","name":"Button initialization","links":["a902d194.51df48","e9e1efef.4781b8"],"x":175,"y":340,"wires":[["a9b48397.bd1d6"]]},{"id":"d2bbd25b.20f7b8","type":"inject","z":"cdc1c9a3.021f58","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":150,"y":1140,"wires":[["83772e32.d03bd"]]},{"id":"987c2900.a5a87","type":"link in","z":"cdc1c9a3.021f58","name":"Global initializations","links":["83772e32.d03bd"],"x":175,"y":1300,"wires":[["5bc7112c.6ca358"]]},{"id":"ab3bed93.7ae2b8","type":"link in","z":"70d4070b.e447b8","name":"Button initialization","links":["a902d194.51df48","e9e1efef.4781b8"],"x":175,"y":440,"wires":[["307effd0.9d5ad8"]]},{"id":"560b31e4.4f485","type":"link in","z":"70d4070b.e447b8","name":"Button initialization","links":["a902d194.51df48","e9e1efef.4781b8"],"x":175,"y":540,"wires":[["41dc7d89.cd143c"]]},{"id":"3a43be9b.9affe2","type":"ui_ui_control","z":"70d4070b.e447b8","name":"Dashboard connection","x":260,"y":220,"wires":[["e9e1efef.4781b8"]]},{"id":"e9e1efef.4781b8","type":"link out","z":"70d4070b.e447b8","name":"Button initialization on connection","links":["29bf3a90.6f689e","560b31e4.4f485","ab3bed93.7ae2b8"],"x":415,"y":220,"wires":[]},{"id":"556117de.9a5b9","type":"ui_ui_control","z":"28484198.eb083e","name":"Dashboard connection","x":260,"y":220,"wires":[["343a6d3e.3643d2"]]},{"id":"343a6d3e.3643d2","type":"link out","z":"28484198.eb083e","name":"Button initialization on connection","links":["8f9871f2.d7aad","ab75cafe.2d25a8","4ea434d4.c6662c"],"x":415,"y":220,"wires":[]},{"id":"159ea120.ea187f","type":"ui_slider","z":"cdc1c9a3.021f58","name":"Mash target slider","label":"Target","tooltip":"","group":"f6e1ef23.f6f118","order":20,"width":6,"height":1,"passthru":true,"outs":"all","topic":"","min":"25","max":"100","step":"0.5","x":390,"y":340,"wires":[["7eae3e81.46ee88","324b69ce.251146","60b0a09.db4006","64f4ecd7.223dac"]]},{"id":"60b0a09.db4006","type":"ui_text","z":"cdc1c9a3.021f58","group":"f6e1ef23.f6f118","order":16,"width":"3","height":1,"name":"Mash target","label":"Target","format":"{{payload | number:1}}°C","layout":"col-center","x":610,"y":320,"wires":[]},{"id":"240ceaea.c2da5e","type":"ui_text","z":"1e878673.29136a","group":"9fe30f36.92cc2","order":11,"width":2,"height":1,"name":"Kettle target","label":"Target","format":"{{payload | number:1}}°C","layout":"col-center","x":590,"y":300,"wires":[]},{"id":"8c14934e.2efe18","type":"ui_slider","z":"1e878673.29136a","name":"Kettle target slider","label":"Target","tooltip":"","group":"9fe30f36.92cc2","order":13,"width":0,"height":0,"passthru":true,"outs":"all","topic":"","min":"25","max":"100","step":"0.5","x":390,"y":260,"wires":[["2ede74f0.2bc45c","240ceaea.c2da5e"]]},{"id":"91b3f0e4.35708","type":"ui_slider","z":"1e878673.29136a","name":"Manual duty slider","label":"Manual","tooltip":"","group":"9fe30f36.92cc2","order":14,"width":0,"height":0,"passthru":true,"outs":"all","topic":"","min":"25","max":"100","step":"0.5","x":390,"y":220,"wires":[["da1a9a4c.d64808","967c4792.88b1a"]]},{"id":"967c4792.88b1a","type":"ui_text","z":"1e878673.29136a","group":"9fe30f36.92cc2","order":12,"width":2,"height":1,"name":"Manual duty","label":"Manual","format":"{{payload | number:0}}٪","layout":"col-center","x":590,"y":220,"wires":[]},{"id":"3ccc6b9b.d55534","type":"ui_button","z":"28484198.eb083e","name":"","group":"f6e1ef23.f6f118","order":4,"width":2,"height":1,"passthru":false,"label":"Limiter","tooltip":"","color":"","bgcolor":"{{colour}}","icon":"","payload":"true","payloadType":"bool","topic":"","x":290,"y":100,"wires":[["2aa6a038.2a82b"]]},{"id":"ad91c055.7c31f8","type":"change","z":"28484198.eb083e","name":"limiter - off colour","rules":[{"t":"set","p":"colour","pt":"msg","to":"grey","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":510,"y":460,"wires":[["5d11d351.7dbcac"]]},{"id":"f67d7d29.d0ffd8","type":"change","z":"28484198.eb083e","name":"limiter - on colour","rules":[{"t":"set","p":"colour","pt":"msg","to":"#424242","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":510,"y":420,"wires":[["5d11d351.7dbcac"]]},{"id":"343c1e35.bd01f2","type":"switch","z":"28484198.eb083e","name":"","property":"rims_limiter","propertyType":"global","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":330,"y":440,"wires":[["f67d7d29.d0ffd8"],["ad91c055.7c31f8"]]},{"id":"ab4cba05.ef49f","type":"delay","z":"28484198.eb083e","name":"delay","pauseType":"delay","timeout":"0.2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":290,"y":400,"wires":[["343c1e35.bd01f2"]]},{"id":"5d11d351.7dbcac","type":"link out","z":"28484198.eb083e","name":"Limiter button colour","links":["fb19ac57.a0c95"],"x":655,"y":440,"wires":[]},{"id":"b53ebaf1.4996f","type":"link in","z":"28484198.eb083e","name":"Button click","links":["15d83e9d.b3ff21","2625d95d.2ed98e","2aa6a038.2a82b"],"x":175,"y":400,"wires":[["ab4cba05.ef49f"]]},{"id":"4ea434d4.c6662c","type":"link in","z":"28484198.eb083e","name":"Button initialization","links":["343a6d3e.3643d2","f51c265.a6e8358"],"x":175,"y":440,"wires":[["343c1e35.bd01f2"]]},{"id":"2aa6a038.2a82b","type":"link out","z":"28484198.eb083e","name":"PID limiter","links":["b53ebaf1.4996f","b962c91e.b3c32","d8dd142c.9e7828","ef3399af.f4985"],"x":415,"y":100,"wires":[]},{"id":"fb19ac57.a0c95","type":"link in","z":"28484198.eb083e","name":"Limiter button colour","links":["5d11d351.7dbcac"],"x":175,"y":100,"wires":[["3ccc6b9b.d55534"]]},{"id":"ef3399af.f4985","type":"link in","z":"cdc1c9a3.021f58","name":"rims_limiter switcher","links":["2aa6a038.2a82b"],"x":175,"y":1240,"wires":[["2b5d25cf.4ea10a"]]},{"id":"2b5d25cf.4ea10a","type":"switch","z":"cdc1c9a3.021f58","name":"","property":"rims_limiter","propertyType":"global","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":290,"y":1240,"wires":[["460819bf.fa184"],["5890006d.b3eeb8"]]},{"id":"5890006d.b3eeb8","type":"change","z":"cdc1c9a3.021f58","name":"","rules":[{"t":"set","p":"rims_limiter","pt":"global","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":480,"y":1260,"wires":[["60f7dfe2.9a8ba"]]},{"id":"123ff4f9.df085b","type":"link in","z":"cdc1c9a3.021f58","name":"RIMS try","links":["83772e32.d03bd","3cad8f0a.a02778","48d58022.99f848"],"x":175,"y":1340,"wires":[["30ac2870.766ad"]]},{"id":"30ac2870.766ad","type":"change","z":"cdc1c9a3.021f58","name":"flow.rims_try = false","rules":[{"t":"set","p":"rims_try","pt":"flow","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":340,"y":1340,"wires":[[]]},{"id":"9f92ccc0.54cce","type":"ui_ui_control","z":"b764cb6a.5d4448","name":"UI navigation","x":350,"y":180,"wires":[[]]},{"id":"76a6c3b3.a8018c","type":"ui_button","z":"b764cb6a.5d4448","name":"","group":"f6e1ef23.f6f118","order":22,"width":6,"height":1,"passthru":false,"label":"Mash settings","tooltip":"","color":"#757575","bgcolor":"white","icon":"","payload":"1","payloadType":"num","topic":"","x":120,"y":180,"wires":[["9f92ccc0.54cce"]]},{"id":"11a16114.5fa03f","type":"ui_button","z":"b764cb6a.5d4448","name":"","group":"9fe30f36.92cc2","order":16,"width":6,"height":1,"passthru":false,"label":"Boil settings","tooltip":"","color":"#757575","bgcolor":"white","icon":"","payload":"2","payloadType":"num","topic":"","x":110,"y":220,"wires":[["9f92ccc0.54cce"]]},{"id":"99276d4d.ae5df","type":"ui_button","z":"b764cb6a.5d4448","name":"","group":"321aaa6a.377d5e","order":24,"width":0,"height":0,"passthru":false,"label":"Back","tooltip":"","color":"#757575","bgcolor":"#e0e0e0","icon":"","payload":"0","payloadType":"num","topic":"","x":90,"y":260,"wires":[["9f92ccc0.54cce"]]},{"id":"25280e6f.05c2ca","type":"ui_button","z":"b764cb6a.5d4448","name":"","group":"f3e4e5c9.37f76","order":17,"width":0,"height":0,"passthru":false,"label":"Back","tooltip":"","color":"#757575","bgcolor":"#e0e0e0","icon":"","payload":"0","payloadType":"num","topic":"","x":90,"y":300,"wires":[["9f92ccc0.54cce"]]},{"id":"6a1e701c.88014","type":"ui_numeric","z":"cdc1c9a3.021f58","name":"","label":"K𝖽","tooltip":"","group":"321aaa6a.377d5e","order":20,"width":"4","height":"1","wrap":false,"passthru":true,"topic":"","format":"{{value | number:1}}","min":0,"max":"100","step":"0.2","x":170,"y":660,"wires":[["93be5173.c7aa2"]]},{"id":"97c18bd5.c5eb58","type":"ui_numeric","z":"cdc1c9a3.021f58","name":"","label":"K𝗂","tooltip":"","group":"321aaa6a.377d5e","order":18,"width":"4","height":"1","wrap":false,"passthru":true,"topic":"","format":"{{value | number:1}}","min":0,"max":"100","step":"0.2","x":170,"y":580,"wires":[["ad2f3a20.1034f"]]},{"id":"6d5d45c8.ade6ec","type":"ui_numeric","z":"cdc1c9a3.021f58","name":"","label":"K𝗉","tooltip":"","group":"321aaa6a.377d5e","order":16,"width":"4","height":"1","wrap":false,"passthru":true,"topic":"","format":"{{value | number:1}}","min":0,"max":"99","step":"0.2","x":170,"y":500,"wires":[["7bc5e770.8a03d"]]},{"id":"926f5889.b91ce8","type":"ui_template","z":"b764cb6a.5d4448","group":"f6e1ef23.f6f118","name":"Ensure dashboard is displayed as 1 or 2 columns","order":23,"width":0,"height":0,"format":"","storeOutMessages":true,"fwdInMessages":true,"templateScope":"global","x":230,"y":60,"wires":[[]]},{"id":"5e61a321.7c951c","type":"change","z":"2d8e58d.7555ca8","name":"pump - off colour","rules":[{"t":"set","p":"colour","pt":"msg","to":"grey","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":550,"y":400,"wires":[["6e56aa5a.45e99c"]]},{"id":"1b274766.986de9","type":"change","z":"2d8e58d.7555ca8","name":"pump - on colour","rules":[{"t":"set","p":"colour","pt":"msg","to":"#66cc00","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":550,"y":360,"wires":[["6e56aa5a.45e99c"]]},{"id":"6d9279e3.4e789","type":"switch","z":"2d8e58d.7555ca8","name":"Pump state","property":"pump","propertyType":"global","rules":[{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":350,"y":380,"wires":[["1b274766.986de9"],["5e61a321.7c951c"]]},{"id":"2f00a82.69115d8","type":"delay","z":"2d8e58d.7555ca8","name":"delay","pauseType":"delay","timeout":"0.2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":290,"y":340,"wires":[["6d9279e3.4e789"]]},{"id":"6e56aa5a.45e99c","type":"link out","z":"2d8e58d.7555ca8","name":"Pump button colour","links":["76c943b.e874a3c"],"x":695,"y":380,"wires":[]},{"id":"1d4ca40a.7d8c24","type":"link in","z":"2d8e58d.7555ca8","name":"Pump update","links":["c73cf0fd.6177a8"],"x":175,"y":340,"wires":[["2f00a82.69115d8"]]},{"id":"f9c9ab63.f152d","type":"inject","z":"2d8e58d.7555ca8","name":"","topic":"","payload":"0","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":210,"y":40,"wires":[["d74042e7.9d1d18"]]},{"id":"52851ec8.0ec6b","type":"change","z":"2d8e58d.7555ca8","name":"Pump update","rules":[{"t":"set","p":"payload","pt":"msg","to":"pump","tot":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":320,"y":480,"wires":[["32fe6811.8055a8"]]},{"id":"3e55809f.6615e8","type":"ui_button","z":"2d8e58d.7555ca8","name":"","group":"7311bc5c.585f8c","order":2,"width":4,"height":1,"passthru":false,"label":"Pump","tooltip":"","color":"","bgcolor":"{{colour}}","icon":"","payload":"true","payloadType":"bool","topic":"","x":230,"y":120,"wires":[["fc940ae2.9a3088"]]},{"id":"76c943b.e874a3c","type":"link in","z":"2d8e58d.7555ca8","name":"Pump button colour","links":["6e56aa5a.45e99c"],"x":115,"y":120,"wires":[["3e55809f.6615e8"]]},{"id":"4423eacc.9b42bc","type":"ui_ui_control","z":"2d8e58d.7555ca8","name":"Dashboard connection","x":140,"y":380,"wires":[["6d9279e3.4e789"]]},{"id":"fc940ae2.9a3088","type":"switch","z":"2d8e58d.7555ca8","name":"Pump state","property":"pump","propertyType":"global","rules":[{"t":"eq","v":"0","vt":"str"},{"t":"eq","v":"1","vt":"num"}],"checkall":"false","repair":false,"outputs":2,"x":290,"y":160,"wires":[["f0386117.e8b958"],["a03929a0.75dd5"]]},{"id":"2cf5b012.61cca","type":"change","z":"2d8e58d.7555ca8","name":"Turn off","rules":[{"t":"set","p":"pump","pt":"global","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":660,"y":160,"wires":[["c73cf0fd.6177a8"]]},{"id":"f0386117.e8b958","type":"change","z":"2d8e58d.7555ca8","name":"Turn on","rules":[{"t":"set","p":"pump","pt":"global","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":660,"y":120,"wires":[["c73cf0fd.6177a8"]]},{"id":"c73cf0fd.6177a8","type":"link out","z":"2d8e58d.7555ca8","name":"Pump update","links":["1d4ca40a.7d8c24","55245a21.c9d0bc"],"x":775,"y":140,"wires":[]},{"id":"d74042e7.9d1d18","type":"change","z":"2d8e58d.7555ca8","name":"","rules":[{"t":"set","p":"pump","pt":"global","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":40,"wires":[[]]},{"id":"55245a21.c9d0bc","type":"link in","z":"2d8e58d.7555ca8","name":"Pump update","links":["c73cf0fd.6177a8"],"x":175,"y":480,"wires":[["52851ec8.0ec6b"]]},{"id":"a03929a0.75dd5","type":"switch","z":"2d8e58d.7555ca8","name":"RIMS on?","property":"rims_on","propertyType":"global","rules":[{"t":"false"},{"t":"true"}],"checkall":"false","repair":false,"outputs":2,"x":460,"y":180,"wires":[["2cf5b012.61cca"],["62dadac5.d90074"]]},{"id":"62dadac5.d90074","type":"change","z":"2d8e58d.7555ca8","name":"Conflict message","rules":[{"t":"set","p":"payload","pt":"msg","to":"Can not turn off pump while RIMS element is active","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":530,"y":220,"wires":[["10b9b346.4371b5"]]},{"id":"10b9b346.4371b5","type":"ui_toast","z":"2d8e58d.7555ca8","position":"top right","displayTime":"5","highlight":"","outputs":0,"ok":"OK","cancel":"","topic":"","name":"","x":570,"y":260,"wires":[]},{"id":"e82101b5.32efb8","type":"ui_text","z":"4ef08725.8fbdd","group":"321aaa6a.377d5e","order":19,"width":"2","height":"1","name":"Inner PID Integrator","label":"Integral","format":"{{inner_integrator | number:1}}°C⦁s","layout":"col-center","x":550,"y":160,"wires":[]},{"id":"527896c3.acf218","type":"ui_text","z":"4ef08725.8fbdd","group":"321aaa6a.377d5e","order":17,"width":"2","height":"1","name":"Inner PID Error","label":"Error","format":"{{last_inner_error | number:1}}°C","layout":"col-center","x":540,"y":120,"wires":[]},{"id":"fba1b06.ac1075","type":"ui_text","z":"4ef08725.8fbdd","group":"321aaa6a.377d5e","order":21,"width":"2","height":"1","name":"Inner PID Derivative","label":"Derivative","format":"{{inner_derivative | number:1}}°C/s","layout":"col-center","x":550,"y":200,"wires":[]},{"id":"3f2878d3.94f4e","type":"link in","z":"4ef08725.8fbdd","name":"Mash PID display","links":["488e4b0e.1f641c","cfaeaee6.2a6ab"],"x":355,"y":220,"wires":[["e82101b5.32efb8","fba1b06.ac1075","527896c3.acf218","2aae55db.648c0a","b4a403cc.f45e58","b627264.9440ad8","b8578d41.4523a","204b1bc3.f8ebdc","ea10db28.55266"]]},{"id":"331f0c30.0eaf84","type":"ui_text","z":"4ef08725.8fbdd","group":"f3e4e5c9.37f76","order":14,"width":"2","height":"1","name":"BK PID Integrator","label":"Integral","format":"{{integrator | number:1}}°C⦁s","layout":"col-center","x":550,"y":600,"wires":[]},{"id":"6d1b4227.4e146c","type":"ui_text","z":"4ef08725.8fbdd","group":"f3e4e5c9.37f76","order":13,"width":"2","height":"1","name":"BK PID Error","label":"Error","format":"{{last_error | number:1}}°C","layout":"col-center","x":530,"y":560,"wires":[]},{"id":"834663e4.c08d7","type":"ui_text","z":"4ef08725.8fbdd","group":"f3e4e5c9.37f76","order":15,"width":"2","height":"1","name":"BK PID Derivative","label":"Derivative","format":"{{derivative | number:1}}°C/s","layout":"col-center","x":550,"y":640,"wires":[]},{"id":"48ae8805.06b6a","type":"link in","z":"4ef08725.8fbdd","name":"Boil PID display","links":["be75bc65.2c4a58","fd3d823.f4d7d8"],"x":355,"y":600,"wires":[["331f0c30.0eaf84","834663e4.c08d7","6d1b4227.4e146c"]]},{"id":"77f463e8.175d3c","type":"ui_template","z":"b764cb6a.5d4448","group":"f6e1ef23.f6f118","name":"Mash Bolt","order":1,"width":3,"height":2,"format":"
\n\n
","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":530,"y":420,"wires":[[]]},{"id":"c315e88a.988b48","type":"link in","z":"b764cb6a.5d4448","name":"BK bolt","links":["395c51b.611aa2e","45708f26.3186e","7eb452a8.843114","9ae6b3bc.013dd8"],"x":55,"y":420,"wires":[["3777085b.b9b408"]]},{"id":"3777085b.b9b408","type":"change","z":"b764cb6a.5d4448","name":"Bolt updates","rules":[{"t":"set","p":"bk_lock","pt":"msg","to":"bk_lock","tot":"global"},{"t":"set","p":"rims_lock","pt":"msg","to":"rims_lock","tot":"global"},{"t":"set","p":"rims_on","pt":"msg","to":"rims_on","tot":"global"},{"t":"set","p":"bk_on","pt":"msg","to":"bk_on","tot":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":350,"y":400,"wires":[["77f463e8.175d3c","49e5454f.82d1cc"]]},{"id":"49e5454f.82d1cc","type":"ui_template","z":"b764cb6a.5d4448","group":"9fe30f36.92cc2","name":"Boil Bolt","order":1,"width":3,"height":2,"format":"\n\n
","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":520,"y":380,"wires":[[]]},{"id":"241cd857.6184c","type":"ui_ui_control","z":"b764cb6a.5d4448","name":"Dashboard connection","x":140,"y":380,"wires":[["3777085b.b9b408"]]},{"id":"25ac40a0.3587f8","type":"switch","z":"cdc1c9a3.021f58","name":"Check pump","property":"pump","propertyType":"global","rules":[{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"0","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":390,"y":1640,"wires":[["253becb4.eb09fc"],["930d09d2.af36","48d58022.99f848"]]},{"id":"930d09d2.af36","type":"change","z":"cdc1c9a3.021f58","name":"Lock message","rules":[{"t":"set","p":"payload","pt":"msg","to":"Can not access RIMS element controls while pump is off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":1700,"wires":[["fd32f589.3deb28"]]},{"id":"fd32f589.3deb28","type":"ui_toast","z":"cdc1c9a3.021f58","position":"top right","displayTime":"5","highlight":"","outputs":0,"ok":"OK","cancel":"","topic":"","name":"","x":670,"y":1760,"wires":[]},{"id":"3cad8f0a.a02778","type":"link out","z":"cdc1c9a3.021f58","name":"RIMS try reset","links":["123ff4f9.df085b"],"x":555,"y":1580,"wires":[]},{"id":"48d58022.99f848","type":"link out","z":"cdc1c9a3.021f58","name":"RIMS try reset","links":["123ff4f9.df085b"],"x":555,"y":1660,"wires":[]},{"id":"c1bb7b75.bc5c68","type":"change","z":"1e878673.29136a","name":"","rules":[{"t":"set","p":"bk_try","pt":"flow","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":1180,"wires":[[]]},{"id":"2928a691.1c2ee2","type":"ui_template","z":"b764cb6a.5d4448","group":"f6e1ef23.f6f118","name":"Centre group titles","order":24,"width":0,"height":0,"format":"","storeOutMessages":true,"fwdInMessages":true,"templateScope":"global","x":130,"y":100,"wires":[[]]},{"id":"883d15e1.4fa8a","type":"ui_template","z":"b764cb6a.5d4448","group":"321aaa6a.377d5e","name":"Inner Loop header","order":12,"width":"6","height":"1","format":"\n
Inner Loop\n","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":130,"y":580,"wires":[[]]},{"id":"71168df0.a00dac","type":"change","z":"cdc1c9a3.021f58","name":"","rules":[{"t":"set","p":"outer_p","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":820,"wires":[[]]},{"id":"32eed7cd.ebb7e","type":"change","z":"cdc1c9a3.021f58","name":"","rules":[{"t":"set","p":"outer_i","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":900,"wires":[["3d8c1d38.bf5382"]]},{"id":"b9d3db75.fa5268","type":"change","z":"cdc1c9a3.021f58","name":"","rules":[{"t":"set","p":"outer_d","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":980,"wires":[[]]},{"id":"a5dfe23a.f0acb8","type":"inject","z":"cdc1c9a3.021f58","name":"Default Outer Kp","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":170,"y":780,"wires":[["2d4a6684.c51be2","71168df0.a00dac"]]},{"id":"a7d53803.59368","type":"inject","z":"cdc1c9a3.021f58","name":"Default Outer Ki","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":160,"y":860,"wires":[["221f49aa.464856","32eed7cd.ebb7e"]]},{"id":"621a411.9e695c","type":"inject","z":"cdc1c9a3.021f58","name":"Default Outer Kd","topic":"","payload":"0","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":170,"y":940,"wires":[["f1b523f2.089028","b9d3db75.fa5268"]]},{"id":"556564b9.22dd04","type":"inject","z":"cdc1c9a3.021f58","name":"Default Outer Max","topic":"","payload":"8","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":170,"y":1020,"wires":[["45f99cbb.a41e74","94c71243.a555c"]]},{"id":"45f99cbb.a41e74","type":"ui_numeric","z":"cdc1c9a3.021f58","name":"","label":"Max ΔT","tooltip":"","group":"321aaa6a.377d5e","order":11,"width":0,"height":0,"wrap":false,"passthru":true,"topic":"","format":"+{{value | number:1}}°C","min":"1","max":"15","step":1,"x":180,"y":1060,"wires":[["94c71243.a555c"]]},{"id":"94c71243.a555c","type":"change","z":"cdc1c9a3.021f58","name":"","rules":[{"t":"set","p":"outer_max","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":410,"y":1060,"wires":[["26ffe308.94498c"]]},{"id":"f1b523f2.089028","type":"ui_numeric","z":"cdc1c9a3.021f58","name":"","label":"K𝖽","tooltip":"","group":"321aaa6a.377d5e","order":9,"width":"4","height":"1","wrap":false,"passthru":true,"topic":"","format":"{{value | number:1}}","min":0,"max":"100","step":"0.2","x":170,"y":980,"wires":[["b9d3db75.fa5268"]]},{"id":"221f49aa.464856","type":"ui_numeric","z":"cdc1c9a3.021f58","name":"","label":"K𝗂","tooltip":"","group":"321aaa6a.377d5e","order":7,"width":"4","height":"1","wrap":false,"passthru":true,"topic":"","format":"{{value | number:1}}","min":0,"max":"100","step":"0.2","x":170,"y":900,"wires":[["32eed7cd.ebb7e"]]},{"id":"2d4a6684.c51be2","type":"ui_numeric","z":"cdc1c9a3.021f58","name":"","label":"K𝗉","tooltip":"","group":"321aaa6a.377d5e","order":5,"width":"4","height":"1","wrap":false,"passthru":false,"topic":"","format":"{{value | number:1}}","min":0,"max":"99","step":"0.2","x":170,"y":820,"wires":[["71168df0.a00dac"]]},{"id":"bd045837.6de6a8","type":"ui_template","z":"b764cb6a.5d4448","group":"321aaa6a.377d5e","name":"Outer Loop header","order":1,"width":"6","height":"1","format":"\n
\n
Outer Loop\n","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":130,"y":640,"wires":[[]]},{"id":"b4a403cc.f45e58","type":"ui_text","z":"4ef08725.8fbdd","group":"321aaa6a.377d5e","order":8,"width":"2","height":"1","name":"Outer PID Integrator","label":"Integral","format":"{{outer_integrator | number:1}}°C⦁s","layout":"col-center","x":560,"y":280,"wires":[]},{"id":"2aae55db.648c0a","type":"ui_text","z":"4ef08725.8fbdd","group":"321aaa6a.377d5e","order":6,"width":"2","height":"1","name":"Outer PID Error","label":"Error","format":"{{last_outer_error | number:1}}°C","layout":"col-center","x":540,"y":240,"wires":[]},{"id":"b627264.9440ad8","type":"ui_text","z":"4ef08725.8fbdd","group":"321aaa6a.377d5e","order":10,"width":"2","height":"1","name":"Outer PID Derivative","label":"Derivative","format":"{{outer_derivative | number:1}}°C/s","layout":"col-center","x":560,"y":320,"wires":[]},{"id":"86751c96.8bee98","type":"link out","z":"cae39ee2.e2c898","name":"MLT temperature","links":["e51f03e2.9a55f8"],"x":535,"y":360,"wires":[]},{"id":"d20fe142.9dfcb8","type":"link in","z":"cdc1c9a3.021f58","name":"RIMS temp","links":["33b1f220.5f8056"],"x":75,"y":40,"wires":[["125eeb42.bedc7d"]]},{"id":"125eeb42.bedc7d","type":"change","z":"cdc1c9a3.021f58","name":"","rules":[{"t":"set","p":"rims_temp","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":210,"y":40,"wires":[[]]},{"id":"e51f03e2.9a55f8","type":"link in","z":"cdc1c9a3.021f58","name":"Mash temp","links":["86751c96.8bee98"],"x":75,"y":80,"wires":[["72bb7a95.5e6654"]]},{"id":"72bb7a95.5e6654","type":"change","z":"cdc1c9a3.021f58","name":"","rules":[{"t":"set","p":"mash_temp","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":215,"y":80,"wires":[[]]},{"id":"dc955b1c.7edea","type":"link in","z":"cdc1c9a3.021f58","name":"Cascade PID trigger","links":["5010ffd6.cabb28"],"x":75,"y":200,"wires":[["6c4d238a.3d5554"]]},{"id":"ae5f9dd0.0698a","type":"delay","z":"cae39ee2.e2c898","name":"","pauseType":"delay","timeout":"500","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":330,"y":560,"wires":[["5010ffd6.cabb28"]]},{"id":"5010ffd6.cabb28","type":"link out","z":"cae39ee2.e2c898","name":"PID trigger","links":["dc955b1c.7edea"],"x":535,"y":560,"wires":[]},{"id":"d6a0ec58.b20f1","type":"function","z":"cdc1c9a3.021f58","name":"Cascade PID - integrator max calculation","func":"// brew2 PID algorithm - integrators\n// Justin Angevaare\n// May 2018 - Nov. 2019\n\n// Calculate outer integrator max\n// Output to flow context\nif(flow.get('outer_i')>0.0){\n flow.set('outer_integrator_max', flow.get('outer_max')/flow.get('outer_i'))}else {\n flow.set('outer_integrator_max', 0.0)}\n\n// Get current output max\n// Output to flow context\nif(global.get('rims_limiter')){\n flow.set('inner_max', flow.get('inner_limit'))}else {\n flow.set('inner_max', 100)}\n\n// Calculate inner integrator max\n// Output to flow context\nif(flow.get('inner_i')>0.0){\n flow.set('inner_integrator_max', flow.get('inner_max')/flow.get('inner_i'))}else {\n flow.set('inner_integrator_max', 0.0)}\n\nreturn msg;","outputs":1,"noerr":0,"x":280,"y":140,"wires":[[]]},{"id":"ae15465d.e134","type":"link in","z":"cdc1c9a3.021f58","name":"Cascade PID Integrator update","links":["b097c6ec.5fbe5","b1cf141f.84ac9","d75d11e.f8f757","eab00f4b.29e27","2f03decd.c6137a","3d8c1d38.bf5382","668f2b46.52004c","26ffe308.94498c","60f7dfe2.9a8ba","9bd31a5b.f45448"],"x":75,"y":140,"wires":[["d6a0ec58.b20f1"]]},{"id":"b1cf141f.84ac9","type":"link out","z":"cdc1c9a3.021f58","name":"Cascade PID Integrator update","links":["ae15465d.e134"],"x":555,"y":580,"wires":[]},{"id":"eab00f4b.29e27","type":"link out","z":"cdc1c9a3.021f58","name":"Cascade PID Integrator update","links":["ae15465d.e134"],"x":555,"y":740,"wires":[]},{"id":"3d8c1d38.bf5382","type":"link out","z":"cdc1c9a3.021f58","name":"Cascade PID Integrator update","links":["ae15465d.e134"],"x":555,"y":900,"wires":[]},{"id":"668f2b46.52004c","type":"link out","z":"cdc1c9a3.021f58","name":"Cascade PID Integrator update","links":["ae15465d.e134"],"x":655,"y":1220,"wires":[]},{"id":"26ffe308.94498c","type":"link out","z":"cdc1c9a3.021f58","name":"Cascade PID Integrator update","links":["ae15465d.e134"],"x":555,"y":1060,"wires":[]},{"id":"60f7dfe2.9a8ba","type":"link out","z":"cdc1c9a3.021f58","name":"Cascade PID Integrator update","links":["ae15465d.e134"],"x":655,"y":1260,"wires":[]},{"id":"9bd31a5b.f45448","type":"link out","z":"cdc1c9a3.021f58","name":"Cascade PID Integrator update","links":["ae15465d.e134"],"x":655,"y":1300,"wires":[]},{"id":"6920821b.3fc50c","type":"ui_text","z":"cae39ee2.e2c898","group":"321aaa6a.377d5e","order":13,"width":2,"height":1,"name":"RIMS temperature display","label":"Heater","format":"{{msg.payload | number:1}}°C","layout":"col-center","x":590,"y":220,"wires":[]},{"id":"5d183b5d.0387cc","type":"ui_text","z":"cae39ee2.e2c898","group":"321aaa6a.377d5e","order":2,"width":2,"height":1,"name":"MLT temperature display","label":"MLT","format":"{{msg.payload | number:1}}°C","layout":"col-center","x":590,"y":400,"wires":[]},{"id":"b8578d41.4523a","type":"ui_text","z":"4ef08725.8fbdd","group":"321aaa6a.377d5e","order":14,"width":"2","height":"1","name":"Inner Target","label":"Target","format":"{{inner_target | number:1}}°C","layout":"col-center","x":530,"y":360,"wires":[]},{"id":"204b1bc3.f8ebdc","type":"ui_text","z":"4ef08725.8fbdd","group":"321aaa6a.377d5e","order":4,"width":"2","height":"1","name":"Outer Output","label":"Output","format":"+{{outer_output | number:1}}°C","layout":"col-center","x":530,"y":440,"wires":[]},{"id":"ea10db28.55266","type":"ui_text","z":"4ef08725.8fbdd","group":"f6e1ef23.f6f118","order":19,"width":"3","height":"1","name":"Inner Target","label":"Target","format":"{{inner_target | number:1}}°C","layout":"col-center","x":530,"y":400,"wires":[]},{"id":"64f4ecd7.223dac","type":"link out","z":"cdc1c9a3.021f58","name":"Mash target slider output","links":["6ce6448.f7e59bc"],"x":555,"y":280,"wires":[]},{"id":"6188a3dc.9d0a9c","type":"switch","z":"4ef08725.8fbdd","name":"","property":"rims_on","propertyType":"global","rules":[{"t":"false"}],"checkall":"true","repair":true,"outputs":1,"x":210,"y":340,"wires":[["417ad43f.c5b28c"]]},{"id":"6ce6448.f7e59bc","type":"link in","z":"4ef08725.8fbdd","name":"","links":["64f4ecd7.223dac"],"x":115,"y":340,"wires":[["6188a3dc.9d0a9c"]]},{"id":"417ad43f.c5b28c","type":"change","z":"4ef08725.8fbdd","name":"","rules":[{"t":"set","p":"inner_target","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":280,"y":380,"wires":[["ea10db28.55266","b8578d41.4523a"]]}]
\ No newline at end of file
+[{"id":"cae39ee2.e2c898","type":"tab","label":"Temperatures","disabled":false,"info":"Temperature readings, triggered every 2 \nseconds (note that the PID algorith has this \nfrequency hard coded into it, and those \nfunctions will need to be modified if the \ntrigger frequency is changed). Also smoothing \nand formating for temperature display."},{"id":"28484198.eb083e","type":"tab","label":"Mash buttons","disabled":false,"info":"Buttons for mash control. These also display \nstate."},{"id":"cdc1c9a3.021f58","type":"tab","label":"Mash controller","disabled":false,"info":"Everything related to mash/RIMS PID control, in\naddition to interlock features to prevent RIMS\nuse when pump is inactive or when the boil \nelement is in use."},{"id":"4ef08725.8fbdd","type":"tab","label":"PID outputs","disabled":false,"info":"This flow displays output from the PID \nalgorithm. This can be useful for tuning \npurposes."},{"id":"70d4070b.e447b8","type":"tab","label":"Boil buttons","disabled":false,"info":"Buttons related to controlling the boil.\nThese buttons also display state."},{"id":"1e878673.29136a","type":"tab","label":"Boil controller","disabled":false,"info":"PID functionality, as well as an interlock \nscheme to prevent multiple elements from being\nused at one time."},{"id":"44130c7e.f0c1fc","type":"tab","label":"Element outputs","disabled":false,"info":"Routing to GPIO, as well as displays for element\noutput in duty % and watts."},{"id":"2d8e58d.7555ca8","type":"tab","label":"Pump control","disabled":false,"info":"This flow provides a button to turn a pump on \nand off. The colour of the pump button reflects\nits status. The pump has one restriction in that \nit can not be turned off while RIMS is active.\nSuch attempts are blocked, with a notification\nprovided to the user."},{"id":"b764cb6a.5d4448","type":"tab","label":"UI","disabled":false,"info":"This tab contains a collection of UI features.\n* CSS overide to ensure dashboard is only 1 or 2 columns\n* Centre \"group\" titles\n* Navigation buttons\n* Bolts indicating element activity"},{"id":"b2a662aa.2b752","type":"tab","label":"Volume","disabled":true,"info":"A pressure sensor is read by an analog input\nboard. The pressure reading is then converted\nto cmH20 and volume and displayed."},{"id":"7fa64790.3f4f4","type":"ui_base","theme":{"name":"theme-light","lightTheme":{"default":"#0094CE","baseColor":"#77bb40","baseFont":"Tahoma,Geneva,sans-serif","edited":true,"reset":false},"darkTheme":{"default":"#097479","baseColor":"#094779","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":true,"reset":false},"customTheme":{"name":"Untitled Theme 1","default":"#4B7930","baseColor":"#32A359","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","reset":false},"themeState":{"base-color":{"default":"#0094CE","value":"#77bb40","edited":true},"page-titlebar-backgroundColor":{"value":"#77bb40","edited":true},"page-backgroundColor":{"value":"#fafafa","edited":true},"page-sidebar-backgroundColor":{"value":"#ffffff","edited":false},"group-textColor":{"value":"#9fd077","edited":true},"group-borderColor":{"value":"#ffffff","edited":true},"group-backgroundColor":{"value":"#ffffff","edited":true},"widget-textColor":{"value":"#111111","edited":true},"widget-backgroundColor":{"value":"#77bb40","edited":true},"widget-borderColor":{"value":"#ffffff","edited":true},"base-font":{"value":"Tahoma,Geneva,sans-serif"}},"angularTheme":{"primary":"indigo","accents":"blue","warn":"red","background":"grey"}},"site":{"name":"brew2","hideToolbar":"true","allowSwipe":"false","allowTempTheme":"false","dateFormat":"DD/MM/YYYY","sizes":{"sx":45,"sy":45,"gx":5,"gy":5,"cx":5,"cy":5,"px":5,"py":5},"lockMenu":"false"}},{"id":"bde8848e.1d357","type":"ui_tab","z":"","name":"Brew","icon":"","order":1,"disabled":false,"hidden":true},{"id":"f6e1ef23.f6f118","type":"ui_group","z":"","name":"MASH","tab":"bde8848e.1d357","order":1,"disp":true,"width":"6","collapse":false},{"id":"9fe30f36.92cc2","type":"ui_group","z":"","name":"BOIL","tab":"bde8848e.1d357","order":2,"disp":true,"width":"6","collapse":false},{"id":"f3e4e5c9.37f76","type":"ui_group","z":"","name":"BOIL SETTINGS","tab":"4adcb434.78650c","order":2,"disp":true,"width":"6","collapse":false},{"id":"321aaa6a.377d5e","type":"ui_group","z":"","name":"MASH SETTINGS","tab":"f33d4d52.4eb478","order":2,"disp":true,"width":"6","collapse":false},{"id":"f33d4d52.4eb478","type":"ui_tab","z":"","name":"Mash Settings","icon":"","order":2,"disabled":false,"hidden":true},{"id":"4adcb434.78650c","type":"ui_tab","z":"","name":"Boil Settings","icon":"","order":3,"disabled":false,"hidden":true},{"id":"d40a07ee.aef4c8","type":"ui_spacer","name":"spacer","group":"f3e4e5c9.37f76","order":12,"width":"6","height":1},{"id":"e7bea373.db6ff","type":"ui_spacer","name":"spacer","group":"f3e4e5c9.37f76","order":10,"width":"6","height":1},{"id":"a727758.4406208","type":"ui_spacer","name":"spacer","group":"321aaa6a.377d5e","order":23,"width":"6","height":1},{"id":"ee71929f.5165","type":"ui_spacer","name":"spacer","group":"f3e4e5c9.37f76","order":1,"width":1,"height":1},{"id":"e0027dad.ce1ab","type":"ui_spacer","name":"spacer","group":"f3e4e5c9.37f76","order":3,"width":1,"height":1},{"id":"c7dbe94d.2b3738","type":"ui_spacer","name":"spacer","group":"f3e4e5c9.37f76","order":4,"width":1,"height":1},{"id":"9d39816a.73695","type":"ui_spacer","name":"spacer","group":"f3e4e5c9.37f76","order":7,"width":1,"height":1},{"id":"f7965945.9488d8","type":"ui_spacer","name":"spacer","group":"f3e4e5c9.37f76","order":6,"width":1,"height":1},{"id":"65121f6a.d0f13","type":"ui_spacer","name":"spacer","group":"f3e4e5c9.37f76","order":9,"width":1,"height":1},{"id":"eee28e32.85e428","type":"ui_spacer","name":"spacer","group":"f3e4e5c9.37f76","order":16,"width":"6","height":1},{"id":"7311bc5c.585f8c","type":"ui_group","z":"","name":"PUMP","tab":"bde8848e.1d357","order":3,"disp":false,"width":"6","collapse":false},{"id":"c85b00d0.83335","type":"ui_spacer","name":"spacer","group":"f6e1ef23.f6f118","order":3,"width":1,"height":1},{"id":"316350b6.1b9c","type":"ui_spacer","name":"spacer","group":"f6e1ef23.f6f118","order":5,"width":1,"height":1},{"id":"c14ce771.46f9b8","type":"ui_spacer","name":"spacer","group":"f6e1ef23.f6f118","order":8,"width":1,"height":1},{"id":"906fc327.7270e","type":"ui_spacer","name":"spacer","group":"f6e1ef23.f6f118","order":9,"width":6,"height":1},{"id":"a77aeab1.f128d8","type":"ui_spacer","name":"spacer","group":"f6e1ef23.f6f118","order":21,"width":6,"height":1},{"id":"992a6538.82412","type":"ui_spacer","name":"spacer","group":"9fe30f36.92cc2","order":3,"width":1,"height":1},{"id":"285414c9.469bf4","type":"ui_spacer","name":"spacer","group":"9fe30f36.92cc2","order":5,"width":1,"height":1},{"id":"eac69de0.0ec08","type":"ui_spacer","name":"spacer","group":"9fe30f36.92cc2","order":8,"width":1,"height":1},{"id":"132f9a87.74275d","type":"ui_spacer","name":"spacer","group":"9fe30f36.92cc2","order":9,"width":6,"height":1},{"id":"f7418565.694118","type":"ui_spacer","name":"spacer","group":"9fe30f36.92cc2","order":15,"width":6,"height":1},{"id":"68a9b625.a1df38","type":"ui_spacer","name":"spacer","group":"7311bc5c.585f8c","order":1,"width":1,"height":1},{"id":"84f64c25.7945e8","type":"ui_spacer","name":"spacer","group":"7311bc5c.585f8c","order":3,"width":1,"height":1},{"id":"7fa5d2fb.efeb04","type":"ui_text","z":"cae39ee2.e2c898","group":"9fe30f36.92cc2","order":10,"width":2,"height":1,"name":"BK temperature display","label":"Kettle","format":"{{msg.payload | number:1}}°C","layout":"col-center","x":450,"y":120,"wires":[]},{"id":"ba5b776f.cbd1c8","type":"smooth","z":"cae39ee2.e2c898","name":"","property":"payload","action":"mean","count":"5","round":"2","mult":"single","x":360,"y":80,"wires":[["7fa5d2fb.efeb04"]]},{"id":"59ad46d5.3e9648","type":"widgetlords-analog-in","z":"b2a662aa.2b752","name":"Mash Volume Raw","channel":"0","chipenable":"0","interval":"1000","x":130,"y":60,"wires":[["a4e3eea3.f3eb5"]]},{"id":"a4e3eea3.f3eb5","type":"range","z":"b2a662aa.2b752","minin":"0","maxin":"4096","minout":"0","maxout":"61.2","action":"scale","round":false,"property":"payload","name":"cmH₂O","x":180,"y":100,"wires":[["d9cde29d.b507b8"]]},{"id":"d9cde29d.b507b8","type":"smooth","z":"b2a662aa.2b752","name":"","property":"payload","action":"mean","count":"5","round":"2","mult":"single","x":220,"y":140,"wires":[["19f82bf2.0c68e4"]]},{"id":"25e729a4.95b7fe","type":"function","z":"b2a662aa.2b752","name":"Volume conversion","func":"msg.payload = 1.89 + (msg.payload * 21.5 * 21.5 * 3.141526 / 1000);\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":220,"wires":[["303cf1e8.cf7276"]]},{"id":"9bc8c2a5.7262b8","type":"ui_text","z":"b2a662aa.2b752","group":"f6e1ef23.f6f118","order":10,"width":3,"height":1,"name":"Mash volume display","label":"Volume","format":"{{msg.payload}}l H₂O","layout":"col-center","x":420,"y":300,"wires":[]},{"id":"19f82bf2.0c68e4","type":"function","z":"b2a662aa.2b752","name":"WC calibration","func":"msg.payload = -11.182129 + 1.392048*msg.payload \nreturn msg;","outputs":1,"noerr":0,"x":280,"y":180,"wires":[["25e729a4.95b7fe","b1b77e03.c2822"]]},{"id":"303cf1e8.cf7276","type":"function","z":"b2a662aa.2b752","name":"Minimum volume","func":"if(msg.payload <= 12.0){\n msg.payload = \"<12.0\"\n} else {\n msg.payload = msg.payload.toFixed(1);\n}\nreturn msg;","outputs":1,"noerr":0,"x":370,"y":260,"wires":[["9bc8c2a5.7262b8"]]},{"id":"32fe6811.8055a8","type":"rpi-gpio out","z":"2d8e58d.7555ca8","name":"Pump GPIO","pin":"11","set":true,"level":"0","freq":"1","out":"out","x":510,"y":480,"wires":[]},{"id":"10f77280.873376","type":"inject","z":"1e878673.29136a","name":"Default Element Duty","topic":"","payload":"100","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":"0.1","x":160,"y":220,"wires":[["91b3f0e4.35708"]]},{"id":"59b941a3.ab6d08","type":"change","z":"1e878673.29136a","name":"bk_lock=true","rules":[{"t":"set","p":"bk_lock","pt":"global","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":750,"y":1280,"wires":[[]]},{"id":"d3ab8458.31cd","type":"change","z":"1e878673.29136a","name":"bk_on = bk_try","rules":[{"t":"set","p":"bk_on","pt":"global","to":"bk_try","tot":"flow"},{"t":"set","p":"payload","pt":"msg","to":"bk_try","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":1300,"wires":[["a6f48df.c6b5d7","45708f26.3186e"]]},{"id":"a6f48df.c6b5d7","type":"switch","z":"1e878673.29136a","name":"bk_on","property":"bk_on","propertyType":"global","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":590,"y":1300,"wires":[["59b941a3.ab6d08"],["d7e61db5.6a8ad8"]]},{"id":"b4c8849.8c2ce78","type":"switch","z":"1e878673.29136a","name":"Check rims_lock","property":"rims_lock","propertyType":"global","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":210,"y":1280,"wires":[["506d5f20.cd229"],["d3ab8458.31cd"]]},{"id":"59bfa59f.c292f4","type":"ui_toast","z":"1e878673.29136a","position":"top right","displayTime":"5","highlight":"","outputs":0,"ok":"OK","cancel":"","topic":"","name":"","x":470,"y":1220,"wires":[]},{"id":"506d5f20.cd229","type":"change","z":"1e878673.29136a","name":"Element lock message","rules":[{"t":"set","p":"payload","pt":"msg","to":"Can not access boil kettle element controls while RIMS element is active","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":1260,"wires":[["59bfa59f.c292f4"]]},{"id":"7bc5e770.8a03d","type":"change","z":"cdc1c9a3.021f58","name":"","rules":[{"t":"set","p":"inner_p","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":500,"wires":[[]]},{"id":"ad2f3a20.1034f","type":"change","z":"cdc1c9a3.021f58","name":"","rules":[{"t":"set","p":"inner_i","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":580,"wires":[["b1cf141f.84ac9"]]},{"id":"93be5173.c7aa2","type":"change","z":"cdc1c9a3.021f58","name":"","rules":[{"t":"set","p":"inner_d","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":660,"wires":[[]]},{"id":"7eae3e81.46ee88","type":"change","z":"cdc1c9a3.021f58","name":"","rules":[{"t":"set","p":"mash_target","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":400,"wires":[[]]},{"id":"a173c222.e1b86","type":"function","z":"cdc1c9a3.021f58","name":"Cascade PID - main","func":"// brew2 Cascade PID algorithm\n// Justin Angevaare\n// Nov. 2019\n\n// Manually specify update interval\nmsg.interval = 2000;\n\n//\n// Begin Outer Control Loop\n//\n// Output from Outer Control will be the target RIMS delta T\n// Calculate outer error\nmsg.mash_target = flow.get('mash_target')\nmsg.outer_error = msg.mash_target - flow.get('mash_temp');\n\n// Update outer integrator\n// For purposes of integrator, bound error by [-1, 1]\nmsg.outer_integrator = flow.get('outer_integrator');\nmsg.outer_integrator += (msg.interval/1000) * Math.max(Math.min(msg.outer_error, 1), -1);\n\n// Bound total outer integrator by absolute maximum\nmsg.outer_integrator = Math.max(Math.min(msg.outer_integrator, flow.get('outer_integrator_max')), -flow.get('outer_integrator_max'));\n\n// Output updated integrator to flow context\nflow.set('outer_integrator', msg.outer_integrator);\n\n// Calculate proportional action\nmsg.outer_output = msg.outer_error * flow.get('outer_p');\n\n// Calculate intergral action\nmsg.outer_output += msg.outer_integrator * flow.get('outer_i');\n\n// Calculate derivative action\nmsg.outer_derivative = (msg.outer_error - flow.get('last_outer_error'))/(msg.interval/1000);\nmsg.outer_output += msg.outer_derivative * flow.get('outer_d');\n\n// Bound outer_output by [0.0, max_output]\nmsg.outer_output = Math.max(Math.min(msg.outer_output, flow.get('outer_max')), 0.0);\n\n// Set inner_target\nmsg.inner_target = Math.min(msg.mash_target + msg.outer_output, 90)\n\n// Output updated last_outer_error to flow context\nmsg.last_outer_error = msg.outer_error;\nflow.set('last_outer_error', msg.last_outer_error);\n\n//\n// Begin Inner Control Loop\n// Output from inner control loop will be RIMS element duty %\n// Calculate inner error\nmsg.inner_error = msg.inner_target - flow.get('rims_temp');\n\n// Update inner integrator\n// For purposes of integrator, bound error by [-1, 1]\nmsg.inner_integrator = flow.get('inner_integrator');\nmsg.inner_integrator += (msg.interval/1000) * Math.max(Math.min(msg.inner_error, 1), -1);\n\n// Bound total inner integrator by absolute maximum\nmsg.inner_integrator = Math.max(Math.min(msg.inner_integrator, flow.get('inner_integrator_max')), -flow.get('inner_integrator_max'));\n\n// Output updated integrator to flow context\nflow.set('inner_integrator', msg.inner_integrator);\n\n// Calculate proportional action\nmsg.inner_output = msg.inner_error * flow.get('inner_p');\n\n// Calculate intergral action\nmsg.inner_output += msg.inner_integrator * flow.get('inner_i');\n\n// Calculate derivative action\nmsg.inner_derivative = (msg.inner_error - flow.get('last_inner_error'))/(msg.interval/1000);\nmsg.inner_output += msg.inner_derivative * flow.get('inner_d');\n\n// Bound inner_output by [0.0, max_output]\nmsg.inner_output = Math.max(Math.min(msg.inner_output, flow.get('inner_max')), 0.0);\n\n// Output updated last_inner_error to flow context\nmsg.last_inner_error = msg.inner_error;\nflow.set('last_inner_error', msg.last_inner_error);\n\n// Set payload to element output\nmsg.payload = msg.inner_output;\n\nreturn msg;","outputs":1,"noerr":0,"x":440,"y":200,"wires":[["d067663f.365a9","cfaeaee6.2a6ab"]]},{"id":"5bc7112c.6ca358","type":"change","z":"cdc1c9a3.021f58","name":"global.rims_lock, rims_on, rims_limiter = false","rules":[{"t":"set","p":"rims_lock","pt":"global","to":"false","tot":"bool"},{"t":"set","p":"rims_on","pt":"global","to":"false","tot":"bool"},{"t":"set","p":"rims_limiter","pt":"global","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":1300,"wires":[["9bd31a5b.f45448"]]},{"id":"26a7870c.b8ea4","type":"change","z":"cdc1c9a3.021f58","name":"Lock message","rules":[{"t":"set","p":"payload","pt":"msg","to":"Can not access RIMS element controls while boil kettle element is active","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":1480,"wires":[["2e4ea9b.ece48d6"]]},{"id":"2e4ea9b.ece48d6","type":"ui_toast","z":"cdc1c9a3.021f58","position":"top right","displayTime":"5","highlight":"","outputs":0,"ok":"OK","cancel":"","topic":"","name":"","x":670,"y":1540,"wires":[]},{"id":"6bfc6616.0a03","type":"switch","z":"cdc1c9a3.021f58","name":"Check bk_lock","property":"bk_lock","propertyType":"global","rules":[{"t":"true"},{"t":"false"}],"checkall":"false","repair":false,"outputs":2,"x":360,"y":1580,"wires":[["26a7870c.b8ea4","3cad8f0a.a02778"],["25ac40a0.3587f8"]]},{"id":"3d6a8f69.ac96","type":"change","z":"cdc1c9a3.021f58","name":"rims_try = payload","rules":[{"t":"set","p":"rims_try","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":330,"y":1520,"wires":[["6bfc6616.0a03"]]},{"id":"253becb4.eb09fc","type":"change","z":"cdc1c9a3.021f58","name":"rims_on = rims_try","rules":[{"t":"set","p":"rims_on","pt":"global","to":"rims_try","tot":"flow"},{"t":"set","p":"payload","pt":"msg","to":"rims_try","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":630,"y":1620,"wires":[["d6a6fe13.0dee2","9ae6b3bc.013dd8"]]},{"id":"d6a6fe13.0dee2","type":"switch","z":"cdc1c9a3.021f58","name":"","property":"rims_on","propertyType":"global","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":810,"y":1660,"wires":[["bce4461c.3e13c"],["e0211c1f.5c199"]]},{"id":"bce4461c.3e13c","type":"change","z":"cdc1c9a3.021f58","name":"rims_lock = true","rules":[{"t":"set","p":"rims_lock","pt":"global","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":980,"y":1640,"wires":[[]]},{"id":"ac7ff251.12f97","type":"change","z":"cdc1c9a3.021f58","name":"rims_lock = false","rules":[{"t":"set","p":"rims_lock","pt":"global","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1030,"y":1720,"wires":[["395c51b.611aa2e"]]},{"id":"e0211c1f.5c199","type":"delay","z":"cdc1c9a3.021f58","name":"","pauseType":"delay","timeout":"3","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":960,"y":1680,"wires":[["ac7ff251.12f97"]]},{"id":"6c4d238a.3d5554","type":"switch","z":"cdc1c9a3.021f58","name":"rims_on switch","property":"rims_on","propertyType":"global","rules":[{"t":"true"}],"checkall":"false","repair":false,"outputs":1,"x":220,"y":200,"wires":[["a173c222.e1b86"]]},{"id":"d7e61db5.6a8ad8","type":"delay","z":"1e878673.29136a","name":"","pauseType":"delay","timeout":"3","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":740,"y":1320,"wires":[["b08647e3.136be8"]]},{"id":"b08647e3.136be8","type":"change","z":"1e878673.29136a","name":"bk_lock = false","rules":[{"t":"set","p":"bk_lock","pt":"global","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":800,"y":1360,"wires":[["7eb452a8.843114"]]},{"id":"324b69ce.251146","type":"ui_text","z":"cdc1c9a3.021f58","group":"321aaa6a.377d5e","order":3,"width":"2","height":"1","name":"Mash target","label":"Target","format":"{{payload | number:1}}°C","layout":"col-center","x":610,"y":360,"wires":[]},{"id":"e34426e3.0824","type":"smooth","z":"cae39ee2.e2c898","name":"","property":"payload","action":"mean","count":"5","round":"2","mult":"single","x":360,"y":400,"wires":[["5af59d82.5bc6dc"]]},{"id":"2b38bf4e.64a19","type":"smooth","z":"cae39ee2.e2c898","name":"","property":"payload","action":"mean","count":"5","round":"2","mult":"single","x":360,"y":220,"wires":[["96c9f49f.26944"]]},{"id":"96c9f49f.26944","type":"ui_text","z":"cae39ee2.e2c898","group":"f6e1ef23.f6f118","order":18,"width":"3","height":1,"name":"RIMS temperature display","label":"Heater","format":"{{msg.payload | number:1}}°C","layout":"col-center","x":450,"y":260,"wires":[]},{"id":"5af59d82.5bc6dc","type":"ui_text","z":"cae39ee2.e2c898","group":"f6e1ef23.f6f118","order":15,"width":"3","height":1,"name":"MLT temperature display","label":"MLT","format":"{{msg.payload | number:1}}°C","layout":"col-center","x":450,"y":440,"wires":[]},{"id":"33b1f220.5f8056","type":"link out","z":"cae39ee2.e2c898","name":"RIMS temperature","links":["d20fe142.9dfcb8"],"x":535,"y":180,"wires":[]},{"id":"7eb452a8.843114","type":"link out","z":"1e878673.29136a","name":"Bolt update","links":["93befc16.2ca578","b05b4104.4b7748","a0d524b2.529a4","f8471ffc.3e73c","c315e88a.988b48"],"x":775,"y":1400,"wires":[]},{"id":"45708f26.3186e","type":"link out","z":"1e878673.29136a","name":"Bolt update","links":["93befc16.2ca578","b05b4104.4b7748","a0d524b2.529a4","f8471ffc.3e73c","c315e88a.988b48"],"x":555,"y":1340,"wires":[]},{"id":"395c51b.611aa2e","type":"link out","z":"cdc1c9a3.021f58","name":"Bolt update","links":["93befc16.2ca578","b05b4104.4b7748","a0d524b2.529a4","f8471ffc.3e73c","c315e88a.988b48"],"x":1175,"y":1720,"wires":[]},{"id":"9ae6b3bc.013dd8","type":"link out","z":"cdc1c9a3.021f58","name":"Bolt update","links":["93befc16.2ca578","b05b4104.4b7748","a0d524b2.529a4","f8471ffc.3e73c","c315e88a.988b48"],"x":775,"y":1620,"wires":[]},{"id":"b1b77e03.c2822","type":"function","z":"b2a662aa.2b752","name":"Minimum WC","func":"if(msg.payload <= 5.0){\n msg.payload = \"<5.0\"\n} else {\n msg.payload = msg.payload.toFixed(1);\n}\nreturn msg;","outputs":1,"noerr":0,"x":620,"y":260,"wires":[["1f2642b8.afc335"]]},{"id":"1f2642b8.afc335","type":"ui_text","z":"b2a662aa.2b752","group":"f6e1ef23.f6f118","order":11,"width":3,"height":1,"name":"Mash WC display","label":"Water column","format":"{{msg.payload}} cmH₂O","layout":"col-center","x":670,"y":300,"wires":[]},{"id":"780c3724.2e43a","type":"inject","z":"cdc1c9a3.021f58","name":"Default Inner Kp","topic":"","payload":"20.0","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":"0.1","x":160,"y":460,"wires":[["6d5d45c8.ade6ec","7bc5e770.8a03d"]]},{"id":"16f886ce.38ae51","type":"inject","z":"cdc1c9a3.021f58","name":"Default Inner Ki","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":160,"y":540,"wires":[["97c18bd5.c5eb58","ad2f3a20.1034f"]]},{"id":"1e869377.fbf4ad","type":"inject","z":"cdc1c9a3.021f58","name":"Default Inner Kd","topic":"","payload":"30","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":160,"y":620,"wires":[["6a1e701c.88014","93be5173.c7aa2"]]},{"id":"b8c19fef.ae0d88","type":"inject","z":"cdc1c9a3.021f58","name":"Default Target","topic":"","payload":"70","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":160,"y":340,"wires":[["159ea120.ea187f","64f4ecd7.223dac"]]},{"id":"55776d2d.6c074c","type":"inject","z":"cdc1c9a3.021f58","name":"Default Inner Limit","topic":"","payload":"30","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":170,"y":700,"wires":[["15d16967.4afe17","1b35e9ba.06cc26"]]},{"id":"15d16967.4afe17","type":"ui_numeric","z":"cdc1c9a3.021f58","name":"","label":"Output limiter","tooltip":"","group":"321aaa6a.377d5e","order":22,"width":"6","height":"1","wrap":false,"passthru":true,"topic":"","format":"{{value | number:0}}٪","min":"1","max":"99","step":1,"x":200,"y":740,"wires":[["1b35e9ba.06cc26"]]},{"id":"1b35e9ba.06cc26","type":"change","z":"cdc1c9a3.021f58","name":"","rules":[{"t":"set","p":"inner_limit","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":410,"y":740,"wires":[["eab00f4b.29e27"]]},{"id":"460819bf.fa184","type":"change","z":"cdc1c9a3.021f58","name":"","rules":[{"t":"set","p":"rims_limiter","pt":"global","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":480,"y":1220,"wires":[["668f2b46.52004c"]]},{"id":"3516d1c2.6cbd6e","type":"sensor-ds18b20","z":"cae39ee2.e2c898","name":"BK","sensorid":"28-0000062eaf09","timer":"2","repeat":false,"x":310,"y":40,"wires":[["ba5b776f.cbd1c8","737daba5.b4f1e4"]]},{"id":"c83a56a2.7af0c8","type":"sensor-ds18b20","z":"cae39ee2.e2c898","name":"RIMS","sensorid":"28-0000062eb892","timer":"2","repeat":false,"x":310,"y":180,"wires":[["2b38bf4e.64a19","33b1f220.5f8056","6920821b.3fc50c"]],"outputLabels":["temp"]},{"id":"598eede.4742214","type":"sensor-ds18b20","z":"cae39ee2.e2c898","name":"MLT","sensorid":"28-000007c0cb12","timer":"2","repeat":false,"x":310,"y":360,"wires":[["e34426e3.0824","86751c96.8bee98","5d183b5d.0387cc"]]},{"id":"9699ad48.47c208","type":"inject","z":"cae39ee2.e2c898","name":"","topic":"","payload":"","payloadType":"date","repeat":"2","crontab":"","once":true,"onceDelay":0.1,"x":110,"y":40,"wires":[["c83a56a2.7af0c8","3516d1c2.6cbd6e","598eede.4742214","ae5f9dd0.0698a"]]},{"id":"bc1c0af.df72bf8","type":"ui_numeric","z":"1e878673.29136a","name":"","label":"P","tooltip":"","group":"f3e4e5c9.37f76","order":2,"width":"4","height":"1","wrap":false,"passthru":true,"topic":"","format":"{{value | number:1}}","min":0,"max":"99.8","step":"0.2","x":150,"y":420,"wires":[["8413d749.f67dd"]]},{"id":"a72bad9f.2b8f58","type":"ui_numeric","z":"1e878673.29136a","name":"","label":"I","tooltip":"","group":"f3e4e5c9.37f76","order":5,"width":"4","height":"1","wrap":false,"passthru":true,"topic":"","format":"{{value | number:1}}","min":0,"max":"100","step":"0.2","x":150,"y":520,"wires":[["83e362d5.df1928"]]},{"id":"c11d5a46.884ae8","type":"ui_numeric","z":"1e878673.29136a","name":"","label":"D","tooltip":"","group":"f3e4e5c9.37f76","order":8,"width":"4","height":"1","wrap":false,"passthru":true,"topic":"","format":"{{value | number:1}}","min":0,"max":"100","step":"0.2","x":150,"y":620,"wires":[["41bb19e8.68968"]]},{"id":"8413d749.f67dd","type":"change","z":"1e878673.29136a","name":"","rules":[{"t":"set","p":"p","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":320,"y":420,"wires":[[]]},{"id":"83e362d5.df1928","type":"change","z":"1e878673.29136a","name":"set flow.i","rules":[{"t":"set","p":"i","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":320,"y":520,"wires":[[]]},{"id":"41bb19e8.68968","type":"change","z":"1e878673.29136a","name":"","rules":[{"t":"set","p":"d","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":320,"y":620,"wires":[[]]},{"id":"c6145809.208b2","type":"inject","z":"1e878673.29136a","name":"Default P","topic":"","payload":"20.0","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":120,"y":380,"wires":[["bc1c0af.df72bf8","8413d749.f67dd"]]},{"id":"f015cf49.0765e","type":"inject","z":"1e878673.29136a","name":"Default I","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":120,"y":480,"wires":[["a72bad9f.2b8f58","83e362d5.df1928"]]},{"id":"bc1104a1.bb44","type":"inject","z":"1e878673.29136a","name":"Default D","topic":"","payload":"30","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":120,"y":580,"wires":[["c11d5a46.884ae8","41bb19e8.68968"]]},{"id":"3a5d8e4a.d39622","type":"inject","z":"1e878673.29136a","name":"Default BK Target","topic":"","payload":"70","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":150,"y":260,"wires":[["8c14934e.2efe18"]]},{"id":"90bd87f9.3e6418","type":"function","z":"1e878673.29136a","name":"BK PID","func":"// Note that the algorithm provided below assumes a 1 second iteration time\n// Justin Angevaare\n// May 2018\n\n// Set temperature\nmsg.temperature = msg.payload;\n\n// Well that node doesn't work... do manually\nmsg.interval = 2000\n\n// Calculate error\nmsg.error = flow.get('bk_target') - msg.temperature;\n\n// Set output max\nmsg.max_output = 100\n \n// Calculate integrator max\nmsg.integrator_max = msg.max_output/flow.get('i');\n\n// Update integrator\n// For purposes of integrator, bound error by [-1, 1]\nmsg.integrator = flow.get('integrator');\nmsg.integrator += (msg.interval/1000) * Math.max(Math.min(msg.error, 1), -1);\n\n// Bound total integrator by absolute maximum\nmsg.integrator = Math.max(Math.min(msg.integrator, msg.integrator_max), -msg.integrator_max);\n\n// Output updated integrator to flow context\nflow.set('integrator', msg.integrator);\n\n// Calculate proportional action\nmsg.output = msg.error * flow.get('p');\n\n// Calculate intergral action\nmsg.output += msg.integrator * flow.get('i');\n\n// Calculate derivative action\nmsg.derivative = (msg.error - flow.get('last_error'))/(msg.interval/1000);\nmsg.output += msg.derivative * flow.get('d');\n\n// Bound output by [0, max_output]\nmsg.output = Math.max(Math.min(msg.output, msg.max_output), 0);\n\n// Output updated last_error to flow context\nmsg.last_error = msg.error;\nflow.set('last_error', msg.last_error);\n\n// Set payload to element output\nmsg.payload = msg.output;\nreturn msg;","outputs":1,"noerr":0,"x":480,"y":80,"wires":[["be52847e.467fe8","fd3d823.f4d7d8"]]},{"id":"eed429e6.df64c8","type":"switch","z":"1e878673.29136a","name":"bk_pid switch","property":"bk_pid","propertyType":"global","rules":[{"t":"true"},{"t":"false"}],"checkall":"false","repair":false,"outputs":2,"x":300,"y":100,"wires":[["90bd87f9.3e6418"],["898bd7d9.a004f"]]},{"id":"898bd7d9.a004f","type":"change","z":"1e878673.29136a","name":"payload = bk_manual_duty","rules":[{"t":"set","p":"payload","pt":"msg","to":"bk_manual_duty","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":540,"y":120,"wires":[["be52847e.467fe8"]]},{"id":"8a024057.0ec2b8","type":"link in","z":"1e878673.29136a","name":"BK PID temperature input","links":["737daba5.b4f1e4"],"x":55,"y":100,"wires":[["611bae86.6497c"]]},{"id":"737daba5.b4f1e4","type":"link out","z":"cae39ee2.e2c898","name":"BK raw temperature","links":["8a024057.0ec2b8"],"x":535,"y":40,"wires":[]},{"id":"2ede74f0.2bc45c","type":"change","z":"1e878673.29136a","name":"","rules":[{"t":"set","p":"bk_target","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":260,"wires":[[]]},{"id":"be52847e.467fe8","type":"link out","z":"1e878673.29136a","name":"PID or Manual Duty","links":["84dd404a.ab7a7"],"x":715,"y":80,"wires":[]},{"id":"60d387fc.ef7d08","type":"change","z":"1e878673.29136a","name":"bk_pid, bk_try = true","rules":[{"t":"set","p":"bk_pid","pt":"global","to":"true","tot":"bool"},{"t":"set","p":"bk_try","pt":"flow","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":220,"y":900,"wires":[["19bbbdcd.af992a"]]},{"id":"3fab212d.7b19fe","type":"change","z":"1e878673.29136a","name":"bk_pid = false, bk_try = true","rules":[{"t":"set","p":"bk_pid","pt":"global","to":"false","tot":"bool"},{"t":"set","p":"bk_try","pt":"flow","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":240,"y":940,"wires":[["89c8425f.410c68"]]},{"id":"9ab73503.8e0a8","type":"change","z":"1e878673.29136a","name":"bk_pid, bk_try = false","rules":[{"t":"set","p":"bk_pid","pt":"global","to":"false","tot":"bool"},{"t":"set","p":"bk_try","pt":"flow","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":220,"y":860,"wires":[["37ca9313.112484"]]},{"id":"89c8425f.410c68","type":"link out","z":"1e878673.29136a","name":"Boil Try Output","links":["39f5e6bb.c2001a"],"x":435,"y":940,"wires":[]},{"id":"39f5e6bb.c2001a","type":"link in","z":"1e878673.29136a","name":"Boil Try Input","links":["89c8425f.410c68","19bbbdcd.af992a","37ca9313.112484"],"x":55,"y":1280,"wires":[["b4c8849.8c2ce78"]]},{"id":"611bae86.6497c","type":"switch","z":"1e878673.29136a","name":"bk_on","property":"bk_on","propertyType":"global","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":150,"y":100,"wires":[["eed429e6.df64c8"]]},{"id":"da1a9a4c.d64808","type":"change","z":"1e878673.29136a","name":"","rules":[{"t":"set","p":"bk_manual_duty","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":630,"y":180,"wires":[[]]},{"id":"af559447.163748","type":"change","z":"1e878673.29136a","name":"payload = 0","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":190,"y":1100,"wires":[["8a2f00e7.8fabc8"]]},{"id":"8a2f00e7.8fabc8","type":"link out","z":"1e878673.29136a","name":"Off Duty","links":["84dd404a.ab7a7"],"x":435,"y":1100,"wires":[]},{"id":"be75bc65.2c4a58","type":"link out","z":"1e878673.29136a","name":"Boil PID display","links":["5285e8f7.b9ad08","eda67ad.0cd1d88","48ae8805.06b6a"],"x":435,"y":1020,"wires":[]},{"id":"e7777c2f.7d6a58","type":"rpi-gpio out","z":"44130c7e.f0c1fc","name":"BK GPIO","pin":"13","set":false,"level":"0","freq":"1","out":"pwm","x":300,"y":240,"wires":[]},{"id":"84dd404a.ab7a7","type":"link in","z":"44130c7e.f0c1fc","name":"BK GPIO","links":["8a2f00e7.8fabc8","be52847e.467fe8"],"x":175,"y":260,"wires":[["e7777c2f.7d6a58","b51e8334.d588b8","909fce1e.6368d"]]},{"id":"b51e8334.d588b8","type":"range","z":"44130c7e.f0c1fc","minin":"0","maxin":"100","minout":"0","maxout":"5.5","action":"scale","round":false,"property":"payload","name":"Duty to watts","x":310,"y":280,"wires":[["c0e8b26f.6046d8"]]},{"id":"c0e8b26f.6046d8","type":"ui_text","z":"44130c7e.f0c1fc","group":"9fe30f36.92cc2","order":6,"width":3,"height":1,"name":"Element output","label":" ","format":"{{payload | number:2}} kw","layout":"row-left","x":360,"y":320,"wires":[]},{"id":"d067663f.365a9","type":"link out","z":"cdc1c9a3.021f58","name":"RIMS GPIO","links":["24145682.3f917a"],"x":615,"y":220,"wires":[]},{"id":"872bc41f.72b268","type":"rpi-gpio out","z":"44130c7e.f0c1fc","name":"RIMS GPIO","pin":"15","set":false,"level":"0","freq":"1","out":"pwm","x":310,"y":40,"wires":[]},{"id":"96ebaee4.146928","type":"range","z":"44130c7e.f0c1fc","minin":"0","maxin":"100","minout":"0","maxout":"5.5","action":"scale","round":false,"property":"payload","name":"Duty to watts","x":315,"y":80,"wires":[["15c06eb9.6944a1"]]},{"id":"15c06eb9.6944a1","type":"ui_text","z":"44130c7e.f0c1fc","group":"f6e1ef23.f6f118","order":6,"width":3,"height":1,"name":"Element output","label":" ","format":"{{payload | number:2}} kw","layout":"row-left","x":360,"y":120,"wires":[]},{"id":"24145682.3f917a","type":"link in","z":"44130c7e.f0c1fc","name":"RIMS GPIO","links":["d067663f.365a9","f9ae67d0.ea6dc"],"x":175,"y":60,"wires":[["872bc41f.72b268","96ebaee4.146928","4530fdb0.e1c884"]]},{"id":"7c7078cd.dce6c","type":"change","z":"cdc1c9a3.021f58","name":"duty = 0","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":300,"y":1420,"wires":[["f9ae67d0.ea6dc"]]},{"id":"f9ae67d0.ea6dc","type":"link out","z":"cdc1c9a3.021f58","name":"RIMS GPIO","links":["79ad6d21.240f2c","24145682.3f917a"],"x":575,"y":1420,"wires":[]},{"id":"40c0028.2cc017c","type":"change","z":"cdc1c9a3.021f58","name":"Zero everything","rules":[{"t":"set","p":"last_inner_error","pt":"msg","to":"0.0","tot":"num"},{"t":"set","p":"last_inner_error","pt":"flow","to":"0.0","tot":"num"},{"t":"set","p":"inner_integrator","pt":"msg","to":"0.0","tot":"num"},{"t":"set","p":"inner_integrator","pt":"flow","to":"0.0","tot":"num"},{"t":"set","p":"inner_derivative","pt":"msg","to":"0.0","tot":"num"},{"t":"set","p":"last_outer_error","pt":"msg","to":"0.0","tot":"num"},{"t":"set","p":"last_outer_error","pt":"flow","to":"0.0","tot":"num"},{"t":"set","p":"outer_integrator","pt":"msg","to":"0.0","tot":"num"},{"t":"set","p":"outer_integrator","pt":"flow","to":"0.0","tot":"num"},{"t":"set","p":"outer_derivative","pt":"msg","to":"0.0","tot":"num"},{"t":"set","p":"outer_output","pt":"flow","to":"0.0","tot":"num"},{"t":"set","p":"outer_output","pt":"msg","to":"0.0","tot":"num"},{"t":"set","p":"inner_target","pt":"msg","to":"mash_target","tot":"flow"},{"t":"set","p":"inner_target","pt":"flow","to":"mash_target","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":320,"y":1380,"wires":[["488e4b0e.1f641c"]]},{"id":"488e4b0e.1f641c","type":"link out","z":"cdc1c9a3.021f58","name":"Mash PID display","links":["3f2878d3.94f4e"],"x":575,"y":1380,"wires":[]},{"id":"cfaeaee6.2a6ab","type":"link out","z":"cdc1c9a3.021f58","name":"Mash PID display","links":["3f2878d3.94f4e"],"x":615,"y":180,"wires":[]},{"id":"1ed4390c.ecfcff","type":"change","z":"1e878673.29136a","name":"","rules":[{"t":"set","p":"last_error","pt":"msg","to":"0","tot":"num"},{"t":"set","p":"integrator","pt":"msg","to":"0","tot":"num"},{"t":"set","p":"derivative","pt":"msg","to":"0","tot":"num"},{"t":"set","p":"last_error","pt":"flow","to":"last_error","tot":"msg"},{"t":"set","p":"integrator","pt":"flow","to":"integrator","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":200,"y":1020,"wires":[["be75bc65.2c4a58"]]},{"id":"fd3d823.f4d7d8","type":"link out","z":"1e878673.29136a","name":"Boil PID display","links":["5285e8f7.b9ad08","eda67ad.0cd1d88","48ae8805.06b6a"],"x":595,"y":40,"wires":[]},{"id":"909fce1e.6368d","type":"ui_text","z":"44130c7e.f0c1fc","group":"f3e4e5c9.37f76","order":11,"width":"0","height":"0","name":"BK Element duty","label":"Element duty","format":"{{payload | number:0}}﹪","layout":"row-spread","x":370,"y":360,"wires":[]},{"id":"4530fdb0.e1c884","type":"ui_text","z":"44130c7e.f0c1fc","group":"321aaa6a.377d5e","order":15,"width":"2","height":"1","name":"RIMS Element duty","label":"Output","format":"{{payload | number:0}}٪","layout":"col-center","x":370,"y":160,"wires":[]},{"id":"b64090c1.73319","type":"link in","z":"cdc1c9a3.021f58","name":"Button click","links":["15d83e9d.b3ff21","2625d95d.2ed98e"],"x":175,"y":1520,"wires":[["3d6a8f69.ac96"]]},{"id":"b3e11a30.e34f4","type":"link in","z":"cdc1c9a3.021f58","name":"Off button","links":["15d83e9d.b3ff21","83772e32.d03bd"],"x":175,"y":1380,"wires":[["40c0028.2cc017c"]]},{"id":"83772e32.d03bd","type":"link out","z":"cdc1c9a3.021f58","name":"Initializations","links":["123ff4f9.df085b","987c2900.a5a87","ac538d8e.a1ade8","b3e11a30.e34f4"],"x":335,"y":1140,"wires":[]},{"id":"cdda2c94.7b455","type":"change","z":"28484198.eb083e","name":"pid - off colour","rules":[{"t":"set","p":"colour","pt":"msg","to":"grey","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":500,"y":360,"wires":[["dec1e90e.4f61d8"]]},{"id":"16c19a69.97a5ce","type":"change","z":"28484198.eb083e","name":"pid - on colour","rules":[{"t":"set","p":"colour","pt":"msg","to":"#424242","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":500,"y":320,"wires":[["dec1e90e.4f61d8"]]},{"id":"debb8cb1.a556c","type":"switch","z":"28484198.eb083e","name":"","property":"rims_on","propertyType":"global","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":330,"y":340,"wires":[["16c19a69.97a5ce"],["cdda2c94.7b455"]]},{"id":"dec1b3f8.d47b88","type":"delay","z":"28484198.eb083e","name":"delay","pauseType":"delay","timeout":"0.2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":290,"y":300,"wires":[["debb8cb1.a556c"]]},{"id":"dec1e90e.4f61d8","type":"link out","z":"28484198.eb083e","name":"PID button colour","links":["3f94bf0f.96a108"],"x":635,"y":340,"wires":[]},{"id":"ce284fe7.1336c","type":"change","z":"28484198.eb083e","name":"off colour","rules":[{"t":"set","p":"colour","pt":"msg","to":"#424242","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":480,"y":560,"wires":[["14559bfb.7a00fc"]]},{"id":"675f200d.3f3d7","type":"change","z":"28484198.eb083e","name":"on colour","rules":[{"t":"set","p":"colour","pt":"msg","to":"grey","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":480,"y":520,"wires":[["14559bfb.7a00fc"]]},{"id":"fe56cee0.8eff5","type":"switch","z":"28484198.eb083e","name":"","property":"rims_on","propertyType":"global","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":330,"y":540,"wires":[["675f200d.3f3d7"],["ce284fe7.1336c"]]},{"id":"df71f8cd.61f3a","type":"delay","z":"28484198.eb083e","name":"delay","pauseType":"delay","timeout":"0.2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":290,"y":500,"wires":[["fe56cee0.8eff5"]]},{"id":"14559bfb.7a00fc","type":"link out","z":"28484198.eb083e","name":"Off button colour","links":["1935f939.d4427f","6757c9a6.827aa"],"x":595,"y":540,"wires":[]},{"id":"d8dd142c.9e7828","type":"link in","z":"28484198.eb083e","name":"Button click","links":["15d83e9d.b3ff21","2625d95d.2ed98e","2aa6a038.2a82b"],"x":175,"y":500,"wires":[["df71f8cd.61f3a"]]},{"id":"248d281f.81767","type":"ui_button","z":"28484198.eb083e","name":"","group":"f6e1ef23.f6f118","order":7,"width":2,"height":1,"passthru":false,"label":"Off","tooltip":"","color":"","bgcolor":"{{colour}}","icon":"","payload":"false","payloadType":"bool","topic":"","x":290,"y":140,"wires":[["15d83e9d.b3ff21"]]},{"id":"70f94901.25c828","type":"ui_button","z":"28484198.eb083e","name":"","group":"f6e1ef23.f6f118","order":2,"width":2,"height":1,"passthru":false,"label":"PID","tooltip":"","color":"","bgcolor":"{{colour}}","icon":"","payload":"true","payloadType":"bool","topic":"","x":290,"y":60,"wires":[["2625d95d.2ed98e"]]},{"id":"15d83e9d.b3ff21","type":"link out","z":"28484198.eb083e","name":"Off button","links":["b64090c1.73319","b3e11a30.e34f4","813395b5.016e08","3bd0c075.6fa628","f9982093.cfdf88","c51c4031.66a098","9f46c607.caf24","76148b82.79985c","44d0cd2b.83654c","ac538d8e.a1ade8","e3cf13ac.ca50d","97f42632.921388","d8dd142c.9e7828","b962c91e.b3c32","b53ebaf1.4996f"],"x":415,"y":140,"wires":[]},{"id":"2625d95d.2ed98e","type":"link out","z":"28484198.eb083e","name":"PID button","links":["54c27116.f0fbb8","65b11f55.0036b","966c3ae9.d0b678","6fd789be.f20e6","67fe4219.31feac","d8dd142c.9e7828","ac9b0385.1a096","1163aa6f.a466a6","ac5a3184.ad004","c443490d.703ff","4aeae28e.9f0d7c","b962c91e.b3c32","b64090c1.73319","b53ebaf1.4996f"],"x":415,"y":60,"wires":[]},{"id":"3f94bf0f.96a108","type":"link in","z":"28484198.eb083e","name":"PID button colour","links":["1b75113e.ca613f","dec1e90e.4f61d8","f531277b.da7808","32f18cc9.4aa03c","e7895fc9.f785","58885f0e.86303"],"x":175,"y":60,"wires":[["70f94901.25c828"]]},{"id":"6757c9a6.827aa","type":"link in","z":"28484198.eb083e","name":"Off button colour","links":["b3d5d6d9.8bfc8","14559bfb.7a00fc","4a0e3c04.89c144"],"x":175,"y":140,"wires":[["248d281f.81767"]]},{"id":"33933972.9ffc16","type":"link in","z":"1e878673.29136a","name":"PID button","links":["89ce3e25.3ad2f8","d888b85c.c0ab6"],"x":55,"y":900,"wires":[["60d387fc.ef7d08"]]},{"id":"19bbbdcd.af992a","type":"link out","z":"1e878673.29136a","name":"Boil Try Output","links":["39f5e6bb.c2001a"],"x":435,"y":900,"wires":[]},{"id":"37ca9313.112484","type":"link out","z":"1e878673.29136a","name":"Boil Try Output","links":["39f5e6bb.c2001a"],"x":435,"y":860,"wires":[]},{"id":"480aa2e0.59a21c","type":"link in","z":"1e878673.29136a","name":"Manual button","links":["ed41478a.5a2028","1777733d.a2553d"],"x":55,"y":940,"wires":[["3fab212d.7b19fe"]]},{"id":"5b459ac7.37d744","type":"link in","z":"1e878673.29136a","name":"Manual button","links":["ed41478a.5a2028","1777733d.a2553d"],"x":55,"y":980,"wires":[["1ed4390c.ecfcff"]]},{"id":"f142f115.fa1378","type":"link in","z":"1e878673.29136a","name":"Off button","links":["308e6b59.254394","11c18a22.2ff07e","fd8c477a.99a1a"],"x":55,"y":860,"wires":[["9ab73503.8e0a8"]]},{"id":"7d106986.7fb6f","type":"link in","z":"1e878673.29136a","name":"Off button","links":["badc88d8.0fe308","d068c868.178e4","308e6b59.254394","11c18a22.2ff07e","fd8c477a.99a1a"],"x":55,"y":1100,"wires":[["af559447.163748"]]},{"id":"af6b29fe.fa767","type":"inject","z":"1e878673.29136a","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":130,"y":740,"wires":[["badc88d8.0fe308"]]},{"id":"344f76f6.ebc892","type":"link in","z":"1e878673.29136a","name":"Off button","links":["308e6b59.254394","badc88d8.0fe308","11c18a22.2ff07e","fd8c477a.99a1a"],"x":55,"y":1020,"wires":[["1ed4390c.ecfcff"]]},{"id":"badc88d8.0fe308","type":"link out","z":"1e878673.29136a","name":"Off button - initialization","links":["7d106986.7fb6f","1ae66216.83043e","344f76f6.ebc892"],"x":315,"y":740,"wires":[]},{"id":"b88cba12.513d28","type":"ui_button","z":"70d4070b.e447b8","name":"","group":"9fe30f36.92cc2","order":4,"width":2,"height":1,"passthru":false,"label":"Manual","tooltip":"","color":"","bgcolor":"{{colour}}","icon":"","payload":"true","payloadType":"bool","topic":"","x":300,"y":100,"wires":[["1777733d.a2553d"]]},{"id":"1e35f86a.7e2a1","type":"ui_button","z":"70d4070b.e447b8","name":"","group":"9fe30f36.92cc2","order":2,"width":2,"height":1,"passthru":false,"label":"PID","tooltip":"","color":"","bgcolor":"{{colour}}","icon":"","payload":"true","payloadType":"bool","topic":"","x":290,"y":60,"wires":[["d888b85c.c0ab6"]]},{"id":"8bc792af.daced","type":"ui_button","z":"70d4070b.e447b8","name":"","group":"9fe30f36.92cc2","order":7,"width":2,"height":1,"passthru":false,"label":"Off","tooltip":"","color":"","bgcolor":"{{colour}}","icon":"","payload":"false","payloadType":"bool","topic":"","x":290,"y":140,"wires":[["308e6b59.254394"]]},{"id":"21b9adad.6a31aa","type":"link in","z":"70d4070b.e447b8","name":"PID button colour","links":["d09e22b.7beaee","cd8fd53.01d4928"],"x":175,"y":60,"wires":[["1e35f86a.7e2a1"]]},{"id":"fb88d45f.879888","type":"link in","z":"70d4070b.e447b8","name":"Manual button colour","links":["d4afc2dc.99b19"],"x":175,"y":100,"wires":[["b88cba12.513d28"]]},{"id":"3973098.f4c3476","type":"link in","z":"70d4070b.e447b8","name":"Off button colour","links":["8caf0a44.8225e8"],"x":175,"y":140,"wires":[["8bc792af.daced"]]},{"id":"d888b85c.c0ab6","type":"link out","z":"70d4070b.e447b8","name":"PID button","links":["33933972.9ffc16","42c201b8.408ae","5c7f7e7d.580358","bc121ca4.f4dcb"],"x":415,"y":60,"wires":[]},{"id":"1777733d.a2553d","type":"link out","z":"70d4070b.e447b8","name":"Manual button","links":["42c201b8.408ae","480aa2e0.59a21c","5b459ac7.37d744","5c7f7e7d.580358","bc121ca4.f4dcb"],"x":415,"y":100,"wires":[]},{"id":"308e6b59.254394","type":"link out","z":"70d4070b.e447b8","name":"Off button","links":["344f76f6.ebc892","42c201b8.408ae","5c7f7e7d.580358","7d106986.7fb6f","bc121ca4.f4dcb","f142f115.fa1378"],"x":415,"y":140,"wires":[]},{"id":"ac538d8e.a1ade8","type":"link in","z":"cdc1c9a3.021f58","name":"Off button","links":["15d83e9d.b3ff21","83772e32.d03bd"],"x":175,"y":1420,"wires":[["7c7078cd.dce6c"]]},{"id":"eb2a7a8.6e8a388","type":"delay","z":"70d4070b.e447b8","name":"delay","pauseType":"delay","timeout":"0.2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":290,"y":300,"wires":[["a9b48397.bd1d6"]]},{"id":"d09e22b.7beaee","type":"link out","z":"70d4070b.e447b8","name":"PID button colour","links":["21b9adad.6a31aa"],"x":735,"y":320,"wires":[]},{"id":"42c201b8.408ae","type":"link in","z":"70d4070b.e447b8","name":"Button click","links":["1777733d.a2553d","308e6b59.254394","d888b85c.c0ab6","11c18a22.2ff07e","fd8c477a.99a1a"],"x":175,"y":300,"wires":[["eb2a7a8.6e8a388"]]},{"id":"52abed07.da9014","type":"change","z":"70d4070b.e447b8","name":"off colour","rules":[{"t":"set","p":"colour","pt":"msg","to":"grey","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":600,"y":440,"wires":[["d4afc2dc.99b19"]]},{"id":"cd261b4c.bceff","type":"change","z":"70d4070b.e447b8","name":"on colour","rules":[{"t":"set","p":"colour","pt":"msg","to":"#424242","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":600,"y":400,"wires":[["d4afc2dc.99b19"]]},{"id":"307effd0.9d5ad8","type":"switch","z":"70d4070b.e447b8","name":"","property":"bk_on","propertyType":"global","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":330,"y":440,"wires":[["363dc3d2.07ca2c"],["52abed07.da9014"]]},{"id":"b82abc3.485d64","type":"delay","z":"70d4070b.e447b8","name":"delay","pauseType":"delay","timeout":"0.2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":290,"y":400,"wires":[["307effd0.9d5ad8"]]},{"id":"d4afc2dc.99b19","type":"link out","z":"70d4070b.e447b8","name":"Manual button colour","links":["fb88d45f.879888"],"x":715,"y":420,"wires":[]},{"id":"eb77bcef.798078","type":"change","z":"70d4070b.e447b8","name":"off colour","rules":[{"t":"set","p":"colour","pt":"msg","to":"#424242","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":560,"wires":[["8caf0a44.8225e8"]]},{"id":"a6b86af0.976658","type":"change","z":"70d4070b.e447b8","name":"on colour","rules":[{"t":"set","p":"colour","pt":"msg","to":"grey","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":520,"wires":[["8caf0a44.8225e8"]]},{"id":"41dc7d89.cd143c","type":"switch","z":"70d4070b.e447b8","name":"","property":"bk_on","propertyType":"global","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":310,"y":540,"wires":[["a6b86af0.976658"],["eb77bcef.798078"]]},{"id":"238dec24.1a0fb4","type":"delay","z":"70d4070b.e447b8","name":"delay","pauseType":"delay","timeout":"0.2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":290,"y":500,"wires":[["41dc7d89.cd143c"]]},{"id":"8caf0a44.8225e8","type":"link out","z":"70d4070b.e447b8","name":"Off button colour","links":["3973098.f4c3476","3e0efd1.4d98882","c98ea849.baf91"],"x":575,"y":540,"wires":[]},{"id":"363dc3d2.07ca2c","type":"switch","z":"70d4070b.e447b8","name":"","property":"bk_pid","propertyType":"global","rules":[{"t":"false"},{"t":"true"}],"checkall":"true","repair":false,"outputs":2,"x":450,"y":420,"wires":[["cd261b4c.bceff"],["52abed07.da9014"]]},{"id":"a9b48397.bd1d6","type":"switch","z":"70d4070b.e447b8","name":"","property":"bk_on","propertyType":"global","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":330,"y":340,"wires":[["835c1ca.3f2fae"],["7dfcdd32.cd104c"]]},{"id":"835c1ca.3f2fae","type":"switch","z":"70d4070b.e447b8","name":"","property":"bk_pid","propertyType":"global","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":470,"y":320,"wires":[["929d9b44.2019c"],["7dfcdd32.cd104c"]]},{"id":"929d9b44.2019c","type":"change","z":"70d4070b.e447b8","name":"on colour","rules":[{"t":"set","p":"colour","pt":"msg","to":"#424242","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":300,"wires":[["d09e22b.7beaee"]]},{"id":"7dfcdd32.cd104c","type":"change","z":"70d4070b.e447b8","name":"off colour","rules":[{"t":"set","p":"colour","pt":"msg","to":"grey","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":340,"wires":[["d09e22b.7beaee"]]},{"id":"1ae66216.83043e","type":"link in","z":"1e878673.29136a","name":"Off button - initialization","links":["badc88d8.0fe308"],"x":55,"y":820,"wires":[["e3b8324b.0dcfb8"]]},{"id":"e3b8324b.0dcfb8","type":"change","z":"1e878673.29136a","name":"bk_lock, bk_on, bk_pid, bk_try = false","rules":[{"t":"set","p":"bk_lock","pt":"global","to":"false","tot":"bool"},{"t":"set","p":"bk_on","pt":"global","to":"false","tot":"bool"},{"t":"set","p":"bk_pid","pt":"global","to":"false","tot":"bool"},{"t":"set","p":"bk_try","pt":"flow","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":270,"y":820,"wires":[[]]},{"id":"bc121ca4.f4dcb","type":"link in","z":"70d4070b.e447b8","name":"Button click","links":["1777733d.a2553d","308e6b59.254394","d888b85c.c0ab6","11c18a22.2ff07e","fd8c477a.99a1a"],"x":175,"y":400,"wires":[["b82abc3.485d64"]]},{"id":"5c7f7e7d.580358","type":"link in","z":"70d4070b.e447b8","name":"Button click","links":["1777733d.a2553d","308e6b59.254394","d888b85c.c0ab6","11c18a22.2ff07e","fd8c477a.99a1a"],"x":175,"y":500,"wires":[["238dec24.1a0fb4"]]},{"id":"b962c91e.b3c32","type":"link in","z":"28484198.eb083e","name":"Button click","links":["15d83e9d.b3ff21","2625d95d.2ed98e","2aa6a038.2a82b"],"x":175,"y":300,"wires":[["dec1b3f8.d47b88"]]},{"id":"ab75cafe.2d25a8","type":"link in","z":"28484198.eb083e","name":"Button initialization","links":["343a6d3e.3643d2","e63a332.88bf8d","f51c265.a6e8358"],"x":175,"y":540,"wires":[["fe56cee0.8eff5"]]},{"id":"8f9871f2.d7aad","type":"link in","z":"28484198.eb083e","name":"Button initialization","links":["dad1a3f8.75b93","e63a332.88bf8d","343a6d3e.3643d2"],"x":175,"y":340,"wires":[["debb8cb1.a556c"]]},{"id":"29bf3a90.6f689e","type":"link in","z":"70d4070b.e447b8","name":"Button initialization","links":["a902d194.51df48","e9e1efef.4781b8"],"x":175,"y":340,"wires":[["a9b48397.bd1d6"]]},{"id":"d2bbd25b.20f7b8","type":"inject","z":"cdc1c9a3.021f58","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":150,"y":1140,"wires":[["83772e32.d03bd"]]},{"id":"987c2900.a5a87","type":"link in","z":"cdc1c9a3.021f58","name":"Global initializations","links":["83772e32.d03bd"],"x":175,"y":1300,"wires":[["5bc7112c.6ca358"]]},{"id":"ab3bed93.7ae2b8","type":"link in","z":"70d4070b.e447b8","name":"Button initialization","links":["a902d194.51df48","e9e1efef.4781b8"],"x":175,"y":440,"wires":[["307effd0.9d5ad8"]]},{"id":"560b31e4.4f485","type":"link in","z":"70d4070b.e447b8","name":"Button initialization","links":["a902d194.51df48","e9e1efef.4781b8"],"x":175,"y":540,"wires":[["41dc7d89.cd143c"]]},{"id":"3a43be9b.9affe2","type":"ui_ui_control","z":"70d4070b.e447b8","name":"Dashboard connection","x":260,"y":220,"wires":[["e9e1efef.4781b8"]]},{"id":"e9e1efef.4781b8","type":"link out","z":"70d4070b.e447b8","name":"Button initialization on connection","links":["29bf3a90.6f689e","560b31e4.4f485","ab3bed93.7ae2b8"],"x":415,"y":220,"wires":[]},{"id":"556117de.9a5b9","type":"ui_ui_control","z":"28484198.eb083e","name":"Dashboard connection","x":260,"y":220,"wires":[["343a6d3e.3643d2"]]},{"id":"343a6d3e.3643d2","type":"link out","z":"28484198.eb083e","name":"Button initialization on connection","links":["8f9871f2.d7aad","ab75cafe.2d25a8","4ea434d4.c6662c"],"x":415,"y":220,"wires":[]},{"id":"159ea120.ea187f","type":"ui_slider","z":"cdc1c9a3.021f58","name":"Mash target slider","label":"Target","tooltip":"","group":"f6e1ef23.f6f118","order":20,"width":6,"height":1,"passthru":true,"outs":"all","topic":"","min":"25","max":"100","step":"0.5","x":390,"y":340,"wires":[["7eae3e81.46ee88","324b69ce.251146","60b0a09.db4006","64f4ecd7.223dac"]]},{"id":"60b0a09.db4006","type":"ui_text","z":"cdc1c9a3.021f58","group":"f6e1ef23.f6f118","order":16,"width":"3","height":1,"name":"Mash target","label":"Target","format":"{{payload | number:1}}°C","layout":"col-center","x":610,"y":320,"wires":[]},{"id":"240ceaea.c2da5e","type":"ui_text","z":"1e878673.29136a","group":"9fe30f36.92cc2","order":11,"width":2,"height":1,"name":"Kettle target","label":"Target","format":"{{payload | number:1}}°C","layout":"col-center","x":590,"y":300,"wires":[]},{"id":"8c14934e.2efe18","type":"ui_slider","z":"1e878673.29136a","name":"Kettle target slider","label":"Target","tooltip":"","group":"9fe30f36.92cc2","order":13,"width":0,"height":0,"passthru":true,"outs":"all","topic":"","min":"25","max":"100","step":"0.5","x":390,"y":260,"wires":[["2ede74f0.2bc45c","240ceaea.c2da5e"]]},{"id":"91b3f0e4.35708","type":"ui_slider","z":"1e878673.29136a","name":"Manual duty slider","label":"Manual","tooltip":"","group":"9fe30f36.92cc2","order":14,"width":0,"height":0,"passthru":true,"outs":"all","topic":"","min":"25","max":"100","step":"0.5","x":390,"y":220,"wires":[["da1a9a4c.d64808","967c4792.88b1a"]]},{"id":"967c4792.88b1a","type":"ui_text","z":"1e878673.29136a","group":"9fe30f36.92cc2","order":12,"width":2,"height":1,"name":"Manual duty","label":"Manual","format":"{{payload | number:0}}٪","layout":"col-center","x":590,"y":220,"wires":[]},{"id":"3ccc6b9b.d55534","type":"ui_button","z":"28484198.eb083e","name":"","group":"f6e1ef23.f6f118","order":4,"width":2,"height":1,"passthru":false,"label":"Limiter","tooltip":"","color":"","bgcolor":"{{colour}}","icon":"","payload":"true","payloadType":"bool","topic":"","x":290,"y":100,"wires":[["2aa6a038.2a82b"]]},{"id":"ad91c055.7c31f8","type":"change","z":"28484198.eb083e","name":"limiter - off colour","rules":[{"t":"set","p":"colour","pt":"msg","to":"grey","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":510,"y":460,"wires":[["5d11d351.7dbcac"]]},{"id":"f67d7d29.d0ffd8","type":"change","z":"28484198.eb083e","name":"limiter - on colour","rules":[{"t":"set","p":"colour","pt":"msg","to":"#424242","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":510,"y":420,"wires":[["5d11d351.7dbcac"]]},{"id":"343c1e35.bd01f2","type":"switch","z":"28484198.eb083e","name":"","property":"rims_limiter","propertyType":"global","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":330,"y":440,"wires":[["f67d7d29.d0ffd8"],["ad91c055.7c31f8"]]},{"id":"ab4cba05.ef49f","type":"delay","z":"28484198.eb083e","name":"delay","pauseType":"delay","timeout":"0.2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":290,"y":400,"wires":[["343c1e35.bd01f2"]]},{"id":"5d11d351.7dbcac","type":"link out","z":"28484198.eb083e","name":"Limiter button colour","links":["fb19ac57.a0c95"],"x":655,"y":440,"wires":[]},{"id":"b53ebaf1.4996f","type":"link in","z":"28484198.eb083e","name":"Button click","links":["15d83e9d.b3ff21","2625d95d.2ed98e","2aa6a038.2a82b"],"x":175,"y":400,"wires":[["ab4cba05.ef49f"]]},{"id":"4ea434d4.c6662c","type":"link in","z":"28484198.eb083e","name":"Button initialization","links":["343a6d3e.3643d2","f51c265.a6e8358"],"x":175,"y":440,"wires":[["343c1e35.bd01f2"]]},{"id":"2aa6a038.2a82b","type":"link out","z":"28484198.eb083e","name":"PID limiter","links":["b53ebaf1.4996f","b962c91e.b3c32","d8dd142c.9e7828","ef3399af.f4985"],"x":415,"y":100,"wires":[]},{"id":"fb19ac57.a0c95","type":"link in","z":"28484198.eb083e","name":"Limiter button colour","links":["5d11d351.7dbcac"],"x":175,"y":100,"wires":[["3ccc6b9b.d55534"]]},{"id":"ef3399af.f4985","type":"link in","z":"cdc1c9a3.021f58","name":"rims_limiter switcher","links":["2aa6a038.2a82b"],"x":175,"y":1240,"wires":[["2b5d25cf.4ea10a"]]},{"id":"2b5d25cf.4ea10a","type":"switch","z":"cdc1c9a3.021f58","name":"","property":"rims_limiter","propertyType":"global","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":290,"y":1240,"wires":[["460819bf.fa184"],["5890006d.b3eeb8"]]},{"id":"5890006d.b3eeb8","type":"change","z":"cdc1c9a3.021f58","name":"","rules":[{"t":"set","p":"rims_limiter","pt":"global","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":480,"y":1260,"wires":[["60f7dfe2.9a8ba"]]},{"id":"123ff4f9.df085b","type":"link in","z":"cdc1c9a3.021f58","name":"RIMS try","links":["83772e32.d03bd","3cad8f0a.a02778","48d58022.99f848"],"x":175,"y":1340,"wires":[["30ac2870.766ad"]]},{"id":"30ac2870.766ad","type":"change","z":"cdc1c9a3.021f58","name":"flow.rims_try = false","rules":[{"t":"set","p":"rims_try","pt":"flow","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":340,"y":1340,"wires":[[]]},{"id":"9f92ccc0.54cce","type":"ui_ui_control","z":"b764cb6a.5d4448","name":"UI navigation","x":350,"y":180,"wires":[[]]},{"id":"76a6c3b3.a8018c","type":"ui_button","z":"b764cb6a.5d4448","name":"","group":"f6e1ef23.f6f118","order":22,"width":6,"height":1,"passthru":false,"label":"Mash settings","tooltip":"","color":"#757575","bgcolor":"white","icon":"","payload":"1","payloadType":"num","topic":"","x":120,"y":180,"wires":[["9f92ccc0.54cce"]]},{"id":"11a16114.5fa03f","type":"ui_button","z":"b764cb6a.5d4448","name":"","group":"9fe30f36.92cc2","order":16,"width":6,"height":1,"passthru":false,"label":"Boil settings","tooltip":"","color":"#757575","bgcolor":"white","icon":"","payload":"2","payloadType":"num","topic":"","x":110,"y":220,"wires":[["9f92ccc0.54cce"]]},{"id":"99276d4d.ae5df","type":"ui_button","z":"b764cb6a.5d4448","name":"","group":"321aaa6a.377d5e","order":24,"width":0,"height":0,"passthru":false,"label":"Back","tooltip":"","color":"#757575","bgcolor":"#e0e0e0","icon":"","payload":"0","payloadType":"num","topic":"","x":90,"y":260,"wires":[["9f92ccc0.54cce"]]},{"id":"25280e6f.05c2ca","type":"ui_button","z":"b764cb6a.5d4448","name":"","group":"f3e4e5c9.37f76","order":17,"width":0,"height":0,"passthru":false,"label":"Back","tooltip":"","color":"#757575","bgcolor":"#e0e0e0","icon":"","payload":"0","payloadType":"num","topic":"","x":90,"y":300,"wires":[["9f92ccc0.54cce"]]},{"id":"6a1e701c.88014","type":"ui_numeric","z":"cdc1c9a3.021f58","name":"","label":"K𝖽","tooltip":"","group":"321aaa6a.377d5e","order":20,"width":"4","height":"1","wrap":false,"passthru":true,"topic":"","format":"{{value | number:1}}","min":0,"max":"100","step":"0.2","x":170,"y":660,"wires":[["93be5173.c7aa2"]]},{"id":"97c18bd5.c5eb58","type":"ui_numeric","z":"cdc1c9a3.021f58","name":"","label":"K𝗂","tooltip":"","group":"321aaa6a.377d5e","order":18,"width":"4","height":"1","wrap":false,"passthru":true,"topic":"","format":"{{value | number:1}}","min":0,"max":"100","step":"0.2","x":170,"y":580,"wires":[["ad2f3a20.1034f"]]},{"id":"6d5d45c8.ade6ec","type":"ui_numeric","z":"cdc1c9a3.021f58","name":"","label":"K𝗉","tooltip":"","group":"321aaa6a.377d5e","order":16,"width":"4","height":"1","wrap":false,"passthru":true,"topic":"","format":"{{value | number:1}}","min":0,"max":"99","step":"0.2","x":170,"y":500,"wires":[["7bc5e770.8a03d"]]},{"id":"926f5889.b91ce8","type":"ui_template","z":"b764cb6a.5d4448","group":"f6e1ef23.f6f118","name":"Ensure dashboard is displayed as 1 or 2 columns","order":23,"width":0,"height":0,"format":"","storeOutMessages":true,"fwdInMessages":true,"templateScope":"global","x":230,"y":60,"wires":[[]]},{"id":"5e61a321.7c951c","type":"change","z":"2d8e58d.7555ca8","name":"pump - off colour","rules":[{"t":"set","p":"colour","pt":"msg","to":"grey","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":550,"y":400,"wires":[["6e56aa5a.45e99c"]]},{"id":"1b274766.986de9","type":"change","z":"2d8e58d.7555ca8","name":"pump - on colour","rules":[{"t":"set","p":"colour","pt":"msg","to":"#66cc00","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":550,"y":360,"wires":[["6e56aa5a.45e99c"]]},{"id":"6d9279e3.4e789","type":"switch","z":"2d8e58d.7555ca8","name":"Pump state","property":"pump","propertyType":"global","rules":[{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"0","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":350,"y":380,"wires":[["1b274766.986de9"],["5e61a321.7c951c"]]},{"id":"2f00a82.69115d8","type":"delay","z":"2d8e58d.7555ca8","name":"delay","pauseType":"delay","timeout":"0.2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":290,"y":340,"wires":[["6d9279e3.4e789"]]},{"id":"6e56aa5a.45e99c","type":"link out","z":"2d8e58d.7555ca8","name":"Pump button colour","links":["76c943b.e874a3c"],"x":695,"y":380,"wires":[]},{"id":"1d4ca40a.7d8c24","type":"link in","z":"2d8e58d.7555ca8","name":"Pump update","links":["c73cf0fd.6177a8"],"x":175,"y":340,"wires":[["2f00a82.69115d8"]]},{"id":"f9c9ab63.f152d","type":"inject","z":"2d8e58d.7555ca8","name":"","topic":"","payload":"0","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":210,"y":40,"wires":[["d74042e7.9d1d18"]]},{"id":"52851ec8.0ec6b","type":"change","z":"2d8e58d.7555ca8","name":"Pump update","rules":[{"t":"set","p":"payload","pt":"msg","to":"pump","tot":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":320,"y":480,"wires":[["32fe6811.8055a8"]]},{"id":"3e55809f.6615e8","type":"ui_button","z":"2d8e58d.7555ca8","name":"","group":"7311bc5c.585f8c","order":2,"width":4,"height":1,"passthru":false,"label":"Pump","tooltip":"","color":"","bgcolor":"{{colour}}","icon":"","payload":"true","payloadType":"bool","topic":"","x":230,"y":120,"wires":[["fc940ae2.9a3088"]]},{"id":"76c943b.e874a3c","type":"link in","z":"2d8e58d.7555ca8","name":"Pump button colour","links":["6e56aa5a.45e99c"],"x":115,"y":120,"wires":[["3e55809f.6615e8"]]},{"id":"4423eacc.9b42bc","type":"ui_ui_control","z":"2d8e58d.7555ca8","name":"Dashboard connection","x":140,"y":380,"wires":[["6d9279e3.4e789"]]},{"id":"fc940ae2.9a3088","type":"switch","z":"2d8e58d.7555ca8","name":"Pump state","property":"pump","propertyType":"global","rules":[{"t":"eq","v":"0","vt":"str"},{"t":"eq","v":"1","vt":"num"}],"checkall":"false","repair":false,"outputs":2,"x":290,"y":160,"wires":[["f0386117.e8b958"],["a03929a0.75dd5"]]},{"id":"2cf5b012.61cca","type":"change","z":"2d8e58d.7555ca8","name":"Turn off","rules":[{"t":"set","p":"pump","pt":"global","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":660,"y":160,"wires":[["c73cf0fd.6177a8"]]},{"id":"f0386117.e8b958","type":"change","z":"2d8e58d.7555ca8","name":"Turn on","rules":[{"t":"set","p":"pump","pt":"global","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":660,"y":120,"wires":[["c73cf0fd.6177a8"]]},{"id":"c73cf0fd.6177a8","type":"link out","z":"2d8e58d.7555ca8","name":"Pump update","links":["1d4ca40a.7d8c24","55245a21.c9d0bc"],"x":775,"y":140,"wires":[]},{"id":"d74042e7.9d1d18","type":"change","z":"2d8e58d.7555ca8","name":"","rules":[{"t":"set","p":"pump","pt":"global","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":40,"wires":[[]]},{"id":"55245a21.c9d0bc","type":"link in","z":"2d8e58d.7555ca8","name":"Pump update","links":["c73cf0fd.6177a8"],"x":175,"y":480,"wires":[["52851ec8.0ec6b"]]},{"id":"a03929a0.75dd5","type":"switch","z":"2d8e58d.7555ca8","name":"RIMS on?","property":"rims_on","propertyType":"global","rules":[{"t":"false"},{"t":"true"}],"checkall":"false","repair":false,"outputs":2,"x":460,"y":180,"wires":[["2cf5b012.61cca"],["62dadac5.d90074"]]},{"id":"62dadac5.d90074","type":"change","z":"2d8e58d.7555ca8","name":"Conflict message","rules":[{"t":"set","p":"payload","pt":"msg","to":"Can not turn off pump while RIMS element is active","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":530,"y":220,"wires":[["10b9b346.4371b5"]]},{"id":"10b9b346.4371b5","type":"ui_toast","z":"2d8e58d.7555ca8","position":"top right","displayTime":"5","highlight":"","outputs":0,"ok":"OK","cancel":"","topic":"","name":"","x":570,"y":260,"wires":[]},{"id":"e82101b5.32efb8","type":"ui_text","z":"4ef08725.8fbdd","group":"321aaa6a.377d5e","order":19,"width":"2","height":"1","name":"Inner PID Integrator","label":"Integral","format":"{{inner_integrator | number:1}}°C⦁s","layout":"col-center","x":550,"y":160,"wires":[]},{"id":"527896c3.acf218","type":"ui_text","z":"4ef08725.8fbdd","group":"321aaa6a.377d5e","order":17,"width":"2","height":"1","name":"Inner PID Error","label":"Error","format":"{{last_inner_error | number:1}}°C","layout":"col-center","x":540,"y":120,"wires":[]},{"id":"fba1b06.ac1075","type":"ui_text","z":"4ef08725.8fbdd","group":"321aaa6a.377d5e","order":21,"width":"2","height":"1","name":"Inner PID Derivative","label":"Derivative","format":"{{inner_derivative | number:1}}°C/s","layout":"col-center","x":550,"y":200,"wires":[]},{"id":"3f2878d3.94f4e","type":"link in","z":"4ef08725.8fbdd","name":"Mash PID display","links":["488e4b0e.1f641c","cfaeaee6.2a6ab"],"x":355,"y":220,"wires":[["e82101b5.32efb8","fba1b06.ac1075","527896c3.acf218","2aae55db.648c0a","b4a403cc.f45e58","b627264.9440ad8","b8578d41.4523a","204b1bc3.f8ebdc","ea10db28.55266"]]},{"id":"331f0c30.0eaf84","type":"ui_text","z":"4ef08725.8fbdd","group":"f3e4e5c9.37f76","order":14,"width":"2","height":"1","name":"BK PID Integrator","label":"Integral","format":"{{integrator | number:1}}°C⦁s","layout":"col-center","x":550,"y":600,"wires":[]},{"id":"6d1b4227.4e146c","type":"ui_text","z":"4ef08725.8fbdd","group":"f3e4e5c9.37f76","order":13,"width":"2","height":"1","name":"BK PID Error","label":"Error","format":"{{last_error | number:1}}°C","layout":"col-center","x":530,"y":560,"wires":[]},{"id":"834663e4.c08d7","type":"ui_text","z":"4ef08725.8fbdd","group":"f3e4e5c9.37f76","order":15,"width":"2","height":"1","name":"BK PID Derivative","label":"Derivative","format":"{{derivative | number:1}}°C/s","layout":"col-center","x":550,"y":640,"wires":[]},{"id":"48ae8805.06b6a","type":"link in","z":"4ef08725.8fbdd","name":"Boil PID display","links":["be75bc65.2c4a58","fd3d823.f4d7d8"],"x":355,"y":600,"wires":[["331f0c30.0eaf84","834663e4.c08d7","6d1b4227.4e146c"]]},{"id":"77f463e8.175d3c","type":"ui_template","z":"b764cb6a.5d4448","group":"f6e1ef23.f6f118","name":"Mash Bolt","order":1,"width":3,"height":2,"format":"\n\n
","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":530,"y":420,"wires":[[]]},{"id":"c315e88a.988b48","type":"link in","z":"b764cb6a.5d4448","name":"BK bolt","links":["395c51b.611aa2e","45708f26.3186e","7eb452a8.843114","9ae6b3bc.013dd8"],"x":55,"y":420,"wires":[["3777085b.b9b408"]]},{"id":"3777085b.b9b408","type":"change","z":"b764cb6a.5d4448","name":"Bolt updates","rules":[{"t":"set","p":"bk_lock","pt":"msg","to":"bk_lock","tot":"global"},{"t":"set","p":"rims_lock","pt":"msg","to":"rims_lock","tot":"global"},{"t":"set","p":"rims_on","pt":"msg","to":"rims_on","tot":"global"},{"t":"set","p":"bk_on","pt":"msg","to":"bk_on","tot":"global"}],"action":"","property":"","from":"","to":"","reg":false,"x":350,"y":400,"wires":[["77f463e8.175d3c","49e5454f.82d1cc"]]},{"id":"49e5454f.82d1cc","type":"ui_template","z":"b764cb6a.5d4448","group":"9fe30f36.92cc2","name":"Boil Bolt","order":1,"width":3,"height":2,"format":"\n\n
","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":520,"y":380,"wires":[[]]},{"id":"241cd857.6184c","type":"ui_ui_control","z":"b764cb6a.5d4448","name":"Dashboard connection","x":140,"y":380,"wires":[["3777085b.b9b408"]]},{"id":"25ac40a0.3587f8","type":"switch","z":"cdc1c9a3.021f58","name":"Check pump","property":"pump","propertyType":"global","rules":[{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"0","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":390,"y":1640,"wires":[["253becb4.eb09fc"],["930d09d2.af36","48d58022.99f848"]]},{"id":"930d09d2.af36","type":"change","z":"cdc1c9a3.021f58","name":"Lock message","rules":[{"t":"set","p":"payload","pt":"msg","to":"Can not access RIMS element controls while pump is off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":620,"y":1700,"wires":[["fd32f589.3deb28"]]},{"id":"fd32f589.3deb28","type":"ui_toast","z":"cdc1c9a3.021f58","position":"top right","displayTime":"5","highlight":"","outputs":0,"ok":"OK","cancel":"","topic":"","name":"","x":670,"y":1760,"wires":[]},{"id":"3cad8f0a.a02778","type":"link out","z":"cdc1c9a3.021f58","name":"RIMS try reset","links":["123ff4f9.df085b"],"x":555,"y":1580,"wires":[]},{"id":"48d58022.99f848","type":"link out","z":"cdc1c9a3.021f58","name":"RIMS try reset","links":["123ff4f9.df085b"],"x":555,"y":1660,"wires":[]},{"id":"c1bb7b75.bc5c68","type":"change","z":"1e878673.29136a","name":"","rules":[{"t":"set","p":"bk_try","pt":"flow","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":1180,"wires":[[]]},{"id":"2928a691.1c2ee2","type":"ui_template","z":"b764cb6a.5d4448","group":"f6e1ef23.f6f118","name":"Centre group titles","order":24,"width":0,"height":0,"format":"","storeOutMessages":true,"fwdInMessages":true,"templateScope":"global","x":130,"y":100,"wires":[[]]},{"id":"883d15e1.4fa8a","type":"ui_template","z":"b764cb6a.5d4448","group":"321aaa6a.377d5e","name":"Inner Loop header","order":12,"width":"6","height":"1","format":"\n
\n
Inner Loop\n","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":130,"y":580,"wires":[[]]},{"id":"71168df0.a00dac","type":"change","z":"cdc1c9a3.021f58","name":"","rules":[{"t":"set","p":"outer_p","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":820,"wires":[[]]},{"id":"32eed7cd.ebb7e","type":"change","z":"cdc1c9a3.021f58","name":"","rules":[{"t":"set","p":"outer_i","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":900,"wires":[["3d8c1d38.bf5382"]]},{"id":"b9d3db75.fa5268","type":"change","z":"cdc1c9a3.021f58","name":"","rules":[{"t":"set","p":"outer_d","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":980,"wires":[[]]},{"id":"a5dfe23a.f0acb8","type":"inject","z":"cdc1c9a3.021f58","name":"Default Outer Kp","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":170,"y":780,"wires":[["2d4a6684.c51be2","71168df0.a00dac"]]},{"id":"a7d53803.59368","type":"inject","z":"cdc1c9a3.021f58","name":"Default Outer Ki","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":160,"y":860,"wires":[["221f49aa.464856","32eed7cd.ebb7e"]]},{"id":"621a411.9e695c","type":"inject","z":"cdc1c9a3.021f58","name":"Default Outer Kd","topic":"","payload":"0","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":170,"y":940,"wires":[["f1b523f2.089028","b9d3db75.fa5268"]]},{"id":"556564b9.22dd04","type":"inject","z":"cdc1c9a3.021f58","name":"Default Outer Max","topic":"","payload":"8","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":170,"y":1020,"wires":[["45f99cbb.a41e74","94c71243.a555c"]]},{"id":"45f99cbb.a41e74","type":"ui_numeric","z":"cdc1c9a3.021f58","name":"","label":"Max ΔT","tooltip":"","group":"321aaa6a.377d5e","order":11,"width":0,"height":0,"wrap":false,"passthru":true,"topic":"","format":"+{{value | number:1}}°C","min":"1","max":"15","step":1,"x":180,"y":1060,"wires":[["94c71243.a555c"]]},{"id":"94c71243.a555c","type":"change","z":"cdc1c9a3.021f58","name":"","rules":[{"t":"set","p":"outer_max","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":410,"y":1060,"wires":[["26ffe308.94498c"]]},{"id":"f1b523f2.089028","type":"ui_numeric","z":"cdc1c9a3.021f58","name":"","label":"K𝖽","tooltip":"","group":"321aaa6a.377d5e","order":9,"width":"4","height":"1","wrap":false,"passthru":true,"topic":"","format":"{{value | number:1}}","min":0,"max":"100","step":"0.2","x":170,"y":980,"wires":[["b9d3db75.fa5268"]]},{"id":"221f49aa.464856","type":"ui_numeric","z":"cdc1c9a3.021f58","name":"","label":"K𝗂","tooltip":"","group":"321aaa6a.377d5e","order":7,"width":"4","height":"1","wrap":false,"passthru":true,"topic":"","format":"{{value | number:1}}","min":0,"max":"100","step":"0.2","x":170,"y":900,"wires":[["32eed7cd.ebb7e"]]},{"id":"2d4a6684.c51be2","type":"ui_numeric","z":"cdc1c9a3.021f58","name":"","label":"K𝗉","tooltip":"","group":"321aaa6a.377d5e","order":5,"width":"4","height":"1","wrap":false,"passthru":false,"topic":"","format":"{{value | number:1}}","min":0,"max":"99","step":"0.2","x":170,"y":820,"wires":[["71168df0.a00dac"]]},{"id":"bd045837.6de6a8","type":"ui_template","z":"b764cb6a.5d4448","group":"321aaa6a.377d5e","name":"Outer Loop header","order":1,"width":"6","height":"1","format":"\n
\n
Outer Loop\n","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":130,"y":640,"wires":[[]]},{"id":"b4a403cc.f45e58","type":"ui_text","z":"4ef08725.8fbdd","group":"321aaa6a.377d5e","order":8,"width":"2","height":"1","name":"Outer PID Integrator","label":"Integral","format":"{{outer_integrator | number:1}}°C⦁s","layout":"col-center","x":560,"y":280,"wires":[]},{"id":"2aae55db.648c0a","type":"ui_text","z":"4ef08725.8fbdd","group":"321aaa6a.377d5e","order":6,"width":"2","height":"1","name":"Outer PID Error","label":"Error","format":"{{last_outer_error | number:1}}°C","layout":"col-center","x":540,"y":240,"wires":[]},{"id":"b627264.9440ad8","type":"ui_text","z":"4ef08725.8fbdd","group":"321aaa6a.377d5e","order":10,"width":"2","height":"1","name":"Outer PID Derivative","label":"Derivative","format":"{{outer_derivative | number:1}}°C/s","layout":"col-center","x":560,"y":320,"wires":[]},{"id":"86751c96.8bee98","type":"link out","z":"cae39ee2.e2c898","name":"MLT temperature","links":["e51f03e2.9a55f8"],"x":535,"y":360,"wires":[]},{"id":"d20fe142.9dfcb8","type":"link in","z":"cdc1c9a3.021f58","name":"RIMS temp","links":["33b1f220.5f8056"],"x":75,"y":40,"wires":[["125eeb42.bedc7d"]]},{"id":"125eeb42.bedc7d","type":"change","z":"cdc1c9a3.021f58","name":"","rules":[{"t":"set","p":"rims_temp","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":210,"y":40,"wires":[[]]},{"id":"e51f03e2.9a55f8","type":"link in","z":"cdc1c9a3.021f58","name":"Mash temp","links":["86751c96.8bee98"],"x":75,"y":80,"wires":[["72bb7a95.5e6654"]]},{"id":"72bb7a95.5e6654","type":"change","z":"cdc1c9a3.021f58","name":"","rules":[{"t":"set","p":"mash_temp","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":215,"y":80,"wires":[[]]},{"id":"dc955b1c.7edea","type":"link in","z":"cdc1c9a3.021f58","name":"Cascade PID trigger","links":["5010ffd6.cabb28"],"x":75,"y":200,"wires":[["6c4d238a.3d5554"]]},{"id":"ae5f9dd0.0698a","type":"delay","z":"cae39ee2.e2c898","name":"","pauseType":"delay","timeout":"500","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":330,"y":560,"wires":[["5010ffd6.cabb28"]]},{"id":"5010ffd6.cabb28","type":"link out","z":"cae39ee2.e2c898","name":"PID trigger","links":["dc955b1c.7edea"],"x":535,"y":560,"wires":[]},{"id":"d6a0ec58.b20f1","type":"function","z":"cdc1c9a3.021f58","name":"Cascade PID - integrator max calculation","func":"// brew2 PID algorithm - integrators\n// Justin Angevaare\n// May 2018 - Nov. 2019\n\n// Calculate outer integrator max\n// Output to flow context\nif(flow.get('outer_i')>0.0){\n flow.set('outer_integrator_max', flow.get('outer_max')/flow.get('outer_i'))}else {\n flow.set('outer_integrator_max', 0.0)}\n\n// Get current output max\n// Output to flow context\nif(global.get('rims_limiter')){\n flow.set('inner_max', flow.get('inner_limit'))}else {\n flow.set('inner_max', 100)}\n\n// Calculate inner integrator max\n// Output to flow context\nif(flow.get('inner_i')>0.0){\n flow.set('inner_integrator_max', flow.get('inner_max')/flow.get('inner_i'))}else {\n flow.set('inner_integrator_max', 0.0)}\n\nreturn msg;","outputs":1,"noerr":0,"x":280,"y":140,"wires":[[]]},{"id":"ae15465d.e134","type":"link in","z":"cdc1c9a3.021f58","name":"Cascade PID Integrator update","links":["b097c6ec.5fbe5","b1cf141f.84ac9","d75d11e.f8f757","eab00f4b.29e27","2f03decd.c6137a","3d8c1d38.bf5382","668f2b46.52004c","26ffe308.94498c","60f7dfe2.9a8ba","9bd31a5b.f45448"],"x":75,"y":140,"wires":[["d6a0ec58.b20f1"]]},{"id":"b1cf141f.84ac9","type":"link out","z":"cdc1c9a3.021f58","name":"Cascade PID Integrator update","links":["ae15465d.e134"],"x":555,"y":580,"wires":[]},{"id":"eab00f4b.29e27","type":"link out","z":"cdc1c9a3.021f58","name":"Cascade PID Integrator update","links":["ae15465d.e134"],"x":555,"y":740,"wires":[]},{"id":"3d8c1d38.bf5382","type":"link out","z":"cdc1c9a3.021f58","name":"Cascade PID Integrator update","links":["ae15465d.e134"],"x":555,"y":900,"wires":[]},{"id":"668f2b46.52004c","type":"link out","z":"cdc1c9a3.021f58","name":"Cascade PID Integrator update","links":["ae15465d.e134"],"x":655,"y":1220,"wires":[]},{"id":"26ffe308.94498c","type":"link out","z":"cdc1c9a3.021f58","name":"Cascade PID Integrator update","links":["ae15465d.e134"],"x":555,"y":1060,"wires":[]},{"id":"60f7dfe2.9a8ba","type":"link out","z":"cdc1c9a3.021f58","name":"Cascade PID Integrator update","links":["ae15465d.e134"],"x":655,"y":1260,"wires":[]},{"id":"9bd31a5b.f45448","type":"link out","z":"cdc1c9a3.021f58","name":"Cascade PID Integrator update","links":["ae15465d.e134"],"x":655,"y":1300,"wires":[]},{"id":"6920821b.3fc50c","type":"ui_text","z":"cae39ee2.e2c898","group":"321aaa6a.377d5e","order":13,"width":2,"height":1,"name":"RIMS temperature display","label":"Heater","format":"{{msg.payload | number:1}}°C","layout":"col-center","x":590,"y":220,"wires":[]},{"id":"5d183b5d.0387cc","type":"ui_text","z":"cae39ee2.e2c898","group":"321aaa6a.377d5e","order":2,"width":2,"height":1,"name":"MLT temperature display","label":"MLT","format":"{{msg.payload | number:1}}°C","layout":"col-center","x":590,"y":400,"wires":[]},{"id":"b8578d41.4523a","type":"ui_text","z":"4ef08725.8fbdd","group":"321aaa6a.377d5e","order":14,"width":"2","height":"1","name":"Inner Target","label":"Target","format":"{{inner_target | number:1}}°C","layout":"col-center","x":530,"y":360,"wires":[]},{"id":"204b1bc3.f8ebdc","type":"ui_text","z":"4ef08725.8fbdd","group":"321aaa6a.377d5e","order":4,"width":"2","height":"1","name":"Outer Output","label":"Output","format":"+{{outer_output | number:1}}°C","layout":"col-center","x":530,"y":440,"wires":[]},{"id":"ea10db28.55266","type":"ui_text","z":"4ef08725.8fbdd","group":"f6e1ef23.f6f118","order":19,"width":"3","height":"1","name":"Inner Target","label":"Target","format":"{{inner_target | number:1}}°C","layout":"col-center","x":530,"y":400,"wires":[]},{"id":"64f4ecd7.223dac","type":"link out","z":"cdc1c9a3.021f58","name":"Mash target slider output","links":["6ce6448.f7e59bc"],"x":555,"y":280,"wires":[]},{"id":"6188a3dc.9d0a9c","type":"switch","z":"4ef08725.8fbdd","name":"","property":"rims_on","propertyType":"global","rules":[{"t":"false"}],"checkall":"true","repair":true,"outputs":1,"x":210,"y":340,"wires":[["417ad43f.c5b28c"]]},{"id":"6ce6448.f7e59bc","type":"link in","z":"4ef08725.8fbdd","name":"","links":["64f4ecd7.223dac"],"x":115,"y":340,"wires":[["6188a3dc.9d0a9c"]]},{"id":"417ad43f.c5b28c","type":"change","z":"4ef08725.8fbdd","name":"","rules":[{"t":"set","p":"inner_target","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":280,"y":380,"wires":[["ea10db28.55266","b8578d41.4523a"]]}]
\ No newline at end of file
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..c1ccec2
--- /dev/null
+++ b/package.json
@@ -0,0 +1,18 @@
+{
+ "name": "node-red-brew2",
+ "description": "A Node-Red App for Brewery Control",
+ "version": "0.3.1",
+ "dependencies": {
+ "node-red-contrib-sensor-ds18b20": "0.1.0",
+ "node-red-contrib-widgetlords": "1.3.0",
+ "node-red-dashboard": "2.19.0",
+ "node-red-node-smooth": "0.1.2",
+ "node-red-node-pi-gpio": "1.0.6"
+ },
+ "node-red": {
+ "settings": {
+ "flowFile": "flows_brew2.json",
+ "credentialsFile": "flows_brew2_cred.json"
+ }
+ }
+}