# Stupid beginner question about repeated flows/ intervals

**URL:** <https://discourse.nodered.org/t/stupid-beginner-question-about-repeated-flows-intervals/47869>\
**Category:** General\
**Created:** [1 July 2021 00:13 UTC](https://discourse.nodered.org/t/stupid-beginner-question-about-repeated-flows-intervals/47869 "2021-07-01T00:13:59Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![kavemang](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kavemang/32/44148_2.png) [@kavemang](https://discourse.nodered.org/u/kavemang)\
**Post date:** [1 July 2021 00:14 UTC](https://discourse.nodered.org/t/stupid-beginner-question-about-repeated-flows-intervals/47869/1 "2021-07-01T00:14:00Z")

</div>

Hi folks, I have a mildy goofy setup where I find myself passing certain sensor values from Smartthings to home assistant.

I have my flow setup 1:1

ST sensor -\> HA entity  
ST sensor -\> HA entity  
ST sensor -\> HA entity  
ST sensor -\> HA entity  
ect

its working fine in the sense that I get my values whenever I restart / save my flow, I can't for the life of me find a straightforward way for this flow to repeat itself (all the connected sensors) so that I can get a 1/s or 10/s interval of updated sensor values.

I've tried the following:

> **[node-red-contrib-cron-plus](https://flows.nodered.org/node/node-red-contrib-cron-plus)**
>
> A flexible scheduler (cron, solar events, simple dates) node for Node-RED with full dynamic control and Timezone support

> **[node-red-contrib-configurable-interval](https://flows.nodered.org/node/node-red-contrib-configurable-interval)**
>
> A simple node-red node that sends a message at regular intervals

/node/node-red-contrib-repeat

I have a hunch that all three of these can technically accomplish what I want but I can't figure out how to actually make them do it.

There doesn't seem to be any way I can just select a flow and have the entire flow / set of connected sensors-\> entities to repeatedly update every second or two. The closest I get is payload/msg errors, surely there's a simple way to do this?

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [1 July 2021 00:43 UTC](https://discourse.nodered.org/t/stupid-beginner-question-about-repeated-flows-intervals/47869/2 "2021-07-01T00:43:52Z")

</div>

The standard inject node can be set to repeat at intervals

---

<div class="post-metadata">

**Author:** ![kavemang](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kavemang/32/44148_2.png) [@kavemang](https://discourse.nodered.org/u/kavemang)\
**Post date:** [1 July 2021 03:23 UTC](https://discourse.nodered.org/t/stupid-beginner-question-about-repeated-flows-intervals/47869/3 "2021-07-01T03:23:17Z")

</div>

Do I attach it at the beginning of the flow or in-between the Smartthings sensor and the Home Assistant entity?

how do I make it activate the flow?

Do i need run for each pairing or can I attach it to the start of all of them?

I tried it earlier and couldn't make it work

PS:  
I've tried hitting the smartthings sensor with msg.topic=update as per the following from the smartthings integration help:

> " All device nodes can receive at its input a message with the `msg.topic` of **update** to force the output of the current device state. This is useful when handling a request, for example."

but no luck so far

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [1 July 2021 05:31 UTC](https://discourse.nodered.org/t/stupid-beginner-question-about-repeated-flows-intervals/47869/4 "2021-07-01T05:31:15Z")

</div>

It's difficult to give an answer without seeing your flow.  
Can you post the exported flow here, or at least a screen grab of the editor?

---

<div class="post-metadata">

**Author:** ![kavemang](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kavemang/32/44148_2.png) [@kavemang](https://discourse.nodered.org/u/kavemang)\
**Post date:** [1 July 2021 05:48 UTC](https://discourse.nodered.org/t/stupid-beginner-question-about-repeated-flows-intervals/47869/5 "2021-07-01T05:48:57Z")

</div>

![Capture](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/3/332958c96eece1fb5e747c36fb3b20b3a7f4f08d.png)

thanks for the help

---

<div class="post-metadata">

**Author:** ![kavemang](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kavemang/32/44148_2.png) [@kavemang](https://discourse.nodered.org/u/kavemang)\
**Post date:** [2 July 2021 02:14 UTC](https://discourse.nodered.org/t/stupid-beginner-question-about-repeated-flows-intervals/47869/6 "2021-07-02T02:14:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [2 July 2021 05:17 UTC](https://discourse.nodered.org/t/stupid-beginner-question-about-repeated-flows-intervals/47869/7 "2021-07-02T05:17:55Z")

</div>

Put a single inject node and have it repeat every 10 seconds (or whatever you want) - link it to the input of each of the smartthings nodes

I do not know what input they are expecting - but if they can be forced to poll - rather than just being passive and waiting for data to be delivered to them - then there should be a message you can inject using the inject node

Craig

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [2 July 2021 09:01 UTC](https://discourse.nodered.org/t/stupid-beginner-question-about-repeated-flows-intervals/47869/8 "2021-07-02T09:01:27Z")

</div>

> [@kavemang](#):
>
> PS:  
> I've tried hitting the smartthings sensor with msg.topic=update as per the following from the smartthings integration help:
> 
> > " All device nodes can receive at its input a message with the `msg.topic` of **update** to force the output of the current device state. This is useful when handling a request, for example."
> 
> but no luck so far

Are you sure "update" doesn't trigger a response from smartthings - have you put a debug node on the smartthings output?

---

<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:** [2 July 2021 11:42 UTC](https://discourse.nodered.org/t/stupid-beginner-question-about-repeated-flows-intervals/47869/9 "2021-07-02T11:42:15Z")

</div>

Ok, and as much as I use foreign nodes myself.....

The `configurable-interval` node.....

The `delay` node can do that too.

You just send a `msg.delay` in the inbound payload and it changed to that time.  
Yes, it is milliseconds, but as long are you `*1000` the number of seconds, it isn't really a problem.

---

<div class="post-metadata">

**Author:** ![kavemang](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kavemang/32/44148_2.png) [@kavemang](https://discourse.nodered.org/u/kavemang)\
**Post date:** [2 July 2021 22:27 UTC](https://discourse.nodered.org/t/stupid-beginner-question-about-repeated-flows-intervals/47869/10 "2021-07-02T22:27:54Z")

</div>

the closest I can get it is having it repeat the same value / output from when i restart the flow, but the ST sensor does not report the correct new value until I modify and start the flow or restart it

---

<div class="post-metadata">

**Author:** ![kavemang](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kavemang/32/44148_2.png) [@kavemang](https://discourse.nodered.org/u/kavemang)\
**Post date:** [2 July 2021 22:29 UTC](https://discourse.nodered.org/t/stupid-beginner-question-about-repeated-flows-intervals/47869/11 "2021-07-02T22:29:26Z")

</div>

when I hit it with msg.topic = update it repeats its output but does not give the new actual wattage of the sensor

---

<div class="post-metadata">

**Author:** ![kavemang](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kavemang/32/44148_2.png) [@kavemang](https://discourse.nodered.org/u/kavemang)\
**Post date:** [3 July 2021 15:52 UTC](https://discourse.nodered.org/t/stupid-beginner-question-about-repeated-flows-intervals/47869/12 "2021-07-03T15:52:39Z")

</div>

**attempting to find info in the following threads but no luck so far**

> <https://github.com/otaviojr/node-red-contrib-smartthings/issues/1>
>
> Greetings,
> 
> First off, I really really appreciate your Smartthings contributio…n. It means a lot to me, and is a life saver in tying together my z-wave, mqtt, modbus project together. Much respect. My issue involves status updates. Whenever I deploy, the output status / values for smartthings shows in debug... 
> 
> "device : msg.payload : Object
> object
> deviceId: "546fbc2b-fe82-412d-8f04-9133909ebdd2"
> deviceType: "contact"
> name: "KITCHEN DOOR"
> value: 0"
> 
> however, when I change the device state, the node-red status does not change, unless I re-deploy.
> 
> I read your help statement:
> "Besides, if you need it to output the status, like when responding a http request, you can use the topic with the update value to force it to report."
> 
> I can't get the update to work for the life of me. I've tried everything and the kitchen sink.
> 
> Can you please clarify. With "Inject", I type "update" in the topic field, and leave the payload type "string" and the field blank. Is this correct? 
> 
> When I trigger the input I get... 
> 
> "update : msg.payload : string\[0\]"
> 
> in debug, on the output of the smartthings node.
> 
> I tried the update in topic for contact, motion... with the same result.
> 
> Can you please help... what am I missing.
> 
> Thanks a lot.

> <https://github.com/otaviojr/node-red-contrib-smartthings/pull/52>
>
> As discussed in #1 and in #47 it is sometimes useful to force the refresh of the… status from SmartThings instead of just output the current cached status.
> 
> This PR adds this functionality while maintaining fully backwards compatibility by adding a new topic for this task.

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [4 July 2021 22:38 UTC](https://discourse.nodered.org/t/stupid-beginner-question-about-repeated-flows-intervals/47869/13 "2021-07-04T22:38:55Z")

</div>

Yeah well it sounds like a few other people have the same issue with that node - so i think you are going to have to wait to hear from the author

Craig

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [4 July 2021 22:41 UTC](https://discourse.nodered.org/t/stupid-beginner-question-about-repeated-flows-intervals/47869/14 "2021-07-04T22:41:52Z")

</div>

Have you read right through this thread and all the troubleshootig steps on the Smartthings webhook side of things ?

> <https://github.com/otaviojr/node-red-contrib-smartthings/issues/1>
>
> Greetings,
> 
> First off, I really really appreciate your Smartthings contributio…n. It means a lot to me, and is a life saver in tying together my z-wave, mqtt, modbus project together. Much respect. My issue involves status updates. Whenever I deploy, the output status / values for smartthings shows in debug... 
> 
> "device : msg.payload : Object
> object
> deviceId: "546fbc2b-fe82-412d-8f04-9133909ebdd2"
> deviceType: "contact"
> name: "KITCHEN DOOR"
> value: 0"
> 
> however, when I change the device state, the node-red status does not change, unless I re-deploy.
> 
> I read your help statement:
> "Besides, if you need it to output the status, like when responding a http request, you can use the topic with the update value to force it to report."
> 
> I can't get the update to work for the life of me. I've tried everything and the kitchen sink.
> 
> Can you please clarify. With "Inject", I type "update" in the topic field, and leave the payload type "string" and the field blank. Is this correct? 
> 
> When I trigger the input I get... 
> 
> "update : msg.payload : string\[0\]"
> 
> in debug, on the output of the smartthings node.
> 
> I tried the update in topic for contact, motion... with the same result.
> 
> Can you please help... what am I missing.
> 
> Thanks a lot.

Craig

---

<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:** [18 July 2021 22:42 UTC](https://discourse.nodered.org/t/stupid-beginner-question-about-repeated-flows-intervals/47869/15 "2021-07-18T22:42:39Z")

</div>

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