Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug in RBE mode "block if value change greater than" #569

Closed
ianmacs opened this issue Aug 14, 2019 · 3 comments

Comments

@ianmacs
Copy link

commented Aug 14, 2019

Which node are you reporting an issue on?

RBE

What are the steps to reproduce?

Configure the rbe node fields to

  • "block if value change greater than"
  • 0 (that's the number zero)
  • "compared to last input value".

Deploy it and pass to RBE the same numeric payload repeatedly.

This is done in the following minimal example flow:
[{"id":"93bea00e.4ce7e","type":"tab","label":"Flow 3","disabled":false,"info":""},{"id":"6b75e49.0e87f1c","type":"inject","z":"93bea00e.4ce7e","name":"","topic":"","payload":"1","payloadType":"num","repeat":"1","crontab":"","once":false,"onceDelay":0.1,"x":90,"y":80,"wires":[["1891a3c5.984d6c","11c26259.6ce816"]]},{"id":"1891a3c5.984d6c","type":"debug","z":"93bea00e.4ce7e","name":"log rbe input","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"\"Input: \" & msg.payload","targetType":"jsonata","x":250,"y":160,"wires":[]},{"id":"11c26259.6ce816","type":"rbe","z":"93bea00e.4ce7e","name":"block if value change greater than zero","func":"narrowband","gap":"0","start":"","inout":"in","property":"payload","x":350,"y":80,"wires":[["46c3192f.842cc8"]]},{"id":"46c3192f.842cc8","type":"debug","z":"93bea00e.4ce7e","name":"log rbe OUTPUT","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"\"OUTPUT: \" & msg.payload","targetType":"jsonata","x":530,"y":160,"wires":[]}]

What happens?

All messages are blocked by RBE.

What do you expect to happen?

Since the input values are always the same, the value change is not greater than zero, and therefore the messages should not be blocked by RBE (starting with the second message).

Please tell us about your environment:

  • Node-RED version: v0.20.7
  • node.js version: v10.15.2
  • npm version: 5.8.0
  • Platform/OS: Raspberry Pi 4, Raspbian Lite
  • Browser: Firefox 68.0.1 (64-bit) on Ubuntu
@dceejay

This comment has been minimized.

Copy link
Member

commented Aug 14, 2019

as a work around you can use a switch node and check == against previous value.

@ianmacs

This comment has been minimized.

Copy link
Author

commented Aug 14, 2019

Thanks for the workaround suggestion!

@dceejay dceejay added the bug label Aug 14, 2019

@dceejay dceejay closed this in 2e5b526 Aug 14, 2019

@dceejay

This comment has been minimized.

Copy link
Member

commented Aug 14, 2019

Published as version 0.2.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.