I have an MPPT Solar controller that sends me on serial port, every second, this three separated messages:
CS: 5
VPV: 12
HDS: 11
Node red treats them as separated messages, because they force me to split them by "\n" How could I join them and get an object like {"CS": 5, "VPV": 12, "HDS": 11} ?
If you want to join them back up again then I suggest not splitting in the serial node. Can you use a timeout of, maybe 500ms to give you the messages? If so then in a function node you can use the split("\n") to give you an array of three elements, then split each one of those using : and then you can build the object from those.
If you want to go down that route but the javascript is too complex then get the serial node going first to give you the complete message. Then feed that to a debug node and you can use the little Copy button that pops up when you hover over it to capture one of the strings exactly. Paste that here and it can be used in an Inject node to simulate your data and can be used to test the code.