Problems sending data to Influx

I'm not sure if I should post separately. Sorry if I should. I have now edited the function node and have all the values coming out as they should be.

I have watched the videos and tried to read about it, but still can't work it out. When I send the data to influxdb it doesn't see it. I need to set it so it sees the values as a group of measurements or fields.

It's totally perplexing me.

I wouldn't have got this far without your help. Sorry if I am being a pain in the neck now.

  1. what node are you using (full name like node-red-contrib-????)
  2. have you gone to the Flows tab, entered that node name in and read it's documentation?
  3. what have you tried so far? What errors (if any) are showing up?
  4. have you ever worked with Influx befor? If not have you taken a tutorial? If not, why not?
1 Like

Your data needs to be.

msg.payload.pa
msg.payload.fa
msg.payload.xxxx......

1 Like

1 - node-red-contrib-influxdb
2 - Yes I have. Can't work it out from the info.

3 - No errors just doesn't show the data in Influxdb.
4 - Yes I have had data working in Influx. Went a stupid way around doing it, but it worked and could use it.

Sorry edit my post DATA not date

1 Like

Thank you very much. It works and I can see the data in Influxdb!

It is though sending through the other payloads as well it seems. It would work, but would be great to get rid of them as not needed.

No idea why influxdb is showing the measurement as h, it works so no drama.

Do you have any idea if I did the timestamp correctly by any chance? Influx doesn't seem to be using it.

I suppose I could just put it through a change node and delete them? Not sure if thats the best way.

Or after your last data you want put

delete msg.payload.h........

repeat the delete for every msg.payload.xxx you don't want.

The change node is actually better to use than the function node, say one of your sensors is "undefined" it will just write it to InfluxDB as a blank.

1 Like

Just want to say a massive thank you for all your help. All working and graphing. Couldn't have done it without you!!!

1 Like

You could change the function node and create a new msg object ‘msg1’ and use that as the output of the function node.

let msg1 = {};
msg1.payload.foo = ‘bar’;
.
.
.
return msg1

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.