# \[SOLVED\] Sonoff rf bridge and 2way contacts?

**URL:** <https://community.openhab.org/t/solved-sonoff-rf-bridge-and-2way-contacts/83976>\
**Category:** Home Automation\
**Created:** [October 21, 2019, 2:52pm UTC](https://community.openhab.org/t/solved-sonoff-rf-bridge-and-2way-contacts/83976 "2019-10-21T14:52:11Z")\
**Posts on this page:** 1\
**Showing post:** 23

<div class="post-metadata">

**Author:** ![rossko57](https://community.openhab.org/user_avatar/community.openhab.org/rossko57/32/70263_2.png) [@rossko57](https://community.openhab.org/u/rossko57)\
**Post date:** [February 11, 2020, 11:26pm UTC](https://community.openhab.org/t/solved-sonoff-rf-bridge-and-2way-contacts/83976/23 "2020-02-11T23:26:45Z")

</div>

> [@kriznik](#):
>
> Any idea how to solve this?

Yes, you chain a REGEX transform to “pre-scan” the incoming string for your target codes on each channel. If there is a “miss”, the REGEX fails silently and never passes the code to the chained MAP transform to produce the error.

> [@MQTT 2.5 M1+ How to implement the equivalent to MQTT1 REGEX filters](https://community.openhab.org/t/mqtt-2-5-m1-how-to-implement-the-equivalent-to-mqtt1-regex-filters/68350):
>
> Problem In the MQTT1 binding there was a feature that let us filter messages published to a given topic and only pass those that match a given REGEX to the transformation and/or on to the Item. This was useful to handle devices that publish messages to a single well known topic for all their devices. For example, the official firmware from the vendor of Shelly devices have a request/response protocol over MQTT to get meta data about the devices (IP address, MAC address, firmware version, whethe…

---

_[View the full topic](https://community.openhab.org/t/solved-sonoff-rf-bridge-and-2way-contacts/83976)._
