RE: timestamp in milliseconds


I was wondering if it is possible to inject timestamp values that are sub-second, e.g. in milliseconds. It seems like the inject node can only repeat every 1s.


I have done this before by using a decimal value, for example 0.1 would be 100 ms. HOWEVER, this can overload the Node-Red engine. I wouldn’t recommend doing much of this, even though it’s possible. Use at your own risk :wink:

1 Like

Thanks, I’ve tried setting it to 0.1 == 100ms, but it seems to halt data ingestion on my receiving end. It makes me wonder if it is due to the OSI PI WEB API Node that I am using.

Interesting. How fast do you need the data?

Hey Dan,

Ideally, I would like to ingest at the speed of the sensors itself. Looking at the spec. sheet the OPTO22 RIO has a data refresh rate of 450ms, which seems to be a hard limit.

With that new information, I think a new approach might work better for you…

MQTT with Sparkplug. Its built in to the RIO and is perfect for publishing its I/O data.
OSI Pi now has an MQTT Sparkplug connector;

This will totally bypass the scan rate limitations of Node-RED. In fact, it would really stream line the configuration and maintenance of moving the data from RIO to OSI Pi.
MQTT will be much faster than any RESTful interface.

1 Like