# Injector node with value and timestamp

**URL:** <https://discourse.nodered.org/t/injector-node-with-value-and-timestamp/79985>\
**Category:** General\
**Tags:** node-red-dashboard\
**Created:** [21 July 2023 06:28 UTC](https://discourse.nodered.org/t/injector-node-with-value-and-timestamp/79985 "2023-07-21T06:28:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ohlala68](https://avatars.discourse-cdn.com/v4/letter/o/f08c70/32.png) [@Ohlala68](https://discourse.nodered.org/u/Ohlala68)\
**Post date:** [21 July 2023 06:28 UTC](https://discourse.nodered.org/t/injector-node-with-value-and-timestamp/79985/1 "2023-07-21T06:28:26Z")

</div>

Hello.  
I´m struggeling with a what I think is a very simple problem.  
I want to mimik live devices to test in flows, but I can´t get it right.  
I want a injector node that sends a value and a timestamp, like the live devices do.  
I´ve tried to set "msg.payload.value" to a number, then add a second row with "msg.payload" and choosed "timestamp" (or just "msg.value) on the first row.  
I´ve also tried some change-nodes and function-nodes to make an object with value and timestamp as well, but no luck.  
I probably gonna be somewhat embarrassed when I see how simple it was to do it : -)  
Clarifying: I want the injector node produce something like this:

2023-07-21 08:01:50[node: debug 23]  
80/obj/lora/24e124535c524720/button : msg.payload : Object  
{ value: 1, timestamp: 1689919311 }

Thanks

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [21 July 2023 06:49 UTC](https://discourse.nodered.org/t/injector-node-with-value-and-timestamp/79985/2 "2023-07-21T06:49:12Z")

</div>

Try

 ![chrome_screenshot_1689922048452](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/c/3c8afbfa2266339649b556b360388aeb68ed6c69.png)

---

<div class="post-metadata">

**Author:** ![Ohlala68](https://avatars.discourse-cdn.com/v4/letter/o/f08c70/32.png) [@Ohlala68](https://discourse.nodered.org/u/Ohlala68)\
**Post date:** [21 July 2023 06:55 UTC](https://discourse.nodered.org/t/injector-node-with-value-and-timestamp/79985/3 "2023-07-21T06:55:02Z")

</div>

Thanks 🙂  
I think I tried every thinkable combinations, but not "payload.timestamp"...hrmpfh  
Thanks again!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [4 August 2023 06:55 UTC](https://discourse.nodered.org/t/injector-node-with-value-and-timestamp/79985/4 "2023-08-04T06:55:08Z")

</div>

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