Platform information:
- Hardware: Raspberry Pi 2 Model B Rev 1.1/1GB/16GB SD card
- OS: Raspbian GNU/Linux 10 (buster)
- Java Runtime Environment: openjdk 11.0.10 2021-01-19 LTS
- openHAB version: OpenHABian 3.0.1
I am having trouble getting REGEX transform going. I looked through docs and the community, but found no real help so far.
What I am trying to do is to get the energy output from my solar inverter. I created an HTTP URL Thing and I get the status in a channel, there are several lines and I created a regex and can read the relevant information with regex101.
However, I am unable to get it going in my setup. I have the regex transformation added, etc. However I cannot get the syntax going, not even in the widgets expression tester.
From what I read, the following simple example should work"
=transform("REGEX", "^[A-Z]", "What")
However, I get no output, much less a reformatted string.
Ultimately this is what I thought my final thing should look like:
UID: http:url:f1f558fa8e
label: HTTP URL Thing
thingTypeUID: http:url
configuration:
authMode: BASIC
ignoreSSLErrors: false
baseURL: http://192.168.1.247/home.cgi
refresh: 30
commandMethod: GET
contentType: text/plain
timeout: 3000
bufferSize: 2048
location: Garage
channels:
- id: cZeverReturn
channelTypeUID: http:string
label: Return
description: ""
configuration:
stateTransformation: REGEX:/^(?:[^\x20]*\x20){11}([0-9]*)\x20/
Any pointer or help much appreciated!