Of course.
Firstly, these are the messages I get from my RF Bridge, as buttons are pressed or other sensors activate. The only thing that changes for a different device is the value for Data;
12:16:43 MQT: tele/rf_bridge/RESULT = {"Time":"2020-09-30T12:16:43","RfReceived":{"Sync":12480,"Low":420,"High":1230,"Data":"4065D4","RfKey":"None"}}
12:16:46 MQT: tele/rf_bridge/RESULT = {"Time":"2020-09-30T12:16:46","RfReceived":{"Sync":12520,"Low":420,"High":1230,"Data":"4065D8","RfKey":"None"}}
12:16:48 MQT: tele/rf_bridge/RESULT = {"Time":"2020-09-30T12:16:48","RfReceived":{"Sync":12160,"Low":440,"High":1220,"Data":"4065D1","RfKey":"None"}}
12:16:51 MQT: tele/rf_bridge/RESULT = {"Time":"2020-09-30T12:16:51","RfReceived":{"Sync":12490,"Low":410,"High":1230,"Data":"4065D1","RfKey":"None"}}
12:16:54 MQT: tele/rf_bridge/RESULT = {"Time":"2020-09-30T12:16:54","RfReceived":{"Sync":12490,"Low":420,"High":1230,"Data":"4065D4","RfKey":"None"}}
Setting a channel for each RF event was done like this;
Because each device sends the same topic, all the channels get all the event for each button/sensor.
Originally, I used this at the Transformation;
JSONPATH:$.RfReceived.Data
This functionally worked, but the logs filled with errors for all the channels which received the topic, but were not the correct ID number.
To fix this, the Transformation was changed to;
REGEX:(.*4065D4.*)∩JSONPATH:$.RfReceived.Data
This filtered out the messages that were not for the correct device, without leaving errors in the logs.
I had 2 errors getting this to work. Firstly ensure you have the following bindings installed to make this work;
Secondly, I had issues with the “∩” which is required to get this to work
I was able to paste it correctly and it worked for a while but the character reverted to a ? when I changed any other channel for the thing. This seem to be because of the encoding used to write the json config files back.
To fix this I needed to edit the file on the server called;
/openhab/runtime/bin/setenv
and make this change;
Then restart openhab.
After this, the config files were saved correctly and all worked.
I hope this might be useful to someone else. And special thanks to @rossko57 for doing such a good job at pointing me to relevant threads of help.