2 nodes I did to test my construction of a payload for InfluxDB - bit rough but for for an 'out' or 'batch' InfluxDB node and construct the times differently. Note Influx expects a time as microseconds.nanoseconds.
If you are using the influx batch node then that is what it expects. The timestamp in nanosecond, probably. However it is not entirely clear to me what the Time Precision setting in the advanced settings in the node does.
Are you confident that is what it means, I know it would appear to mean that the timestamp should be provided in that format, but have you actually tried it and confirmed it works? When I looked into this subject a little while back it appeared to be more complex than one might think.
If you are correct then in the case here it would be simpler to leave the timestamp in milliseconds (so don't multiply by 10^6) and set it to ms in the node.
Reasonably confident although not tested. As the link to the InfluxDB docs shows an example of setting the precision in a CURL command, I see no reason why it would be different for the Node-RED node. They are all vaid InfluxDB time precisions.
Thank you to all ... I dont know how to explain my situation. I am student at university and I received task in one subject.
The task consists of 2 parts:
It is DONE and works fine.
I am sendit this JSON objects via JSON.stringify(senzor_values)
2.) the second part of my task is to receive the JSON objects in NODE-RED, than write from JSON values into Influx DB and the last make report from this data in grafana,
It is my task from university.
Now I am new in Node-RED
a) I added MQTT in node in the flow - I am receiving data - It IS OK
b) I added JSON node and set action to always convert JSON data to JSON object
c) then I send the output into debug and into influx DB and this is NOT OK - why?
Because when is see the measurement in INflux DB I see that DateTime values from JSON which I received
on INflux DB was added data as a string not as a DateTime
SHOW FIELD KEYS
It is the reason why I need to change or convert received DateTime string from JSON into DateTime format because I am importin directly this datas/values into INfluxDB.