[SOLVED] MQTT binding - Contact (open/closed)

Hello together,
i have got a problem, and need some assistance.
1., i have got a zwave device (door sensor)
2., i have got a zwave-mqtt gateway
3., i have got an openhab with MQTT binding

From the MQTT gateway, for the contact, the JSON is coming. This one i can translate it in the thing definition:
Thing mqtt:topic:GF_LivingRoom_0001:okosotthon:LivingRoom:WindowSensorBig “ZW120_1” (mqtt:broker:C_StorageRoom_0002) @ “LivingRoom”
{
Channels:
Type contact: ZW120_1_Contact “Contact” [stateTopic=“okosotthon/LivingRoom/WindowSensorBig/48/1/0”, transformationPattern=“JSONPATH:$.value”, Open=“false”, Closed=“true”]

In this case true or false is really there.

In the item definition
Contact GF_LivingRoom_WindowSensorBig_Contact_String “Contact_String” {channel=“mqtt:topic:GF_LivingRoom_0001:okosotthon:LivingRoom:WindowSensorBig:ZW120_1_Contact”}

i have got the error:

Command ‘true’ not supported by type ‘OpenCloseValue’: No enum constant org.eclipse.smarthome.core.library.types.OpenClosedType.true

so i have got a feeling that the true will be not “Open” and the false will be not a “Closed”

Where is the mistake, can you please help me?

}

I think you need params on= off= and the channel sorts that out for Contact type.

Open= Closed= are not documented params, are they?

1 Like

thanks!
[stateTopic=“okosotthon/LivingRoom/WindowSensorBig/48/1/0”, transformationPattern=“JSONPATH:$.value”, on=“true”, off=“false”]

1 Like

And this is yet another example of misconfiguration due to not using the PaperUI to configure MQTT channels…
I’ll say no more

thank you for feedback. i have a lot of reason why to do that. in a privat message i can explain you the details.