I reply to myself, I succeeded to make it work.
The \n was missing in the payload before sending it back to the gateway.
This took me months to see this...
Works like a charm now, I just need to implement the inclusion feature in NodeRED.
Seems that the problem was that influxdb always configures the field type the first time a series is accessed.
I thought that the value was something like a "variant" and would eat anything I throw at it. So when I altered the data types in the flow, the db refused to save.
A drop and re create solved the problem.
This seems to evaluate to true/undefined every time, effectively resetting the array:
var global_individual_data=global.get("global_invidual_data");
if (global_individual_data===undefined) {
msg.kein_array_vorhanden="true"
global_individual_data=[];
}
even though it's later set with
global.set("global_individual_data",global_individual_data);