# Not all UI Switches are updating Status

**URL:** <https://discourse.nodered.org/t/not-all-ui-switches-are-updating-status/19621>\
**Category:** Dashboard\
**Created:** [27 December 2019 00:25 UTC](https://discourse.nodered.org/t/not-all-ui-switches-are-updating-status/19621 "2019-12-27T00:25:32Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![teoboyle](https://avatars.discourse-cdn.com/v4/letter/t/c77e96/32.png) [@teoboyle](https://discourse.nodered.org/u/teoboyle)\
**Post date:** [27 December 2019 00:25 UTC](https://discourse.nodered.org/t/not-all-ui-switches-are-updating-status/19621/1 "2019-12-27T00:25:32Z")

</div>

Newbie here.

I am working on a simple project that turns relays on/off via the dashboard. I also want to set the relays ON via an automated script to turn on at a specific time in the morning. Using the Inject node, I can get the event to occur but ONLY the 1st relay will show the status correctly on the UI -- the other 3 execute the command properly but DON'T change the switch state on the UI. See screenshots below:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/b/be2501033cfa504b7e98257b4e88c592fee57bac.png)

I've spent lots of time reviewing the settings for each UI switch and input trying to make sure they are all the same. Here are the settings on Relay 1. They are the same for relay 2, 3, 4.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/b/b266489ca7f217ede6cdce0d420ad2c93799f208.png)

Any help is appreciated!

Thanks,  
Tom

---

<div class="post-metadata">

**Author:** ![teoboyle](https://avatars.discourse-cdn.com/v4/letter/t/c77e96/32.png) [@teoboyle](https://discourse.nodered.org/u/teoboyle)\
**Post date:** [27 December 2019 00:29 UTC](https://discourse.nodered.org/t/not-all-ui-switches-are-updating-status/19621/3 "2019-12-27T00:29:36Z")

</div>

Here is the NR flow where you can see the statuses of the relays all ON..

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/c/c4a54b5777515414b24d329ce6f14639bb0cccbb.png)

---

<div class="post-metadata">

**Author:** ![Andrei](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andrei/32/10446_2.png) [@Andrei](https://discourse.nodered.org/u/Andrei)\
**Post date:** [27 December 2019 03:04 UTC](https://discourse.nodered.org/t/not-all-ui-switches-are-updating-status/19621/4 "2019-12-27T03:04:10Z")

</div>

You did not share the configuration of the inject node. My best guess is that the payload received by the ui\_switch node is not matching the data type configured for on / off. You configured the switch nodes to send numbers 0/1 when clicked, so it is mandatory that the inject node send `msg.payload` with values 0 or 1 .

From the node help:

`In pass through mode the switch state can be updated by an incoming msg.payload with the specified values, that must also match the specified type (number, string, etc).`

---

<div class="post-metadata">

**Author:** ![Andrei](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andrei/32/10446_2.png) [@Andrei](https://discourse.nodered.org/u/Andrei)\
**Post date:** [29 December 2019 14:07 UTC](https://discourse.nodered.org/t/not-all-ui-switches-are-updating-status/19621/5 "2019-12-29T14:07:06Z")

</div>

I found a behavior that is not intuitive for me.

I managed to find a way to replicate a case where the ui\_switch will not update its status in the editor.

Looks like it is a must that we wire something to the output of the ui\_switch in order for it to update the status. In below testing flow the behavior is different when the debug nodes are wired / not wired.

At least this is what is seems to happen in my environment.

29 Dec 09:26:12 - [info] Node-RED version: v1.0.0  
29 Dec 09:26:12 - [info] Node.js version: v8.11.1  
29 Dec 09:26:12 - [info] Windows\_NT 10.0.17763 x64 LE  
29 Dec 09:26:15 - [info] Loading palette nodes  
29 Dec 09:26:21 - [info] Worldmap version 2.2.0  
29 Dec 09:26:22 - [info] Dashboard version 2.19.2 started at /ui

Can anyone test and confirm ?

```auto
[{"id":"49ee18f5.a1ec18","type":"tab","label":"Flow 4","disabled":false,"info":""},{"id":"44b27109.3d21a","type":"ui_switch","z":"49ee18f5.a1ec18","name":"Switch 1","label":"switch 1","tooltip":"","group":"e7ca9205.45fb","order":3,"width":"2","height":"1","passthru":true,"decouple":"false","topic":"","style":"","onvalue":"on","onvalueType":"str","onicon":"","oncolor":"","offvalue":"off","offvalueType":"str","officon":"","offcolor":"","x":360,"y":140,"wires":[[]]},{"id":"580f76ab.4e2458","type":"ui_switch","z":"49ee18f5.a1ec18","name":"Switch 2","label":"switch 2","tooltip":"","group":"e7ca9205.45fb","order":3,"width":"2","height":"1","passthru":true,"decouple":"false","topic":"","style":"","onvalue":"on","onvalueType":"str","onicon":"","oncolor":"","offvalue":"off","offvalueType":"str","officon":"","offcolor":"","x":360,"y":200,"wires":[[]]},{"id":"2596ae73.31b882","type":"inject","z":"49ee18f5.a1ec18","name":"","topic":"","payload":"on","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":"1","x":130,"y":140,"wires":[["44b27109.3d21a","580f76ab.4e2458"]]},{"id":"640afc.fb75b504","type":"inject","z":"49ee18f5.a1ec18","name":"","topic":"","payload":"off","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":"1","x":130,"y":200,"wires":[["580f76ab.4e2458","44b27109.3d21a"]]},{"id":"10da206b.40521","type":"debug","z":"49ee18f5.a1ec18","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":550,"y":140,"wires":[]},{"id":"5cef6e99.45a93","type":"debug","z":"49ee18f5.a1ec18","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":530,"y":200,"wires":[]},{"id":"e7ca9205.45fb","type":"ui_group","z":"","name":"Default","tab":"4c84c814.4b2f68","disp":false,"width":"3","collapse":false},{"id":"4c84c814.4b2f68","type":"ui_tab","z":"","name":"Home","icon":"dashboard","order":6,"disabled":false,"hidden":false}]

```

---

<div class="post-metadata">

**Author:** ![teoboyle](https://avatars.discourse-cdn.com/v4/letter/t/c77e96/32.png) [@teoboyle](https://discourse.nodered.org/u/teoboyle)\
**Post date:** [29 December 2019 14:31 UTC](https://discourse.nodered.org/t/not-all-ui-switches-are-updating-status/19621/6 "2019-12-29T14:31:48Z")

</div>

Hi Andrei -

Below is the inject node. It has the same data type, number.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/8/869fd8c83a037e7c1d5cd3c3665486b5ace8a0ea.png)

Thanks for looking at this.

Tom

---

<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:** [29 December 2019 15:50 UTC](https://discourse.nodered.org/t/not-all-ui-switches-are-updating-status/19621/7 "2019-12-29T15:50:58Z")

</div>

@teoboyle post here an example non-working flow, just as many nodes as you need to show the problem. See [this post](https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506) for how to share a flow.

---

<div class="post-metadata">

**Author:** ![Andrei](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andrei/32/10446_2.png) [@Andrei](https://discourse.nodered.org/u/Andrei)\
**Post date:** [29 December 2019 23:30 UTC](https://discourse.nodered.org/t/not-all-ui-switches-are-updating-status/19621/8 "2019-12-29T23:30:21Z")

</div>

> [@teoboyle](#):
>
> Below is the inject node. It has the same data type, number.

In which case sounds good. When building a flow like yours it works for me.  
As @Colin suggested we would need to have a look on your flow, if you can share it.

---

<div class="post-metadata">

**Author:** ![teoboyle](https://avatars.discourse-cdn.com/v4/letter/t/c77e96/32.png) [@teoboyle](https://discourse.nodered.org/u/teoboyle)\
**Post date:** [29 December 2019 23:50 UTC](https://discourse.nodered.org/t/not-all-ui-switches-are-updating-status/19621/10 "2019-12-29T23:50:33Z")

</div>

```auto
[
    {
        "id": "aea1bfab.87782",
        "type": "tab",
        "label": "Flow 1",
        "disabled": false,
        "info": ""
    },
    {
        "id": "fcff0166.31e51",
        "type": "mqtt in",
        "z": "aea1bfab.87782",
        "name": "/home/p1/I2CRelay1",
        "topic": "/home/p1/I2CRelay1",
        "qos": "2",
        "datatype": "auto",
        "broker": "81d264d5.eb5ad8",
        "x": 330,
        "y": 1165,
        "wires": [
            [
                "c3a9d0fe.e9646"
            ]
        ]
    },
    {
        "id": "8e170cfc.321da",
        "type": "exec",
        "z": "aea1bfab.87782",
        "command": "i2cset -y 1 0x10 0x01 0x00",
        "addpay": false,
        "append": "",
        "useSpawn": "false",
        "timer": "",
        "oldrc": false,
        "name": "Relay1OFF",
        "x": 950,
        "y": 1245,
        "wires": [
            [],
            [],
            []
        ]
    },
    {
        "id": "2fad9f93.fef2c",
        "type": "exec",
        "z": "aea1bfab.87782",
        "command": "i2cset -y 1 0x10 0x01 0xFF",
        "addpay": false,
        "append": "",
        "useSpawn": "false",
        "timer": "",
        "oldrc": false,
        "name": "Relay1ON",
        "x": 950,
        "y": 1165,
        "wires": [
            [],
            [],
            []
        ]
    },
    {
        "id": "9c0b8031.8a4d3",
        "type": "switch",
        "z": "aea1bfab.87782",
        "name": "Relay1_Switch",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "0",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "1",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 720,
        "y": 1165,
        "wires": [
            [
                "f239b85.df67548",
                "8e170cfc.321da"
            ],
            [
                "f239b85.df67548",
                "2fad9f93.fef2c"
            ]
        ]
    },
    {
        "id": "c3a9d0fe.e9646",
        "type": "json",
        "z": "aea1bfab.87782",
        "name": "",
        "property": "payload",
        "action": "",
        "pretty": false,
        "x": 530,
        "y": 1165,
        "wires": [
            [
                "9c0b8031.8a4d3"
            ]
        ]
    },
    {
        "id": "f239b85.df67548",
        "type": "debug",
        "z": "aea1bfab.87782",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "x": 950,
        "y": 1325,
        "wires": []
    },
    {
        "id": "15f9c1f2.4e9e5e",
        "type": "ui_switch",
        "z": "aea1bfab.87782",
        "name": "Relay1",
        "label": "Relay1",
        "tooltip": "",
        "group": "dbccbb51.1690a8",
        "order": 1,
        "width": 0,
        "height": 0,
        "passthru": true,
        "decouple": "false",
        "topic": "/home/p1/I2CRelay1",
        "style": "",
        "onvalue": "1",
        "onvalueType": "num",
        "onicon": "",
        "oncolor": "",
        "offvalue": "0",
        "offvalueType": "num",
        "officon": "",
        "offcolor": "",
        "x": 120,
        "y": 40,
        "wires": [
            [
                "f70dbf76.d0cad"
            ]
        ]
    },
    {
        "id": "f70dbf76.d0cad",
        "type": "mqtt out",
        "z": "aea1bfab.87782",
        "name": "Relay1",
        "topic": "/home/p1/I2CRelay1",
        "qos": "",
        "retain": "",
        "broker": "81d264d5.eb5ad8",
        "x": 400,
        "y": 40,
        "wires": []
    },
    {
        "id": "6749180d.10bb68",
        "type": "mqtt in",
        "z": "aea1bfab.87782",
        "name": "/home/p1/I2CRelay3",
        "topic": "/home/p1/I2CRelay3",
        "qos": "2",
        "datatype": "auto",
        "broker": "81d264d5.eb5ad8",
        "x": 330,
        "y": 1745,
        "wires": [
            [
                "33080c1e.8c3844"
            ]
        ]
    },
    {
        "id": "33080c1e.8c3844",
        "type": "json",
        "z": "aea1bfab.87782",
        "name": "",
        "property": "payload",
        "action": "",
        "pretty": false,
        "x": 530,
        "y": 1750,
        "wires": [
            [
                "adddf3ac.c8359"
            ]
        ]
    },
    {
        "id": "bc47815d.8dcc4",
        "type": "exec",
        "z": "aea1bfab.87782",
        "command": "i2cset -y 1 0x10 0x03 0x00 ",
        "addpay": false,
        "append": "",
        "useSpawn": "false",
        "timer": "",
        "oldrc": false,
        "name": "Relay3OFF",
        "x": 950,
        "y": 1810,
        "wires": [
            [],
            [],
            []
        ]
    },
    {
        "id": "a5453296.15311",
        "type": "exec",
        "z": "aea1bfab.87782",
        "command": "i2cset -y 1 0x10 0x03 0xFF ",
        "addpay": false,
        "append": "",
        "useSpawn": "false",
        "timer": "",
        "oldrc": false,
        "name": "Relay3ON",
        "x": 950,
        "y": 1710,
        "wires": [
            [],
            [],
            []
        ]
    },
    {
        "id": "5d3b7873.3014d8",
        "type": "debug",
        "z": "aea1bfab.87782",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "x": 950,
        "y": 1890,
        "wires": []
    },
    {
        "id": "e371a719.0a59b8",
        "type": "ui_switch",
        "z": "aea1bfab.87782",
        "name": "Relay3",
        "label": "Relay3",
        "tooltip": "",
        "group": "dbccbb51.1690a8",
        "order": 3,
        "width": 0,
        "height": 0,
        "passthru": true,
        "decouple": "false",
        "topic": "/home/p1/I2CRelay3",
        "style": "",
        "onvalue": "1",
        "onvalueType": "str",
        "onicon": "",
        "oncolor": "",
        "offvalue": "0",
        "offvalueType": "str",
        "officon": "",
        "offcolor": "",
        "x": 123,
        "y": 318,
        "wires": [
            [
                "5fd9714e.b8987"
            ]
        ]
    },
    {
        "id": "5fd9714e.b8987",
        "type": "mqtt out",
        "z": "aea1bfab.87782",
        "name": "Relay3",
        "topic": "/home/p1/I2CRelay3",
        "qos": "",
        "retain": "",
        "broker": "81d264d5.eb5ad8",
        "x": 403,
        "y": 318,
        "wires": []
    },
    {
        "id": "adddf3ac.c8359",
        "type": "switch",
        "z": "aea1bfab.87782",
        "name": "Relay3_Switch",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "0",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "1",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 730,
        "y": 1750,
        "wires": [
            [
                "5d3b7873.3014d8",
                "bc47815d.8dcc4"
            ],
            [
                "5d3b7873.3014d8",
                "a5453296.15311"
            ]
        ]
    },
    {
        "id": "db27acbc.375fe",
        "type": "mqtt in",
        "z": "aea1bfab.87782",
        "name": "/home/p1/I2CRelay2",
        "topic": "/home/p1/I2CRelay2",
        "qos": "2",
        "datatype": "auto",
        "broker": "81d264d5.eb5ad8",
        "x": 330,
        "y": 1485,
        "wires": [
            [
                "824fece3.3ec6f"
            ]
        ]
    },
    {
        "id": "824fece3.3ec6f",
        "type": "json",
        "z": "aea1bfab.87782",
        "name": "",
        "property": "payload",
        "action": "",
        "pretty": false,
        "x": 530,
        "y": 1485,
        "wires": [
            [
                "d0cef954.1b9558"
            ]
        ]
    },
    {
        "id": "e3b12b75.cede48",
        "type": "exec",
        "z": "aea1bfab.87782",
        "command": "i2cset -y 1 0x10 0x02 0x00 ",
        "addpay": false,
        "append": "",
        "useSpawn": "false",
        "timer": "",
        "oldrc": false,
        "name": "Relay2OFF",
        "x": 950,
        "y": 1545,
        "wires": [
            [],
            [],
            []
        ]
    },
    {
        "id": "76f0ace.1c8c254",
        "type": "exec",
        "z": "aea1bfab.87782",
        "command": "i2cset -y 1 0x10 0x02 0xFF ",
        "addpay": false,
        "append": "",
        "useSpawn": "false",
        "timer": "",
        "oldrc": false,
        "name": "Relay2ON",
        "x": 950,
        "y": 1445,
        "wires": [
            [],
            [],
            []
        ]
    },
    {
        "id": "7e57fd35.9505c4",
        "type": "debug",
        "z": "aea1bfab.87782",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "x": 950,
        "y": 1625,
        "wires": []
    },
    {
        "id": "d0cef954.1b9558",
        "type": "switch",
        "z": "aea1bfab.87782",
        "name": "Relay2_Switch",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "0",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "1",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 730,
        "y": 1485,
        "wires": [
            [
                "7e57fd35.9505c4",
                "e3b12b75.cede48"
            ],
            [
                "7e57fd35.9505c4",
                "76f0ace.1c8c254"
            ]
        ]
    },
    {
        "id": "8fc360e7.3e731",
        "type": "ui_switch",
        "z": "aea1bfab.87782",
        "name": "Relay2",
        "label": "Relay2",
        "tooltip": "",
        "group": "dbccbb51.1690a8",
        "order": 2,
        "width": 0,
        "height": 0,
        "passthru": true,
        "decouple": "false",
        "topic": "/home/p1/I2CRelay2",
        "style": "",
        "onvalue": "1",
        "onvalueType": "str",
        "onicon": "",
        "oncolor": "",
        "offvalue": "0",
        "offvalueType": "str",
        "officon": "",
        "offcolor": "",
        "x": 120,
        "y": 189,
        "wires": [
            [
                "6371b6cb.208a38"
            ]
        ]
    },
    {
        "id": "6371b6cb.208a38",
        "type": "mqtt out",
        "z": "aea1bfab.87782",
        "name": "Relay2",
        "topic": "/home/p1/I2CRelay2",
        "qos": "",
        "retain": "",
        "broker": "81d264d5.eb5ad8",
        "x": 400,
        "y": 189,
        "wires": []
    },
    {
        "id": "35134e39.e09ca2",
        "type": "mqtt in",
        "z": "aea1bfab.87782",
        "name": "/home/p1/I2CRelay4",
        "topic": "/home/p1/I2CRelay4",
        "qos": "2",
        "datatype": "auto",
        "broker": "81d264d5.eb5ad8",
        "x": 330,
        "y": 2047,
        "wires": [
            [
                "f936ba91.2f6118"
            ]
        ]
    },
    {
        "id": "f936ba91.2f6118",
        "type": "json",
        "z": "aea1bfab.87782",
        "name": "",
        "property": "payload",
        "action": "",
        "pretty": false,
        "x": 530,
        "y": 2047,
        "wires": [
            [
                "ecfed3ea.2a3b8"
            ]
        ]
    },
    {
        "id": "bae1b8ed.cd7318",
        "type": "exec",
        "z": "aea1bfab.87782",
        "command": "i2cset -y 1 0x10 0x04 0x00 ",
        "addpay": false,
        "append": "",
        "useSpawn": "false",
        "timer": "",
        "oldrc": false,
        "name": "Relay4OFF",
        "x": 950,
        "y": 2107,
        "wires": [
            [],
            [],
            []
        ]
    },
    {
        "id": "e0b75b46.e03a98",
        "type": "exec",
        "z": "aea1bfab.87782",
        "command": "i2cset -y 1 0x10 0x04 0xFF ",
        "addpay": false,
        "append": "",
        "useSpawn": "false",
        "timer": "",
        "oldrc": false,
        "name": "Relay4ON",
        "x": 950,
        "y": 2007,
        "wires": [
            [],
            [],
            []
        ]
    },
    {
        "id": "f9421946.306dd8",
        "type": "debug",
        "z": "aea1bfab.87782",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "x": 950,
        "y": 2187,
        "wires": []
    },
    {
        "id": "ecfed3ea.2a3b8",
        "type": "switch",
        "z": "aea1bfab.87782",
        "name": "Relay4_Switch",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "0",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "1",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 700,
        "y": 2040,
        "wires": [
            [
                "f9421946.306dd8",
                "bae1b8ed.cd7318"
            ],
            [
                "f9421946.306dd8",
                "e0b75b46.e03a98"
            ]
        ]
    },
    {
        "id": "f839be77.20271",
        "type": "ui_switch",
        "z": "aea1bfab.87782",
        "name": "Relay4",
        "label": "Relay4",
        "tooltip": "",
        "group": "dbccbb51.1690a8",
        "order": 4,
        "width": 0,
        "height": 0,
        "passthru": true,
        "decouple": "false",
        "topic": "/home/p1/I2CRelay4",
        "style": "",
        "onvalue": "1",
        "onvalueType": "str",
        "onicon": "",
        "oncolor": "",
        "offvalue": "0",
        "offvalueType": "str",
        "officon": "",
        "offcolor": "",
        "x": 120,
        "y": 442,
        "wires": [
            [
                "670e97fb.0248b8"
            ]
        ]
    },
    {
        "id": "670e97fb.0248b8",
        "type": "mqtt out",
        "z": "aea1bfab.87782",
        "name": "Relay4",
        "topic": "/home/p1/I2CRelay4",
        "qos": "",
        "retain": "",
        "broker": "81d264d5.eb5ad8",
        "x": 400,
        "y": 442,
        "wires": []
    },
    {
        "id": "e4d1b125.0d88f",
        "type": "ui_template",
        "z": "aea1bfab.87782",
        "group": "31e65dc1.63aa32",
        "name": "Weather",
        "order": 0,
        "width": "4",
        "height": "4",
        "format": "<div ng-bind-html=\"<a href=\"https://www.wunderground.com/dashboard/pws/KILSCHAU15\"><img src=\"http://banners.wunderground.com/cgi-bin/banner/ban/wxBanner?bannertype=wxstnsticker_both&weatherstationcount=KILSCHAU15\" height=\"160\" width=\"160\" border=\"0\" alt=\"Weather Underground PWS KILSCHAU15\" /></a></div>",
        "storeOutMessages": true,
        "fwdInMessages": true,
        "templateScope": "local",
        "x": 80,
        "y": 620,
        "wires": [
            []
        ]
    },
    {
        "id": "acea7277.c0e9d",
        "type": "inject",
        "z": "aea1bfab.87782",
        "name": "AutomateRelay1",
        "topic": "AutomateRelay1",
        "payload": "1",
        "payloadType": "num",
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "x": 120,
        "y": 120,
        "wires": [
            [
                "15f9c1f2.4e9e5e"
            ]
        ]
    },
    {
        "id": "9cc4ebee.bb9138",
        "type": "comment",
        "z": "aea1bfab.87782",
        "name": "Relays Below Here",
        "info": "",
        "x": 410,
        "y": 1060,
        "wires": []
    },
    {
        "id": "de4fbb0c.c38598",
        "type": "inject",
        "z": "aea1bfab.87782",
        "name": "AutomateRelay2",
        "topic": "AutomateRelay2",
        "payload": "1",
        "payloadType": "num",
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "x": 120,
        "y": 260,
        "wires": [
            [
                "8fc360e7.3e731"
            ]
        ]
    },
    {
        "id": "f01e0cca.0f9de",
        "type": "inject",
        "z": "aea1bfab.87782",
        "name": "AutomateRelay3",
        "topic": "AutomateRelay3",
        "payload": "1",
        "payloadType": "num",
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "x": 120,
        "y": 380,
        "wires": [
            [
                "e371a719.0a59b8"
            ]
        ]
    },
    {
        "id": "b0de393f.e93828",
        "type": "inject",
        "z": "aea1bfab.87782",
        "name": "AutomateRelay4",
        "topic": "AutomateRelay4",
        "payload": "1",
        "payloadType": "num",
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "x": 120,
        "y": 520,
        "wires": [
            [
                "f839be77.20271"
            ]
        ]
    },
    {
        "id": "7f21bec1.ed04b",
        "type": "status",
        "z": "aea1bfab.87782",
        "name": "",
        "scope": [
            "9c0b8031.8a4d3",
            "adddf3ac.c8359",
            "d0cef954.1b9558",
            "ecfed3ea.2a3b8"
        ],
        "x": 1160,
        "y": 1480,
        "wires": [
            []
        ]
    },
    {
        "id": "81d264d5.eb5ad8",
        "type": "mqtt-broker",
        "z": "",
        "name": "EclipseWS",
        "broker": "ws://test.mosquitto.org:8080",
        "port": "8080",
        "clientid": "",
        "usetls": false,
        "compatmode": true,
        "keepalive": "60",
        "cleansession": true,
        "birthTopic": "Test connection",
        "birthQos": "0",
        "birthPayload": "Connect?",
        "closeTopic": "",
        "closeQos": "0",
        "closePayload": "",
        "willTopic": "",
        "willQos": "0",
        "willPayload": ""
    },
    {
        "id": "dbccbb51.1690a8",
        "type": "ui_group",
        "z": "",
        "name": "Home Relays",
        "tab": "e47097f1.4ad908",
        "order": 1,
        "disp": true,
        "width": "6",
        "collapse": false
    },
    {
        "id": "31e65dc1.63aa32",
        "type": "ui_group",
        "z": "",
        "name": "Information",
        "tab": "e47097f1.4ad908",
        "disp": true,
        "width": "6",
        "collapse": false
    },
    {
        "id": "e47097f1.4ad908",
        "type": "ui_tab",
        "z": "",
        "name": "N9GUN Desktop Control",
        "icon": "dashboard",
        "order": 1,
        "disabled": false,
        "hidden": false
    }
]

```

---

<div class="post-metadata">

**Author:** ![teoboyle](https://avatars.discourse-cdn.com/v4/letter/t/c77e96/32.png) [@teoboyle](https://discourse.nodered.org/u/teoboyle)\
**Post date:** [29 December 2019 23:50 UTC](https://discourse.nodered.org/t/not-all-ui-switches-are-updating-status/19621/11 "2019-12-29T23:50:52Z")

</div>

Flow is attached.

---

<div class="post-metadata">

**Author:** ![Andrei](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andrei/32/10446_2.png) [@Andrei](https://discourse.nodered.org/u/Andrei)\
**Post date:** [30 December 2019 01:17 UTC](https://discourse.nodered.org/t/not-all-ui-switches-are-updating-status/19621/12 "2019-12-30T01:17:18Z")

</div>

I see clearly now. You may want to change data type to number. Only the first switch is configured for number type . The others are configured to string type.

 ![r-01](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/c/cb7726fb703ac80cffa9bfafd12890fec1e92367.png)

 ![r-02](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/b/b2dd908491c18dd7fddb30fe795415376e960c26.png)

---

<div class="post-metadata">

**Author:** ![teoboyle](https://avatars.discourse-cdn.com/v4/letter/t/c77e96/32.png) [@teoboyle](https://discourse.nodered.org/u/teoboyle)\
**Post date:** [30 December 2019 11:59 UTC](https://discourse.nodered.org/t/not-all-ui-switches-are-updating-status/19621/13 "2019-12-30T11:59:42Z")

</div>

Awesome... Thanks.
