Transformation service REGEX for pattern <pattern> NOT found!

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.

I went to check if serial port recieved anything with:

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

This is recieved output:
2021-03-16-214302_2560x1440_scrot
ex.
SECURITY;TEMP=25.00;HUM=48.00;SMOKE=1;MOTION=0;FLAME=1;

This is code for demo.things file:

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:

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.

This is what logs said:

I don’t know what’s wrong with regular expressions because I simulated them and they looked okay.

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

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!

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.

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”?

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

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

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

Thank you, I will do my research tomorrow :slight_smile:
I found this I will see if it helps Installation of Add-ons | openHAB

See step 6.1 in this tutorial. The gif shows how to install the JSONPATH Transformation Service, but the REGEX Transformation Service is in the same list.

@hafniumzinc 's solution worked instantly! Thank you!