Paperui items & mqtt?

Hi, I have add few own sample items that send and mqtt.
But how can I do same with automatic added devices from paperui that is not listed in my items file? Where can I found the items file?
Here is what I have tried in my own items file.
Switch item=zway_zwayDevice_192_168_2_138_5_sensorBinary_ZWayVDev_zway_5_0_113_7_3_A {mqtt=">[broker:fibaro/motion/sensor1:command:ON:1],>[broker:fibaro/motion/sensor1:OFF:0]"}

I’m running openhab2 on Raspberry 3
Many thanks

Assuming you do not have Simple Mode enabled, you just create the Item as normal but use channel=<name of Thing's channel> in-between the {}.

The relevant documents are:

http://docs.openhab.org/configuration/items.html#binding-configuration

Thank you Rich, I had Simple mode activated. So I had to figure out how to find the data to add into channel then.

If I list the items from restapi I can found below motion sensor. Device is located in node 5
"type": “Switch”,
“name”: “zway_zwayDevice_192_168_2_138_3_sensorBinary_ZWayVDev_zway_3_0_113_7_8_A”,
“label”: “Sensor binary”,
“category”: “Switch”,
“tags”: [],
“groupNames”: []

I have tried
Contact Fibaro_Motion_Sensor “Motion detection [%s]” { channel=“zwave:device:ZWayVDev_zway_5-0-113-7-8-A:5:switch_binary” }

How do I find correct channel?

The stuff (Things/Channels/Items/etc) that gets added automatically from PaperUI is stored in the jsonDB. (userdata/jsondb folder)

From the info above, I assume that you are using the Z-Way binding. Correct? (I didn’t understand the mqtt part)

In this case, you would discover your things in PaperUI and then you can choose:
a) Use simple linking mode and let OH2 auto-create the items and the links to the channels
or
b) Use flat config files for your items and define the links in there like Rich wrote above

To find the correct channel name of a thing to be used for the item definition, use PaperUI → Configuration → Things. You can copy the name from there and paste in in your `{ channel =“” } section.

Example (Z-Wave but not Z-Way …I believe that it’s similar) bound Items for the PaperUI channel shown in the screenshot below:

Dimmer	WDim01_Dim			"Staircase LED Dim [%d %%]"	<slider>	(gZWave,GF_P02_Corridor)    {channel="zwave:device:ZW090C:node4:switch_dimmer"}
Switch  WDim01_Switch		"Staircase LED Switch"		<switch>	(gZWave,GF_P02_Corridor)	{channel="zwave:device:ZW090C:node4:switch_dimmer"}

Thank you I got that part working.

Switch Motionsensor1 {channel=“zway:zwayDevice:192_168_2_138:6:sensorBinary-ZWayVDev_zway_6-0-113-7-3-A”}
Update the switch by the motionsensor.
But if I add mqtt it stop working.
Switch Motionsensor1 {channel=“zway:zwayDevice:192_168_2_138:6:sensorBinary-ZWayVDev_zway_6-0-113-7-3-A” mqtt=">[broker:/fibaro/motion/bedroom:command:ON:1],>[broker:/fibaro/motion/bedroom:command:OFF:0]"}
Or with a comma between
Switch Motionsensor1 {channel=“zway:zwayDevice:192_168_2_138:6:sensorBinary-ZWayVDev_zway_6-0-113-7-3-A” , mqtt=">[broker:/fibaro/motion/bedroom:command:ON:1],>[broker:/fibaro/motion/bedroom:command:OFF:0]"}
If I remove channel it works by pressing the switch manually, mqtt message is broadcasted. But zwave device is not connected.
Switch Motionsensor1 {mqtt=">[broker:/fibaro/motion/bedroom:command:ON:1],>[broker:/fibaro/motion/bedroom:command:OFF:0]"}
So can I not have 2 functions inside {} channel plus mqtt?
I have also tried with multilple {} {}
Switch Motionsensor1 {channel=“zway:zwayDevice:192_168_2_138:6:sensorBinary-ZWayVDev_zway_6-0-113-7-3-A”} {mqtt=">[broker:/fibaro/motion/bedroom:command:ON:1],>[broker:/fibaro/motion/bedroom:command:OFF:0]"}
Switch Motionsensor1 {channel=“zway:zwayDevice:192_168_2_138:6:sensorBinary-ZWayVDev_zway_6-0-113-7-3-A”}, {mqtt=">[broker:/fibaro/motion/bedroom:command:ON:1],>[broker:/fibaro/motion/bedroom:command:OFF:0]"}

I have also tried to use same switch name in same item file to cover both functions but…
Switch Motionsensor1 {channel=“zway:zwayDevice:192_168_2_138:6:sensorBinary-ZWayVDev_zway_6-0-113-7-3-A”}
Switch Motionsensor1 {mqtt=">[broker:/fibaro/motion/bedroom:command:ON:1],>[broker:/fibaro/motion/bedroom:command:OFF:0]"}

I don’t use Items linked to more than 1 binding but I believe that this should be possible (with comma)

I have another suggestion for you:
a) Set up individual items (different names) for each binding (one for Z-Way and another for MQTT)
b) Create a Group and make the 2 items members of the Group
c) Control the Group

Ok thank you for the Group suggestion, I’m very new to openhab bu I will try and check the documention for Groups.

1 Like

I solved it by rules instead:)