# Ui-control - change page for specific tablet

**URL:** <https://discourse.nodered.org/t/ui-control-change-page-for-specific-tablet/96360>\
**Category:** Dashboard\
**Tags:** dashboard-2\
**Created:** [1 April 2025 06:16 UTC](https://discourse.nodered.org/t/ui-control-change-page-for-specific-tablet/96360 "2025-04-01T06:16:22Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Giamma](https://avatars.discourse-cdn.com/v4/letter/g/e47774/32.png) [@Giamma](https://discourse.nodered.org/u/Giamma)\
**Post date:** [1 April 2025 06:16 UTC](https://discourse.nodered.org/t/ui-control-change-page-for-specific-tablet/96360/1 "2025-04-01T06:16:22Z")

</div>

Hi everyone,  
how can I avoid that the change page with ui-control in one tablet don't change the page also in another tablet?  
I spent yesterday in many tests thinking using socketIp but or it's not possible or I'm not good to write code.

Can you help me?

---

<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:** [1 April 2025 06:36 UTC](https://discourse.nodered.org/t/ui-control-change-page-for-specific-tablet/96360/2 "2025-04-01T06:36:26Z")

</div>

Have you looked at the complete message output of the ui-control node, it should contain a socketid. If you send this socket id the message should only go to the device with that socketid. Not tested it though.

---

<div class="post-metadata">

**Author:** ![Giamma](https://avatars.discourse-cdn.com/v4/letter/g/e47774/32.png) [@Giamma](https://discourse.nodered.org/u/Giamma)\
**Post date:** [1 April 2025 06:46 UTC](https://discourse.nodered.org/t/ui-control-change-page-for-specific-tablet/96360/3 "2025-04-01T06:46:34Z")

</div>

I tried this ...

```auto
const socId = flow.get("socketId"); //saved when the dashboard is open

msg = {
    payload: "Heating",
    client: {
        socketId: socId
    }
}

return msg;

```

without success but I don't know if is correct ....

---

<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:** [1 April 2025 07:02 UTC](https://discourse.nodered.org/t/ui-control-change-page-for-specific-tablet/96360/4 "2025-04-01T07:02:41Z")

</div>

Can you create a minimal example flow so we can test.

How is the flow context socketid distinguished for each device, as when any device connects isn't the context over written.

---

<div class="post-metadata">

**Author:** ![Giamma](https://avatars.discourse-cdn.com/v4/letter/g/e47774/32.png) [@Giamma](https://discourse.nodered.org/u/Giamma)\
**Post date:** [1 April 2025 07:19 UTC](https://discourse.nodered.org/t/ui-control-change-page-for-specific-tablet/96360/5 "2025-04-01T07:19:05Z")

</div>

When I open the dashboard with this function ...

```auto
if (msg._client.socketIp == "192.168.1.10") {
    flow.set("tab", msg.tab)
    flow.set("socketId", msg._client.socketId)
    flow.set("socketIp", msg._client.socketIp)
}

node.status(msg.tab + " - " + msg._client.socketId + " - " + msg._client.socketIp);

```

I have the data of the tablet and I was using those parameters to indicate the target tablet to send tab numer or page name ...

---

<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:** [1 April 2025 07:25 UTC](https://discourse.nodered.org/t/ui-control-change-page-for-specific-tablet/96360/6 "2025-04-01T07:25:22Z")

</div>

IS client missing the leading \_

---

<div class="post-metadata">

**Author:** ![Giamma](https://avatars.discourse-cdn.com/v4/letter/g/e47774/32.png) [@Giamma](https://discourse.nodered.org/u/Giamma)\
**Post date:** [1 April 2025 07:32 UTC](https://discourse.nodered.org/t/ui-control-change-page-for-specific-tablet/96360/7 "2025-04-01T07:32:47Z")

</div>

Thank you very much for help and patience, I'm going to whip myself ...

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [15 April 2025 07:33 UTC](https://discourse.nodered.org/t/ui-control-change-page-for-specific-tablet/96360/8 "2025-04-15T07:33:20Z")

</div>

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