# Node-Red Set the desired temperature value

**URL:** <https://discourse.nodered.org/t/node-red-set-the-desired-temperature-value/77870>\
**Category:** Dashboard\
**Created:** [24 April 2023 08:29 UTC](https://discourse.nodered.org/t/node-red-set-the-desired-temperature-value/77870 "2023-04-24T08:29:56Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tomi](https://avatars.discourse-cdn.com/v4/letter/t/f4b2a3/32.png) [@Tomi](https://discourse.nodered.org/u/Tomi)\
**Post date:** [24 April 2023 08:29 UTC](https://discourse.nodered.org/t/node-red-set-the-desired-temperature-value/77870/1 "2023-04-24T08:29:56Z")

</div>

Set temperature value in node red dashboard  
I want to set it to the desired temperature  
I want to know how to set it to get the desired temperature value

---

<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:** [24 April 2023 08:35 UTC](https://discourse.nodered.org/t/node-red-set-the-desired-temperature-value/77870/2 "2023-04-24T08:35:34Z")

</div>

Hi Tomi and welcome to the forum.

Being new, you have a limited number of posts before you get temporarily blocked.

You said `dashboard` so I am guessing you are using the standard dashboard?  
How much experience do you have using it?

> I want to set it to the desired temperature

What is `it`?

Anyway, you may find a `slider` handy.  
It gives you a slider (GUI side of things) and you set the max/min (or min/max) values and you slide a slider along to set a desired value.

But more than that I can't really help you as you haven't really explained what you really mean.  
And HOW you are going to do this. Though: that - I fear - is a whole other can of worms.  
For now maybe concentrate on getting the GUI side of things.

---

<div class="post-metadata">

**Author:** ![Tomi](https://avatars.discourse-cdn.com/v4/letter/t/f4b2a3/32.png) [@Tomi](https://discourse.nodered.org/u/Tomi)\
**Post date:** [24 April 2023 09:11 UTC](https://discourse.nodered.org/t/node-red-set-the-desired-temperature-value/77870/3 "2023-04-24T09:11:25Z")

</div>

I don't have much experience using it.

I want to set a warning alarm when the temperature rises above, and if I set the temperature I want, I want it to be that temperature

---

<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:** [24 April 2023 09:24 UTC](https://discourse.nodered.org/t/node-red-set-the-desired-temperature-value/77870/4 "2023-04-24T09:24:41Z")

</div>

Node-red is fun to play with.  
But you will need to expand on what temperature you are referring.  
CPU?  
Room temperature? If so: how are you getting the _value_? (Not that it is that important. But it would be nice to know)

> I want it to be that temperature

Again: Nice but you aren't telling anyone what this `it` is?

And there is the next question which is there bashing against the door:  
How are you going to control the temperature?

But I don't think we are at that stage yet.

Could you please expand on what it is you are wanting to do?  
Measure the temperature of what?

---

<div class="post-metadata">

**Author:** ![Tomi](https://avatars.discourse-cdn.com/v4/letter/t/f4b2a3/32.png) [@Tomi](https://discourse.nodered.org/u/Tomi)\
**Post date:** [24 April 2023 09:28 UTC](https://discourse.nodered.org/t/node-red-set-the-desired-temperature-value/77870/5 "2023-04-24T09:28:08Z")

</div>

Test the temperature of the motor using a sensor. If the temperature of the motor reaches 50° or higher, I want to make a sound

---

<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:** [24 April 2023 09:39 UTC](https://discourse.nodered.org/t/node-red-set-the-desired-temperature-value/77870/6 "2023-04-24T09:39:03Z")

</div>

I fear you are about to run out of allowed posts for now.

Ok, suggestion:  
For now forget about what you are wanting to do.  
It will only be for a short time - so please don't panic!

Have you put the `slider` node into/onto your dashboard?  
If not: Please do it.  
Set it to range from 40 to 60.  
In the `edit` screen, connect the output of the `slider` to a `debug` node.  
While you are at it, also connect up a `text` node and put it in/on the same _page_ as the `slider`, and connect it to the `slider` node also.  
DEPLOY and go to the `dashboard` screen.  
Move the slider and watch the value in the `text` node change.  
If it doesn't (as you are sliding the slider) _release_ it (move it to a new position and release the mouse) and see if it changes.

This establishes you can set a value you want to _detect_.

You are going to have to learn about `context`.  
There are THREE types:  
1 - node  
2 - flow  
3 - global

You are going to have to learn what NODE CONTEXT is and how to use it.

Also study the `slider` node and there is an option to either send the value continuously or `only on release`.  
This arcs back to above and moving the slider and watching the value/s change.

Put ANOTHER slider and this can SIMULATE the measured temperature reading from the engine.  
(Basically duplicate what you just did above)

One slider - say the first one -_label_ it as WARNING, and the second one _label_ it as TEMPERATURE.  
That way you know which is which.

Adjust the WARNING one to 50 and the TEMPERATURE one is - as I said - simulating what you get from the engine.

After studying and learning about NODE CONTEXT, you will need to learn how to write code in a `function` node.

But I fear I am getting way too far ahead for what you know.

---

<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:** [24 April 2023 09:51 UTC](https://discourse.nodered.org/t/node-red-set-the-desired-temperature-value/77870/7 "2023-04-24T09:51:59Z")

</div>

> [@Tomi](#):
>
> Test the temperature of the motor using a sensor.

Are you able to read the temperature ok in node-red?

---

<div class="post-metadata">

**Author:** ![Tomi](https://avatars.discourse-cdn.com/v4/letter/t/f4b2a3/32.png) [@Tomi](https://discourse.nodered.org/u/Tomi)\
**Post date:** [25 April 2023 01:47 UTC](https://discourse.nodered.org/t/node-red-set-the-desired-temperature-value/77870/8 "2023-04-25T01:47:11Z")

</div>

Yes, I can read the temperature from Nordred

---

<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:** [26 April 2023 15:56 UTC](https://discourse.nodered.org/t/node-red-set-the-desired-temperature-value/77870/10 "2023-04-26T15:56:31Z")

</div>

In that case @TotallyInformation's suggestion seems a good possibility.

---

<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 April 2023 08:41 UTC](https://discourse.nodered.org/t/node-red-set-the-desired-temperature-value/77870/11 "2023-04-29T08:41:51Z")

</div>

Sorry, I meant @Trying_to_learn's suggestion of course.

---

<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:** [29 April 2023 20:12 UTC](https://discourse.nodered.org/t/node-red-set-the-desired-temperature-value/77870/12 "2023-04-29T20:12:47Z")

</div>

No worries.

I thought I had missed something.

All good.

---

<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:** [29 May 2023 20:13 UTC](https://discourse.nodered.org/t/node-red-set-the-desired-temperature-value/77870/13 "2023-05-29T20:13:36Z")

</div>

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