RBE Node for msg.payload Array

Hi, I am using a device with NodeRed 0.18.7.
I am getting an array of msg.payload looks like
NodeRED msg.payloadarray

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


Welcome to the forum Andreas!

  1. you should go read 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.

Hi, thx for your answer Paul,

I know this site, but it doesnt help me :frowning:

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

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

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:

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?

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.

Drats! Another great idea down the drain.

Thx, I have done it with an Function Node.

1 Like

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