# Deadband (RBE) reset all topics does not work

**URL:** https://discourse.nodered.org/t/deadband-rbe-reset-all-topics-does-not-work/45314
**Category:** General
**Created:** [7 May 2021 06:11 UTC](https://discourse.nodered.org/t/deadband-rbe-reset-all-topics-does-not-work/45314 "2021-05-07T06:11:30Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![priyank](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/priyank/32/41391_2.png) [@priyank](https://discourse.nodered.org/u/priyank)
#### Post date: [7 May 2021 06:11 UTC](https://discourse.nodered.org/t/deadband-rbe-reset-all-topics-does-not-work/45314/1 "2021-05-07T06:11:31Z")

</div>

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.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/f/cfec525b4eadf6b7596bd601ec824c1256e6b7c8.png)

Deadband properties:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/3/b397c3dc07614a5a994b5153377af0ef21c89143.png)

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:

```auto
[{"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"];`

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [7 May 2021 07:31 UTC](https://discourse.nodered.org/t/deadband-rbe-reset-all-topics-does-not-work/45314/2 "2021-05-07T07:31:15Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![priyank](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/priyank/32/41391_2.png) [@priyank](https://discourse.nodered.org/u/priyank)
#### Post date: [7 May 2021 07:38 UTC](https://discourse.nodered.org/t/deadband-rbe-reset-all-topics-does-not-work/45314/3 "2021-05-07T07:38:04Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [7 May 2021 07:41 UTC](https://discourse.nodered.org/t/deadband-rbe-reset-all-topics-does-not-work/45314/4 "2021-05-07T07:41:33Z")

</div>

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.

---

<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: [6 July 2021 07:41 UTC](https://discourse.nodered.org/t/deadband-rbe-reset-all-topics-does-not-work/45314/5 "2021-07-06T07:41:37Z")

</div>

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