Onewire digitalIO for window contacts

I have started from scratch with a openhab 4.1 (openhabian). I have a onewire bus with some digital IOs used as contacts for windows to sense open/closed.
Some years ago I had set up an openhab1 and defined my items as “contact”. With the current onewire-binding I realy like the autodiscovery which found my DIO, but mapping the channel to a contact didn’t work. Here on the forum I found a post telling contact isn’t supported, so I used switch instead as recommended. OK, now the state changes between ON/OFF but the displayed window-Icon isn’t updated correct.
With one homematic-windowcontact I have it works fine using a contact-item.

Now I’m wondering how to achive this with the onewire items. Does the binding still not support contact or might have I done something wrong? If I need to stay with switch instead of contact: how can the correct windowstate beeing visualized (MainUI and Sitemap on Android-App).

I thought this should be easy-going but I’ve searched for hours now and didn’t find anything really bringing me forward. Hence i would appreciate getting a hint on what I could/should try.

best regards

You could use a profile that maps ON/OFF to OPEN/CLOSED

Thank you for the feedback.
I’ve tryed already with a profile but had no luck yesterday but today one more try with your hint and voila: it works :slight_smile:
Thank you for your feedback confirming I’m on the right way.

And for all who might have the same problem and coming around here in the future:
install Map-Transformation and create a MAP (your name, language empty):


(NULL als Defaultwert für unbekannt - je nach Anwendungsfall auch auf OPEN)

Item of type “Contact”, Category “Window”, SemanticClass “OpenState”, Semantic Property “Opening”.
Channel: the “Digital I/O”, Profile “MAP” and then select the created mapping from above.

That is at least what worked for me :slight_smile:

1 Like