# In node with timestamp

**URL:** https://discourse.nodered.org/t/in-node-with-timestamp/66123
**Category:** General
**Tags:** function-node
**Created:** [6 August 2022 21:37 UTC](https://discourse.nodered.org/t/in-node-with-timestamp/66123 "2022-08-06T21:37:58Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![melrose](https://avatars.discourse-cdn.com/v4/letter/m/d26b3c/32.png) [@melrose](https://discourse.nodered.org/u/melrose)
#### Post date: [6 August 2022 21:37 UTC](https://discourse.nodered.org/t/in-node-with-timestamp/66123/1 "2022-08-06T21:37:58Z")

</div>

Hello,  
the input node shows me the last value.  
For debugging purposes, I need to know the timestamp, so that I can correlate sequence of incoming data. I need this info for every input node, to be able to debug issues as they pop up.  
How do I configure this globally ?

thanks you!

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [7 August 2022 05:37 UTC](https://discourse.nodered.org/t/in-node-with-timestamp/66123/2 "2022-08-07T05:37:03Z")

</div>

I am not understanding the question..... Sorry.

If you are wanting to turn a `timestamp` into local time, there are nodes to do that.

you just put the `timestamp` into the node and then a `debug` node on the output and you will see the local time.

`node-red-contrib-moment` for instance.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [7 August 2022 06:21 UTC](https://discourse.nodered.org/t/in-node-with-timestamp/66123/3 "2022-08-07T06:21:12Z")

</div>

> [@melrose](#):
>
> the input node shows me the last value

What do you mean by input node? There are many sorts of input node. MQTT In, GPIO In, dashboard inputs, and so on.

---

<div class="post-metadata">

### Author: ![melrose](https://avatars.discourse-cdn.com/v4/letter/m/d26b3c/32.png) [@melrose](https://discourse.nodered.org/u/melrose)
#### Post date: [7 August 2022 09:08 UTC](https://discourse.nodered.org/t/in-node-with-timestamp/66123/4 "2022-08-07T09:08:19Z")

</div>

Here an example. What I want is the timestamp displayd in the region of the input value. I want to avoid adding extra blocks go give me this information

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/b/1b43ace039b2b0c43cbb895a8e7c973bdd385c32.png)

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [7 August 2022 09:32 UTC](https://discourse.nodered.org/t/in-node-with-timestamp/66123/5 "2022-08-07T09:32:57Z")

</div>

I don't recognise the node, is it a home assistant node?

---

<div class="post-metadata">

### Author: ![melrose](https://avatars.discourse-cdn.com/v4/letter/m/d26b3c/32.png) [@melrose](https://discourse.nodered.org/u/melrose)
#### Post date: [7 August 2022 09:35 UTC](https://discourse.nodered.org/t/in-node-with-timestamp/66123/6 "2022-08-07T09:35:31Z")

</div>

this is from the iobroker

---

<div class="post-metadata">

### Author: ![knoepsche](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knoepsche/32/69450_2.png) [@knoepsche](https://discourse.nodered.org/u/knoepsche)
#### Post date: [7 August 2022 11:03 UTC](https://discourse.nodered.org/t/in-node-with-timestamp/66123/7 "2022-08-07T11:03:26Z")

</div>

You could put a function node after your input-nodes. There the unix timestamp should be something like

const timestamp = new Date().valueOf();

But it's always some time between processing different nodes, which depends on your flow.

---

<div class="post-metadata">

### Author: ![melrose](https://avatars.discourse-cdn.com/v4/letter/m/d26b3c/32.png) [@melrose](https://discourse.nodered.org/u/melrose)
#### Post date: [7 August 2022 11:50 UTC](https://discourse.nodered.org/t/in-node-with-timestamp/66123/8 "2022-08-07T11:50:20Z")

</div>

yes sure, but this would mean rework with a high number of normally useless new nodes.  
It would be clean if input node would display it.

---

<div class="post-metadata">

### Author: ![paulkeates](https://avatars.discourse-cdn.com/v4/letter/p/9de053/32.png) [@paulkeates](https://discourse.nodered.org/u/paulkeates)
#### Post date: [7 August 2022 12:28 UTC](https://discourse.nodered.org/t/in-node-with-timestamp/66123/9 "2022-08-07T12:28:10Z")

</div>

Hi,

Why not put a Debug node right after it and wired to the output port?

Configure it to only display the actual variable you need.  
Set the "Output" variable to the the exact variable name + path you want to monitor.  
Turn off 'debug window' option and turn on "node status (32 characters)" option.

This is built-in functionality - no new nodes needed.

Cheers,

Paul

---

<div class="post-metadata">

### Author: ![melrose](https://avatars.discourse-cdn.com/v4/letter/m/d26b3c/32.png) [@melrose](https://discourse.nodered.org/u/melrose)
#### Post date: [7 August 2022 13:26 UTC](https://discourse.nodered.org/t/in-node-with-timestamp/66123/10 "2022-08-07T13:26:42Z")

</div>

please no, the question was how to add this info to a input node.  
I have it like that and want to get rid of

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [7 August 2022 13:39 UTC](https://discourse.nodered.org/t/in-node-with-timestamp/66123/11 "2022-08-07T13:39:45Z")

</div>

It will all depend on what ‘input’ node you are using and if the ability does not currently exist it would have to be added.

The best way to get that to happen would be for you to do a PRfor each node you are interested in having that option.

---

<div class="post-metadata">

### Author: ![DamianosS](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/damianoss/32/16990_2.png) [@DamianosS](https://discourse.nodered.org/u/DamianosS)
#### Post date: [7 August 2022 13:42 UTC](https://discourse.nodered.org/t/in-node-with-timestamp/66123/12 "2022-08-07T13:42:17Z")

</div>

Maybe, I'm not getting the question. Anyway, you could add a `simpletime` node after the `Lichtwert` node. So, the output would be enhanced by rich time information.  
You can find it here: [Simpletime node](https://flows.nodered.org/node/node-red-contrib-simpletime)

---

<div class="post-metadata">

### Author: ![melrose](https://avatars.discourse-cdn.com/v4/letter/m/d26b3c/32.png) [@melrose](https://discourse.nodered.org/u/melrose)
#### Post date: [7 August 2022 13:49 UTC](https://discourse.nodered.org/t/in-node-with-timestamp/66123/13 "2022-08-07T13:49:58Z")

</div>

that means there is not general override to do it for input nodes; ok i'll check out the implementation of the specific node and check it there

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [7 August 2022 15:25 UTC](https://discourse.nodered.org/t/in-node-with-timestamp/66123/14 "2022-08-07T15:25:43Z")

</div>

You could contact the node author.  
Why do you need this? The node status should only be used for debugging while getting flows to work. The editor is not intended to be an operator interface.

---

<div class="post-metadata">

### Author: ![drmibell](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/drmibell/32/8424_2.png) [@drmibell](https://discourse.nodered.org/u/drmibell)
#### Post date: [7 August 2022 16:00 UTC](https://discourse.nodered.org/t/in-node-with-timestamp/66123/15 "2022-08-07T16:00:47Z")

</div>

> [@Colin](#):
>
> node status should only be used for debugging

Mild disagreement here. Changes in node status can be caught by the `status` node and used to trigger a flow. This can be handy at times.

---

<div class="post-metadata">

### Author: ![melrose](https://avatars.discourse-cdn.com/v4/letter/m/d26b3c/32.png) [@melrose](https://discourse.nodered.org/u/melrose)
#### Post date: [7 August 2022 16:13 UTC](https://discourse.nodered.org/t/in-node-with-timestamp/66123/16 "2022-08-07T16:13:41Z")

</div>

the input nows already shows its last input value. you could also question this.  
Expanding it with a timestamp is not wasting much space, and gives a good overview

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [7 August 2022 17:37 UTC](https://discourse.nodered.org/t/in-node-with-timestamp/66123/17 "2022-08-07T17:37:21Z")

</div>

Hi @melrose

I'm not entirely clear if you are asking about just the iobroker input node, or for this to be an option on all nodes.

I don't believe the maintainer of the iobroker nodes is on this forum, so you'd have to raise an issue against its repository to see if they are interested in the idea.

More globally, there is no way to override all nodes to do this. The node status is an external API of each individual node - it isn't for the runtime to change their behaviour.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [7 August 2022 18:26 UTC](https://discourse.nodered.org/t/in-node-with-timestamp/66123/18 "2022-08-07T18:26:24Z")

</div>

> [@drmibell](#):
>
> Mild disagreement here.

I should have rephrased that differently. The status _display_ is principally for debugging. Certainly Status can be useful in a flow as in some nodes it is effectively another output. In the case shown here, however, the status value is also available in the node output so the display is just for the developer following what is going on.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [7 August 2022 18:28 UTC](https://discourse.nodered.org/t/in-node-with-timestamp/66123/19 "2022-08-07T18:28:59Z")

</div>

> [@melrose](#):
>
> the input nows already shows its last input value. you could also question this.

No, seeing the current value may well be useful when developing a flow.

Have you considered that if a lot of nodes did this then it could measurably affect the performance of the system if the sample rate were high, as it would be a lot of time manipulation. Therefore it would have to be configurable on a node by node basis.

Why do you need this on lots of nodes at the same time?

---

<div class="post-metadata">

### Author: ![melrose](https://avatars.discourse-cdn.com/v4/letter/m/d26b3c/32.png) [@melrose](https://discourse.nodered.org/u/melrose)
#### Post date: [7 August 2022 18:41 UTC](https://discourse.nodered.org/t/in-node-with-timestamp/66123/20 "2022-08-07T18:41:04Z")

</div>

I have a system with many inputs that work on a number of similar library nodes. The logic in it is a bit more complex. Inputs are event based on a slow rate.  
When I see that the error happened I want that snapshot with the timestamps. My assumption is, the issue is related to data inflow sequence.

[Next page](https://discourse.nodered.org/t/in-node-with-timestamp/66123.md?page=2)
