I’m attempting a regex state transformation for a string item linked to a channel of an http item.
While the original value is returned properly, I run into issues the moment I’m attempting a REGEX transformation.
YES - I have installed the REGEX transform service
You need to put the parenthesis around the part that shall be returned.
For whatever reason your expample value returned from browser resp. http binding ( which is described as AS9=1 ) does not match with what you use in the expression ( AS0 ).
Either a typo here in the description or a typo in your regex.
So shouldn’t the REGEX be:
REGEX:AS9=(\d)
I need to say that I 've never used regex in OH but in other linux stuff.
Well spotted wrt the 9 vs 0. That was a copy pased issue when starting this topic.
When using REGEX:AS9=(\d) as state transform value the output seems to be frozen. there is not even a change of the value appearing in the event log.
Should REGEX:(.*) not returning the original value? the moment I use it and change the state of the device there is no change reported in the events logs anymore…
As if the regex transform service is not working completely.
So REGEX:(.*) is now working after I reinstalled the regex transform service.
REGEX:AS9=(\d) or just REGEX:(AS9=) don’t. The Itm value just seems to freeze at its last state and does not get updated anymore if the state changes. As if the pattern is not getting processed by the transformation service.
I do not see any errors with regard to REGEX module in openhab.log