OpenHab2 and Linear NGD00Z-4 Garage Door Controller

Thanks for the suggestion Scott but barrier_position doesn’t show as a linkable channel…only barrier_state. Not sure what I should do.

Strange… I’m using version 2.1.0.201707291849 of the test zwave binding and have barrier_position:

image

Which version are you using?

How do I check the exact version and build?

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 think I have the 07292017 version of the snapshot and I do have this file in the addons directory:
http://www.cd-jackson.com/downloads/openhab2/org.openhab.binding.zwave-2.1.0-SNAPSHOT.jar

But this is what I see:

One other thing I notice is that barrier_state for me shows 253 regardless if I send 0 or 255.

I don’t see barrier_position at all below the screenshot so I’m wondering what’s wrong with my configuration. Thanks again for the help.

To find the version of the binding, do this in the Karaf console:

bundle:list | grep ZWave

Thanks for the command. Looks like I’m using the same version as you.

openhab> bundle:list | grep ZWave
217 | Active | 80 | 2.1.0.201707291849 | ZWave Binding

Bizarre…do you think it has something to do with me using Openhab 2.2.0 snapshot vs release?

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"}

garagedoor.map:

0=CLOSED
ON=CLOSED
252=CLOSING
253=STOPPED
254=OPENING
255=OPEN
OFF=OPEN
-=Unknown
NULL=Unknown

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!

I followed your instruction. Now the door works.

// 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”

Frame label=“Garage Door” {
Switch item=Garage_Dr label=“Garage Door” mappings=[ON=“Closed”, OFF=“Open”]
Text item=Garage_Dr_Position label=“Current Position[MAP(garagedoor.map):%s]”}

How to show the position as your garagedoor.map? Can we use Rollershutter as the item?

Screenshot from 2017-08-06 22-24-44

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.

here is what I got, with the sitemap at post 22
Screenshot from 2017-08-06 19-56-24

I take back what I said about the double transforms :slightly_smiling_face:. 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]"

it displays as this:

And it looks the same when using this in the sitemap:

Switch item=GarageAttached_Door
Text item=GarageAttached_Door_Position

Are you seeing any transforms? If not, check that you have the MAP transform service installed.

Did you put the MAP back into the Items?

YES. I put the MAP back, remove the mapping at sitemap.
Switch Garage_Dr “Garage Door [(garagedoor.map):%s]”

Basically, with your original setting. and
sudo chown -R openhab:openhab /etc/openhab2/transform/garagedoor.map

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’m not sure how else to help! What version of OH are you on? I’m running 2.2.0 snapshot build 1002.

2.2.0-SNAPSHOT Build #1003

What do you see here?

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.

Alright! Get the map transform service in and you should be good to go! Hopefully you didn’t have too many items to redo :persevere:.

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. :frowning: I guess I need to look into doing some soldering…

Thanks again for the help!

@5iver

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?