Adorkable / node-red-contrib-ui-led

A simple LED status indicator for the Node-RED Dashboard
MIT License
16 stars 12 forks source link

Retention of state during re-deployment and page switches #13

Closed cmmh closed 5 years ago

cmmh commented 5 years ago

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.

yoiang commented 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!

yoiang commented 5 years ago

Store state: #14

yoiang commented 5 years ago

Let me know if you can reproduce the state being lost besides between deploys and restarts (that is as expected).

yoiang commented 5 years ago

I'm marking this closed, if you feel this is still an issue besides what's represented in #14 please say so.