Struggling with this and am unable to find the right terms to search for although undoubtedly I am not the first to ask…
MQTT feed incoming from RF link I get data such as
From RF open/closed sensor, physical state open - rflink/EV1527/0e20a0/R/SWITCH 0a
From RF open/closed sensor, physical state closed - rflink/EV1527/0e20a0/R/SWITCH 0e
I am having issues building this input into rules as clearly 0a & 0e do not fit in the normal framework, somehow I need to change them to OPEN & CLOSED (I think) so I can use them in the normal fashion but for the life of me cannot figure out how, some expert advice would be much appreciated!
You can use an incoming MAP Transformation. You need to install the Map Transformation Service to use this.
And than you create a map file that maps your custom values to open and closed as described in the example section. You have to save this map file to the transformation folder that is in the same place as your rules and items folders.
You can than call this transformation from paper ui as an incoming transformation in the channel settings of the generic mqtt thing of type contact in paperui
You can put 0a in the “Custom On/Open value” and the binding will convert that to OPEN. It’s not clear whether what you wrote above is the full message received or not. If it is, then put the full text of the OPEN message on the left and the full test of the other one in the CLOSED message.
I can’t remember if this was available in MQTT 2.4 so if you don’t see the above you will need to move up to MQTT 2.5 M1 or later.