# Ui-leds grey after update

**URL:** https://discourse.nodered.org/t/ui-leds-grey-after-update/45634
**Category:** Dashboard
**Created:** [14 May 2021 09:29 UTC](https://discourse.nodered.org/t/ui-leds-grey-after-update/45634 "2021-05-14T09:29:26Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Fluidus](https://avatars.discourse-cdn.com/v4/letter/f/f04885/32.png) [@Fluidus](https://discourse.nodered.org/u/Fluidus)
#### Post date: [14 May 2021 09:29 UTC](https://discourse.nodered.org/t/ui-leds-grey-after-update/45634/1 "2021-05-14T09:29:27Z")

</div>

After updating my nodered-system yesterday, the ui-leds in my dashboard are grey and not green or red as usual.

I can force the ui-leds to green or red by manually injecting true or false. For example this log entry turns the ui-led from grey to red:

```auto
5/14/2021, 10:30:42 AMnode: 74507e09.d8ac08
polling : msg.payload : boolean
false
```

![](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/f/3fcfec7fe6b31a36b73739be90903913caa927b4.png)

But my normal flow, which reads a modbus-slave, sends true or false each 100 ms to the ui-leds and then the leds are staying grey. These boolean messages look the same as my manual test inject:

```auto
(normal ui-led inputs each 100ms)
[...]
5/14/2021, 10:24:55 AMnode: 74507e09.d8ac08
polling : msg.payload : boolean
false
5/14/2021, 10:24:56 AMnode: 74507e09.d8ac08
polling : msg.payload : boolean
false
[...]
```

![](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/2/820541b48b735f62a8c581dc8f39afc3056df987.png)

I thought that 100 ms cycles are eventually too fast for the new dashboard/ui-led, but even if I set the cyles to 2 seconds for example, the ui-leds are staying grey. I'm running out of ideas for the reason. I can't remember if those socketids were in the URL in the past, example:

```auto
http://192.168.123.246:1880/ui/#!/1?socketid=D2Q_06JgyfmGMkJJAAAA
```

I have the problem with the dashboard ui-leds with firefox and chromium, all systems (PC and RPi4) with current Buster.

```auto
May 14 10:16:22 opi2 Node-RED[372]: Welcome to Node-RED
May 14 10:16:22 opi2 Node-RED[372]: ===================
May 14 10:16:22 opi2 Node-RED[372]: 14 May 10:16:22 - [info] Node-RED version: v1.3.4
May 14 10:16:22 opi2 Node-RED[372]: 14 May 10:16:22 - [info] Node.js version: v12.22.1
May 14 10:16:22 opi2 Node-RED[372]: 14 May 10:16:22 - [info] Linux 5.10.17-v7l+ arm LE
May 14 10:16:23 opi2 Node-RED[372]: 14 May 10:16:23 - [info] Loading palette nodes
May 14 10:16:26 opi2 Node-RED[372]: 14 May 10:16:26 - [info] Dashboard version 2.29.0 started at /ui
```

---

<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: [14 May 2021 14:29 UTC](https://discourse.nodered.org/t/ui-leds-grey-after-update/45634/2 "2021-05-14T14:29:27Z")

</div>

Set the debug node to show Complete message and see what the difference is in the message. Perhaps you are setting a socket id in the message, so only connections with that socket will take notice of the messages.

---

<div class="post-metadata">

### Author: ![Fluidus](https://avatars.discourse-cdn.com/v4/letter/f/f04885/32.png) [@Fluidus](https://discourse.nodered.org/u/Fluidus)
#### Post date: [14 May 2021 15:56 UTC](https://discourse.nodered.org/t/ui-leds-grey-after-update/45634/3 "2021-05-14T15:56:00Z")

</div>

Ah, "complete message" is located in the debug node and not in the debug messages window, thank you.

My manual injection of boolean false (which successfully changes the color grey to red) has a simple object structure:

```auto
{"_msgid":"403eb9eb.161f58","payload":false,"topic":"polling"}
```

The non-working object (ui-led remains grey) is more complicated indeed:

```auto
{"topic":"polling","payload":false,"responseBuffer":{"data":[true,false,true,false,false,false,false,false],"buffer":[5]},"input":{"topic":"polling","from":"","payload":{"unitid":"","fc":2,"address":"0","quantity":"1","messageId":"609e8ff3e92e3c5ab46f7952"},"queueLengthByUnitId":{"unitId":1,"queueLength":0},"queueUnitId":1,"unitId":1},"sendingNodeId":"2ce4e912.835a5e","_msgid":"59261441.27dddc"}
```

Does this complicate object contain something, that confuses ui-led?

It is the output of my change node, that picks the true or false state from a modbus array and moves it to the msg.payload. Until the updates yesterday it had worked in the past as valid input for ui-led.

![](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/e/4ef45d7cc6eccbd1c2bcacc0fdc58959b545dfa3.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: [14 May 2021 16:05 UTC](https://discourse.nodered.org/t/ui-leds-grey-after-update/45634/4 "2021-05-14T16:05:06Z")

</div>

I don't see anything in there that should confuse it. It has three extra attributes, `responseBuffer`, `input`, and `sendingNodeId`  
Add entries to the change node to get rid of each of those by adding rules such as  
Delete msg.input  
If that fixes it then remove those one at a time to find which one(s) it is that causes the problem. Then please submit an issue on the ui\_led github page describing the problem.  
I presume you have checked that you are using the latest version of that node.

---

<div class="post-metadata">

### Author: ![Fluidus](https://avatars.discourse-cdn.com/v4/letter/f/f04885/32.png) [@Fluidus](https://discourse.nodered.org/u/Fluidus)
#### Post date: [14 May 2021 17:14 UTC](https://discourse.nodered.org/t/ui-leds-grey-after-update/45634/5 "2021-05-14T17:14:38Z")

</div>

Colin, you're the man!  
Filtering those attributes helps!  
sendingNodeId had no influence, but as soon as responseBuffer or input is deleted in the object, ui-led works a expected! I deleted both attributes now:

![](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/4/b489539b222835c7508baa1b8c6dad703dd33378.png)

Ui\_led is the latest v0.4.9. Eventually the deeper reason is the latest node-red-contrib-modbus v5.14.0, which had been updated a month ago. I have another quirk with this node in my flow that I have to sort out. Perhaps the mentioned attributes are new in that modbus version.

Thanks a lot

---

<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: [14 May 2021 20:16 UTC](https://discourse.nodered.org/t/ui-leds-grey-after-update/45634/6 "2021-05-14T20:16:49Z")

</div>

Could you submit an issue against the node please. [Issues · Adorkable/node-red-contrib-ui-led · GitHub](https://github.com/Adorkable/node-red-contrib-ui-led/issues)  
Explain the problem and include a link to this thread.

---

<div class="post-metadata">

### Author: ![Fluidus](https://avatars.discourse-cdn.com/v4/letter/f/f04885/32.png) [@Fluidus](https://discourse.nodered.org/u/Fluidus)
#### Post date: [14 May 2021 21:27 UTC](https://discourse.nodered.org/t/ui-leds-grey-after-update/45634/7 "2021-05-14T21:27:51Z")

</div>

Of course I will do, but I'm not convinced at the moment, that node-red-contrib-ui-led has an issue. The other "quirk" I had in my flow was with node-red-contrib-ui-svg. I could solve its problem too by deleting msg.responseBuffer and msg.input with a change-node between the modbus-read node and the SVG graphics node.

Wouldn't it be better to submit an issue to node-red-contrib-modbus?

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [14 May 2021 21:47 UTC](https://discourse.nodered.org/t/ui-leds-grey-after-update/45634/8 "2021-05-14T21:47:21Z")

</div>

Sorry, one question:

What is this moving `msg.payload[1]` to `msg.payload` all about?

---

<div class="post-metadata">

### Author: ![Fluidus](https://avatars.discourse-cdn.com/v4/letter/f/f04885/32.png) [@Fluidus](https://discourse.nodered.org/u/Fluidus)
#### Post date: [14 May 2021 22:24 UTC](https://discourse.nodered.org/t/ui-leds-grey-after-update/45634/9 "2021-05-14T22:24:45Z")

</div>

Hi,  
just a quick answer from my memory.

When the msg.payload is an array - for example  
[true,false,true,false,false,false,false,false] - then msg.payload[0] picks the first field (here true) and msg.payload[1] the second (here false).

Moving this selection to a new msg.payload makes it directly usable to turn on or off a ui-led in the dashboard for example. Don't know if it is good practice, but it works for me.

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [14 May 2021 23:02 UTC](https://discourse.nodered.org/t/ui-leds-grey-after-update/45634/10 "2021-05-14T23:02:56Z")

</div>

And so, if `msg.payload` is an array...... It wouldn't work sending an array to the LED node.

But anyway, sorry. I just wanted to check if I understood the problem myself.

---

<div class="post-metadata">

### Author: ![Fluidus](https://avatars.discourse-cdn.com/v4/letter/f/f04885/32.png) [@Fluidus](https://discourse.nodered.org/u/Fluidus)
#### Post date: [15 May 2021 05:56 UTC](https://discourse.nodered.org/t/ui-leds-grey-after-update/45634/11 "2021-05-15T05:56:02Z")

</div>

Yes, but at the output of the change node the msg.payload is boolean ("payload":false) then, see post #3.

---

<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: [15 May 2021 07:38 UTC](https://discourse.nodered.org/t/ui-leds-grey-after-update/45634/12 "2021-05-15T07:38:02Z")

</div>

> [@Fluidus](#):
>
> Wouldn't it be better to submit an issue to node-red-contrib-modbus?

Why? Nothing in the docs for the led node says that the other properties should affect it, therefore it should not matter whether they are there or not. It is very common for messages to contain additional properties used by previous nodes.

---

<div class="post-metadata">

### Author: ![Fluidus](https://avatars.discourse-cdn.com/v4/letter/f/f04885/32.png) [@Fluidus](https://discourse.nodered.org/u/Fluidus)
#### Post date: [15 May 2021 08:39 UTC](https://discourse.nodered.org/t/ui-leds-grey-after-update/45634/13 "2021-05-15T08:39:48Z")

</div>

Ah ok, thank you, I have opened an issue for `node-red-contrib-ui-led`. Probably I have to do the same for `node-red-contrib-ui-svg` then, which is affected too.

---

<div class="post-metadata">

### Author: ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)
#### Post date: [15 May 2021 09:20 UTC](https://discourse.nodered.org/t/ui-leds-grey-after-update/45634/14 "2021-05-15T09:20:47Z")

</div>

> [@Fluidus](#):
>
> Probably I have to do the same for `node-red-contrib-ui-svg` then, which is affected too.

Yes if there is an issue with the svg node, please create an issue on Github to avoid that other users have the same troubles.  
And please add enough info in the issue, because I don't go in depth through all discussions on Discourse...  
Thanks!  
Bart

---

<div class="post-metadata">

### Author: ![Fluidus](https://avatars.discourse-cdn.com/v4/letter/f/f04885/32.png) [@Fluidus](https://discourse.nodered.org/u/Fluidus)
#### Post date: [15 May 2021 10:58 UTC](https://discourse.nodered.org/t/ui-leds-grey-after-update/45634/15 "2021-05-15T10:58:01Z")

</div>

Thank you, Bart,  
just a very short summary at the moment: The issue with `node-red-contrib-ui-svg` is the same as in this topic, the grey fill color of elements can't be updated without the solution/workaround in [post #7](https://discourse.nodered.org/t/ui-leds-grey-after-update/45634/7).

---

<div class="post-metadata">

### Author: ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)
#### Post date: [15 May 2021 11:37 UTC](https://discourse.nodered.org/t/ui-leds-grey-after-update/45634/16 "2021-05-15T11:37:38Z")

</div>

It would be useful for me if you create an issue in the svg node Github repository, so I can refer to that issue in the code for the fix...  
And if you can add a simple flow in the issue, that would be a _ **great** _ help! I mean an svg with a single shape, and 2 inject nodes: one that fails and another that works (i.e. which is wired to the change node to delete the msg properties).  
It doesn't ring a bell to me at the moment why it fails. I'm very curious now...

---

<div class="post-metadata">

### Author: ![smithy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smithy/32/37804_2.png) [@smithy](https://discourse.nodered.org/u/smithy)
#### Post date: [5 June 2021 18:30 UTC](https://discourse.nodered.org/t/ui-leds-grey-after-update/45634/17 "2021-06-05T18:30:00Z")

</div>

Yes I'm seeing some strange behavior after update too. I could not work out what was happening after I rebuilt a Pi from scratch, loaded my working flow backups and suddenly observed what seems like an inconsistent behavior where some of my LEDs should be showing green for healthy condition but show grey sometimes...

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [6 June 2021 01:33 UTC](https://discourse.nodered.org/t/ui-leds-grey-after-update/45634/18 "2021-06-06T01:33:51Z")

</div>

If I remember right the leds will show grey until a value I’d sent to them. So you could have an inject node send an initial value on deploy.

---

<div class="post-metadata">

### Author: ![smithy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smithy/32/37804_2.png) [@smithy](https://discourse.nodered.org/u/smithy)
#### Post date: [6 June 2021 08:59 UTC](https://discourse.nodered.org/t/ui-leds-grey-after-update/45634/19 "2021-06-06T08:59:11Z")

</div>

Yes that's how they are configured, in fact they are constantly updated

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [6 June 2021 09:20 UTC](https://discourse.nodered.org/t/ui-leds-grey-after-update/45634/20 "2021-06-06T09:20:07Z")

</div>

So are you saying that even after initializing them they will go to grey?

If so, I would add a `debug` Node to the output of the node feeding the `ui-led` node to see if there is a chance something invalid is being passed in.

What version of node-red, node.js, dashboard (start the startup log) and the `ui-led` node are you using?

[Next page](https://discourse.nodered.org/t/ui-leds-grey-after-update/45634.md?page=2)
