I tried going into the Karaf Console but it just shows I’m not using 2.2 snapshot:
openhab-binding-zwave1 | 1.11.0.SNAPSHOT | | Uninstalled | openhab-addons-legacy-2.2.0-SNAPSHOT | Z-Wave Binding (1.x)
openhab-binding-zwave | 2.2.0.SNAPSHOT | | Uninstalled | addons-2.2.0-SNAPSHOT | Z-Wave Binding
I just looked at the XML in the binding and see BARRIER_STATE and all the other channels you are seeing. I didnt realize the device database was updated back in April. I haven’t deleted (or reinitialized) the Things for my garage openers, which would have picked up these changes!
So, I reinitialized them and am in the same state as you (I’m also on 2.2.0 snapshot). I swapped my items from barrier_operator to barrier_state and everything is behaving as before. I tried the other channels and nothing came through. Which I’m not surprised about, since the device does not use the ALARM CC (http://products.z-wavealliance.org/products/1298/classes).
The items for one of my garage doors:
Switch GarageAttached_Door "Garage Door (Attached) [MAP(garagedoor.map):%s]" <garagedoor> (gGarageAttached,gLock,gGarageDoor,gSleep_Security)
Number GarageAttached_Door_Position "Garage Door (Attached) [MAP(garagedoor.map):%s]" <garagedoor> (gGarageAttached,gGarageDoor,gSleep_Security) {channel="zwave:device:07cb40a2:node177:barrier_state"}
This rule sends a 255 or 0 to open and close the door, based on the switch state:
rule "Lock: Update garage door barrier_state after switch state change events (GarageAttached_Door)"
when
Item GarageAttached_Door changed
then
if (GarageAttached_Door.state == ON) {//closed
GarageAttached_Door_Position.sendCommand("0")
logDebug("Rules", "Lock: Update garage door barrier_state after switch state change events (GarageAttached_Door_Position) [{}]",GarageAttached_Door_Position.state)
}
else if (GarageAttached_Door.state == OFF) {
GarageAttached_Door_Position.sendCommand("255")
logDebug("Rules", "Lock: Update garage door barrier_state after switch state change events (GarageAttached_Door_Position) [{}]",GarageAttached_Door_Position.state)
}
end
The number items change if the remote for the garage doors are used, so this rule keeps the state of the switch correct:
rule "Lock: Update garage door states after barrier_state events (GarageAttached_Door_Position)"
when
Item GarageAttached_Door_Position received update
then
if (GarageAttached_Door_Position.state == 255 && GarageAttached_Door.state == ON) {
GarageAttached_Door.postUpdate(OFF)
logDebug("Rules", "Lock: Update garage door states after barrier_state events (GarageAttached_Door) [{}]",GarageAttached_Door.state)
}
else if (GarageAttached_Door_Position.state == 0 && GarageAttached_Door.state == OFF) {
GarageAttached_Door.postUpdate(ON)
logDebug("Rules", "Lock: Update garage door states after barrier_state events (GarageAttached_Door) [{}]",GarageAttached_Door.state)
}
end
EDIT: Here is an updated version that uses a lambda to avoid duplication of code when more than one NGD00Z is being used.
@ashgupta, you added a number of channels that this device does not support. I’m thinking these should be removed to clean up the database, but I don’t know your reasoning for adding them and don’t want to mess anything up!
// items. I removed the [(garagedoor.map):%s]" from the Switch, as it shows as On and Off, ON is closed, confusing to me. So I put mapping at sitemaps.
Switch Garage_Dr “Garage Door”
Number Garage_Dr_Position “Garage Door Position[MAP(garagedoor.map):%s]” {channel=“zwave:device:5a8b5492:node25:barrier_state”}
//the exact same rule.
//sitemap, But this position shows as “0, 254, 255”
It looks to me like the issue you have is that you are transforming the Garage_Dr_Position twice… once in the Item and again in the sitemap. The value coming from the Item should be OK as it is. You also shouldn’t need to add the label to the sitemap either, since you defined it in the Item. Try this with the MAP in the Items:
Frame label=“Garage Door” {
Switch item=Garage_Dr
Text item=Garage_Dr_Position
}
I just use the gGarageDoor (you can see it in my item definitions) group in my sitemap, but prefer HABpanel.
I take back what I said about the double transforms . That does not seem to be the problem. Using this in my sitemap:
Switch item=GarageAttached_Door label="Garage Door (Attached) [MAP(garagedoor.map):%s]"
Text item=GarageAttached_Door_Position label="Garage Door (Attached) [MAP(garagedoor.map):%s]"
I used exactly what you had in your original post, replaced with my items, and changed the quotes (somehow they didn’t copy/paste as quotes), and I get the same as I see them:
I didn’t install the transformations Add-ons. It should be the reason. But my default.item files is lost for unknown reason. I had to make a new one now
update: After those Transformation add-ons installed, now everything works as it’s. Thank you.
Awesome, this got me up and running! Thanks Scott. The only snag I ran into which isn’t related to zwave is that my craftsman garage door isn’t compatible with the gd00z-4 since it has a “smart controller” that doesn’t send a dumb push button pulse to open the door. I guess I need to look into doing some soldering…
Got the transform working…stupid me miss named it…duh! Anyways, in the map file is the conversion for opening and closing…I don’t get those, only open and closed. Do I have to create a while rule for checking the state?
No rule is needed. The 252, 253, 254 are received by the opener from the tilt sensor that goes on the door. Look at section 8 of the installation manual. IIRC, step 2 was needed to sync the tilt sensor. There is also a plastic pull tab that covers the battery on the sensor. Or maybe you just need a new battery!