Graph shows no data unless input changed

I have made a simple dashboard, the problem is if the slider is not changed, the graph is frozen until the slider is being moved.
If I do not change the slider value even for an hour, I got nothing instead of a steady line.Would you please help if you know any idea how to let the graph stamp the time and the slide value every second whether it is changed or not?

Appreciate your support.

One way is to disconnect the slider from the chart and instead save the slider value in a variable.
An inject node can be set to inject the variable value every second.
Edit - sorry I changed the variable name from lastvalue to slidervalue but didn't change the node labels to match.
Untitled 5

Or connect the slider to a Trigger node configured to repeat the last payload.
image

1 Like

Much better!
Why didn't I know the trigger node could do that? :rage:

1 Like

Thank you very much for your answer. I have tried this way but still, I got nothing. Colin's solution worked. Thank you.

Thank you very much. It worked very well, except when you started the dashboard, the graph was not shown until data changed then keep working as I wished perfectly. so if the temperature is not changed for some time, the first run of the dashboard will show an empty graph as the first image I attached.

Initialise the slider and the trigger node with an Inject node set to fire on startup with the initial value you want.

It is a recent addition I think.

I guess the slider has no initial value until you move it. I will try to use real sensor data. However, I have learnt from your way how to use the exchange function. I am very beginner in Node-Red. Thank you

I recommend watching this playlist: Node-RED Essentials. The videos are done by the developers of node-red. They're nice & short and to the point. You will understand a whole lot in about 1 hour. A small investment for a lot of gain.

For about 5 years but not often used.

When you get to my age, five years is recent :slight_smile:

2 Likes

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