Ecolink DWZWAVE2 Z-Wave Door Sensor only works as Switch, not Contact

In OpenHAB 1, the Z-Wave door sensor worked as a Contact, and this is how I want to show it in the classic UI and in HabPanel (as OPEN/CLOSED rather than ON/OFF).

In OH2, the BINARY_SENSOR returns ONOFF so it can only be mapped to a switch. I’ve worked around this in a rule by creating a contact variable but wonder if this is a bug and I should be able to add my switch BINARY_SENSOR to a Contact variable directly.

rule "Front Door Opened"
when
Item frontdoor_sensor_switch changed
then
if(frontdoor_sensor_switch.state==ON) {
pushover(“Front door opened”)
postUpdate(frontdoor_sensor_contact, OPEN)
} else if (frontdoor_sensor_switch.state==OFF) {
postUpdate(frontdoor_sensor_contact, CLOSED)
}
end

Can you tell us what device this is for - it’s hard to check when we don’t know the device ;).

Hi Chris, sure. It’s this one
http://www.cd-jackson.com/index.php/zwave/zwave-device-database/zwave-device-list/devicesummary/138

Looks like it needs to be updated to use the door sensor channel type (sensor_door I think). I’ll try and remember to do this when I get home.

1 Like

Just added one of these and noticed that it came up as a contact not a switch, as all the rest of my door contact devices(WADWAZ-1) are Switches, myy question is, for consistency, should we change WADWAZ-1 to sensor_door? I was under the impression that Contacts were being deprecated in OH2 and they would all be Switches now. I have a couple of different types that used to be Contacts (ZW097 dry contact sensors and all my motion sensors) but changed to Switches in OH2.

I actually prefer all the devices that have an ON/OFF state to be Switches as it keeps the rules simpler to have just one type to deal with but I can see that OPEN/CLOSED is more accurate.