[SOLVED] Trying to add HM-SEC-WDS-2 via things file

Hi,

I configured all my Homematic and Homematic IP things and items via files. This works fine for all but one: HM-SEC-WDS-2.

Info: the communication channel of the device with the CCU3 is not secured.

My things file:

Bridge homematic:bridge:ccu [ gatewayAddress="192.168.178.61"] {
    Thing HM-SEC-WDS-2 SN1234 "Badezimmer Wassermelder" @ "Bad"
}

My items file:

Group  Bad_Wassermelder             "Bad Wassermelder"
String Bad_Wassermelder_State       "Bad Wassermelder Status"             { channel="homematic:HM-Sec-WDS-2:ccu:SN1234:1#STATE" }
Switch Bad_Wassermelder_Battery_Low        "Battery Low"                   { channel="homematic:HM-Sec-WDS-2:ccu:SN1234:1#LOWBAT" }

The item is detected to some extend, log says:

==> /var/log/openhab2/events.log <==

2020-01-07 17:31:45.961 [vent.ItemStateChangedEvent] - Bad_Wassermelder_State changed from NULL to DRY
2020-01-07 17:31:45.972 [.ItemChannelLinkAddedEvent] - Link 'Bad_Wassermelder_State-homematic:HM-Sec-WDS-2:ccu:SN1234:1#STATE' has been added.

But the item does not appear in PaperUI Control and it is not updated from the device.
The item is not linked to the thing in PaperUI, as with all other stuff I configured.

If I add the thing through PaperUI discovery, everything works fine, even I use my items file.

What did I miss?

Thanks
Christian

PaperUI is not for control, create a sitemap file and add your items then use BasicUI to control them.

Hi.

I know, I just provided this information to emphasize that the configuration through files does not work at all.

[quote="chris81, post:1, topic:89786"]
String Bad_Wassermelder_State "Bad Wassermelder Status" { channel="homematic:HM-Sec-WDS-2:ccu:SN1234:1#STATE" } Switch Bad_Wassermelder_Battery_Low "Battery Low" { channel="homematic:HM-Sec-WDS-2:ccu:SN1234:1#LOWBAT" }
[/quote]


I the items file should the “Sec” part be SEC?

Exaample:

[quote="chris81, post:1, topic:89786"]
String Bad_Wassermelder_State "Bad Wassermelder Status" { channel="homematic:HM-SEC-WDS-2:ccu:SN1234:1#STATE" } Switch Bad_Wassermelder_Battery_Low "Battery Low" { channel="homematic:HM-SEC-WDS-2:ccu:SN1234:1#LOWBAT" }
[/quote]


I tried that, but that’s not the error.
Well spotted, though.

After making that change did you stop OH, clean the cache and reboot?

No, and I never did that before.
But you brought me to the solution.
Not the items has to be SEC, but the the thing must be Sec.
That is different to all other Homematic device, where all letters are capital.

That works:

Thing HM-Sec-WDS-2 SN1234 "Badezimmer Wassermelder" @ "Bad"
String Bad_Wassermelder_State "Bad Wassermelder Status" { channel="homematic:HM-Sec-WDS-2:ccu:SN1234:1#STATE" }

Many, many thanks for your help!

Yes the point was they should match and I assumed the Things was discoved in PaperUI and correct. :roll_eyes:

Glad you found the solution and marked your post.

The dicovered thing had Sec and not SEC, I just did not spot that.

Point remains, they must match for the channel to be linked. If you used Sec in both thing and item file what happens?

EDIT: What happens when making the change then stopping OH and clean the cache? If the Thing must be Sec and will not work any other way then you should report this on giithub to have it fixed.

Using Sec in both files works.
Using SEC in both files does not work.

Using automatic discovery adds the thing with Sec, items with SEC worked strangely.