# False or true for an LED Display

**URL:** https://discourse.nodered.org/t/false-or-true-for-an-led-display/96615
**Category:** Dashboard
**Created:** [17 April 2025 07:39 UTC](https://discourse.nodered.org/t/false-or-true-for-an-led-display/96615 "2025-04-17T07:39:52Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![F11](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/f11/32/73913_2.png) [@F11](https://discourse.nodered.org/u/F11)
#### Post date: [17 April 2025 07:39 UTC](https://discourse.nodered.org/t/false-or-true-for-an-led-display/96615/1 "2025-04-17T07:39:52Z")

</div>

Good morning everyone,

I get the following back from a node

```auto
{{msg.payload[“000106xxx803”].state.remoteEnable.fullRemoteControl}}

```

if I enter this therm in a text field, a false or true is also returned  
I would also like to display an LED display on the page with the result.  
For this I have created a function with the

code:  
var new = { payload: msg.payload[“000106xxx803”].state.remoteEnable.fullRemoteControl };  
return [new];

Unfortunately, this does not return false or true.  
How do I have to do this correctly to get the result I want?

Thanks in advance  
Greetings  
Roland

---

<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: [17 April 2025 08:06 UTC](https://discourse.nodered.org/t/false-or-true-for-an-led-display/96615/2 "2025-04-17T08:06:42Z")

</div>

Can you connect a debug to the node and set the debug node to `show complete message object`. Then show the expanded debug so we can verify the content of the property.

Please also verify the dashboard you are using and what led 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 April 2025 08:46 UTC](https://discourse.nodered.org/t/false-or-true-for-an-led-display/96615/3 "2025-04-17T08:46:36Z")

</div>

Also, assuming that this is in a function node, you need to return a message, not a simple value, so possibly you need something like

```auto
msg.payload = msg.payload[“000106xxx803”].state.remoteEnable.fullRemoteControl
return msg

```

Also note that, when needed, it is better to use const or let rather than var. Also semi colons are generally not required.

---

<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: [17 April 2025 12:00 UTC](https://discourse.nodered.org/t/false-or-true-for-an-led-display/96615/4 "2025-04-17T12:00:34Z")

</div>

> [@F11](#):
>
> code:  
> var new = { payload: msg.payload[“000106xxx803”].state.remoteEnable.fullRemoteControl };  
> return [new];

I don't think you can use 'new' as a variable name, as it is a reserved JS token. It will throw a runtime error.

---

<div class="post-metadata">

### Author: ![F11](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/f11/32/73913_2.png) [@F11](https://discourse.nodered.org/u/F11)
#### Post date: [17 April 2025 13:42 UTC](https://discourse.nodered.org/t/false-or-true-for-an-led-display/96615/5 "2025-04-17T13:42:35Z")

</div>

Hello  
and thanks for the feedback

Then I will try to clear up the ambiguities  
I am using the flow from:

> **[Manage Miele Appliances (flow) - Node-RED](https://flows.nodered.org/flow/17e34e88ca4c6ff319a5287d3db44a1e)**

here, the message of the debug node.  
This is where the Boolean values arrive.

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

The path for this is

```auto
payload[“000106xxx803”].state.remoteEnable.fullRemoteControl

```

If I enter this in a TextField, a boolen value is also returned!

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

even if I enter the term in the debug node like this  
a boolean value is returned

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

```auto
payload["000106xxx803"].state.remoteEnable.fullRemoteControl

```

What / How do I have to do so that I can control an LED with it?

If I insert the function like this

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

the message comes back

```auto
msg.payload["000106xxx803"].state.remoteEnable.fullRemoteControl : undefined

```

I hope you understand me better now

Roland

---

<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: [17 April 2025 14:01 UTC](https://discourse.nodered.org/t/false-or-true-for-an-led-display/96615/6 "2025-04-17T14:01:17Z")

</div>

> [@F11](#):
>
> ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/f/bf9176e1085fbd261d6c6be528357dbe5206877d.png)
> 
> the message comes back
> 
> ```auto
> msg.payload["000106xxx803"].state.remoteEnable.fullRemoteControl : undefined
> 
> ```
> 
> I hope you understand me better now
> 
> Roland

As it should, as you have rewritten msg.payload to boolean true, therefore `msg.payload["000106xxx803"].state.remoteEnable.fullRemoteControl`does not exist any more. set the debug after the function to `complete messgae object`

---

<div class="post-metadata">

### Author: ![F11](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/f11/32/73913_2.png) [@F11](https://discourse.nodered.org/u/F11)
#### Post date: [19 April 2025 07:20 UTC](https://discourse.nodered.org/t/false-or-true-for-an-led-display/96615/7 "2025-04-19T07:20:40Z")

</div>

For the sake of completeness  
I have solved it like this and I think it works

```auto
var msgNeu1 = { payload: msg.payload["000106xxx803"].state.remoteEnable.fullRemoteControl };
return msgNeu1;

```

Thank you all!  
Roland

---

<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: [19 May 2025 07:21 UTC](https://discourse.nodered.org/t/false-or-true-for-an-led-display/96615/8 "2025-05-19T07:21:11Z")

</div>

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