# Variable control Zwave thermostat

**URL:** https://discourse.nodered.org/t/variable-control-zwave-thermostat/7272
**Category:** General
**Created:** [26 January 2019 16:45 UTC](https://discourse.nodered.org/t/variable-control-zwave-thermostat/7272 "2019-01-26T16:45:44Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![pinie\_pinie](https://avatars.discourse-cdn.com/v4/letter/p/ccd318/32.png) [@pinie\_pinie](https://discourse.nodered.org/u/pinie_pinie)
#### Post date: [26 January 2019 16:45 UTC](https://discourse.nodered.org/t/variable-control-zwave-thermostat/7272/1 "2019-01-26T16:45:44Z")

</div>

Hello,

I set the temperature on my Zwave thermostat with this command (Picture 1). This works without problems.  
Now I want to replace the fixed value ("26") with a variable. A slider is used to set a variable value. The set value should replace the "26".  
This allows the Zwave thermostat to send a variable command.  
My problem is a purely mathematical function.  
Does anyone have a solution for me?  
Many Thanks.

Thoralf ![Picture%201](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/6/63c348bcd91ef940d87c97f08bc64cb2d1dc7d77.jpeg)

---

<div class="post-metadata">

### Author: ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)
#### Post date: [26 January 2019 17:15 UTC](https://discourse.nodered.org/t/variable-control-zwave-thermostat/7272/2 "2019-01-26T17:15:14Z")

</div>

This page shows you how you can use the debug panel to find the path to anything  
[https://nodered.org/docs/user-guide/messages](https://nodered.org/docs/user-guide/messages)

Once you have that, it should be simple to either change the value in a function or within the dashboard. What have you tried?

---

<div class="post-metadata">

### Author: ![pinie\_pinie](https://avatars.discourse-cdn.com/v4/letter/p/ccd318/32.png) [@pinie\_pinie](https://discourse.nodered.org/u/pinie_pinie)
#### Post date: [26 January 2019 17:30 UTC](https://discourse.nodered.org/t/variable-control-zwave-thermostat/7272/3 "2019-01-26T17:30:05Z")

</div>

Hello,  
Thank you for your quick reply.  
I have already been on this page. Unfortunately, I could not find an answer for my problem.  
I think I lack the basic knowledge.  
Have tried some variants, but unfortunately without success.

Many Thanks.

Thoralf

---

<div class="post-metadata">

### Author: ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)
#### Post date: [26 January 2019 17:42 UTC](https://discourse.nodered.org/t/variable-control-zwave-thermostat/7272/4 "2019-01-26T17:42:00Z")

</div>

That page won't give you the answer to your problem but it should help you understand your data, which you can then manipulate.

But using that page, you should be able to find the path to the data you want to change.  
Using that information you should be able to change it with an `inject` node and a `change` node.

But perhaps it would be worthwhile you following one of the online tutorials to Node-RED?

---

<div class="post-metadata">

### Author: ![pinie\_pinie](https://avatars.discourse-cdn.com/v4/letter/p/ccd318/32.png) [@pinie\_pinie](https://discourse.nodered.org/u/pinie_pinie)
#### Post date: [26 January 2019 17:59 UTC](https://discourse.nodered.org/t/variable-control-zwave-thermostat/7272/5 "2019-01-26T17:59:02Z")

</div>

Hello,

since I can only speak a little English, it is very difficult for me.  
I was hoping somebody could offer me a ready solution. Nevertheless, they are right to understand the problem more deeply.  
Maybe someone else will find you.

Many Thanks.

Thoralf

---

<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: [26 January 2019 18:07 UTC](https://discourse.nodered.org/t/variable-control-zwave-thermostat/7272/6 "2019-01-26T18:07:17Z")

</div>

Here is a simple example using the slider from the node-red-dashboard

hope this helps.

```auto
[{"id":"9a6cbdcd.17723","type":"ui_slider","z":"68704546.3d0e0c","name":"","label":"slider","tooltip":"","group":"8c6774a4.06e158","order":4,"width":0,"height":0,"passthru":true,"outs":"all","topic":"setValue","min":"10","max":"80","step":1,"x":160,"y":640,"wires":[["42eb1e3f.981bd"]]},{"id":"42eb1e3f.981bd","type":"function","z":"68704546.3d0e0c","name":"","func":"msg.payload = {\n nodeid: 5,\n cmdclass: 67,\n cmdidx: 1,\n value: msg.payload\n}\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":640,"wires":[["412bcda4.751964"]]},{"id":"412bcda4.751964","type":"debug","z":"68704546.3d0e0c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":540,"y":640,"wires":[]},{"id":"8c6774a4.06e158","type":"ui_group","z":"","name":"Default","tab":"3df105b2.37ac4a","order":2,"disp":true,"width":"6","collapse":false},{"id":"3df105b2.37ac4a","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

```

---

<div class="post-metadata">

### Author: ![pinie\_pinie](https://avatars.discourse-cdn.com/v4/letter/p/ccd318/32.png) [@pinie\_pinie](https://discourse.nodered.org/u/pinie_pinie)
#### Post date: [26 January 2019 18:21 UTC](https://discourse.nodered.org/t/variable-control-zwave-thermostat/7272/7 "2019-01-26T18:21:21Z")

</div>

Hello,

Great, it works !!!!!  
The slider now gives a variable value. This is transmitted via Zwave to the thermostat. That was exactly what I was looking for.  
Now I can extend the control. The basis was your solution. For you a trifle, for me unsolvable.  
I am very happy.

Thank you very much

Thoralf

---

<div class="post-metadata">

### Author: ![Tobitobs](https://avatars.discourse-cdn.com/v4/letter/t/ecd19e/32.png) [@Tobitobs](https://discourse.nodered.org/u/Tobitobs)
#### Post date: [6 June 2020 22:32 UTC](https://discourse.nodered.org/t/variable-control-zwave-thermostat/7272/8 "2020-06-06T22:32:01Z")

</div>

@pinie_pinie how exactly did you came so far. I am struggling with my thermostat but can not figure out what the problem is. Can you please explain or share some pictures of the flow.  
Thanks

Tobias

---

<div class="post-metadata">

### Author: ![pinie\_pinie](https://avatars.discourse-cdn.com/v4/letter/p/ccd318/32.png) [@pinie\_pinie](https://discourse.nodered.org/u/pinie_pinie)
#### Post date: [10 June 2020 12:42 UTC](https://discourse.nodered.org/t/variable-control-zwave-thermostat/7272/9 "2020-06-10T12:42:51Z")

</div>

Hi,

do not currently work with z-wave, sorry.  
I called up old flows on my computer from back then.  
Maybe you can do something with.

Thoralf[zwavekrollflow.txt](https://discourse.nodered.org/uploads/short-url/coGvRzjdHSMSJl3eBv6vaXP48tp.txt) (30.0 KB)
