[{"id":"89f7750d71a9177b","type":"tab","label":"GX prevent high voltage alarms","disabled":false,"info":"","env":[]},{"id":"e8ba067f6231021c","type":"mqtt in","z":"89f7750d71a9177b","name":"venus/GX/Batt_Amps","topic":"venus/GX/Batt_Amps","qos":"2","datatype":"auto-detect","broker":"1701f33596afcf6b","nl":false,"rap":true,"rh":0,"inputs":0,"x":140,"y":440,"wires":[["a17ee2848f265687","9d3e1ebe170f752a"]]},{"id":"a17ee2848f265687","type":"switch","z":"89f7750d71a9177b","name":"gte zero","property":"payload","propertyType":"msg","rules":[{"t":"gte","v":"0","vt":"num"},{"t":"else"}],"checkall":"false","repair":false,"outputs":2,"x":340,"y":440,"wires":[["a20e349e39bf63a9"],["cd12be7cbc01298f"]]},{"id":"ca243c6fc2337004","type":"gate","z":"89f7750d71a9177b","name":"","controlTopic":"control","defaultState":"closed","openCmd":"open","closeCmd":"close","toggleCmd":"toggle","defaultCmd":"default","statusCmd":"status","persist":false,"storeName":"memory","x":390,"y":300,"wires":[["baeff2f0c2f6f28f"]]},{"id":"a20e349e39bf63a9","type":"change","z":"89f7750d71a9177b","name":"open Gate","rules":[{"t":"set","p":"topic","pt":"msg","to":"control","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"open","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":470,"y":380,"wires":[["ca243c6fc2337004"]]},{"id":"cd12be7cbc01298f","type":"change","z":"89f7750d71a9177b","name":"close Gate","rules":[{"t":"set","p":"topic","pt":"msg","to":"control","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"close","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":470,"y":500,"wires":[["ca243c6fc2337004","ba7f964ed00d4604","9e0a357adbf886c6"]]},{"id":"b3bb89e29652637f","type":"mqtt in","z":"89f7750d71a9177b","name":"venus/GX/BMS_Cells-Vdiff","topic":"venus/GX/BMS_Cells-Vdiff","qos":"2","datatype":"auto-detect","broker":"1701f33596afcf6b","nl":false,"rap":true,"rh":0,"inputs":0,"x":150,"y":300,"wires":[["ca243c6fc2337004","f66844b2ab20a25f"]]},{"id":"fd664e3eb0c56ae3","type":"mqtt out","z":"89f7750d71a9177b","name":"settings/0/Settings/SystemSetup/MaxChargeCurrent","topic":"venus-home/W/[your VRM ID here]/settings/0/Settings/SystemSetup/MaxChargeCurrent","qos":"2","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"1701f33596afcf6b","x":1080,"y":700,"wires":[]},{"id":"f66844b2ab20a25f","type":"debug","z":"89f7750d71a9177b","name":"BMS_VdiffCells","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":180,"y":360,"wires":[]},{"id":"17e32e4c0482b534","type":"mqtt in","z":"89f7750d71a9177b","name":"settings/0/Settings/SystemSetup/MaxChargeCurrent","topic":"venus-home/N/[your VRM ID here]/settings/0/Settings/SystemSetup/MaxChargeCurrent","qos":"2","datatype":"auto-detect","broker":"1701f33596afcf6b","nl":false,"rap":true,"rh":0,"inputs":0,"x":290,"y":700,"wires":[["ee51cfa66adf50f1"]]},{"id":"ee51cfa66adf50f1","type":"debug","z":"89f7750d71a9177b","name":"Charger max. Current","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":660,"y":700,"wires":[]},{"id":"e5a1a9c7b6848fbd","type":"change","z":"89f7750d71a9177b","name":"V to mV","rules":[{"t":"set","p":"payload","pt":"msg","to":"$number($.payload * 1000)","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":720,"y":180,"wires":[["17fb93fc46ec7b51"]]},{"id":"e57269c53d0baeb6","type":"debug","z":"89f7750d71a9177b","name":"max Cell_Diff (mV)","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":930,"y":380,"wires":[]},{"id":"8dfea953302fd34b","type":"change","z":"89f7750d71a9177b","name":"set max Charge-Current 8A","rules":[{"t":"set","p":"payload","pt":"msg","to":"8","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1180,"y":340,"wires":[["0440040bc7acb15e"]]},{"id":"45451a3b256095ce","type":"change","z":"89f7750d71a9177b","name":"set msg.payload.value","rules":[{"t":"set","p":"value","pt":"msg","to":"payload","tot":"msg"},{"t":"delete","p":"payload","pt":"msg"},{"t":"move","p":"value","pt":"msg","to":"payload.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":990,"y":600,"wires":[["e31a5aa5befc87d9","fd664e3eb0c56ae3"]]},{"id":"e31a5aa5befc87d9","type":"debug","z":"89f7750d71a9177b","name":"Charger max. Current","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":1260,"y":600,"wires":[]},{"id":"75b9278a07996a74","type":"change","z":"89f7750d71a9177b","name":"set max Charge-Current 100A","rules":[{"t":"set","p":"payload","pt":"msg","to":"100","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1190,"y":260,"wires":[["0440040bc7acb15e"]]},{"id":"a6d35e08f1cfbdf7","type":"change","z":"89f7750d71a9177b","name":"disable max Charge-Current","rules":[{"t":"set","p":"payload","pt":"msg","to":"-1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1180,"y":220,"wires":[["0440040bc7acb15e"]]},{"id":"254b63c227764789","type":"change","z":"89f7750d71a9177b","name":"set max Charge-Current 25A","rules":[{"t":"set","p":"payload","pt":"msg","to":"25","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1180,"y":300,"wires":[["0440040bc7acb15e"]]},{"id":"3b672b66a86668cd","type":"switch","z":"89f7750d71a9177b","name":"switch","property":"payload","propertyType":"msg","rules":[{"t":"lte","v":"21","vt":"num"},{"t":"btwn","v":"48","vt":"num","v2":"22","v2t":"num"},{"t":"btwn","v":"49","vt":"num","v2":"99","v2t":"num"},{"t":"gt","v":"100","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":5,"x":930,"y":300,"wires":[["a6d35e08f1cfbdf7"],["75b9278a07996a74"],["8dfea953302fd34b"],["f907f0a692ea56ac"],["254b63c227764789"]]},{"id":"9d3e1ebe170f752a","type":"debug","z":"89f7750d71a9177b","name":"BATT_Amps","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":170,"y":500,"wires":[]},{"id":"0440040bc7acb15e","type":"rbe","z":"89f7750d71a9177b","name":"","func":"rbe","gap":"","start":"","inout":"out","septopics":false,"property":"payload","topi":"topic","x":1050,"y":500,"wires":[["45451a3b256095ce","11d63f595b6fdbe8"]]},{"id":"ba7f964ed00d4604","type":"change","z":"89f7750d71a9177b","name":"disable max Charge-Current","rules":[{"t":"set","p":"payload","pt":"msg","to":"-1","tot":"num"},{"t":"delete","p":"topic","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":740,"y":500,"wires":[["67c75d6bb83af3b4","0440040bc7acb15e"]]},{"id":"67c75d6bb83af3b4","type":"debug","z":"89f7750d71a9177b","name":"Charger max. Current","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":760,"y":540,"wires":[]},{"id":"f907f0a692ea56ac","type":"change","z":"89f7750d71a9177b","name":"set max Charge-Current 1A","rules":[{"t":"set","p":"payload","pt":"msg","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1180,"y":380,"wires":[["0440040bc7acb15e"]]},{"id":"17fb93fc46ec7b51","type":"smooth","z":"89f7750d71a9177b","name":"max out of next 10 samples","property":"payload","action":"max","count":"10","round":"","mult":"single","reduce":true,"x":720,"y":300,"wires":[["3b672b66a86668cd","e57269c53d0baeb6"]]},{"id":"9ea51a40e4b09c45","type":"mqtt in","z":"89f7750d71a9177b","name":"venus/GX/BMS_MaxCellV","topic":"venus/GX/BMS_MaxCellV","qos":"2","datatype":"auto-detect","broker":"1701f33596afcf6b","nl":false,"rap":true,"rh":0,"inputs":0,"x":130,"y":40,"wires":[["c9578d5c3468f8ad","282f9250cb697ec4"]]},{"id":"c9578d5c3468f8ad","type":"debug","z":"89f7750d71a9177b","name":"BMS_MaxCellV","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":200,"y":100,"wires":[]},{"id":"282f9250cb697ec4","type":"switch","z":"89f7750d71a9177b","name":"gt 3.55V","property":"payload","propertyType":"msg","rules":[{"t":"gt","v":"3.55","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":440,"y":40,"wires":[["155fdbeb0bb2bf3e"],["ac88bf77e5eb9f1f"]]},{"id":"a322585c77d164a3","type":"change","z":"89f7750d71a9177b","name":"set max Charge-Current 0A","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1060,"y":40,"wires":[["45451a3b256095ce"]]},{"id":"baeff2f0c2f6f28f","type":"gate","z":"89f7750d71a9177b","name":"","controlTopic":"control","defaultState":"closed","openCmd":"open","closeCmd":"close","toggleCmd":"toggle","defaultCmd":"default","statusCmd":"status","persist":false,"storeName":"memory","x":550,"y":180,"wires":[["e5a1a9c7b6848fbd"]]},{"id":"ac88bf77e5eb9f1f","type":"change","z":"89f7750d71a9177b","name":"open Gate","rules":[{"t":"set","p":"topic","pt":"msg","to":"control","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"open","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":630,"y":80,"wires":[["baeff2f0c2f6f28f"]]},{"id":"155fdbeb0bb2bf3e","type":"change","z":"89f7750d71a9177b","name":"close Gate","rules":[{"t":"set","p":"topic","pt":"msg","to":"control","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"close","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":630,"y":40,"wires":[["baeff2f0c2f6f28f","9e0a357adbf886c6","a322585c77d164a3"]]},{"id":"9e0a357adbf886c6","type":"change","z":"89f7750d71a9177b","name":"reset","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"},{"t":"delete","p":"payload","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":830,"y":40,"wires":[["17fb93fc46ec7b51"]]},{"id":"4f24526478a2f5ca","type":"comment","z":"89f7750d71a9177b","name":"kill switch","info":"do not allow any cell go above 3.56V, anytime","x":440,"y":80,"wires":[]},{"id":"68f9edfacebde5d3","type":"inject","z":"89f7750d71a9177b","name":"set -1 (disable max. charge current)","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"-1","payloadType":"num","x":480,"y":600,"wires":[["45451a3b256095ce"]]},{"id":"11d63f595b6fdbe8","type":"debug","z":"89f7750d71a9177b","name":"Charger max. Current","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":1260,"y":500,"wires":[]},{"id":"111114fd65eec51b","type":"comment","z":"89f7750d71a9177b","name":"check actual DVCC config","info":"do not allow any cell go above 3.56V, anytime","x":530,"y":760,"wires":[]},{"id":"93cfb25190765687","type":"comment","z":"89f7750d71a9177b","name":"set max Current according to Cell-Voltage imbalance","info":"do not allow any cell go above 3.56V, anytime","x":1110,"y":420,"wires":[]},{"id":"1701f33596afcf6b","type":"mqtt-broker","name":"mosquitto-on-alarm","broker":"192.168.10.22","port":"1883","clientid":"","autoConnect":true,"usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""}]