Foxess Inverter Modbus

I have currently solved this with Elfin-EW11 within Node-RED…
I understand that this is probably not the most rational way, but it works…

Function node, for example, for generate power: return { payload: msg.payload.readInt16BE(11)/1000 }; // 11 is the buffer byte number offset

TCP in node:
image

Switch node for filtering messages:
image

Entity node: