mblackstock / node-red-contrib-influxdb

Node-RED nodes to save and query data from an influxdb time series database
Other
64 stars 44 forks source link

"time" - outside range #112

Closed TheNON75 closed 2 years ago

TheNON75 commented 2 years ago

Good morning,

i am kindly asking for some help with using time(stamp). I've tried following the output example and also by changing the time to string, but in both cases I receive the error: "HttpError: unable to parse 'temperature,class=sensors,type=environment Kitchen=19.55 1643966422275': time outside range -9223372036854775806 - 9223372036854775806"

The func node with static data (except time):

msg.measurement = "temperature"
msg.payload = [
    {
        "Kitchen": 19.55,
        "time": (new Date().getTime()-60000).toString() // toString was added to see if the error persists
    },
    {
        "class": "sensors",
        "type": "environment"
    }
]
return msg;

the resulting payload (with simply new Date().getTime()): image thank you

ps.: i will galdly open a pr to the documentation afterwards :)

TheNON75 commented 2 years ago

my bad... darn morning coffee