Execution time changing inject delay

Hello.
I have an inject delay of 5 minutes executing a flow that checks a device temperature and when reach the allowed high, it switchs ona fan.
Same inject stops the fan when the temperature is bellow that high, so the temperature drops but not too much.
I have thought to separate the flows, one to switch the fan on and another to switch it off, but I wonder if it is possible to change the inject node delay in execution time and simplify the flows.
Is it possible?
Thank you.

  • How are you reading the temperature of the device?
  • can the sensor itself send back the temperature?
  • What temp do you turn on the fan and what temp do you turn it off?
  • can you provide your current flow?
  • what version of NR and node.js are you running? (see the startup log for this)

Well, the topic asks for changing in executuion time the inject node timer use case.

Not related on how to get the temperature. But if you are interested in, I can explain.
The connection is a SSH connection that asks the sensor about the temperature, receiving it in a string and regex it to get the number
This number (current temperature) is switched and if greater than, switch the fan on and otherwise switch the fan off

I'm not sure what you mean by that, however your flow is concise and does what you want. If you want to dynamically change the time between sending requests for data, take a look at node-red-contrib-configurable-interval.

You could create a dashboard using ui-number to enter the interval that you want, feed that thru the interval node to set the amount of time between its injects.

At least I think that is what you want to do... :grin:

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