Z wave and items - where to define?

Hi Teams

Something in this z wave does not make sense to me. So maybe someone can explain this to me :wink:

Using:
Raspberry pi 3
Openhab 2
Z stick Gen 5
ZW120-C Door window sensors Gen5

Under THINGS, I have a window sensor registered:

Bathroom
ZW120 Door/Window sensor Gen5
Door/Window sensor Gen5
zwave:device:c90b4ea8:node4

This Thing has 3 channels:
-Binary Sensor, Alarm (General), Battery Level

Binary Sensor is the one I will use to monitor if the window is open or closed.

Binary Sensor
Link Channel – creating a new Item

Bathroom_BinarySensor
zwave:device:c90b4ea8:node4:sensor_binary

Linked items:
Bathroom_BinarySensor
Label: BadevĂŠrelse
Category: Door
Type : Switch

So fare, all ‘Windows sensor’ configuration have been done inside Paper UI in OpenHab 2 – no use of configuration files.

In a x.sitemap I have this entry:
Text item=Bathroom_BinarySensor

And nothing in x.items.

Result in browser is:
“Badevérelse “ but without a value.

I would say, that my sitemap entry is connecting to the definitions in PaperUI – since it displays ‘Badevérelse’ as defined in Item. But how come it does not pickup the value ?

Changing the Type to Contact or Number, does not make any changes.

The only way to get a value or reading is to make an entry in the x.items file:

Number Bathroom_BinarySensor “Badevérelse [%s]”

This now gives this in the sitemap:
“Badevérelse 1”

In PaperUI under Items, I now have two entries for ‘Bathroom_BinarySensor’, the one that was created in paper UI – with a door icon and Switch type, one with a B icon and Number type.

If I change the items entry to Switch, it displays now two in paper UI of type of switch , with
different icons. But looks like it is the same item when going into edit on both.

So, why do I have to create an Item inside the items file, when the item is defined in Paper UI ?

And to the next, how do I get this 0/1 or on/off to show Open/closed instead ?

I have tried with a map – Number Bathroom_BinarySensor “Badevérelse [MAP(dk.map):%s]” But without success


Thanks.

Check if the device is fully initialized.

You don’t have to.

You can’t do that in openHAB2, keep the default for that channel and you will get open/closed.

Also check if you have set the corresponding association group to your controller, otherwise you won’t get any updates on closed/open.

If you’re only using Paper UI, you don’t need to create an item file.

If you want to use another UI such as Basic UI for a sitemap, then you do need an item file. These UI’s don’t draw their info from Paper UI, you need to use text files.

I’m not sure about the experimental rules editor in Paper UI, if that uses item files or if it draws from Paper UI. But to use textual rule files you need a text item file.

There is some confusion with Paper UI. Paper UI was never designed for OpenHab. It was designed as part of the Eclipse Smarthome system. It works with OpenHab which is why it is provided. The split nature of Paper UI not needing text files and all other aspects of OpenHab needing text files has caused a lot of confusion with people new to OpenHab, especially those that have started directly with OH2.

Over time, I’ve developed a pretty balanced method. All of my bindings and things are managed through Paper UI but items, rules, and sitemaps (I use Basic UI for control) are handled through text files.