Artless gauge loses value and graphic after reload window

Hello,

I'm using artless gauge, and I love it, but I have still some troubles.

When I deploy my flow, then everything is fine and it looks like this:
Unbenannt
so current value is incoming and updating, the max value is set once after deploy, or on change, but this is a static number and does not change very often.

But when I refresh the window with F5 key, then it looks like this:
image

As you see, I lose the graphic show of the gauge and my max value is set on its default value.

How can I achieve, that my max value update itself, when the page is being refreshed and why the blue line disapears?

Update:
I found the third state of the gauge. When I go back and open the tab again threw menu, then the graphic updates, but the value keeps on 20 and the line is on the middle, so I guess the max value is 32 but there is no update on the number itself.
image

I have an Idea how to solve it, but dont know how to do it.
Maybe I can storrage the max and current values somewhere and when the page is reloading, I am able to detect it with ui_control, so I need to trigger the storrage value to load into gauge.

If you change the tab, the gauge does not exist any more. It can't remember any state or value or what so ever.
Going back to the tab with gauge - the gauge is created again.
The server side is helpful and sends last known message to the gauge.
So all the gauge can do is to react to that last message.
If you are using the .control messages to change gauge min/max or other possible options and if your last message did not contain the .control part, there will be out of sync situation - the gauge does not reflect the actual conditions.

In case the .control option is used and you have multiple tabs, you should use ui_control node, to detect tab changes and if they happen, (collect and) send up to date values to the gauge.

thanks for explaining why this happens.
I had already added a note to my previous post.
do i need to develop a function for this, or can i do it with the switch nodes?
because i don't really know how to connect the nodes so as not to overwrite my payload with the ui trigger.

If you have created your flows in the way that you don't hold any state (measured values of the equipment) then only way to have current value is to ask that value from that equipment.
If that is not possible, then you should store the value in server side (flow.context, global.context) and in case of needed, read that last stored value from context and send where it is needed (gauge).

oh ok, didnt work with context so far. I will gather some information how to do this, thank you!

hotNIPI thanks for providing these details.. they helped me as well...

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