Hi, I'm quite new dealing with Node-Red and have a couple of requirements where I don't find anything in the Web. This question is about just executing certain nodes if the data is requested by the UI.
Situation:
- Flow is polling data from an external source (currently every 5 seconds)
- UI is showing received data on different UI tabs
- Sometimes it happens that some polled datapoints don't answer
- Parts of the data need to be available and sent to other external software
- Parts of the data is only needed for certain tabs of the UI
I want to minimize the data traffic and just poll the required data every 5 seconds.
That means I would need a flag for each datapoint on the UI Tab which is telling me that somebody is looking at the data - only in this case I would poll this certain datapoint every 5 seconds.
In addition I would like to have something like a data watchdog for each signal. If there was no answer for a certain datapoint after polling (let's say for 2 Minutes) I want to set either the Value on the UI to 'NA' or change the font color to grey.
I would appreciate if somebody could give me a starting point for both problems.