Deadband (RBE) reset all topics does not work

I send a message with blank topic and reset properties (i.e. msg.topic="" and msg.reset="")

Expected behavior: All topics in deadband are reset. i.e it will forget last input/output value for all topics and for the immediate next message on a topic it will act like its the first message it has ever received on that topic

Actual behavior: Deadband behaves as if nothing happened and continues filtering based on last remembered value for each topic.

Deadband properties:
image

Version:
I am running an official nodered in docker image: nodered/node-red:1.0.6-2
It has nodejs version: v10.20.1

Test Code:

[{"id":"d5b0fdef.e51dc","type":"rbe","z":"d9c0e444.537698","name":"","func":"deadband","gap":"50%","start":"","inout":"out","property":"payload","x":620,"y":800,"wires":[["c76f38b3.ea4f48"]]},{"id":"fabb2d8c.b2291","type":"inject","z":"d9c0e444.537698","name":"","topic":"topicA","payload":"1","payloadType":"num","repeat":"1","crontab":"","once":false,"onceDelay":0.1,"x":420,"y":760,"wires":[["d5b0fdef.e51dc"]]},{"id":"b789c5ff.9474d8","type":"inject","z":"d9c0e444.537698","name":"","topic":"topicB","payload":"1","payloadType":"num","repeat":"1","crontab":"","once":false,"onceDelay":0.1,"x":420,"y":800,"wires":[["d5b0fdef.e51dc"]]},{"id":"453fe72e.5c0988","type":"inject","z":"d9c0e444.537698","name":"","topic":"topicC","payload":"1","payloadType":"num","repeat":"1","crontab":"","once":false,"onceDelay":0.1,"x":420,"y":840,"wires":[["d5b0fdef.e51dc"]]},{"id":"c76f38b3.ea4f48","type":"debug","z":"d9c0e444.537698","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":790,"y":800,"wires":[]},{"id":"bd8d0f64.fb72a","type":"change","z":"d9c0e444.537698","name":"","rules":[{"t":"set","p":"reset","pt":"msg","to":"","tot":"str"},{"t":"set","p":"topic","pt":"msg","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":880,"wires":[["64b59efa.711b","d5b0fdef.e51dc"]]},{"id":"10c6f11.a2ab50f","type":"inject","z":"d9c0e444.537698","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":220,"y":880,"wires":[["bd8d0f64.fb72a"]]},{"id":"64b59efa.711b","type":"debug","z":"d9c0e444.537698","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":610,"y":880,"wires":[]}]

Edit: Already tried
delete msg["topic"];

I havn't tried it but the help text says
msg.reset: if set clears the stored value for the specified msg.topic, or all topics if msg.topic is not specified.
That suggests that you need to delete msg.topic, not set it to an empty string.

Forgot to mention but had tried that as well.
Using the following in a function node
delete msg["topic"];

Actually, having tested it, your original flow works fine for me, so I guess that was an issue in the old version of node-red that you are using, so the solution is probably to upgrade node-red. The current version is 1.3.4.

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