Node red issue

Hello friends,

I have te follow question.

I’m running node red and a Influxdb on my server.
In node red I have a MQTT noce connected to my TTI node.
With a function node I put the data to my Influx database.
But now I want to connect another TTI node to my database.

This is how my code looks in my functionnode:

let eui = msg.payload.end_device_ids.device_id;
let temperature_11 = msg.payload.uplink_message.decoded_payload.temperature_11;
let analog_in_1 = msg.payload.uplink_message.decoded_payload.analog_in_1;
let analog_in_2 = msg.payload.uplink_message.decoded_payload.analog_in_2;
let barometric_pressure_12 = msg.payload.uplink_message.decoded_payload.barometric_pressure_12;
let relative_humidity_10 = msg.payload.uplink_message.decoded_payload.relative_humidity_10;

msg = {}

msg.payload = {
eui: eui,
temperature_11: temperature_11,
analog_in_1: analog_in_1,
analog_in_2: analog_in_2,
barometric_pressure_12: barometric_pressure_12,
relative_humidity_10: relative_humidity_10

}

return msg

How can I send the data from every eui seperated from the other eui?
Now when I go to Grafana and I want to make a dashboard I got al lot of datafields.
I want (if eui is XXXXXXXXXXXX the I must have XXXXXXXXX data.
I hope someone knows what I mean.

Regards
Reinier

If i understand your problem right - than you can put the data from each node in a separate database - and so you have all the node data separated. One influx installation can hold a lot of different databases.

Is this new node the same as the first one?

If it is you can use the same application in TTN, the new node will use the same MQTT connection and ‘let eui = msg.payload.end_device_ids.device_id;’ will distinguish the two noses from each other in the DB table.

If not you will require a new application in TTN, new MQTT connection and new function node. Then you wright the data to a new table in the DB and recall it from there into Grafana.