# How to strip out unwanted MQTT inputs(?)

**URL:** https://discourse.nodered.org/t/how-to-strip-out-unwanted-mqtt-inputs/39805
**Category:** General
**Created:** [26 January 2021 17:31 UTC](https://discourse.nodered.org/t/how-to-strip-out-unwanted-mqtt-inputs/39805 "2021-01-26T17:31:44Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![haskle](https://avatars.discourse-cdn.com/v4/letter/h/e19adc/32.png) [@haskle](https://discourse.nodered.org/u/haskle)
#### Post date: [26 January 2021 17:31 UTC](https://discourse.nodered.org/t/how-to-strip-out-unwanted-mqtt-inputs/39805/1 "2021-01-26T17:31:44Z")

</div>

Newbie(ish) question: I have managed to set up my Node\_RED RPi to receive MQTT messages with the topic `home/rtl_433` from an MQTT broker installed on a different RPi.

But there are a load of messages that I am not interested in, and I don't know how to "filter them out" or delete / remove them.

EG: I do _not_ want these messages ...

```auto
home/rtl_433 : msg.payload : Object
object
time: "2021-01-26 17:29:25"
brand: "OS"
model: "Oregon-v1"
id: 0
channel: 4
battery_ok: 0
temperature_C: -157.7
mic: "CHECKSUM"

```

... but I do want these ...

```auto
home/rtl_433 : msg.payload : Object
object
time: "2021-01-26 17:29:16"
model: "Oil-SonicSmart"
id: 136628653
flags: 128
maybetemp: 24
temperature_C: 8.333
binding_countdown: 0
depth_cm: 96

```

How might I achieve this?

Many thanks!

---

<div class="post-metadata">

### Author: ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)
#### Post date: [26 January 2021 17:43 UTC](https://discourse.nodered.org/t/how-to-strip-out-unwanted-mqtt-inputs/39805/2 "2021-01-26T17:43:44Z")

</div>

if you had given your mqtt topics another value eg

```auto
home/device1/rtl_433

```

You could target the topic to the device. To get all devices you could then use wildcard e.g. `home/+/rtl_433`

As you have not, you can use a switch node to only allow message to pass on certain message property value, etc.

---

<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: [26 January 2021 17:44 UTC](https://discourse.nodered.org/t/how-to-strip-out-unwanted-mqtt-inputs/39805/3 "2021-01-26T17:44:23Z")

</div>

You can use a Switch node to only pass messages where msg.payload.model is Oil-SonicSmart.

---

<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: [27 March 2021 17:44 UTC](https://discourse.nodered.org/t/how-to-strip-out-unwanted-mqtt-inputs/39805/4 "2021-03-27T17:44:58Z")

</div>

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