# How do I extract this Lux value from a Fibaro Motion Sensor

**URL:** <https://discourse.nodered.org/t/how-do-i-extract-this-lux-value-from-a-fibaro-motion-sensor/73631>\
**Category:** General\
**Created:** [13 January 2023 11:55 UTC](https://discourse.nodered.org/t/how-do-i-extract-this-lux-value-from-a-fibaro-motion-sensor/73631 "2023-01-13T11:55:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bobbles](https://avatars.discourse-cdn.com/v4/letter/b/6a8cbe/32.png) [@bobbles](https://discourse.nodered.org/u/bobbles)\
**Post date:** [13 January 2023 11:55 UTC](https://discourse.nodered.org/t/how-do-i-extract-this-lux-value-from-a-fibaro-motion-sensor/73631/1 "2023-01-13T11:55:57Z")

</div>

I'm a novice at NR but I'm slowly progressing using debug nodes to see what is going on.  
This has me stumped though.

I have an MQTT in node that I have looking at a single topic from the sensor.

> **MQTT In**
>
> ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/6/46fa7a2a2565427ec84f0996704c301a536f59dc.png)

This is what I can narrow the payload to.

> **Payload**
>
> ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/b/7bce402703c88745fa791042e0d3562158516f53.png)

I've tried all sorts of configuration but cannot seem to get an output that only has the lux 'value'.

Like I say I'm a complete novice and not a coder but learning all the time and I just don't know where to go with this.  
Any guidance would be much appreciated.

---

<div class="post-metadata">

**Author:** ![mudwalker](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@mudwalker](https://discourse.nodered.org/u/mudwalker)\
**Post date:** [13 January 2023 12:00 UTC](https://discourse.nodered.org/t/how-do-i-extract-this-lux-value-from-a-fibaro-motion-sensor/73631/2 "2023-01-13T12:00:08Z")

</div>

Please can you show us what messages are returned by the MQTT node (using the debug node - copy and paste), we will have a better idea of the message structure and be able to help more rather than just having to make a guess. I, for one, don't have access to a Fibaro Motion Sensor.

I recommend watching this playlist: [Node-RED Essentials](https://www.youtube.com/playlist?list=PLyNBB9VCLmo1hyO-4fIZ08gqFcXBkHy-6). The videos are done by the developers of node-red. They're nice & short and to the point. You will understand a whole lot more in about 1 hour. A small investment for a lot of gain.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [13 January 2023 12:02 UTC](https://discourse.nodered.org/t/how-do-i-extract-this-lux-value-from-a-fibaro-motion-sensor/73631/3 "2023-01-13T12:02:12Z")

</div>

I'll guess that a change node set to move msg.payload.value to msg.payload will do what you want - but yes well worth watching the videos.

---

<div class="post-metadata">

**Author:** ![bobbles](https://avatars.discourse-cdn.com/v4/letter/b/6a8cbe/32.png) [@bobbles](https://discourse.nodered.org/u/bobbles)\
**Post date:** [13 January 2023 12:10 UTC](https://discourse.nodered.org/t/how-do-i-extract-this-lux-value-from-a-fibaro-motion-sensor/73631/4 "2023-01-13T12:10:34Z")

</div>

> [@mudwalker](#):
>
> Please can you show us what messages are returned by the MQTT node

Thanks for the prompt response.  
I will definitely spend some time looking at the videos.  
My query has been answered below but again thanks for taking the time to respond.

> [@dceejay](#):
>
> I'll guess that a change node set to move msg.payload.value to msg.payload will do what you want

Doh!!! I feel such an idiot. I was using a change node but tried putting in what I thought was the full structure.  
i.e. setting msg.payload.object.value to msg.payload as that is what I could see in the debug logs.

So simple.  
Thanks again for the response. 👍

---

<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:** [27 January 2023 12:11 UTC](https://discourse.nodered.org/t/how-do-i-extract-this-lux-value-from-a-fibaro-motion-sensor/73631/5 "2023-01-27T12:11:18Z")

</div>

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