HM-Sec-TIS = undefined

I can not get my HM-Sec-TIS to correctly show the state. I have quite a few HM-Sec-SC/SCo/SC-2 devices and I have configured the HM-Sec-TIS the same way.

Contact Windows_O_Garage		"Garage [MAP(de.map):%s]"				(rrd4jEveryChange)											{channel="homematic:HG-HM-Sec-TiS:SOMEHEXVALUE:XXQ12345678:1#STATE"}

The result is always “Undefined”.

Should the HM-Sec-TIS work using Homegear and the current OH2 Homematic Binding?

Undefined means the Item has never received a state from the binding. I don’t know this technology so can’t help with specifics. But the problem lies with the binding, or the Item configurations for that binding.

I have created the item in the textfile by hand and I used Paper UI for it. I have deleted the corresponding thing and did it all over again. Nothing changed.

The device shows state changes in the homegear logfile, but those won’t show up in OH2. Is there a way to enable debug logging for the homematic binding?

You can enable logging in the karaf console with log:set TRACE org.openhab.binding.homematic

Here is the trace log of opening and closing the garage door:

2016-12-15 20:54:23.492 [DEBUG] [ternal.communicator.HomematicGateway] - Received new (Integer) value '-51' for 'LEQ0786831:0#RSSI_DEVICE' from gateway with id 'E92CD3A5-D6A5-C666-DB0B-895E3D31D05D'
2016-12-15 20:54:23.578 [DEBUG] [ternal.communicator.HomematicGateway] - Received new (Boolean) value 'false' for 'LEQ0786831:1#LOWBAT' from gateway with id 'E92CD3A5-D6A5-C666-DB0B-895E3D31D05D'
2016-12-15 20:54:23.584 [DEBUG] [ternal.communicator.HomematicGateway] - Received new (Boolean) value 'true' for 'LEQ0786831:1#STATE' from gateway with id 'E92CD3A5-D6A5-C666-DB0B-895E3D31D05D'
2016-12-15 20:54:23.587 [TRACE] [ng.homematic.converter.TypeConverter] - Converting BOOL value 'true' with OnOffTypeConverter for 'LEQ0786831:1#STATE'
2016-12-15 20:54:25.786 [TRACE] [al.communicator.client.SocketHandler] - Returning socket for port 2001
2016-12-15 20:54:25.834 [DEBUG] [ternal.communicator.HomematicGateway] - Received new (Boolean) value 'false' for 'LEQ0786831:1#LOWBAT' from gateway with id 'E92CD3A5-D6A5-C666-DB0B-895E3D31D05D'
2016-12-15 20:54:25.837 [DEBUG] [ternal.communicator.HomematicGateway] - Received new (Boolean) value 'false' for 'LEQ0786831:1#STATE' from gateway with id 'E92CD3A5-D6A5-C666-DB0B-895E3D31D05D'
2016-12-15 20:54:25.839 [TRACE] [ng.homematic.converter.TypeConverter] - Converting BOOL value 'false' with OnOffTypeConverter for 'LEQ0786831:1#STATE'

the item is configured in a text file like this:

Contact Windows_O_Garage "Garage [MAP(de.map):%s]" (rrd4jEveryChange) {channel="homematic:HG-HM-Sec-TiS:E92CD3A5-D6A5-C666-DB0B-895E3D31D05D:LEQ0786831:1#STATE"}

I stil get “undefined” in the sitemap :frowning:

looks like the binding does get the information, but does not pass it to the item.

here’s what the karaf console has to say regarding the link of the tem and the thing.

openhab> smarthome:links | grep Garage
Windows_O_Garage -> homematic:HG-HM-Sec-TiS:E92CD3A5-D6A5-C666-DB0B-895E3D31D05D:LEQ0786831:1#STATE

and here is the output regarding the item

openhab> smarthome:items | grep Garage
Windows_O_Garage (Type=ContactItem, State=NULL, Label=Garage, Category=null, Groups=[rrd4jEveryChange])

You can see, that the State = NULL

any ideas?

I have found the problem

I have configured the Item as a Contact-Item (as it was in OH1), but the binding uses the “OnOffTypeConverter” and not the “OpenCloseTypeConverter”.

I have changed the Item configuration to Switch and then it shows ON or OFF. I will just have to use a new mapping to map ON to OPEN and OFF to CLOSE.

Is it wanted this way or did I find a bug?

1 Like

The binding derives the types from the Homematic datapoint definitions. As far as I know “boolean” are alway respresented as Switches. It is quite interesting that the window contact state is defined as ContactItem because the datapoint is a string returning open/close. It seems that the Homematic datapoint definitions are not very consistent.

There is a discussion on Github about the possibility to influence the derivation of types.

Looking at HomeMatic

it is the same as for a window contact

the output in xml interface is the same too:

<channel name="HM-Sec-SCo NEQ1800409:1" ise_id="5909" visible="true" operate="true">
<datapoint name="BidCos-RF.NEQ1800409:1.STATE" type="STATE" ise_id="5934" value="false" valuetype="2" valueunit="" timestamp="1527253687" operations="5"/>
<datapoint name="BidCos-RF.NEQ1800409:1.ERROR" type="ERROR" ise_id="5910" value="0" valuetype="16" valueunit="" timestamp="1527253687" operations="5"/>
<datapoint name="BidCos-RF.NEQ1800409:1.LOWBAT" type="LOWBAT" ise_id="5933" value="false" valuetype="2" valueunit="" timestamp="1527253687" operations="5"/>
</channel>
<channel name="HM-Sec-TiS LEQ1284369:1" ise_id="7075" visible="true" operate="true">
<datapoint name="BidCos-RF.LEQ1284369:1.STATE" type="STATE" ise_id="7078" value="false" valuetype="2" valueunit="" timestamp="1527172923" operations="5"/>
<datapoint name="BidCos-RF.LEQ1284369:1.LOWBAT" type="LOWBAT" ise_id="7077" value="false" valuetype="2" valueunit="" timestamp="1527172923" operations="5"/>
</channel>

The one is recognized as Contact

The other as switch

Hi, I just ran into the same problem.
Does anybody know where to file a bug? I cannot find a github repo for the homematic binding…

I’m 90% certain it’s in openhab2-addons

thanks, found it in there and added the issue https://github.com/openhab/openhab2-addons/issues/5674