Clients get out of sync from centralised datastore
Current Behavior
If you have two separate Dashboard clients open and connected to a centralised Node-RED instance with Dashboard 2.0, the server has a single source of truth.
If one client updates that data, e.g. through a toggle switch, the centralised store of data is updated. However, other clients are not aware of this change until they refresh, which is not the desired behaviour. Any clients connected should update if a client has been the driver of change (i.e. user clicks a toggle).
This already works for all instance where a node is injected with a new value.
Expected Behavior
All clients should reflect the server-side datastore at all times, unless using multi-user authentication/Dashboards architecture
Steps To Reproduce
- Add a toggle switch
- Open two browsers connecting to the Dashboard
- Toggle the switch on one of the clients
- Note that the other client doesn't automically update
Environment
- Dashboard version: 1.4.0
Have you provided an initial effort estimate for this issue?
I have provided an initial effort estimate
This will require a little re-think of our underlying architecture, as this should just be working out of the box, but the events flow doesn't allow for it currently.
Forum Discussion: https://discourse.nodered.org/t/how-to-retain-the-state-of-a-button-on-and-off-between-page-updates-and-different-browsers/86404/8?u=joepavitt
Also https://discourse.nodered.org/t/dashboard-2-changes-in-one-viewer-not-reflected-in-another/85949/5
Hi, is there any progress on this issue?
Kind Regards
Sorry @uschmelmer - no updates on this currently