EVCS node red flow to maximise PV usage off grid

hi all,
perhpas this might help someone.
I am running a 1 phase system with 5kva multiplus, with a 5kW DC charger and 8 kW ac coupled fronius.
the battery pack is only 15kw.

My main aim is to maximise car charging, and I dont mind cycling the main battery.
this is the flow I use (in winter time).

[{"id":"993fb2eb835140ae","type":"tab","label":"xarger zima","disabled":false,"info":"","env":[]},{"id":"c7f141b44426ca7b","type":"modbus-write","z":"993fb2eb835140ae","name":"5085","showStatusActivities":false,"showErrors":false,"showWarnings":true,"unitid":"","dataType":"HoldingRegister","adr":"5085","quantity":"1","server":"73302cf3919a3677","emptyMsgOnFail":false,"keepMsgProperties":false,"delayOnStart":false,"startDelayTime":"","x":510,"y":40,"wires":[["7058f7ae1567fb46"],[]]},{"id":"299b3d603afa55f6","type":"victron-input-battery","z":"993fb2eb835140ae","service":"com.victronenergy.battery/512","path":"/Soc","serviceObj":{"service":"com.victronenergy.battery/512","name":"Pylontech battery"},"pathObj":{"path":"/Soc","type":"float","name":"State of charge (%)"},"name":"bat soc","onlyChanges":true,"roundValues":"1","x":70,"y":40,"wires":[["75c8ab446f660658","04566bef6416c19d","eb1ef7ce784f1520","c4d888013256d511","07ac44bc2e9d5e3b","ce82f9f701e9422d"]]},{"id":"75c8ab446f660658","type":"range","z":"993fb2eb835140ae","minin":"0","maxin":"80","minout":"0","maxout":"0","action":"drop","round":true,"property":"payload","name":"0-80 to 0","x":280,"y":40,"wires":[["c7f141b44426ca7b"]]},{"id":"7058f7ae1567fb46","type":"debug","z":"993fb2eb835140ae","name":"debug 5","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":700,"y":40,"wires":[]},{"id":"7ef2acd6022ea2c1","type":"debug","z":"993fb2eb835140ae","name":"debug 6","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":980,"y":100,"wires":[]},{"id":"8b2e5ac2a4529ac3","type":"modbus-write","z":"993fb2eb835140ae","name":"5081","showStatusActivities":false,"showErrors":false,"showWarnings":true,"unitid":"","dataType":"HoldingRegister","adr":"5081","quantity":"1","server":"73302cf3919a3677","emptyMsgOnFail":false,"keepMsgProperties":false,"delayOnStart":false,"startDelayTime":"","x":490,"y":220,"wires":[["7231a4bcd695c5cc"],[]]},{"id":"04566bef6416c19d","type":"range","z":"993fb2eb835140ae","minin":"0","maxin":"50","minout":"2500","maxout":"1500","action":"drop","round":true,"property":"payload","name":"0-50 to 2500-1500","x":310,"y":160,"wires":[["8b2e5ac2a4529ac3"]]},{"id":"eb1ef7ce784f1520","type":"range","z":"993fb2eb835140ae","minin":"51","maxin":"80","minout":"1500","maxout":"500","action":"drop","round":true,"property":"payload","name":"51-80 to 1500-300","x":310,"y":200,"wires":[["8b2e5ac2a4529ac3"]]},{"id":"d0e1382adafe8e5b","type":"cronplus","z":"993fb2eb835140ae","name":"sunrise +50 change to auto mode","outputField":"payload","timeZone":"","storeName":"","commandResponseMsgOutput":"output1","defaultLocation":"","defaultLocationType":"default","outputs":1,"options":[{"name":"schedule1","topic":"topic1","payloadType":"num","payload":"1","expressionType":"solar","expression":"0 * * * * * *","location":"48.729620678911886 17.957496643066406","offset":"50","solarType":"selected","solarEvents":"sunriseEnd"}],"x":200,"y":320,"wires":[["f614bd51f7a35f6e"]]},{"id":"f614bd51f7a35f6e","type":"victron-output-evcharger","z":"993fb2eb835140ae","service":"com.victronenergy.evcharger/40","path":"/Mode","serviceObj":{"service":"com.victronenergy.evcharger/40","name":"xarger"},"pathObj":{"path":"/Mode","type":"enum","name":"Mode","enum":{"0":"Manual","1":"Auto","2":"Schedule"},"writable":true},"initial":"","name":"","onlyChanges":false,"x":520,"y":320,"wires":[]},{"id":"3253374c5b16870a","type":"modbus-write","z":"993fb2eb835140ae","name":"start charging 5066","showStatusActivities":false,"showErrors":false,"showWarnings":true,"unitid":"","dataType":"HoldingRegister","adr":"5066","quantity":"1","server":"73302cf3919a3677","emptyMsgOnFail":false,"keepMsgProperties":false,"delayOnStart":false,"startDelayTime":"","x":450,"y":440,"wires":[[],[]]},{"id":"c8911a1ca760145b","type":"modbus-write","z":"993fb2eb835140ae","name":"stop charging 5067","showStatusActivities":false,"showErrors":false,"showWarnings":true,"unitid":"","dataType":"HoldingRegister","adr":"5067","quantity":"1","server":"73302cf3919a3677","emptyMsgOnFail":false,"keepMsgProperties":false,"delayOnStart":false,"startDelayTime":"","x":450,"y":500,"wires":[[],[]]},{"id":"72d324bec295e177","type":"cronplus","z":"993fb2eb835140ae","name":"sunrise +60 10","outputField":"payload","timeZone":"","storeName":"","commandResponseMsgOutput":"output1","defaultLocation":"","defaultLocationType":"default","outputs":1,"options":[{"name":"schedule1","topic":"topic1","payloadType":"num","payload":"10","expressionType":"solar","expression":"0 * * * * * *","location":"48.729620678911886 17.957496643066406","offset":"60","solarType":"selected","solarEvents":"sunriseEnd"}],"x":140,"y":500,"wires":[["c8911a1ca760145b"]]},{"id":"571c36dcd66eb25b","type":"cronplus","z":"993fb2eb835140ae","name":"sunrise +61 12","outputField":"payload","timeZone":"","storeName":"","commandResponseMsgOutput":"output1","defaultLocation":"","defaultLocationType":"default","outputs":1,"options":[{"name":"schedule1","topic":"topic1","payloadType":"num","payload":"12","expressionType":"solar","expression":"0 * * * * * *","location":"48.729620678911886 17.957496643066406","offset":"61","solarType":"selected","solarEvents":"sunriseEnd"}],"x":140,"y":440,"wires":[["3253374c5b16870a"]]},{"id":"5834dc841942cb7b","type":"cronplus","z":"993fb2eb835140ae","name":"noon +60  -49","outputField":"payload","timeZone":"","storeName":"","commandResponseMsgOutput":"output1","defaultLocation":"","defaultLocationType":"default","outputs":1,"options":[{"name":"schedule1","topic":"topic1","payloadType":"num","payload":"49","expressionType":"solar","expression":"0 * * * * * *","location":"48.729620678911886 17.957496643066406","offset":"60","solarType":"selected","solarEvents":"solarNoon"}],"x":140,"y":620,"wires":[["c8911a1ca760145b"]]},{"id":"8bf81aca784a257e","type":"cronplus","z":"993fb2eb835140ae","name":"noon +50 50","outputField":"payload","timeZone":"","storeName":"","commandResponseMsgOutput":"output1","defaultLocation":"","defaultLocationType":"default","outputs":1,"options":[{"name":"schedule1","topic":"topic1","payloadType":"num","payload":"50","expressionType":"solar","expression":"0 * * * * * *","location":"48.729620678911886 17.957496643066406","offset":"61","solarType":"selected","solarEvents":"solarNoon"}],"x":130,"y":560,"wires":[["3253374c5b16870a"]]},{"id":"c4d888013256d511","type":"range","z":"993fb2eb835140ae","minin":"81","maxin":"100","minout":"0","maxout":"0","action":"drop","round":true,"property":"payload","name":"81-100 to 0-0","x":300,"y":240,"wires":[["8b2e5ac2a4529ac3"]]},{"id":"13e419fb91dd2357","type":"victron-input-pvinverter","z":"993fb2eb835140ae","service":"com.victronenergy.pvinverter/23","path":"/Ac/L1/Power","serviceObj":{"service":"com.victronenergy.pvinverter/23","name":"froni 8.2"},"pathObj":{"path":"/Ac/L1/Power","type":"float","name":"L1 Power (W)"},"name":"","onlyChanges":true,"roundValues":"1","x":140,"y":720,"wires":[["8036b4bdb99df39a"]]},{"id":"8036b4bdb99df39a","type":"range","z":"993fb2eb835140ae","minin":"0","maxin":"4200","minout":"12","maxout":"32","action":"clamp","round":true,"property":"payload","name":"2000-6000 13-32","x":350,"y":720,"wires":[["5849ec6282d6a358"]]},{"id":"73eef9842c7bb00d","type":"victron-output-evcharger","z":"993fb2eb835140ae","service":"com.victronenergy.evcharger/40","path":"/MaxCurrent","serviceObj":{"service":"com.victronenergy.evcharger/40","name":"xarger"},"pathObj":{"path":"/MaxCurrent","type":"float","name":"Maximum charge current (A)","writable":true},"name":"max charge current","onlyChanges":false,"x":810,"y":720,"wires":[]},{"id":"5849ec6282d6a358","type":"rbe","z":"993fb2eb835140ae","name":"","func":"rbe","gap":"","start":"","inout":"out","septopics":true,"property":"payload","topi":"topic","x":510,"y":720,"wires":[["73eef9842c7bb00d"]]},{"id":"22daafd25b9ab88f","type":"comment","z":"993fb2eb835140ae","name":"allowed power to bat","info":"","x":320,"y":280,"wires":[]},{"id":"016e8db011a3fd33","type":"comment","z":"993fb2eb835140ae","name":"allowed power draw from battery","info":"","x":350,"y":120,"wires":[]},{"id":"f33369f0145d6e93","type":"modbus-write","z":"993fb2eb835140ae","name":"start charging 5083","showStatusActivities":false,"showErrors":false,"showWarnings":true,"unitid":"","dataType":"HoldingRegister","adr":"5083","quantity":"1","server":"73302cf3919a3677","emptyMsgOnFail":false,"keepMsgProperties":false,"delayOnStart":false,"startDelayTime":"","x":810,"y":100,"wires":[["7ef2acd6022ea2c1"],[]]},{"id":"07ac44bc2e9d5e3b","type":"range","z":"993fb2eb835140ae","minin":"0","maxin":"100","minout":"3000","maxout":"50","action":"clamp","round":true,"property":"payload","name":"0-100soc  to 3000-50w","x":560,"y":100,"wires":[["f33369f0145d6e93","776c64d8eac35767"]]},{"id":"6abc7ee873a83902","type":"comment","z":"993fb2eb835140ae","name":"available sun power to start","info":"","x":580,"y":140,"wires":[]},{"id":"1f793f173058b191","type":"cronplus","z":"993fb2eb835140ae","name":"sunrise +51 start auto mode","outputField":"payload","timeZone":"","storeName":"","commandResponseMsgOutput":"output1","defaultLocation":"","defaultLocationType":"default","outputs":1,"options":[{"name":"schedule1","topic":"topic1","payloadType":"num","payload":"1","expressionType":"solar","expression":"0 * * * * * *","location":"48.729620678911886 17.957496643066406","offset":"51","solarType":"selected","solarEvents":"sunriseEnd"}],"x":180,"y":380,"wires":[["53be3fc6d3c64a92"]]},{"id":"53be3fc6d3c64a92","type":"modbus-write","z":"993fb2eb835140ae","name":"5010","showStatusActivities":false,"showErrors":false,"showWarnings":true,"unitid":"","dataType":"HoldingRegister","adr":"5010","quantity":"1","server":"73302cf3919a3677","emptyMsgOnFail":false,"keepMsgProperties":false,"delayOnStart":false,"startDelayTime":"","x":430,"y":380,"wires":[[],[]]},{"id":"776c64d8eac35767","type":"debug","z":"993fb2eb835140ae","name":"debug 16","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":800,"y":180,"wires":[]},{"id":"ce82f9f701e9422d","type":"range","z":"993fb2eb835140ae","minin":"81","maxin":"100","minout":"0","maxout":"4000","action":"drop","round":true,"property":"payload","name":"81-100 to 0-4000","x":310,"y":80,"wires":[["c7f141b44426ca7b"]]},{"id":"7231a4bcd695c5cc","type":"debug","z":"993fb2eb835140ae","name":"debug 33","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":640,"y":220,"wires":[]},{"id":"73302cf3919a3677","type":"modbus-client","name":"xarger","clienttype":"tcp","bufferCommands":true,"stateLogEnabled":false,"queueLogEnabled":false,"failureLogEnabled":true,"tcpHost":"192.168.1.201","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttyUSB","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","serialAsciiResponseStartDelimiter":"0x3A","unit_id":"1","commandDelay":"1","clientTimeout":"1000","reconnectOnTimeout":true,"reconnectTimeout":"2000","parallelUnitIdsAllowed":true,"showErrors":false,"showWarnings":true,"showLogs":true}]