I have an Ecolink Zwave 2.5 tilt sensor that works fine as a Switch, but my item never seems to get an update when defined as a Contact. Is there any explanation for this behavior?
If my sitemap is:
Text item=GarageTiltStatus
Then I will see it changed between open and closed if the item is defined as:
Switch GarageTiltStatus “Garage Door Status [MAP(tilt.map):%s]” { channel=“zwave:device:2a2bd030:node6:sensor_binary” }
but when I change it to
Contact GarageTiltStatus “Garage Door Status [MAP(tilt.map):%s]” { channel=“zwave:device:2a2bd030:node6:sensor_binary” }
I only see “Unknown” next to the text item in the sitemap even though I do see the device changing correctly in the events.log, such as:
zwave_device_2a2bd030_node6_sensor_binary changed from ON to OFF
Yes, you need use the default itemtype defined for the channel, you can’t switch between them. There was a discussion about this a long time ago in this forum, you may find it through the search button:
Trying to implement this as a Contact OH Item is exactly the correct approach in OpenHAB conventions, but the zwave binding does not support that.
From my personal view, zwave binding went completely the wrong way in not defining read-only binary devices as Contacts for OH, and misusing (in my view) the read-write Switch category instead.
But it’s a very long standing issue, and now has a huge investment in user’s configurations, so it ain’t going to change
Thanks guys. Your answer saved me a lot of headache trying to figure things out. What was more confusing is that I saw some old posts regarding the same or similar tilt sensor where the items were expressed as Contacts. I didn’t realize that you had to stick with the default item type for the channel, and I’ve been using the Zwave binding for years. I guess I always managed to use the default type. In general I think Chris has done great work with the Zwave binding.
It might be helpful to include this exception in the main openhab docs, since a quick read seems to indicate that the item can be either Switch or Contact depending on how it is used.
Just wanted to say thanks, your post saved me a lot of time. I was driving myself nuts as I had two different ecolink tilt sensors which behave differently.
The first one (tiltzwave2) accepts the Contact definition and works as expected. The second one (tilt-zwave2.5) works as you describe and requires the Switch definition.
Hope this helps someone else from losing their sanity.
I’m using TILT-ZWAVE2.5-ECO as well, with OH 2.5.M1. I did all the configuration via PaperUI using Item Linking in Simple Mode. I am getting the notifications from the tilt sensor:
2019-03-07 09:38:54.164 [vent.ItemStateChangedEvent] - zwave_device_84a73f00_node2_sensor_binary changed from OFF to ON
2019-03-07 09:38:55.994 [vent.ItemStateChangedEvent] - zwave_device_84a73f00_node2_sensor_binary changed from ON to OFF
But in Control page, the only item that updates is the Battery Level.