I’m not an experienced Node-red user, but I find making logic in HAAS very tedious and ineffective.
[{"id":"dae48a4adc25160a","type":"tab","label":"Solar","disabled":false,"info":"","env":[]},{"id":"257abe6c0a5907e2","type":"junction","z":"dae48a4adc25160a","x":140,"y":340,"wires":[["90614ad5a674692c","fbb05aa007462456"]]},{"id":"9995ae81a37d9dae","type":"ha-entity","z":"dae48a4adc25160a","name":"Low Power Solar","server":"d7bd0613.794c78","version":2,"debugenabled":false,"outputs":2,"entityType":"switch","config":[{"property":"name","value":"Low_power_solar"},{"property":"device_class","value":""},{"property":"icon","value":""},{"property":"unit_of_measurement","value":""},{"property":"state_class","value":""},{"property":"last_reset","value":""}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"payload","outputLocationType":"none","inputOverride":"allow","outputOnStateChange":true,"outputPayload":"true","outputPayloadType":"bool","x":130,"y":180,"wires":[["5461e6b90ab63e7c","9ec2556140e57470"],["c7303b2ce79047a5","b2bc0cd9d3731f54"]]},{"id":"5461e6b90ab63e7c","type":"modbus-getter","z":"dae48a4adc25160a","name":"","showStatusActivities":false,"showErrors":false,"logIOActivities":false,"unitid":"1","dataType":"HoldingRegister","adr":"3051","quantity":"1","server":"839d6faa3b9316ef","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"keepMsgProperties":true,"x":340,"y":140,"wires":[["92291737d89d8fcc"],[]]},{"id":"92291737d89d8fcc","type":"function","z":"dae48a4adc25160a","name":"set to 50%","func":"var pwrMsg = {};\nvar gridMsg = {}; \n\nif (msg.payload[0] > 6000)\n{\n node.warn(\"output set to 60%\");\n pwrMsg.payload = { value: 6000, 'fc': 6, 'unitid': 1, 'address': 3051, 'quantity': 1 };\n gridMsg.payload = { value: 52, 'fc': 6, 'unitid': 1, 'address': 3067, 'quantity': 1 }; \n return [pwrMsg, gridMsg];\n}\n","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":530,"y":120,"wires":[["5364e6d4aafc542b"],["5364e6d4aafc542b"]]},{"id":"d643f2a283e32b10","type":"function","z":"dae48a4adc25160a","name":"set to 110%","func":"var pwrMsg = {};\nvar gridMsg = {};\n\nif (msg.payload[0] < 11000) {\n node.warn(\"output set to 110%\");\n pwrMsg.payload = { value: 11000, 'fc': 6, 'unitid': 1, 'address': 3051, 'quantity': 1 };\n gridMsg.payload = { value: 53, 'fc': 6, 'unitid': 1, 'address': 3067, 'quantity': 1 };\n return [pwrMsg, gridMsg];\n}\n\n","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":530,"y":220,"wires":[["5364e6d4aafc542b"],["5364e6d4aafc542b"]]},{"id":"c7303b2ce79047a5","type":"modbus-getter","z":"dae48a4adc25160a","name":"","showStatusActivities":false,"showErrors":false,"logIOActivities":false,"unitid":"1","dataType":"HoldingRegister","adr":"3051","quantity":"1","server":"839d6faa3b9316ef","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"keepMsgProperties":true,"x":340,"y":200,"wires":[["d643f2a283e32b10"],[]]},{"id":"5364e6d4aafc542b","type":"modbus-flex-write","z":"dae48a4adc25160a","name":"","showStatusActivities":false,"showErrors":false,"server":"839d6faa3b9316ef","emptyMsgOnFail":false,"keepMsgProperties":false,"x":750,"y":160,"wires":[["6caf2b56548b9338"],[]]},{"id":"90614ad5a674692c","type":"modbus-getter","z":"dae48a4adc25160a","name":"","showStatusActivities":false,"showErrors":false,"logIOActivities":false,"unitid":"1","dataType":"HoldingRegister","adr":"3067","quantity":"1","server":"839d6faa3b9316ef","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"keepMsgProperties":true,"x":340,"y":360,"wires":[["cc6fd2526d5e451a"],[]]},{"id":"cc6fd2526d5e451a","type":"function","z":"dae48a4adc25160a","name":"Sort Grid Standard","func":"if (msg.payload[0] == 52) {\n msg.payload = \"G98\";\n} else if (msg.payload[0] == 53) {\n msg.payload = \"G99\";\n} else {\n msg.payload = \"error\";\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":590,"y":340,"wires":[["d2a4ec41e3cf64a7"]]},{"id":"fbb05aa007462456","type":"modbus-getter","z":"dae48a4adc25160a","name":"","showStatusActivities":false,"showErrors":false,"logIOActivities":false,"unitid":"1","dataType":"HoldingRegister","adr":"3051","quantity":"1","server":"839d6faa3b9316ef","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"keepMsgProperties":true,"x":340,"y":420,"wires":[["6990b2096f6560d0"],[]]},{"id":"6990b2096f6560d0","type":"function","z":"dae48a4adc25160a","name":"Sort Power Level","func":"msg.payload = (msg.payload[0] / 100); \nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":590,"y":420,"wires":[["4ed266f81e8320a8"]]},{"id":"d2a4ec41e3cf64a7","type":"ha-entity","z":"dae48a4adc25160a","name":"solis_grid_standard","server":"d7bd0613.794c78","version":2,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"solis_grid_standard"},{"property":"device_class","value":""},{"property":"icon","value":""},{"property":"unit_of_measurement","value":""},{"property":"state_class","value":""},{"property":"last_reset","value":""}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"payload","outputLocationType":"none","inputOverride":"allow","outputOnStateChange":false,"outputPayload":"","outputPayloadType":"str","x":810,"y":340,"wires":[[]]},{"id":"4ed266f81e8320a8","type":"ha-entity","z":"dae48a4adc25160a","name":"solis_power_limit","server":"d7bd0613.794c78","version":2,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"solis_power_limit"},{"property":"device_class","value":""},{"property":"icon","value":""},{"property":"unit_of_measurement","value":"%"},{"property":"state_class","value":""},{"property":"last_reset","value":""}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"payload","outputLocationType":"none","inputOverride":"allow","outputOnStateChange":false,"outputPayload":"","outputPayloadType":"str","x":810,"y":420,"wires":[[]]},{"id":"6caf2b56548b9338","type":"delay","z":"dae48a4adc25160a","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"5","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"allowrate":false,"outputs":1,"x":960,"y":220,"wires":[["257abe6c0a5907e2"]]},{"id":"9ec2556140e57470","type":"debug","z":"dae48a4adc25160a","name":"debug 1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":220,"y":60,"wires":[]},{"id":"b2bc0cd9d3731f54","type":"debug","z":"dae48a4adc25160a","name":"debug 2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":240,"y":260,"wires":[]},{"id":"d7bd0613.794c78","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30},{"id":"839d6faa3b9316ef","type":"modbus-client","name":"Solis","clienttype":"tcp","bufferCommands":true,"stateLogEnabled":false,"queueLogEnabled":false,"failureLogEnabled":true,"tcpHost":"192.168.1.24","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}]
This is the flow that I use. This checks some variables in HAAS then allows you to switch Grid standard from G98 to G99 and limit the power output of the inverter.
Weirdly these settings are not persistent over nighttime. ie. the next day it has forgotten about them, which also happens if you set them via the panel at the front. I’ve not investigated this at the moment, it was more a proof of principle. However, setting up the modes instance and reading values was fairly straight forward.
If you are having trouble, show me what you are doing and I can try to help.
Have you got HASS working from the TCP/Serial device?
A