Stupid beginner question about repeated flows/ intervals

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/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?

The standard inject node can be set to repeat at intervals

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

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?

Capture

thanks for the help

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

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

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.

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

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

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

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

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

Craig

1 Like

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