Closed cmmh closed 5 years ago
The LEDs losing state between pages sounds like something that should be fixed, can you elaborate what your steps are? I haven't seen them lose state during a deploy, can you clarify those steps as well? Can you point me towards a UI element that functions as you would expect?
Potential bugs aside it seems like something folks would want state retained between runs, the option to store state in global context if one would like sounds like a great idea! You can likely achieve this already in an arguably more robust way using one of the restoring state machine flows and keeping the LED dumb but there is likely value in the option to not have to go through that work. I'm going to break it into a separate issue so we can think about it further!
Store state: #14
Let me know if you can reproduce the state being lost besides between deploys and restarts (that is as expected).
I'm marking this closed, if you feel this is still an issue besides what's represented in #14 please say so.
My use case has messages updating the LED status very infrequently -- like once an hour or so. When I update my flows and re-deploy, I lose the state information on the LEDs -- but other UI elements like graphs don't forget their states.
Also, when I switch to a different page and then back to the one with the LED UI elements, they have lost their state.
Perhaps this is a case where the global context needs to be used to save states?
It would be good to maintain state in both cases. I understand that restarting Node-Red would be a loss of state.