# Dashboard 2: ui-control node multiple connect/change/lost events

**URL:** <https://discourse.nodered.org/t/dashboard-2-ui-control-node-multiple-connect-change-lost-events/98167>\
**Category:** Dashboard\
**Tags:** dashboard-2\
**Created:** [16 July 2025 12:44 UTC](https://discourse.nodered.org/t/dashboard-2-ui-control-node-multiple-connect-change-lost-events/98167 "2025-07-16T12:44:22Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![rakgupta](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rakgupta/32/42535_2.png) [@rakgupta](https://discourse.nodered.org/u/rakgupta)\
**Post date:** [16 July 2025 12:44 UTC](https://discourse.nodered.org/t/dashboard-2-ui-control-node-multiple-connect-change-lost-events/98167/1 "2025-07-16T12:44:22Z")

</div>

Hello:

Converting from DB1 to DB2... I have a ui-control node that is set to "Connection Events Only" (name = Connect) and another one "Page/tab Change Events Only" (name = Refresh Tab). What appears to happen is that every "connect" event is followed by a "change" event. Then the connection drops (ui-control node emits a "lost" payload) immediately followed by another "connect" and "change", essentially triggering the flow twice. See debug output below:

 ![Screenshot 2025-07-16 at 7.31.48 AM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/0/b064da8320cc80a19bbd2325df9d41e9a5e68b02.png)

Is this expected behavior (connect followed by change)? Also, what would cause the "lost" connection and how do I troubleshoot this? Thanks for your help

```flows
[{"id":"f13e35c22de01c0f","type":"inject","z":"3c0c33a32557141e","name":"Manual Startup","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":222.33334350585938,"y":191.00000953674316,"wires":[["c4fe837b4b2c93bf"]]},{"id":"c4fe837b4b2c93bf","type":"ui-control","z":"3c0c33a32557141e","name":"Startup","ui":"de5759a313e7ad79","events":"connect","x":412.64703369140625,"y":190.86947631835938,"wires":[["0044f01175b23393","8c5731ed8d47e18d"]]},{"id":"8c5731ed8d47e18d","type":"debug","z":"3c0c33a32557141e","name":"Connect","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":558.06982421875,"y":120.82720947265625,"wires":[]},{"id":"392b9dff111841c1","type":"ui-control","z":"3c0c33a32557141e","name":"Refresh Tab","ui":"de5759a313e7ad79","events":"change","x":1136.6471252441406,"y":60.873138427734375,"wires":[["6dd64b6ebf6cdee9"]]},{"id":"6dd64b6ebf6cdee9","type":"debug","z":"3c0c33a32557141e","name":"Refresh","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1314.1875,"y":47.82720947265625,"wires":[]},{"id":"de5759a313e7ad79","type":"ui-base","name":"Node-RED Dashboard","path":"/dashboard","appIcon":"","includeClientData":false,"acceptsClientConfig":["ui-notification","ui-control"],"showPathInSidebar":false,"headerContent":"dashboard","navigationStyle":"fixed","titleBarStyle":"default","showReconnectNotification":true,"notificationDisplayTime":5,"showDisconnectNotification":true,"allowInstall":true}]

```

EDIT: Node-RED v 4.0.9  
MacOS:15.5  
Node.js: 22.15.0

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [16 July 2025 16:24 UTC](https://discourse.nodered.org/t/dashboard-2-ui-control-node-multiple-connect-change-lost-events/98167/2 "2025-07-16T16:24:47Z")

</div>

I would expect to see the Connect followed by a Change, as the client has connected and then opened that tab. I would not expect to see the disconnect, and I don't see that when I run your flow on my system.

What version of @flowfuse/node-red-dashboard are you running. If it is not the latest (1.25.0) then update that, restart node-red and try again.

If you are already running the latest, when it reconnects is it connecting with a different socketID in the \_client object?

If you look in the node-red log do you see the two connects?

What are you doing to cause the initial connection?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [16 July 2025 16:31 UTC](https://discourse.nodered.org/t/dashboard-2-ui-control-node-multiple-connect-change-lost-events/98167/3 "2025-07-16T16:31:28Z")

</div>

Hold on, there is stuff missing from your debug output. It should look like this

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/7/67b6126f4a4bfd43e87ed564471fbce9e15b33c5.png)

---

<div class="post-metadata">

**Author:** ![rakgupta](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rakgupta/32/42535_2.png) [@rakgupta](https://discourse.nodered.org/u/rakgupta)\
**Post date:** [16 July 2025 17:44 UTC](https://discourse.nodered.org/t/dashboard-2-ui-control-node-multiple-connect-change-lost-events/98167/4 "2025-07-16T17:44:15Z")

</div>

> [@Colin](#):
>
> What version of @flowfuse/node-red-dashboard are you running.

@Colin - I am running 1.25.0 of @flowfuse/node-red-dashboard

> [@Colin](#):
>
> Hold on, there is stuff missing from your debug output. It should look like this

That is strange - I don't see the "client" object in my debug. Is DB2 multi-tenancy on by default or is it something that has to be enabled? I imported my old flows but on a fresh install of Node-RED (running it standalone on my local laptop), so maybe that has something to do with it?

> [@Colin](#):
>
> I would expect to see the Connect followed by a Change, as the client has connected and then opened that tab.

OK - that makes sense, I think I can adjust my flows to be triggered by the "change" message.

> [@Colin](#):
>
> I would not expect to see the disconnect, and I don't see that when I run your flow on my system.

I can't get it to happen now either. There is some weird scenario where one of my flows is going into a loop so maybe that was causing it. Still trying to figure out was is going on.🤔

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [16 July 2025 18:29 UTC](https://discourse.nodered.org/t/dashboard-2-ui-control-node-multiple-connect-change-lost-events/98167/5 "2025-07-16T18:29:22Z")

</div>

I beleive there is a setting in the dashboard node or sidebar to turn on/off client data [Building Multi-Tenant Dashboards | Node-RED Dashboard 2.0](https://dashboard.flowfuse.com/user/multi-tenancy#configuring-client-data)

---

<div class="post-metadata">

**Author:** ![rakgupta](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rakgupta/32/42535_2.png) [@rakgupta](https://discourse.nodered.org/u/rakgupta)\
**Post date:** [16 July 2025 19:19 UTC](https://discourse.nodered.org/t/dashboard-2-ui-control-node-multiple-connect-change-lost-events/98167/6 "2025-07-16T19:19:57Z")

</div>

> [@Colin](#):
>
> If you look in the node-red log do you see the two connects?

I got the disconnect (but no "connect") in the logs. I took out the debug node, so don't know if there was something else there.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/5/15139ca63da2fcdbb52d1de07558f704d6cb9a1d.png)

The strange thing is that this seems to happen when I am loading data into a ui-tabulator table. However a different page with an almost identical flow (also populating a ui-tabulator table) seems to work just fine.

**EDIT** : I did have the debug node but I was filtering on "current flow" so did not see it. I see multiple "lost" and "connect" events in the debug panel ☹

 ![Screenshot 2025-07-16 at 2.22.11 PM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/2/a2cae54198a5276fe0038259c2c4e411bc0da13a.png)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [16 July 2025 20:51 UTC](https://discourse.nodered.org/t/dashboard-2-ui-control-node-multiple-connect-change-lost-events/98167/7 "2025-07-16T20:51:21Z")

</div>

I would have expected Transport Error to mean there is some sort of networking issue causing the connection to be dropped and restored, but maybe that error can occur for other reasons.

Run `top` or other system monitor on the server and see if the CPU is being maxed out temporarily.

---

<div class="post-metadata">

**Author:** ![rakgupta](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rakgupta/32/42535_2.png) [@rakgupta](https://discourse.nodered.org/u/rakgupta)\
**Post date:** [16 July 2025 21:07 UTC](https://discourse.nodered.org/t/dashboard-2-ui-control-node-multiple-connect-change-lost-events/98167/8 "2025-07-16T21:07:24Z")

</div>

> [@Colin](#):
>
> Run `top` or other system monitor on the server and see if the CPU is being maxed out temporarily.

I’m running it local on my laptop. The problem seems to be with that one page. If I change pages and go to another one, it does seem to work. I’m going to let it be overnight and look at it again tomorrow. Hopefully, it will be something simple. Thanks again for all your help.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [17 July 2025 08:10 UTC](https://discourse.nodered.org/t/dashboard-2-ui-control-node-multiple-connect-change-lost-events/98167/9 "2025-07-17T08:10:43Z")

</div>

In the example you posted you are not actually doing anything when the page is switched. In your real flow are you taking action when that page is selected? It may be that which is triggering the connection dropout. Try disconnecting the ui-control nodes from the action and see if that stops the dropout.

---

<div class="post-metadata">

**Author:** ![rakgupta](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rakgupta/32/42535_2.png) [@rakgupta](https://discourse.nodered.org/u/rakgupta)\
**Post date:** [17 July 2025 11:46 UTC](https://discourse.nodered.org/t/dashboard-2-ui-control-node-multiple-connect-change-lost-events/98167/10 "2025-07-17T11:46:02Z")

</div>

> [@Colin](#):
>
> In the example you posted you are not actually doing anything when the page is switched. In your real flow are you taking action when that page is selected?

Actually that is one of the problems that I'm having. The ui-control node is on a separate flow and on tab change, it is supposed to trigger a particular flow, depending on the tab name (determined in a switch node which is connected to a link-out node). The problem is that the link-in node never gets triggered.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/d/9df1021c31cd19811fbf44abb3b2546e5a19cda2.png)

So far, I have manually been triggering the flow with an inject node.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [17 July 2025 12:05 UTC](https://discourse.nodered.org/t/dashboard-2-ui-control-node-multiple-connect-change-lost-events/98167/11 "2025-07-17T12:05:32Z")

</div>

> [@rakgupta](#):
>
> problem is that the link-in node never gets triggered.

Is the switch node sending anything?

---

<div class="post-metadata">

**Author:** ![rakgupta](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rakgupta/32/42535_2.png) [@rakgupta](https://discourse.nodered.org/u/rakgupta)\
**Post date:** [17 July 2025 12:34 UTC](https://discourse.nodered.org/t/dashboard-2-ui-control-node-multiple-connect-change-lost-events/98167/12 "2025-07-17T12:34:38Z")

</div>

> [@Colin](#):
>
> Is the switch node sending anything?

Aargh - I feel really stupid now 😔. I thought I had tried a debug after the switch node. Turns out I had an extra space in my tab name! And that appears to have fixed the disconnect issue (not sure why but will test some more). Thanks so much for your help.

---

<div class="post-metadata">

**Author:** ![rakgupta](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rakgupta/32/42535_2.png) [@rakgupta](https://discourse.nodered.org/u/rakgupta)\
**Post date:** [21 July 2025 09:11 UTC](https://discourse.nodered.org/t/dashboard-2-ui-control-node-multiple-connect-change-lost-events/98167/13 "2025-07-21T09:11:52Z")

</div>

@Colin - I wonder if the disconnects were related to this? [https://discourse.nodered.org/t/node-red-dashboard-2-table-tabulator-problems-when-loading-data/98225/2](https://discourse.nodered.org/t/node-red-dashboard-2-table-tabulator-problems-when-loading-data/98225/2)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [21 July 2025 09:41 UTC](https://discourse.nodered.org/t/dashboard-2-ui-control-node-multiple-connect-change-lost-events/98167/14 "2025-07-21T09:41:39Z")

</div>

Only if you are sending massive amounts of data across.

---

<div class="post-metadata">

**Author:** ![rakgupta](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rakgupta/32/42535_2.png) [@rakgupta](https://discourse.nodered.org/u/rakgupta)\
**Post date:** [22 July 2025 10:11 UTC](https://discourse.nodered.org/t/dashboard-2-ui-control-node-multiple-connect-change-lost-events/98167/15 "2025-07-22T10:11:52Z")

</div>

> [@Colin](#):
>
> massive amounts of data across

About 5000 to 7000 rows of data (5 columns of text data - max 100 chars, 2 columns of date/time). It was never a problem in DB1.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [22 July 2025 10:25 UTC](https://discourse.nodered.org/t/dashboard-2-ui-control-node-multiple-connect-change-lost-events/98167/16 "2025-07-22T10:25:07Z")

</div>

Yes that is probably the issue then. The fix in the other issue should sort it.

Is that amount of data really usable in the dashboard?

---

<div class="post-metadata">

**Author:** ![omrid](https://avatars.discourse-cdn.com/v4/letter/o/77aa72/32.png) [@omrid](https://discourse.nodered.org/u/omrid)\
**Post date:** [22 July 2025 11:32 UTC](https://discourse.nodered.org/t/dashboard-2-ui-control-node-multiple-connect-change-lost-events/98167/17 "2025-07-22T11:32:38Z")

</div>

The dashboard-2 nodes `ui control` and `event` sometimes behave differently when moving to a page (tab) from another dashboard tab,  
In my applications, I use them only for `connect/disconnect` events add a little template which sets listeners and gets load & view events directly from the page:

```auto
<script>
function init() {
// Do your stuff here
  console.log("Page is fully loaded");
}
if (document.readyState === "complete")
  init();
else
  window.addEventListener("load", init);

document.addEventListener("visibilitychange", () => {
  if (document.visibilityState === "visible") {
    // User has returned to the tab, do your stuff here
    console.log("Welcome back to the page");
  }
});
</script>

```

---

<div class="post-metadata">

**Author:** ![rakgupta](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rakgupta/32/42535_2.png) [@rakgupta](https://discourse.nodered.org/u/rakgupta)\
**Post date:** [22 July 2025 12:02 UTC](https://discourse.nodered.org/t/dashboard-2-ui-control-node-multiple-connect-change-lost-events/98167/18 "2025-07-22T12:02:42Z")

</div>

> [@Colin](#):
>
> Is that amount of data really usable in the dashboard?

It's a log from my home automation system and it allows a user to filter by event type(s) and device(s) for a selected date. It is used mainly for troubleshooting since the built-in logging of the home automation platform is somewhat limited.

---

<div class="post-metadata">

**Author:** ![rakgupta](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rakgupta/32/42535_2.png) [@rakgupta](https://discourse.nodered.org/u/rakgupta)\
**Post date:** [22 July 2025 12:08 UTC](https://discourse.nodered.org/t/dashboard-2-ui-control-node-multiple-connect-change-lost-events/98167/19 "2025-07-22T12:08:16Z")

</div>

> [@omrid](#):
>
> In my applications, I use them only for `connect/disconnect`

In my DB1 application, I used the connect/disconnect events only. The first connect event initiated the flow to load the data for the first page. Hence I was confused with the change/tab event essentially triggering the flow again. For now, I have changed it to trigger based on tab name and that seems to be working so far.

Thanks for the heads up - I will continue to monitor to see if it does strange things.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [22 July 2025 12:34 UTC](https://discourse.nodered.org/t/dashboard-2-ui-control-node-multiple-connect-change-lost-events/98167/20 "2025-07-22T12:34:07Z")

</div>

> [@rakgupta](#):
>
> it allows a user to filter by event type(s) and device(s) for a selected date

Do the filtering in the server so that only a subset of data are sent to the browser

[Next page](https://discourse.nodered.org/t/dashboard-2-ui-control-node-multiple-connect-change-lost-events/98167.md?page=2)
