HomeMatic Window State is NULL for Contact but CLOSED for Strings

While integrating a few Homematic-IP Door/Window Contacts via CCU2 with the Homematic Binding (openhab2 latest unstable) I noticed that only the String type seems to be supported on the STATE channel.

Is this the expected behaviour?

openhab> smarthome:items list *XX*
XX_Fenster_StateContactCon (Type=ContactItem, State=NULL, Label=Fenster, Category=contact, Groups=[gWindow])
XX_Fenster_StateContactStr (Type=StringItem, State=NULL, Label=Fenster, Category=contact, Groups=[gWindow])
XX_Fenster_StateContactNum (Type=NumberItem, State=NULL, Label=Fenster, Category=contact, Groups=[gWindow])
XX_Fenster_StateContactSwi (Type=SwitchItem, State=NULL, Label=Fenster, Category=contact, Groups=[gWindow])

XX_Fenster_StateCon (Type=ContactItem, State=NULL, Label=Fenster, Category=contact, Groups=[gWindow])
XX_Fenster_StateStr (Type=StringItem, State=CLOSED, Label=Fenster, Category=contact, Groups=[gWindow])
XX_Fenster_StateNum (Type=NumberItem, State=NULL, Label=Fenster, Category=contact, Groups=[gWindow])
XX_Fenster_StateSwi (Type=SwitchItem, State=NULL, Label=Fenster, Category=contact, Groups=[gWindow])

The items file contains this:

Contact XX_Fenster_StateContactCon           "Fenster [MAP(window.map):%s]"                      <contact>   (gWindow)      {channel="homematic:HMIP-SWDO:ccu2:0000D569A49B6E:1#STATE_CONTACT"}
String  XX_Fenster_StateContactStr           "Fenster [MAP(window.map):%s]"                      <contact>   (gWindow)      {channel="homematic:HMIP-SWDO:ccu2:0000D569A49B6E:1#STATE_CONTACT"}
Number  XX_Fenster_StateContactNum           "Fenster [MAP(window.map):%s]"                      <contact>   (gWindow)      {channel="homematic:HMIP-SWDO:ccu2:0000D569A49B6E:1#STATE_CONTACT"}
Switch  XX_Fenster_StateContactSwi           "Fenster [MAP(window.map):%s]"                      <contact>   (gWindow)      {channel="homematic:HMIP-SWDO:ccu2:0000D569A49B6E:1#STATE_CONTACT"}

Contact XX_Fenster_StateCon         "Fenster [MAP(window.map):%s]"                      <contact>   (gWindow)      {channel="homematic:HMIP-SWDO:ccu2:0000D569A49B6E:1#STATE"}
String  XX_Fenster_StateStr         "Fenster [MAP(window.map):%s]"                      <contact>   (gWindow)      {channel="homematic:HMIP-SWDO:ccu2:0000D569A49B6E:1#STATE"}
Number  XX_Fenster_StateNum         "Fenster [MAP(window.map):%s]"                      <contact>   (gWindow)      {channel="homematic:HMIP-SWDO:ccu2:0000D569A49B6E:1#STATE"}
Switch  XX_Fenster_StateSwi         "Fenster [MAP(window.map):%s]"                      <contact>   (gWindow)      {channel="homematic:HMIP-SWDO:ccu2:0000D569A49B6E:1#STATE"}

interestingly the gWindow group seems to work fine eventhough the channel uses String:

openhab> smarthome:items list *gWindow*
gWindow (Type=GroupItem, BaseType=ContactItem, Members=9, State=OPEN, Label=Offene Fenster, Category=contact, Groups=[Whg])
openhab> smarthome:items list *gWindow*
gWindow (Type=GroupItem, BaseType=ContactItem, Members=9, State=CLOSED, Label=Offene Fenster, Category=contact, Groups=[Whg])

Hi Olivier,

I am using the non-IP Window contacts and for these devices the “Contact” type works perfectly. The problem may be caused by the MAP definition. I am not absolutely sure but it is possible that the MAP definitions only work with strings.
Did you try to define them as Contact without adding a MAP definition?

Martin