# RBE Node for msg.payload Array

**URL:** <https://discourse.nodered.org/t/rbe-node-for-msg-payload-array/23655>\
**Category:** General\
**Created:** [26 March 2020 06:42 UTC](https://discourse.nodered.org/t/rbe-node-for-msg-payload-array/23655 "2020-03-26T06:42:24Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andreas703](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andreas703/32/26326_2.png) [@Andreas703](https://discourse.nodered.org/u/Andreas703)\
**Post date:** [26 March 2020 06:42 UTC](https://discourse.nodered.org/t/rbe-node-for-msg-payload-array/23655/1 "2020-03-26T06:42:24Z")

</div>

Hi, I am using a device with NodeRed 0.18.7.  
I am getting an array of msg.payload looks like  
 ![NodeRED msg.payloadarray](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/b/bb96df174518a61987b9a067f8b119eaaf3623b9.jpeg)

Is there a possibility to address all msg.payload.value of the array in the rbe node without splitting the Array?

Thx

---

<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:** [26 March 2020 10:13 UTC](https://discourse.nodered.org/t/rbe-node-for-msg-payload-array/23655/2 "2020-03-26T10:13:49Z")

</div>

Welcome to the forum Andreas!

1. you should go read [https://nodered.org/docs/user-guide/messages](https://nodered.org/docs/user-guide/messages) bfor background information
2. what device are you using? The reason I ask is that v0.18.7 is old. The current version is v1.0.4 and I would suggest upgrading if at all possible (backup your flows first)

if you just specify msg.payload, then any change in msg.payload - depending on the option you chose - will cause the node evaluate the msg and deal with it.

---

<div class="post-metadata">

**Author:** ![Andreas703](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andreas703/32/26326_2.png) [@Andreas703](https://discourse.nodered.org/u/Andreas703)\
**Post date:** [26 March 2020 10:39 UTC](https://discourse.nodered.org/t/rbe-node-for-msg-payload-array/23655/3 "2020-03-26T10:39:38Z")

</div>

Hi, thx for your answer Paul,

I know this site, but it doesnt help me ☹

sry but it isnt possible to upgrade nodered, its an device with customised Nodered inside which dont allow users to upgrade NodeRed.

If I would specify msg.payload I would get every msg because of the timestamp in the msg object

btw I want to set the deadband rbe, to see only changes above 0.01

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [26 March 2020 11:18 UTC](https://discourse.nodered.org/t/rbe-node-for-msg-payload-array/23655/4 "2020-03-26T11:18:57Z")

</div>

Hi @Andreas703

can you describe a bit more about what you are trying to do.

The RBE node can be used to block messages if a given message property has not changed. But you have an object containing lots of properties.

You have both `msg.payload.HMI_NAEHERUNG_1_FEHLERWERT.value` and `msg.payload.HMI_NAEHERUNG_2_FEHLERWERT.value`.

So is your requirement to only allow the message through if _either_ one of those values has changed?

The RBE node cannot be used to check multiple properties at once. You would need to recreate the logic in a Function node using context to remember the previous values received

---

<div class="post-metadata">

**Author:** ![Andreas703](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andreas703/32/26326_2.png) [@Andreas703](https://discourse.nodered.org/u/Andreas703)\
**Post date:** [26 March 2020 11:31 UTC](https://discourse.nodered.org/t/rbe-node-for-msg-payload-array/23655/5 "2020-03-26T11:31:31Z")

</div>

Hello @knolleary  
hat's right, I only want to forward the message if one of the two values ​​has changed.  
I was hoping to only work with wildcards like msg.payload. \* .value would solve the problem.

Is there anotherway or do I have to create a function for this now?  
I am asking because its only one property(value) @ 2 objects (HMI\_Naeherung\_1\_FEHLERWERT + HMI\_Naeherung\_2\_FEHLERWERT)

After that I want to write the value into a csv file, so I have to convert the string like:  
"Value1","Value2","Timestamp"

---

<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:** [26 March 2020 14:20 UTC](https://discourse.nodered.org/t/rbe-node-for-msg-payload-array/23655/6 "2020-03-26T14:20:06Z")

</div>

Why not add a `change` node before the `rbe` node and set another msg variable to those two values. Something like  
msg.testme.v1 = msg.payload.msg.payload.HMI\_NAEHERUNG\_1\_FEHLERWERT.value  
msg.testme.v2 = msg.payload.msg.payload.HMI\_NAEHERUNG\_2\_FEHLERWERT.value  
and then in the `rbe` node watch msg.testme?

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [26 March 2020 14:25 UTC](https://discourse.nodered.org/t/rbe-node-for-msg-payload-array/23655/7 "2020-03-26T14:25:23Z")

</div>

They want to use the deadbanding feature to block changes smaller than 0.01. For that to work, the property must be a parsable number. You cannot pass it an object with multiple values in that mode.

---

<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:** [26 March 2020 14:28 UTC](https://discourse.nodered.org/t/rbe-node-for-msg-payload-array/23655/8 "2020-03-26T14:28:57Z")

</div>

> [@knolleary](#):
>
> They want to use the deadbanding feature to block changes smaller than 0.01

Drats! Another great idea down the drain.

---

<div class="post-metadata">

**Author:** ![Andreas703](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andreas703/32/26326_2.png) [@Andreas703](https://discourse.nodered.org/u/Andreas703)\
**Post date:** [3 April 2020 14:54 UTC](https://discourse.nodered.org/t/rbe-node-for-msg-payload-array/23655/9 "2020-04-03T14:54:05Z")

</div>

Thx, I have done it with an Function Node.

---

<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:** [17 April 2020 14:54 UTC](https://discourse.nodered.org/t/rbe-node-for-msg-payload-array/23655/10 "2020-04-17T14:54:06Z")

</div>

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