MQTT 2.5 M1+ How to implement the equivalent to MQTT1 REGEX filters

@hafniumzinc Yes I’ve it:

openhab> list | grep -i reg
277 │ Active │  75 │ 2.5.7                   │ openHAB Add-ons :: Bundles :: Transformation Service :: RegEx

And I use it in anothers places, like this:

{ udp="<[192.168.1.65:*:'REGEX(.*<chan id=\'0\'>.*<day units=\'wh\'>(.*)</day></chan><chan id='1'>.*)']" }

But you have to spell it right. You asked for REGEXP, it told you you haven’t got one.

1 Like

The most difficult mistake is always the most obvious :wink:

I’m am still having trouble with this…

Functionally, it all seems to work, but logs are spammed out :confused:

REGEX:(.*D3F9EE.*)∩JSONPATH:$.RfReceived.Data

as in;

image

But still get log errors for channels getting;

tele/rf_bridge/RESULT

when just one message is sent;

2020-09-29 21:10:45.008 [WARN ] [t.generic.ChannelStateTransformation] - Transformation service REGEX for pattern (.*4065D4.*) not found!
2020-09-29 21:10:45.009 [WARN ] [ab.binding.mqtt.generic.ChannelState] - Command '4065D8' not supported by type 'OnOffValue': No enum constant org.eclipse.smarthome.core.library.types.OnOffType.4065D8
2020-09-29 21:10:45.010 [WARN ] [t.generic.ChannelStateTransformation] - Transformation service REGEX for pattern (.*4065D1.*) not found!
2020-09-29 21:10:45.010 [WARN ] [ab.binding.mqtt.generic.ChannelState] - Command '4065D8' not supported by type 'OnOffValue': No enum constant org.eclipse.smarthome.core.library.types.OnOffType.4065D8
2020-09-29 21:10:45.011 [WARN ] [t.generic.ChannelStateTransformation] - Transformation service REGEX for pattern (.*D3F9EE.*) not found!
2020-09-29 21:10:45.011 [WARN ] [ab.binding.mqtt.generic.ChannelState] - Command '4065D8' not supported by type 'OnOffValue': No enum constant org.eclipse.smarthome.core.library.types.OnOffType.4065D8
2020-09-29 21:10:45.012 [WARN ] [t.generic.ChannelStateTransformation] - Transformation service REGEX for pattern (.*E4CF0[AE].*) not found!
2020-09-29 21:10:45.012 [WARN ] [ab.binding.mqtt.generic.ChannelState] - Command '4065D8' not supported by type 'OpenCloseValue': No enum constant org.eclipse.smarthome.core.library.types.OpenClosedType.4065D8
2020-09-29 21:10:45.013 [WARN ] [t.generic.ChannelStateTransformation] - Transformation service REGEX for pattern (.*D3F9E6.*) not found!
2020-09-29 21:10:45.013 [WARN ] [ab.binding.mqtt.generic.ChannelState] - Command '4065D8' not supported by type 'OnOffValue': No enum constant org.eclipse.smarthome.core.library.types.OnOffType.4065D8
2020-09-29 21:10:45.014 [WARN ] [t.generic.ChannelStateTransformation] - Transformation service REGEX for pattern (.*E46E0[AE].*) not found!
2020-09-29 21:10:45.015 [WARN ] [ab.binding.mqtt.generic.ChannelState] - Command '4065D8' not supported by type 'OpenCloseValue': No enum constant org.eclipse.smarthome.core.library.types.OpenClosedType.4065D8
2020-09-29 21:10:45.015 [WARN ] [t.generic.ChannelStateTransformation] - Transformation service REGEX for pattern (.*E3BA0[AE].*) not found!
2020-09-29 21:10:45.015 [WARN ] [ab.binding.mqtt.generic.ChannelState] - Command '4065D8' not supported by type 'OpenCloseValue': No enum constant org.eclipse.smarthome.core.library.types.OpenClosedType.4065D8
Transformation service REGEX for pattern (.*4065D4.*) not found!

You need to install the REGEX transformation service! Add-ons -> Transformation

1 Like

Thank you, that sorted it. :slight_smile: