How to configure a contact Item in a Sitemap

Hi,
I’m new to Openhab and have a problem but google and searching forum and documentation hasn’t workd out for me. Maybe it is to simple?

My setup: openhabian with usb zwave controller. I already integrated an roller shutter(via paperUI and simple mode) and an led light bulb (via habmin and manual Item configuration). I left the simple mode of paper ui because it created double Item wich i couldn’t delete. Took me long enough to get it cleaned up in the jasonDB.

I have an magnetic door sensor “IM-20 Door Sensor”. In the end i want to switch on a lightbulb if the door is opened.
First I created an Item as Switch and integrated it as Switch in my sitemap. But then i can toggle it in the sitemap which i don’t want. So i looked again and found the Item type contact which to me looked far better for this since all I want the sensor to signal is door open or door closed.
So i connected the “binary Sensor” channel of my thing with the Contact Item and threw it in the sitemap. But in the sitemap i just see the Item on the left side, but no information on the right side (like the on off toggle with the lightbulb).

But in paper UI it says “triggered or untriggered” when i open or close the physical sensor.
What is the correct way to do this?
If i close and open PaperUI the first time it just says “-” and after triggering the physical switch it says “triggered or untriggered”. So the Conntact item is not persistent in the system, just when i trigger it?

my item definition:
Contact Kabuff_Tuer_Offen "Kabuff Tür offen"
my sitemap:
Default item=Kabuff_Tuer_Offen label=“Tür” icon=“door”

Any suggestions?

Contact Kabuff_Tuer_Offen "Kabuff Tür offen[%s]"
Default item=Kabuff_Tuer_Offen icon="door"
3 Likes

…well, that gives me a “-” on the right side in my sitemap but it still won’t show me any information in what state my sensor is in.
What is frustrating is, that in paper ui i see the state change but i can’t get it to my sitemap.
So any other suggestions how to debug this?

1 Like

Change the state to OPEN or CLOSED and you will see it. It is NULL now.

No, that does not happen.
Sitemap shows “-” consistently. (viewing it in VS code, on my phone and in basic ui)
I think something is wrong with my config, because the only place i see some feedback from the sensor is in paper ui.
Here is the logfile. node 5 is my sensor. Any Error i should care about?

2018-02-03 20:29:48.029 [hingStatusInfoChangedEvent] - ‘zwave:device:8663531c:node5’ changed from OFFLINE (BRIDGE_OFFLINE): Controller is offline to ONLINE

2018-02-03 20:29:51.078 [hingStatusInfoChangedEvent] - ‘zwave:device:8663531c:node5’ changed from ONLINE to ONLINE: Node initialising: INIT_NEIGHBORS

2018-02-03 20:29:51.101 [hingStatusInfoChangedEvent] - ‘zwave:device:8663531c:node5’ changed from ONLINE: Node initialising: INIT_NEIGHBORS to ONLINE: Node initialising: FAILED_CHECK

2018-02-03 20:29:51.113 [hingStatusInfoChangedEvent] - ‘zwave:device:8663531c:node5’ changed from ONLINE: Node initialising: FAILED_CHECK to ONLINE: Node initialising: WAIT

2018-02-03 22:05:14.190 [hingStatusInfoChangedEvent] - ‘zwave:device:8663531c:node5’ changed from ONLINE: Node initialising: WAIT to ONLINE

2018-02-04 00:09:49.915 [temChannelLinkRemovedEvent] - Link ‘Kabuff_Tuer_Offen => zwave:device:8663531c:node5:sensor_binary’ has been removed.

2018-02-04 00:11:06.714 [.ItemChannelLinkAddedEvent] - Link ‘Kabuff_Tuer_Offen-zwave:device:8663531c:node5:sensor_binary’ has been added.

2018-02-04 00:23:40.411 [hingStatusInfoChangedEvent] - ‘zwave:device:8663531c:node5’ changed from ONLINE to UNINITIALIZED

2018-02-04 00:23:40.452 [hingStatusInfoChangedEvent] - ‘zwave:device:8663531c:node5’ changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)

2018-02-04 00:23:44.703 [temChannelLinkRemovedEvent] - Link ‘Batterie_Kabuff_Tuer => zwave:device:8663531c:node5:battery-level’ has been removed.

2018-02-04 00:23:44.705 [temChannelLinkRemovedEvent] - Link ‘Kabuff_Tuer_Offen => zwave:device:8663531c:node5:sensor_binary’ has been removed.

2018-02-04 00:25:24.486 [.ItemChannelLinkAddedEvent] - Link ‘Kabuff_Tuer_Offen-zwave:device:8663531c:node5:sensor_binary’ has been added.

2018-02-04 00:25:24.504 [.ItemChannelLinkAddedEvent] - Link ‘Batterie_Kabuff_Tuer-zwave:device:8663531c:node5:battery-level’ has been added.

2018-02-04 00:25:33.617 [hingStatusInfoChangedEvent] - ‘zwave:device:8663531c:node5’ changed from UNINITIALIZED to UNINITIALIZED (BRIDGE_UNINITIALIZED)

2018-02-04 00:25:34.040 [hingStatusInfoChangedEvent] - ‘zwave:device:8663531c:node5’ changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING

2018-02-04 00:25:34.067 [hingStatusInfoChangedEvent] - ‘zwave:device:8663531c:node5’ changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline

2018-02-04 00:25:40.130 [hingStatusInfoChangedEvent] - ‘zwave:device:8663531c:node5’ changed from OFFLINE (BRIDGE_OFFLINE): Controller is offline to ONLINE

2018-02-04 00:25:43.170 [hingStatusInfoChangedEvent] - ‘zwave:device:8663531c:node5’ changed from ONLINE to ONLINE: Node initialising: INIT_NEIGHBORS

2018-02-04 00:25:43.200 [hingStatusInfoChangedEvent] - ‘zwave:device:8663531c:node5’ changed from ONLINE: Node initialising: INIT_NEIGHBORS to ONLINE: Node initialising: FAILED_CHECK

2018-02-04 00:25:43.215 [hingStatusInfoChangedEvent] - ‘zwave:device:8663531c:node5’ changed from ONLINE: Node initialising: FAILED_CHECK to ONLINE: Node initialising: WAIT

2018-02-04 00:26:05.121 [hingStatusInfoChangedEvent] - ‘zwave:device:8663531c:node5’ changed from ONLINE: Node initialising: WAIT to ONLINE

Put it on your sitemap using Text

Text item=Kabuff_Tuer_Offen label=“Tür” icon=“door”

You are looking at the Thing, not the Item I suspect. When you look at the Thing that represents this sensor in PaperUI, it will tell you what type of Item you must use to link that channel to an Item.

image

I suspect you must use a Switch.

It is not clear to me what you are looking at so it is hard to answer. Item states are presistant in the system until you change a .items file or restart OH. At that point the Items get initialized to NULL (which will appear in your sitemap as “-”.

PaperUI is an administration UI so it doesn’t really let you control or show Items in general.

Please How to use code fences when posting logs.

For what it’s worth… I had the same problem. Saw the status in paperUI and habpanel, not in the sitemap.

After some (cough) googling around I found that you had to add “[%s]”

Text item=GarageDeursensor_DoorSensor label=“Garage” icon=“garage” gave me “-”

Text item=GarageDeursensor_DoorSensor label=“Garage [%s]” icon=“garage” gave me “Closed”

That would make

Default item=Kabuff_Tuer_Offen label=“Tür” icon=“door”

becoming

Text item=Kabuff_Tuer_Offen label=“Tür [%s]” icon=“door”

4 Likes