I have been receiving this message from sonoffbridge (rf signal), but I would like to have a transformation for open/close but for specific bold area only. How to split this using json
IMHO regarding JSON only the whole string after “data” (“AA …”) is adresable via JSON. In order to split that string further down you would need to split that string. I would think a simple .contains("theBoldPart") method should do.
I was trying to build a more generic REGEX @rlkoshak. So i could get all devices in my house that use the same rf pattern. Tried doing:
(?<=^…)[0-2]{58}
start at beginning;
skip AA B1 03 0212 03FC 2D28
Get the 58 characters i need.
The thing is, using this regex i use a lookbehindmethod, which is not supported.
Also, how can i use the REGEX with JSON in the paperUI thing configuration?
That REGEX does not match the whole string and the part you want is not in the capture group. Whether or not you want a more generic REGEX, those are the requirements for using REGEX transformation in openHAB.