Hello,
I’m new in openhab2.
I have installed a tasmota sonoff rf bridge. Everything works well with MQTT.
But within my rules I have a problem, maybe anyone can help me.
rule "RF Bridge sensor triggered"
when
Item RF_BRIDGE received update
then
logInfo("tasmota-rf", "received command: {}", RF_BRIDGE.state.toString)
val String stateNew = transform("REGEX", ".*(\\d{50}).*", RF_BRIDGE.state.toString)
logInfo("tasmota-rf", "transform: {}", stateNew)
end
The log looks like:
[INFO ] [se.smarthome.model.script.tasmota-rf] - received command: AA B1 03 0122 03DE 26FC 28190819090908190909081908190818181818181818190908 55
[INFO ] [se.smarthome.model.script.tasmota-rf] - transform: AA B1 03 0122 03DE 26FC 28190819090908190909081908190818181818181818190908 55
My target is to extract the String “28190819090908190909081908190818181818181818190908” from “AA B1 03 0122 03DE 26FC 28190819090908190909081908190818181818181818190908 55”. A test with https://regexr.com/ works fine.
What’s wrong? :-/
Thanks
Caesium