Can't use Homematic Tilt Sensor HM-Sec-TiS as Contact item

Im using a Homematic tilt sensor HM-Sec-TiS for my garage door to see weather it is open or not.
But when i link it with a Contact item it is ignored. As a Number item it has Values 1 or 0. As Switch or String it has ON and OFF. And I am able to transform the values of the String Item to values CLOSED and OPEN with Profile transform:MAP. Why can’t I use the same transformation with a Contact item. Or why is it ignored. No MAP transform error anymore!
It would be so smart instead writing a Rule that translates from one e.g. Number Item to a second Contact item.

My items for the same channel:

Number Gtn_Garagentor_Kontakt_Number "Garagentor Kont]"	<garagedoor> 	{channel="homematic:HM-Sec-TiS:ccu:MEQ0475729:1#STATE"}
Switch Gtn_Garagentor_Kontakt_Switch "Garagentor Kont]"	<garagedoor> 	{channel="homematic:HM-Sec-TiS:ccu:MEQ0475729:1#STATE"}
String Gtn_Garagentor_Kontakt_String "Garagentor Kont"	<garagedoor> 	{channel="homematic:HM-Sec-TiS:ccu:MEQ0475729:1#STATE" [profile="transform:MAP", function=""]}
Contact Gtn_Garagentor_Kontakt_Cont "Garagentor Kont"	<garagedoor> 	{channel="homematic:HM-Sec-TiS:ccu:MEQ0475729:1#STATE" [profile="transform:MAP", function=""]}


Log when I open and close garage door (Contact Item is ignored other Items work):

2019-06-20 23:52:52.062 [vent.ItemStateChangedEvent] - Gtn_Garagentor_Kontakt_Number changed from NULL to 1
2019-06-20 23:52:52.066 [vent.ItemStateChangedEvent] - Gtn_Garagentor_Kontakt_Switch changed from NULL to ON
2019-06-20 23:52:52.069 [vent.ItemStateChangedEvent] - Gtn_Garagentor_Kontakt_String changed from NULL to CLOSED	
2019-06-21 00:05:00.997 [vent.ItemStateChangedEvent] - Gtn_Garagentor_Kontakt_String changed from CLOSED	 to OPEN
2019-06-21 00:05:01.004 [vent.ItemStateChangedEvent] - Gtn_Garagentor_Kontakt_Switch changed from ON to OFF
2019-06-21 00:05:01.013 [vent.ItemStateChangedEvent] - Gtn_Garagentor_Kontakt_Number changed from 1 to 0
2019-06-21 00:05:18.494 [vent.ItemStateChangedEvent] - Gtn_Garagentor_Kontakt_String changed from OPEN to CLOSED	
2019-06-21 00:05:18.500 [vent.ItemStateChangedEvent] - Gtn_Garagentor_Kontakt_Switch changed from OFF to ON
2019-06-21 00:05:18.509 [vent.ItemStateChangedEvent] - Gtn_Garagentor_Kontakt_Number changed from 0 to 1

Any idea how to get a Contact item with this tilt sensor, to use it in groups?

1 Like

transforms used in profiles currently have a serious restriction; transforms always produce string results, but no parsing is done between profile result and Item state.

So you cannot use transform profiles with Switch, Contact, Number etc. type Items.
Yes, I think that is a great shame too.

Binding authors can opt to support transforms in their binding; this works in a different way, fitting between binding and channel (rather than between channel and Item)…
That doesn’t help here -
Homematic binding does not appear to support transforms.
even if it did -
Homematic binding does not appear to offer Contact type channels.

I think you are stuck with a proxy Item and conversion rule for now

1 Like

Thanks for fast and precise replay. Even I hoped to hear something else.
So I will stick to the proxy item way.

Maybe the Homematic experts should check if it is the right way the tilt sensor thing is implemented with a switch (?) channel in the bindig. In the Homematic world it looks like a contact in terms of values and usage in CCU scripts.

You could create a github issue to (a) put in front of the right people (b) see that the idea does not get lost amongst the noise.

I have a view that OH Contact type is there to represent any binary input/sensor. Others do not; Homematic is one of many bindings that do not support Contacts and instead use Switch to represent read-only binary states.