# Transformation service REGEX for pattern \<pattern\> NOT found!

**URL:** <https://community.openhab.org/t/transformation-service-regex-for-pattern-pattern-not-found/119128>\
**Category:** Beginners\
**Tags:** regex, serialbinding, regex-transform\
**Created:** [March 16, 2021, 9:28pm UTC](https://community.openhab.org/t/transformation-service-regex-for-pattern-pattern-not-found/119128 "2021-03-16T21:28:39Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dominik\_Barukcic](https://community.openhab.org/user_avatar/community.openhab.org/dominik_barukcic/32/61502_2.png) [@Dominik\_Barukcic](https://community.openhab.org/u/Dominik_Barukcic)\
**Post date:** [March 16, 2021, 9:28pm UTC](https://community.openhab.org/t/transformation-service-regex-for-pattern-pattern-not-found/119128/1 "2021-03-16T21:28:39Z")

</div>

Hi, everyone!

I use OpenHAB (3.0.1) on a Raspberry Pi 4B with an Arduino Mega connected to it via USB cable. I irune OpenHAB Server on Raspberry PI Desktop OS. I tried to get sensor values from Arduino with Serial binding but I ran into a problem. I followed this [tutorial](https://openhab.org/addons/bindings/serial/).

I went to check if serial port recieved anything with:

```auto
sudo minicom -b 9600 -o -D /dev/ttyACM0 

```

This is recieved output:

 ![2021-03-16-214302_2560x1440_scrot](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/a/a/aae52b8b62842c85758d7501b30d1193a59dff2a.png)  
ex.  
SECURITY;TEMP=25.00;HUM=48.00;SMOKE=1;MOTION=0;FLAME=1;

This is code for demo.things file:

```auto
Bridge serial:serialBridge:sensors [serialPort="/dev/ttyACM0", baudRate=9600, charset="ASCII"] {
    Thing serialDevice temperatureSensor [patternMatch="SECURITY;.*"] {
        Channels:
            Type number : temperature [stateTransformation="REGEX:SECURITY;TEMP=(.*?);.*"]
            Type number : humidity [stateTransformation="REGEX:.*HUM=(.*?);.*"]
    }
}

```

This is code for demo.items file:

```auto
Number:Temperature myTemp "My Temperature" {channel="serial:serialDevice:sensors:temperatureSensor:temperature"}
Number myHum "My Humidity" {channel="serial:serialDevice:sensors:temperatureSensor:humidity"}

```

First I want to figure out how to get values for temperature and humidity to items, and later I will move on to binary values.

I don’t know where is the problem because the values in OpenHAB are null.

 ![2021-03-16-221358_2560x1440_scrot](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/5/3/532387f5fa85a2ec45750a2e904557f835a79bb2.png)

This is what logs said:

 ![2021-03-16-214031_2560x1440_scrot](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/6/c/6c0a353b0c8daf957ce3073279da6f2e5e27597f.png)

I don’t know what’s wrong with regular expressions because I [simulated them](https://regex101.com/) and they looked okay.

I tried adding this line in .items file and Arduino item was NULL as well.

```auto
String Arduino "Arduino [%s]" (arduino) {serial="/dev/ttyACM0"}  

```

I hope you will help me! I’m a student and I’m relatively new to coding and Linux. We studied C in school so I could manage in that environment and Arduino part wasn’t much of a challenge. I want to make a smart home model. It isn’t very complicated but it’s my graduation task. I wouldn’t ask you yet if I hadn’t spent much time stuck on this. Thank you for your time!

---

<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:** [March 16, 2021, 9:34pm UTC](https://community.openhab.org/t/transformation-service-regex-for-pattern-pattern-not-found/119128/2 "2021-03-16T21:34:16Z")

</div>

> [@Dominik\_Barukcic](#):
>
> `{serial="/dev/ttyACM0"} `

This is a configuration for version 1 Serial binding, which is not available in openHAB version 3.

The error message tells you that the REGEX Transformation service cannot be found.  
It’s an optional add-on, and needs installing.

---

<div class="post-metadata">

**Author:** ![Dominik\_Barukcic](https://community.openhab.org/user_avatar/community.openhab.org/dominik_barukcic/32/61502_2.png) [@Dominik\_Barukcic](https://community.openhab.org/u/Dominik_Barukcic)\
**Post date:** [March 16, 2021, 10:16pm UTC](https://community.openhab.org/t/transformation-service-regex-for-pattern-pattern-not-found/119128/3 "2021-03-16T22:16:42Z")

</div>

I installed serial binding in configuration ui. How is it then that I have to do it again and I have serial devices that are “online”?

---

<div class="post-metadata">

**Author:** ![hafniumzinc](https://community.openhab.org/letter_avatar_proxy/v4/letter/h/b9bd4f/32.png) [@hafniumzinc](https://community.openhab.org/u/hafniumzinc)\
**Post date:** [March 16, 2021, 10:18pm UTC](https://community.openhab.org/t/transformation-service-regex-for-pattern-pattern-not-found/119128/4 "2021-03-16T22:18:42Z")

</div>

> [@Dominik\_Barukcic](#):
>
> I installed serial binding in configuration ui.

> [@rossko57](#):
>
> The error message tells you that the **REGEX Transformation service** cannot be found.

As @rossko57 says, you’re missing the REGEX Transformation Service.

---

<div class="post-metadata">

**Author:** ![Dominik\_Barukcic](https://community.openhab.org/user_avatar/community.openhab.org/dominik_barukcic/32/61502_2.png) [@Dominik\_Barukcic](https://community.openhab.org/u/Dominik_Barukcic)\
**Post date:** [March 16, 2021, 10:24pm UTC](https://community.openhab.org/t/transformation-service-regex-for-pattern-pattern-not-found/119128/5 "2021-03-16T22:24:28Z")

</div>

Where can I get this Regex service from? Do I have to download something, or eddit addons file,or…?

---

<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:** [March 16, 2021, 11:26pm UTC](https://community.openhab.org/t/transformation-service-regex-for-pattern-pattern-not-found/119128/6 "2021-03-16T23:26:07Z")

</div>

How did you install the serial binding, using the UI maybe? Have a look there for transformation add-ons as well.

---

<div class="post-metadata">

**Author:** ![Dominik\_Barukcic](https://community.openhab.org/user_avatar/community.openhab.org/dominik_barukcic/32/61502_2.png) [@Dominik\_Barukcic](https://community.openhab.org/u/Dominik_Barukcic)\
**Post date:** [March 17, 2021, 12:03am UTC](https://community.openhab.org/t/transformation-service-regex-for-pattern-pattern-not-found/119128/7 "2021-03-17T00:03:14Z")

</div>

Thank you, I will do my research tomorrow 🙂  
I found this I will see if it helps [Installation of Add-ons | openHAB](https://www.openhab.org/docs/configuration/addons.html)

---

<div class="post-metadata">

**Author:** ![hafniumzinc](https://community.openhab.org/letter_avatar_proxy/v4/letter/h/b9bd4f/32.png) [@hafniumzinc](https://community.openhab.org/u/hafniumzinc)\
**Post date:** [March 17, 2021, 6:01am UTC](https://community.openhab.org/t/transformation-service-regex-for-pattern-pattern-not-found/119128/8 "2021-03-17T06:01:23Z")

</div>

[See step 6.1 in this tutorial.](https://community.openhab.org/t/oh3-tasmota-relay-via-mqtt-sonoff-basic-with-optional-dht22/111485) The gif shows how to install the JSONPATH Transformation Service, but the REGEX Transformation Service is in the same list.

---

<div class="post-metadata">

**Author:** ![Dominik\_Barukcic](https://community.openhab.org/user_avatar/community.openhab.org/dominik_barukcic/32/61502_2.png) [@Dominik\_Barukcic](https://community.openhab.org/u/Dominik_Barukcic)\
**Post date:** [March 17, 2021, 9:34am UTC](https://community.openhab.org/t/transformation-service-regex-for-pattern-pattern-not-found/119128/9 "2021-03-17T09:34:17Z")

</div>

@hafniumzinc 's solution worked instantly! Thank you!

 ![2021-03-17-103119_2560x1440_scrot](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/8/5/85c228e7a2be335d1a179497d180d6c35e5f78bd.png)
