Seriously, super helpful! I’m so grateful that I got this up and running now (soon)! I started out two weeks ago from nothing, and now I control my cars, heat pump, solar and battery through home assistant. I had this in the back of my head for like a year now, but finally came around to actually do something about it.
I’m looking forward to getting this perfect (ok, it will never be hehe), and this feels like a good base to stand on.
We’ll see, maybe I’ll keep Node RED or convert it into HAOS automations, we’ll see what’s easiest… Do you know btw if you can make enteties of node flows? If I for example would like a button or switch to quickly turn on or off charging…?
I’ll post the full export tomorrow. Have to sleep now.
Thanks again!
EDIT: Or btw, here you go:
[{"id":"effce8e2e8a9f43c","type":"tab","label":"Flow 1","disabled":false,"info":"","env":[]},{"id":"76ab0c3aad64c668","type":"tab","label":"Fronius Export Control Updated","disabled":true,"info":"","env":[]},{"id":"82d61b2ddb027662","type":"tab","label":"Flow 2","disabled":true,"info":"","env":[]},{"id":"67faeae86ef585a8","type":"group","z":"76ab0c3aad64c668","name":"Check 1 Minute Intervals","style":{"label":true},"nodes":["200bacc074df8cbe","cc52d431205212f2","4db51c0c85952ba4","045582548c036ebb","a3c52370e1e3c91b"],"x":14,"y":99},{"id":"d49b298a20da4cb3","type":"group","z":"76ab0c3aad64c668","name":"Check Battery Discharge - If Yes - Max Output","style":{"label":true},"nodes":["d18a063fdcace0ab","093e86667a226569","45fd82b96452fd59"],"x":14,"y":439},{"id":"dd1ae8afab7bd989","type":"group","z":"76ab0c3aad64c668","name":"Primary Inverter with Smart Meter","style":{"label":true},"nodes":["bf545c79efb5be6e","5b9f73ad2d28291f","d61e75648cf03aa5","942cab0954a58820","0ad6a47eabf863af","5dd4a83230f373cf","ec76d9ae41bde168","bc3862a711b0445e","92b3c15ead4a275d"],"x":614,"y":39},{"id":"67f3f6554cd2fe41","type":"group","z":"82d61b2ddb027662","name":"Main Inverter Connected to Smart Meter","style":{"label":true},"nodes":["2c660a19252258df","678adc0348f546d3","ed79a132110622ab"],"x":114,"y":299},{"id":"d4ddcb9085ea730f","type":"group","z":"effce8e2e8a9f43c","name":"Write changes!","style":{"label":true},"nodes":["180989e6b6be69e1","beceba7f58b3cb02","8257c587efbab683","128a17e0b4b42529","6e1b23a96a0be05e","cb1a63e7561cc549"],"x":994,"y":19,"w":692,"h":162},{"id":"9d13313687e3f017","type":"group","z":"effce8e2e8a9f43c","name":"Normal state","style":{"label":true},"nodes":["134bc56b2d93918d","cf500d91417561eb","2468d8245a765d21"],"x":674,"y":359,"w":532,"h":122},{"id":"ceea0bd0f56e5cbe","type":"group","z":"effce8e2e8a9f43c","name":"Force charge","style":{"label":true},"nodes":["8bf3fd6bab97b524","d19deebddbe58f74","f3095d184f17834f","0548b4b7a9faec3d","f79b4f746a482239","ab188204ffe303ef"],"x":674,"y":219,"w":652,"h":122},{"id":"32f8524788c52a9d","type":"group","z":"effce8e2e8a9f43c","name":"Force Discharge","style":{"label":true},"nodes":["f941ac38c439226e","d804b22ae3be2b4e","127b84a81d7204e8"],"x":674,"y":499,"w":532,"h":122},{"id":"f84e3a88a392756e","type":"group","z":"effce8e2e8a9f43c","name":"HOLD (No charge or discharge) - NOT TESTED","style":{"label":true},"nodes":["23b92e3a92162b4a","9c1a5de4d5079aa4","4be156af80f1d0d2"],"x":674,"y":659,"w":612,"h":122},{"id":"0ad6a47eabf863af","type":"group","z":"76ab0c3aad64c668","g":"dd1ae8afab7bd989","name":"Enable Modbus Control - Max Output","style":{"label":true},"nodes":["57f9336fd070e990","38741f73b2283ba3","d14dcad7cd72383f","168c0e4cad193ff9","737229fe2974e0cf"],"x":1234,"y":99},{"id":"5dd4a83230f373cf","type":"group","z":"76ab0c3aad64c668","g":"dd1ae8afab7bd989","name":"Disable Modbus Control - Limit Exports","style":{"label":true},"nodes":["9677eb7418f50bfe","7acb279b01b8b86e","c15edc748f63bdd9","ad601a7bb224da80","2734f7c6cd704d7c"],"x":1234,"y":299},{"id":"ec76d9ae41bde168","type":"group","z":"76ab0c3aad64c668","g":"dd1ae8afab7bd989","name":"Main Inverter Connected to Smart Meter","style":{"label":true},"nodes":["ba19a0ef37ef7dca","c337fcf0fac93eae","f8e3e969561ea1f7","c40101ee33f5a5fd"],"x":1954,"y":219},{"id":"bc3862a711b0445e","type":"group","z":"76ab0c3aad64c668","g":"dd1ae8afab7bd989","name":"Check Current WMaxLimEna","style":{"label":true},"nodes":["b8453a1af1eac10d","817a3ac03ce24936","8c568a8ffe7f8f39"],"x":654,"y":119},{"id":"92b3c15ead4a275d","type":"group","z":"76ab0c3aad64c668","g":"dd1ae8afab7bd989","name":"Check Current WMaxLimEna","style":{"label":true},"nodes":["108881d15cc05277","e98e8be8c28e9b7d","9cabe321855fbdb2"],"x":654,"y":319},{"id":"7ba45c1373d6db9c","type":"group","z":"effce8e2e8a9f43c","name":"Check current price/kWh","style":{"label":true},"nodes":["d5351cdc453ee22e","3b6d2b1103a7ee5c","dd104017de06fd0b"],"x":14,"y":39,"w":452,"h":162},{"id":"0548b4b7a9faec3d","type":"junction","z":"effce8e2e8a9f43c","g":"ceea0bd0f56e5cbe","x":700,"y":280,"wires":[[]]},{"id":"f79b4f746a482239","type":"junction","z":"effce8e2e8a9f43c","g":"ceea0bd0f56e5cbe","x":700,"y":280,"wires":[[]]},{"id":"ab188204ffe303ef","type":"junction","z":"effce8e2e8a9f43c","g":"ceea0bd0f56e5cbe","x":700,"y":280,"wires":[[]]},{"id":"168c0e4cad193ff9","type":"junction","z":"76ab0c3aad64c668","g":"0ad6a47eabf863af","x":1280,"y":200,"wires":[["38741f73b2283ba3"]]},{"id":"c40101ee33f5a5fd","type":"junction","z":"76ab0c3aad64c668","g":"ec76d9ae41bde168","x":1980,"y":300,"wires":[["f8e3e969561ea1f7"]]},{"id":"737229fe2974e0cf","type":"junction","z":"76ab0c3aad64c668","g":"0ad6a47eabf863af","x":1780,"y":200,"wires":[["c40101ee33f5a5fd"]]},{"id":"ad601a7bb224da80","type":"junction","z":"76ab0c3aad64c668","g":"5dd4a83230f373cf","x":1300,"y":340,"wires":[["7acb279b01b8b86e"]]},{"id":"2734f7c6cd704d7c","type":"junction","z":"76ab0c3aad64c668","g":"5dd4a83230f373cf","x":1802.592529296875,"y":342.66656494140625,"wires":[["c40101ee33f5a5fd"]]},{"id":"045582548c036ebb","type":"junction","z":"76ab0c3aad64c668","g":"67faeae86ef585a8","x":380,"y":260,"wires":[["b8453a1af1eac10d"]]},{"id":"a3c52370e1e3c91b","type":"junction","z":"76ab0c3aad64c668","g":"67faeae86ef585a8","x":380,"y":300,"wires":[["108881d15cc05277","d18a063fdcace0ab"]]},{"id":"afa7e6c.89d5e18","type":"server","name":"Home Assistant","addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"","connectionDelay":false,"cacheJson":false,"heartbeat":true,"heartbeatInterval":"30","statusSeparator":"","enableGlobalContextStore":false},{"id":"ecd41b68db8d4254","type":"modbus-client","name":"Fronius Gen24","clienttype":"tcp","bufferCommands":true,"stateLogEnabled":true,"queueLogEnabled":false,"failureLogEnabled":true,"tcpHost":"10.10.10.4","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,"showWarnings":true,"showLogs":true},{"id":"180989e6b6be69e1","type":"modbus-response","z":"effce8e2e8a9f43c","g":"d4ddcb9085ea730f","name":"","registerShowMax":20,"x":1470,"y":120,"wires":[]},{"id":"beceba7f58b3cb02","type":"modbus-flex-write","z":"effce8e2e8a9f43c","g":"d4ddcb9085ea730f","name":"Fronius Storage","showStatusActivities":true,"showErrors":true,"showWarnings":true,"server":"ecd41b68db8d4254","emptyMsgOnFail":true,"keepMsgProperties":true,"delayOnStart":false,"startDelayTime":"10","x":1280,"y":100,"wires":[["180989e6b6be69e1","8257c587efbab683"],[]]},{"id":"8257c587efbab683","type":"debug","z":"effce8e2e8a9f43c","g":"d4ddcb9085ea730f","name":"Inverter MODBUS Response","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1510,"y":80,"wires":[]},{"id":"8bf3fd6bab97b524","type":"function","z":"effce8e2e8a9f43c","g":"ceea0bd0f56e5cbe","name":"Force Charge @ 4.8kW, No Discharge","func":"msg.StorCtl_Mod = \"2\"\n// 0%\nmsg.OutWRte = \"65535\"\n\nmsg.newstate = \"forcechargeonly\"\n\nreturn msg","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":850,"y":280,"wires":[["d19deebddbe58f74","f3095d184f17834f"]],"info":"Example 7: Charging with 50% to 100% of the nominal power\nThis behavior can be achieved by limiting the maximum discharge capacity to\n-50% => results in window [1650 W, 3300 W]\n- OutWRte = -50% (set discharge limit of WchaMax to -50%)\n- StorCtl_Mod = 2 (activates discharge limit, bit pattern: 10)\n- InWRte is not relevant in this case\n- Battery status in Fronius Solar.web will change to Forced Recharge"},{"id":"f941ac38c439226e","type":"function","z":"effce8e2e8a9f43c","g":"32f8524788c52a9d","name":"50% kW discharge","func":"\nmsg.StorCtl_Mod = \"3\"\n// + 50%\nmsg.OutWRte = 5000\n// -50%\nmsg.InWRte = \"65485\"\n\nmsg.newstate = \"1kWdischarge\"\n\nreturn msg","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":790,"y":560,"wires":[["d804b22ae3be2b4e","127b84a81d7204e8"]],"info":"Example 6: Discharging with 50% of the nominal power\nThis behavior can be achieved by limiting the maximum charge capacity to -50%\nand the maximum discharge capacity to 50%\n=> results in window [-1650 W, -1650 W]\n- InWRte = -50% (set charge limit of WchaMax to -50%)\n- OutWRte = 50% (set discharge limit of WchaMax to 50%)\n- StorCtl_Mod = 3 (activate both limit values, bit pattern: 11)"},{"id":"2468d8245a765d21","type":"function","z":"effce8e2e8a9f43c","g":"9d13313687e3f017","name":"Normal Operation","func":"\nmsg.StorCtl_Mod = \"0\"\nmsg.OutWRte = 10000\nmsg.InWRte = 10000\n\nmsg.newstate = \"normal\"\n\nreturn msg","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":790,"y":420,"wires":[["134bc56b2d93918d","cf500d91417561eb"]],"info":"This puts the battery in normal operation.\nMeaningn that it will both charge and discharge to\nits set limits at 100%,\n"},{"id":"d5351cdc453ee22e","type":"api-current-state","z":"effce8e2e8a9f43c","g":"7ba45c1373d6db9c","name":"GreenelyPrice","server":"afa7e6c.89d5e18","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"sensor.greenely_prices","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":140,"y":160,"wires":[["3b6d2b1103a7ee5c"]]},{"id":"3b6d2b1103a7ee5c","type":"switch","z":"effce8e2e8a9f43c","g":"7ba45c1373d6db9c","name":"> 50 öre or < 50 öre","property":"payload","propertyType":"msg","rules":[{"t":"gt","v":"0.5","vt":"num"},{"t":"lt","v":"0.5","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":340,"y":160,"wires":[["cb1a63e7561cc549"],["8bf3fd6bab97b524"]]},{"id":"dd104017de06fd0b","type":"cronplus","z":"effce8e2e8a9f43c","g":"7ba45c1373d6db9c","name":"Every hour","outputField":"payload","timeZone":"","storeName":"","commandResponseMsgOutput":"output1","defaultLocation":"","defaultLocationType":"default","outputs":1,"options":[{"name":"schedule1","topic":"topic1","payloadType":"default","payload":"","expressionType":"cron","expression":"0 0 * * * * *","location":"","offset":"0","solarType":"all","solarEvents":"sunrise,sunset"}],"x":130,"y":80,"wires":[["d5351cdc453ee22e"]]},{"id":"d19deebddbe58f74","type":"debug","z":"effce8e2e8a9f43c","g":"ceea0bd0f56e5cbe","name":"Inverter MODBUS Response","active":true,"tosidebar":true,"console":true,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1150,"y":260,"wires":[]},{"id":"f3095d184f17834f","type":"modbus-response","z":"effce8e2e8a9f43c","g":"ceea0bd0f56e5cbe","name":"","registerShowMax":20,"x":1110,"y":300,"wires":[]},{"id":"128a17e0b4b42529","type":"debug","z":"effce8e2e8a9f43c","g":"d4ddcb9085ea730f","name":"Inverter MODBUS Response","active":true,"tosidebar":true,"console":true,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1150,"y":60,"wires":[]},{"id":"6e1b23a96a0be05e","type":"modbus-response","z":"effce8e2e8a9f43c","g":"d4ddcb9085ea730f","name":"","registerShowMax":20,"x":1110,"y":140,"wires":[]},{"id":"cb1a63e7561cc549","type":"function","z":"effce8e2e8a9f43c","g":"d4ddcb9085ea730f","name":"InWRte","func":"var values = [msg.StorCtl_Mod, (65535), (700), (10000), (65535), (65535), (5), (msg.OutWRte), (msg.InWRte)]\n\nmsg.payload = {\n 'value': values,\n 'fc': 16,\n 'unitid': 1,\n // INT+SF = -10\n 'address': 40348,\n 'quantity': 9\n}\n\nreturn msg","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":1080,"y":100,"wires":[["beceba7f58b3cb02","6e1b23a96a0be05e","128a17e0b4b42529"]]},{"id":"134bc56b2d93918d","type":"modbus-response","z":"effce8e2e8a9f43c","g":"9d13313687e3f017","name":"","registerShowMax":20,"x":990,"y":440,"wires":[]},{"id":"cf500d91417561eb","type":"debug","z":"effce8e2e8a9f43c","g":"9d13313687e3f017","name":"Inverter MODBUS Response","active":true,"tosidebar":true,"console":true,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1030,"y":400,"wires":[]},{"id":"d804b22ae3be2b4e","type":"debug","z":"effce8e2e8a9f43c","g":"32f8524788c52a9d","name":"Inverter MODBUS Response","active":true,"tosidebar":true,"console":true,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1030,"y":540,"wires":[]},{"id":"127b84a81d7204e8","type":"modbus-response","z":"effce8e2e8a9f43c","g":"32f8524788c52a9d","name":"","registerShowMax":20,"x":990,"y":580,"wires":[]},{"id":"23b92e3a92162b4a","type":"modbus-response","z":"effce8e2e8a9f43c","g":"f84e3a88a392756e","name":"","registerShowMax":20,"x":1070,"y":740,"wires":[]},{"id":"9c1a5de4d5079aa4","type":"debug","z":"effce8e2e8a9f43c","g":"f84e3a88a392756e","name":"Inverter MODBUS Response","active":true,"tosidebar":true,"console":true,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1110,"y":700,"wires":[]},{"id":"4be156af80f1d0d2","type":"function","z":"effce8e2e8a9f43c","g":"f84e3a88a392756e","name":"HOLD (no charge or discharge)","func":"\nmsg.StorCtl_Mod = \"0\"\nmsg.OutWRte = 65535\nmsg.InWRte = 65535\n\nmsg.newstate = \"HOLD state\"\n\nreturn msg","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":830,"y":720,"wires":[["23b92e3a92162b4a","9c1a5de4d5079aa4","cb1a63e7561cc549"]],"info":"This puts the battery in normal operation.\nMeaningn that it will both charge and discharge to\nits set limits at 100%,\n"},{"id":"0f7bddac0d6e47e9","type":"poll-state","z":"effce8e2e8a9f43c","name":"Volkswagen status","server":"afa7e6c.89d5e18","version":3,"exposeAsEntityConfig":"","updateInterval":"60","updateIntervalType":"num","updateIntervalUnits":"seconds","outputInitially":false,"outputOnChanged":false,"entityId":"sensor.ev_smart_charging_volkswagen_charging","stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputs":1,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":170,"y":280,"wires":[["afd38d704e49105d"]]},{"id":"34930c36e0d50c0c","type":"poll-state","z":"effce8e2e8a9f43c","name":"Tesla status","server":"afa7e6c.89d5e18","version":3,"exposeAsEntityConfig":"","updateInterval":"60","updateIntervalType":"num","updateIntervalUnits":"seconds","outputInitially":false,"outputOnChanged":false,"entityId":"sensor.ev_smart_charging_charging","stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputs":1,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":190,"y":340,"wires":[["afd38d704e49105d"]]},{"id":"afd38d704e49105d","type":"switch","z":"effce8e2e8a9f43c","name":"Charging or not?","property":"payload","propertyType":"msg","rules":[{"t":"gt","v":"off","vt":"num"},{"t":"lt","v":"running","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":390,"y":320,"wires":[["dd104017de06fd0b"],["4be156af80f1d0d2"]]},{"id":"ba19a0ef37ef7dca","type":"debug","z":"76ab0c3aad64c668","g":"ec76d9ae41bde168","name":"GEN24: Inverter Set","active":false,"tosidebar":true,"console":true,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":2340,"y":320,"wires":[]},{"id":"57f9336fd070e990","type":"inject","z":"76ab0c3aad64c668","g":"0ad6a47eabf863af","name":"ExportLimitOFF","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":"","topic":"","payload":"","payloadType":"str","x":1360,"y":140,"wires":[["38741f73b2283ba3"]]},{"id":"38741f73b2283ba3","type":"function","z":"76ab0c3aad64c668","g":"0ad6a47eabf863af","name":"100% Max Power","func":"var values = [(10000),(0),(0),(0),(1)];\n\nmsg.payload = { \n 'value': values,\n 'fc': 16,\n 'unitid': 1,\n 'address': 40232,\n 'quantity': 5\n} \n\nreturn msg","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":1510,"y":220,"wires":[["d14dcad7cd72383f","737229fe2974e0cf"]]},{"id":"d14dcad7cd72383f","type":"debug","z":"76ab0c3aad64c668","g":"0ad6a47eabf863af","name":"GEN24: MAX POWA SET","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1670,"y":140,"wires":[]},{"id":"c337fcf0fac93eae","type":"modbus-response","z":"76ab0c3aad64c668","g":"ec76d9ae41bde168","name":"","registerShowMax":20,"x":2330,"y":260,"wires":[]},{"id":"f8e3e969561ea1f7","type":"modbus-flex-write","z":"76ab0c3aad64c668","g":"ec76d9ae41bde168","name":"Fronius-Storage","showStatusActivities":true,"showErrors":true,"showWarnings":true,"server":"ecd41b68db8d4254","emptyMsgOnFail":false,"keepMsgProperties":false,"delayOnStart":false,"startDelayTime":"10","x":2100,"y":300,"wires":[["c337fcf0fac93eae","ba19a0ef37ef7dca"],["ba19a0ef37ef7dca"]]},{"id":"9677eb7418f50bfe","type":"inject","z":"76ab0c3aad64c668","g":"5dd4a83230f373cf","name":"ExportLimitOn","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":"","topic":"","payload":"","payloadType":"str","x":1350,"y":420,"wires":[["7acb279b01b8b86e"]]},{"id":"7acb279b01b8b86e","type":"function","z":"76ab0c3aad64c668","g":"5dd4a83230f373cf","name":"WMaxLim_Ena = 0","func":"msg.payload = { \n 'value': 0,\n 'fc': 6,\n 'unitid': 1,\n 'address': 40236,\n 'quantity': 1\n} \n\nreturn msg","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":1510,"y":340,"wires":[["c15edc748f63bdd9","2734f7c6cd704d7c"]]},{"id":"c15edc748f63bdd9","type":"debug","z":"76ab0c3aad64c668","g":"5dd4a83230f373cf","name":"GEN24: Set Export Limit","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1710,"y":420,"wires":[]},{"id":"bf545c79efb5be6e","type":"comment","z":"76ab0c3aad64c668","g":"dd1ae8afab7bd989","name":"When Positive Feed In - Max Output","info":"","x":1380,"y":80,"wires":[]},{"id":"5b9f73ad2d28291f","type":"comment","z":"76ab0c3aad64c668","g":"dd1ae8afab7bd989","name":"When Negative Feed In - Limit Exports to 0","info":"","x":1400,"y":480,"wires":[]},{"id":"b8453a1af1eac10d","type":"modbus-getter","z":"76ab0c3aad64c668","g":"bc3862a711b0445e","name":"Read_WMaxLimEna","showStatusActivities":false,"showErrors":false,"showWarnings":false,"logIOActivities":false,"unitid":"1","dataType":"HoldingRegister","adr":"40236","quantity":"1","server":"ecd41b68db8d4254","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"keepMsgProperties":true,"delayOnStart":false,"startDelayTime":"","x":780,"y":160,"wires":[["817a3ac03ce24936"],[]]},{"id":"817a3ac03ce24936","type":"switch","z":"76ab0c3aad64c668","g":"bc3862a711b0445e","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"1","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":990,"y":160,"wires":[["168c0e4cad193ff9"],["8c568a8ffe7f8f39"]]},{"id":"108881d15cc05277","type":"modbus-getter","z":"76ab0c3aad64c668","g":"92b3c15ead4a275d","name":"Read_WMaxLimEna","showStatusActivities":false,"showErrors":false,"showWarnings":false,"logIOActivities":false,"unitid":"1","dataType":"HoldingRegister","adr":"40236","quantity":"1","server":"ecd41b68db8d4254","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"keepMsgProperties":true,"delayOnStart":false,"startDelayTime":"","x":780,"y":360,"wires":[["e98e8be8c28e9b7d"],[]]},{"id":"e98e8be8c28e9b7d","type":"switch","z":"76ab0c3aad64c668","g":"92b3c15ead4a275d","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"0","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":970,"y":360,"wires":[["ad601a7bb224da80"],["9cabe321855fbdb2"]]},{"id":"8c568a8ffe7f8f39","type":"debug","z":"76ab0c3aad64c668","g":"bc3862a711b0445e","name":"GEN24: Already Max","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1040,"y":220,"wires":[]},{"id":"9cabe321855fbdb2","type":"debug","z":"76ab0c3aad64c668","g":"92b3c15ead4a275d","name":"GEN24: Already Limit","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1040,"y":420,"wires":[]},{"id":"d61e75648cf03aa5","type":"comment","z":"76ab0c3aad64c668","g":"dd1ae8afab7bd989","name":"If WMaxLimEna is 0, set it to 1, if 1, then do nothing","info":"","x":850,"y":80,"wires":[]},{"id":"942cab0954a58820","type":"comment","z":"76ab0c3aad64c668","g":"dd1ae8afab7bd989","name":"If WMaxLimEna is 1, set it to 0, if 0, then do nothing","info":"","x":830,"y":480,"wires":[]},{"id":"200bacc074df8cbe","type":"api-current-state","z":"76ab0c3aad64c668","g":"67faeae86ef585a8","name":"GreenelyPrice","server":"afa7e6c.89d5e18","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"sensor.greenely_prices","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":180,"y":220,"wires":[["cc52d431205212f2"]]},{"id":"cc52d431205212f2","type":"switch","z":"76ab0c3aad64c668","g":"67faeae86ef585a8","name":"Above 0, or Less Equal to 0","property":"payload","propertyType":"msg","rules":[{"t":"gt","v":"0","vt":"num"},{"t":"lte","v":"0","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":240,"y":280,"wires":[["045582548c036ebb"],["a3c52370e1e3c91b"]]},{"id":"d18a063fdcace0ab","type":"api-current-state","z":"76ab0c3aad64c668","g":"d49b298a20da4cb3","name":"BatteryDischarge","server":"afa7e6c.89d5e18","version":3,"outputs":2,"halt_if":"500","halt_if_type":"num","halt_if_compare":"gt","entity_id":"sensor.gen24_mppt_module_3_dc_power","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"topic","propertyType":"msg","value":"discharge","valueType":"str"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":130,"y":480,"wires":[[],["093e86667a226569"]]},{"id":"093e86667a226569","type":"api-current-state","z":"76ab0c3aad64c668","g":"d49b298a20da4cb3","name":"Battery Charge Rate Less Than 4500","server":"afa7e6c.89d5e18","version":3,"outputs":2,"halt_if":"4500","halt_if_type":"num","halt_if_compare":"lt","entity_id":"sensor.gen24_mppt_module_2_dc_power","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":190,"y":560,"wires":[["45fd82b96452fd59"],[]]},{"id":"45fd82b96452fd59","type":"api-current-state","z":"76ab0c3aad64c668","g":"d49b298a20da4cb3","name":"Battery Not Full","server":"afa7e6c.89d5e18","version":3,"outputs":2,"halt_if":"100","halt_if_type":"num","halt_if_compare":"lt","entity_id":"sensor.gen24_storage_chastate","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":420,"y":500,"wires":[[],[]]},{"id":"4db51c0c85952ba4","type":"cronplus","z":"76ab0c3aad64c668","g":"67faeae86ef585a8","name":"1 Min Interval","outputField":"payload","timeZone":"","persistDynamic":false,"commandResponseMsgOutput":"output1","outputs":1,"options":[{"name":"schedule1","topic":"topic1","payloadType":"default","payload":"","expressionType":"cron","expression":"30 * 5-20 * * * *","location":"","offset":"0","solarType":"all","solarEvents":"sunrise,sunset"}],"x":140,"y":140,"wires":[["200bacc074df8cbe"]]},{"id":"479a9cbc4a8364f1","type":"debug","z":"82d61b2ddb027662","name":"debug 1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":760,"y":100,"wires":[]},{"id":"6c0bec9257e8a35c","type":"modbus-response","z":"82d61b2ddb027662","name":"","registerShowMax":20,"x":790,"y":40,"wires":[]},{"id":"0f3f8144fdb342a6","type":"cronplus","z":"82d61b2ddb027662","name":"1 Min Interval","outputField":"payload","timeZone":"","storeName":"","commandResponseMsgOutput":"output1","defaultLocation":"","defaultLocationType":"default","outputs":1,"options":[{"name":"schedule1","topic":"topic1","payloadType":"default","payload":"","expressionType":"cron","expression":"30 * 5-23 * * * *","location":"","offset":"0","solarType":"all","solarEvents":"sunrise,sunset"}],"x":160,"y":80,"wires":[["7b66a52b51a5a4ac"]]},{"id":"2c660a19252258df","type":"debug","z":"82d61b2ddb027662","g":"67f3f6554cd2fe41","name":"GEN24: Inverter Set","active":false,"tosidebar":true,"console":true,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":460,"y":400,"wires":[]},{"id":"678adc0348f546d3","type":"modbus-response","z":"82d61b2ddb027662","g":"67f3f6554cd2fe41","name":"","registerShowMax":20,"x":450,"y":340,"wires":[]},{"id":"ed79a132110622ab","type":"modbus-flex-write","z":"82d61b2ddb027662","g":"67f3f6554cd2fe41","name":"Fronius-Storage","showStatusActivities":true,"showErrors":true,"showWarnings":true,"server":"ecd41b68db8d4254","emptyMsgOnFail":false,"keepMsgProperties":false,"delayOnStart":false,"startDelayTime":"10","x":220,"y":380,"wires":[["678adc0348f546d3","2c660a19252258df"],["2c660a19252258df"]]},{"id":"7b66a52b51a5a4ac","type":"function","z":"82d61b2ddb027662","name":"Force Charge @ Max, No Discharge","func":"msg.StorCtl_Mod = \"2\"\nmsg.OutWRte = \"60486\"\nmsg.InWRte = 5000\n\nmsg.newstate = \"forcechargeonly\"\n\nreturn msg","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":470,"y":80,"wires":[["7c1c7d833e308cbc","6c0bec9257e8a35c","479a9cbc4a8364f1"]]},{"id":"7c1c7d833e308cbc","type":"function","z":"82d61b2ddb027662","name":"InWRte","func":"var values = [msg.StorCtl_Mod, (65535), (700), (10000), (65535), (65535), (5), (msg.OutWRte), (msg.InWRte)]\n\nmsg.payload = {\n 'value': values,\n 'fc': 16,\n 'unitid': 1,\n // INT+SF = -10\n 'address': 40348,\n 'quantity': 9\n}\n\nreturn msg","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":380,"y":140,"wires":[["ed79a132110622ab","c06cf8115a809b2b","1c418f6f8269ddcd"]]},{"id":"1c418f6f8269ddcd","type":"debug","z":"82d61b2ddb027662","name":"debug 2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":760,"y":220,"wires":[]},{"id":"c06cf8115a809b2b","type":"modbus-response","z":"82d61b2ddb027662","name":"","registerShowMax":20,"x":790,"y":160,"wires":[]}]