Fibaro Wall Plug and Homematic Window Sensor

Hi, I have some experiences with homematic, with which a played a bit two years ago.
Currently I am running a Fibaro Set up, but want to migrate to OpenHAB. I liked
the idea of 16 LED Display from Homematic. For Fibaro, there is no similar
solution. So I am using a Fibrao Wall Plug that I have configured to shine red, when a
window is open and green, when it is closed.

Is there a way, to set up a script or rule that covers this on an OpenHAB setup? I want to
use the Homematic window sensors that worked much better than the Fibaro ones
and are much cheaper. Any other way to show window status is also appreciated.