# Change payloadmeasureunit

**URL:** <https://discourse.nodered.org/t/change-payloadmeasureunit/64347>\
**Category:** General\
**Tags:** function-node\
**Created:** [25 June 2022 09:06 UTC](https://discourse.nodered.org/t/change-payloadmeasureunit/64347 "2022-06-25T09:06:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nilpferd](https://avatars.discourse-cdn.com/v4/letter/n/db5fbb/32.png) [@Nilpferd](https://discourse.nodered.org/u/Nilpferd)\
**Post date:** [25 June 2022 09:06 UTC](https://discourse.nodered.org/t/change-payloadmeasureunit/64347/1 "2022-06-25T09:06:46Z")

</div>

Hi,  
I try to verify the temperature of hotwater. If below 60 degrees the power controller should be adjusted to 90%. in my node the output is always 90 degrees and so the 0-10V KNX device will not understand it.  
I use the cange node to set the value to 90:

 ![set value](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/c/4ca5a78acd9be4864226450eb9c3ce2c09daa3e3.jpeg)

How can i change the units and/or DPT?

regards Erwin

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [25 June 2022 09:26 UTC](https://discourse.nodered.org/t/change-payloadmeasureunit/64347/2 "2022-06-25T09:26:48Z")

</div>

Does the value need to be a number? Currently it looks like the 90 is a string. Look at the `change` node.

---

<div class="post-metadata">

**Author:** ![Nilpferd](https://avatars.discourse-cdn.com/v4/letter/n/db5fbb/32.png) [@Nilpferd](https://discourse.nodered.org/u/Nilpferd)\
**Post date:** [25 June 2022 12:50 UTC](https://discourse.nodered.org/t/change-payloadmeasureunit/64347/3 "2022-06-25T12:50:19Z")

</div>

it should be a percentage (0...100%) - KNX DPT 5.0001

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [25 June 2022 17:43 UTC](https://discourse.nodered.org/t/change-payloadmeasureunit/64347/4 "2022-06-25T17:43:23Z")

</div>

Without seeing your flow and the msg you are processing it’s hard to give you advice. Please export your flow and attach it to a reply and add a debug node ( set to display the complete msg object) to the output of the switch node and show me what it is.

---

<div class="post-metadata">

**Author:** ![Nilpferd](https://avatars.discourse-cdn.com/v4/letter/n/db5fbb/32.png) [@Nilpferd](https://discourse.nodered.org/u/Nilpferd)\
**Post date:** [26 June 2022 08:31 UTC](https://discourse.nodered.org/t/change-payloadmeasureunit/64347/5 "2022-06-26T08:31:43Z")

</div>

I tried another way to find a solution;

 ![powercontrolltemp](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/b/bb5d635de2cc9821b585d65525ae8e2905ce2de7.jpeg)

The temperature is checked if \<55 degrees and then set true. Depending on the azimuth of the sun the contactor will be activated.  
The difference between PV power and used power controlls the amount (0-10V) of the power controller. If the difference ist greater than the power of the heating it ist limited to 90%, if it is less than 1 kW it ist fixed to 20%, and between adjusted linear.

for information the flow:  
[power controll by temp.json](https://discourse.nodered.org/uploads/short-url/glvQFaAusMGD2suRYYvmztX7MoV.json) (18.5 KB)

if you find ways to optimize and improve the flow please let me now.

regards Erwin

---

<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:** [25 August 2022 08:32 UTC](https://discourse.nodered.org/t/change-payloadmeasureunit/64347/6 "2022-08-25T08:32:14Z")

</div>

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