Error
2020-08-14 06:01:40.991 [WARN ] [ab.binding.mqtt.generic.ChannelState] - Command 'FBFB0E' not supported by type 'OpenCloseValue': No enum constant org.eclipse.smarthome.core.library.types.OpenClosedType.FBFB0E
Your two channels have the same topic. Both channels get the MQTT messages from both sensors. "allowedStates’ does not work for contact type channels. So each channel will throw the WARN when it gets a message for the other channel.
@rossko57 has nailed it. I was curious so tried it out myself, and no longer get the warnings. Try the following in your things file, and make sure the RegEx transformation service is installed in openHAB.
Note that your original things file still works - the second sensor still updated correctly. Just that the first sensor channel complained with the warning, which - if you don’t care about it - you could just ignore…
Do you have a plan for detecting when the second contact is no longer open?
I tested by publishing the following to tele/RFBridge1/RESULT
{ "RfReceived" : { "Data" : "FBFB0E" } }
If in reality the device publishes something else then there’s a chance it may interfere with the REGEX - try it and see! If there is an issue, then let us know what the actual message is.
You could probably do this with the Expire binding - no need for rules!
This Works perfectly. I cant thank you enough, I was about to jump to the other side as there seemed to be more people willing to help, sometimes you need to see the answer so you can understand the function.
This opens up a lot of automation fun.
I now have
Sensor on postbox so I know when courier has delivered something and closes the lid.
Back Gate Alarm
Front Door Alarm
PIR on top patio to switch on water feature
PIR on drive to switch security lights on
I have a lot more planned.
I will now write a conclusion post so people also benefit from your help