# MQTT NodeRed values

**URL:** <https://community.homey.app/t/mqtt-nodered-values/60459>\
**Category:** Questions & Help\
**Created:** [February 15, 2022, 1:23pm UTC](https://community.homey.app/t/mqtt-nodered-values/60459 "2022-02-15T13:23:23Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![hteibler](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/hteibler/32/35537_2.png) [@hteibler](https://community.homey.app/u/hteibler)\
**Post date:** [February 15, 2022, 1:23pm UTC](https://community.homey.app/t/mqtt-nodered-values/60459/1 "2022-02-15T13:23:23Z")

</div>

I want to use a color picker in NodeRed to change a RGB Color light  
I see via MQTT Explorer the message,  
but have no idea how to set the color in homey

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [February 15, 2022, 10:47pm UTC](https://community.homey.app/t/mqtt-nodered-values/60459/2 "2022-02-15T22:47:13Z")

</div>

The mqtt client can read topics. Triggering a flow with mqtt client card “Trigger when a message is received on …” you can set the corresponding color to a device. In short.

A random flow:

---

<div class="post-metadata">

**Author:** ![hteibler](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/hteibler/32/35537_2.png) [@hteibler](https://community.homey.app/u/hteibler)\
**Post date:** [February 16, 2022, 8:23am UTC](https://community.homey.app/t/mqtt-nodered-values/60459/3 "2022-02-16T08:23:00Z")

</div>

thanks, but this shows how to fill a variable with a MQTT value  
but how to I set this on this device

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/f/bfa6df8725af80d991c6be0d21cb44920e794895.png)  
there is no “variable” option

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [February 16, 2022, 7:44pm UTC](https://community.homey.app/t/mqtt-nodered-values/60459/4 "2022-02-16T19:44:01Z")

</div>

If the topic “text” contains only numbers, you can create a numeric variable from the text variable [message received from]

Example to “Convert” a textvar which holds only numbers, to a numvar:

.  
If numvar changes, set color to the value stored in [numvar]:

Probably this app is interesting to you

> **[Color Tools](https://homey.app/en-us/app/com.sdn.color-tools/Color-Tools/)**
>
> Convert color data to processable values

---

<div class="post-metadata">

**Author:** ![hteibler](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/hteibler/32/35537_2.png) [@hteibler](https://community.homey.app/u/hteibler)\
**Post date:** [February 16, 2022, 8:46pm UTC](https://community.homey.app/t/mqtt-nodered-values/60459/5 "2022-02-16T20:46:54Z")

</div>

Hi Peter  
Thanks, i’ve found this, and it’s working  
i’m just wondering why this is not possible in1 flow…

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [February 17, 2022, 2:41am UTC](https://community.homey.app/t/mqtt-nodered-values/60459/6 "2022-02-17T02:41:58Z")

</div>

You’re welcome.

Yea, I left it for you to figure out 😬  
It is possible, but is it _better_…

There’s a disadvantage:  
As you can see, there’s a delay needed.  
While the shortest delay possible is ONE whole second, using 2 flows makes it respond quicker.  
In the previous 2 flow example, the 2nd flow fires as soon as the numeric var has changed…

---

<div class="post-metadata">

**Author:** ![hteibler](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/hteibler/32/35537_2.png) [@hteibler](https://community.homey.app/u/hteibler)\
**Post date:** [February 17, 2022, 9:31am UTC](https://community.homey.app/t/mqtt-nodered-values/60459/7 "2022-02-17T09:31:18Z")

</div>

that’s great for my Sauna use-case  
I change the color according the temperature every 10 sec!
