# Make a payload go to 0 if not updated

**URL:** <https://discourse.nodered.org/t/make-a-payload-go-to-0-if-not-updated/79330>\
**Category:** General\
**Created:** [20 June 2023 21:17 UTC](https://discourse.nodered.org/t/make-a-payload-go-to-0-if-not-updated/79330 "2023-06-20T21:17:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Faust](https://avatars.discourse-cdn.com/v4/letter/f/c89c15/32.png) [@Faust](https://discourse.nodered.org/u/Faust)\
**Post date:** [20 June 2023 21:17 UTC](https://discourse.nodered.org/t/make-a-payload-go-to-0-if-not-updated/79330/1 "2023-06-20T21:17:54Z")

</div>

I have a payload i need to reset to 0, if it is not updated under 5 seconds. Im sure this is something basic im missing but if someone could help, that would be great

---

<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:** [20 June 2023 21:25 UTC](https://discourse.nodered.org/t/make-a-payload-go-to-0-if-not-updated/79330/2 "2023-06-20T21:25:21Z")

</div>

A trigger node will do that.  
e.g

```auto
[{"id":"7b8359d23ec847b5","type":"inject","z":"b9860b4b9de8c8da","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"num","x":130,"y":4860,"wires":[["973070bd5e95bb88","59abab797a3df654"]]},{"id":"973070bd5e95bb88","type":"trigger","z":"b9860b4b9de8c8da","name":"","op1":"","op2":"0","op1type":"nul","op2type":"num","duration":"5000","extend":true,"overrideDelay":false,"units":"ms","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":300,"y":4900,"wires":[["59abab797a3df654"]]},{"id":"59abab797a3df654","type":"debug","z":"b9860b4b9de8c8da","name":"debug 316","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":530,"y":4840,"wires":[]}]

```

Or

```auto
[{"id":"7b8359d23ec847b5","type":"inject","z":"b9860b4b9de8c8da","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"num","x":130,"y":4860,"wires":[["973070bd5e95bb88"]]},{"id":"973070bd5e95bb88","type":"trigger","z":"b9860b4b9de8c8da","name":"","op1":"","op2":"0","op1type":"pay","op2type":"num","duration":"5000","extend":true,"overrideDelay":false,"units":"ms","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":300,"y":4900,"wires":[["59abab797a3df654"]]},{"id":"59abab797a3df654","type":"debug","z":"b9860b4b9de8c8da","name":"debug 316","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":530,"y":4840,"wires":[]}]

```

---

<div class="post-metadata">

**Author:** ![Faust](https://avatars.discourse-cdn.com/v4/letter/f/c89c15/32.png) [@Faust](https://discourse.nodered.org/u/Faust)\
**Post date:** [20 June 2023 21:29 UTC](https://discourse.nodered.org/t/make-a-payload-go-to-0-if-not-updated/79330/3 "2023-06-20T21:29:54Z")

</div>

thanks again, and im watching the videos...

---

<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:** [19 August 2023 21:30 UTC](https://discourse.nodered.org/t/make-a-payload-go-to-0-if-not-updated/79330/4 "2023-08-19T21:30:03Z")

</div>

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