Linear NGDZ00-4 Garage Door

After I refreshed the UI my ZWave cover control for the door is gone. :unamused:

Need a little help here. I got mine to work in OZWCP, I can open and close and sensor is working correctly, but after adding zwave and cover in configuration.yaml, I don’t get any cover control. No matter what I do, it just won’t show up in HA. Is there any changes I need to make in HA? I’m running the latest version 0.46.1.
Thanks

You probably saw this already but just in case. HASS uses its own OpenZwave files now from PyPi. It might be that your install is using those files and OZWCP is looking at your patched version. Do you have a “config_path” under your zwave entry inside of configuration.yaml? Make sure its pointing to the patched configuration directory.

On a side note, are you using Hassbian? I have been unsuccessful in trying to patch it to work with the Linear garage door opener (although I admit I haven’t tried very hard and just let it run on SmartThings). If you’re on Hassbian can you share your steps for this? Instructions in this thread and others are very old.

Thanks.

thanks for your reply. I do have a config_path in my configuration.yaml which is pointing to “/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/libopenzwave-0.3.3-py3.4-linux-armv7l.egg/config” and that’s where my patched version is installed. After reading this thread, my understanding is that as long as I have it working under OZWCP, all I have to do is add proper settings in configuration.yaml for zwave and cover and the control should show up in HA. I don’t know what I’ve overlooked.

Sorry to say, I’m not using hassbian, I’ve tried, but with hassbian, I ended up with other issues when trying to compile python-openzwave/OZWCP, so I am running Jessie and AIO, this way, I could at least patch and compile python-openzwave/OZWCP.

I’m still curious in how you did this. Maybe I can figure it out on Hassbian. Just reluctant to try the steps in the really old threads in case the branches they reference are too out of date.

Thanks.

I was able to get this working again with the following modifications to the script:

#!/bin/bash

echo
echo "Open Z-Wave Installer for Hassbian"
echo "Modified by Landrash for use with Hassbian."
echo "Remodified by unt1tled for use with Linear NGDZ00-4  (barrier_operator)."
echo "Copyright(c) 2016 Dale Higgs <https://gitter.im/dale3h>"
echo

if [ "$(id -u)" != "0" ]; then
echo "This script must be run with sudo. Use \"sudo ${0} ${*}\"" 1>&2
exit 1
fi

echo "Running apt-get preparation"
apt-get update
apt-get upgrade -y
apt-get install -y make python3-dev libudev-dev python3-sphinx python3-setuptools libgnutlsxx28 libgnutls28-dev libssl-dev

echo "Changing to homeassistant user"
sudo -u homeassistant -H /bin/bash <<EOF

echo "Activating virtualenv"
source /srv/homeassistant/homeassistant_venv/bin/activate

echo "Installing latest version of cython"
### Currently locked to this version since build fails for later versions.
pip3 install --upgrade cython==0.24.1

echo "Creating source directory"
mkdir -p /srv/homeassistant/src
chown -R homeassistant:homeassistant /srv/homeassistant/src

echo "Cloning python-openzwave"
cd /srv/homeassistant/src
git clone  https://github.com/OpenZWave/python-openzwave.git
chown homeassistant:homeassistant python-openzwave
cd python-openzwave

echo "Cloning openzwave"
git checkout python3
rm -rf openzwave
git clone git://github.com/OpenZWave/open-zwave.git openzwave
cd openzwave

echo "Changing to openzwave Dev branch to add barrier_operator support"
git checkout Dev
cd ..

echo "Building python-openzwave with barrier_operator support\nStage 1..."
make build
make install

# Remove the 1.4 non-dev branched compile and replace with the 1.5 dev branch compiled version
rm -Rf openzwave-git/open-zwave-master/
cp -R openzwave/ openzwave-git/
mv openzwave-git/openzwave/ openzwave-git/open-zwave-master/
echo "Building stage 2..."
make install

echo "Deactivating virtualenv"
deactivate
EOF

echo "Creating libmicrohttpd directory"
cd /srv/homeassistant/src
mkdir libmicrohttpd
chown homeassistant:homeassistant libmicrohttpd
cd /srv/homeassistant/src/libmicrohttpd

echo "Downloading libmicrohttpd-0.9.19"
wget ftp://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-0.9.19.tar.gz
chown homeassistant:homeassistant libmicrohttpd-0.9.19.tar.gz
tar zxvf libmicrohttpd-0.9.19.tar.gz
chown homeassistant:homeassistant libmicrohttpd-0.9.19

echo "Building libmicrohttpd-0.9.19"
cd libmicrohttpd-0.9.19
./configure
make
make install

echo "Cloning open-zwave-control-panel"
cd /srv/homeassistant/src
git clone https://github.com/OpenZWave/open-zwave-control-panel.git
chown -R homeassistant:homeassistant open-zwave-control-panel
cd open-zwave-control-panel

echo "Replacing open-zwave-control-panel source files with barrier_operator support"
#wget -O zwavelib.cpp https://raw.githubusercontent.com/legrego/open-zwave-control-panel/0925251a566a36543e0c6b5cb0b2c1498bddfa68/zwavelib.cpp


echo "Building open-zwave-control-panel"
rm Makefile
wget https://raw.githubusercontent.com/home-assistant/fabric-home-assistant/master/Makefile
chown homeassistant:homeassistant Makefile
make

echo "Linking ozwcp config directory"
ln -sd /srv/homeassistant/lib/python3.*/site-packages/libopenzwave-0.*-linux*.egg/config
chown -R homeassistant:homeassistant /srv/homeassistant/src

echo "Linking Home Assistant OpenZWave config directory"
cd /home/homeassistant/.homeassistant
sudo -u homeassistant ln -sd /srv/homeassistant/lib/python3.*/site-packages/libopenzwave-*-linux*.egg/config
chown -R homeassistant:homeassistant /home/homeassistant/.homeassistant

echo
echo "Installation done!"
echo
echo "If you have issues with this script, please contact @Landrash on gitter.im"
echo "Original script by @dale3h on gitter.im"
echo
```

Modifications to __init__.py need to be done in /srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/zwave

I made mine like this:
```
#REQUIREMENTS = ['pydispatcher==2.0.5', 'python_openzwave==0.4.0.31']
REQUIREMENTS = ['pydispatcher==2.0.5']
```

Make sure to clear `/home/homeassistant/.homeassistant/deps/` or just nuke the python_openzwave in there, either works.
1 Like

Thanks. Going to give it a shot.

I am able to see the proper cover in HA now but openzwave changed the way it handles the door status:

                    <CommandClass id="102" name="COMMAND_CLASS_BARRIER_OPERATOR" version="1" issecured="true">
                            <Instance index="1" />
                            <Value type="list" genre="user" instance="1" index="1" label="Barrier State Label" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" vindex="0" size="$
                                    <Item label="Closed" value="0" />
                                    <Item label="Closing" value="1" />
                                    <Item label="Stopped" value="2" />
                                    <Item label="Opening" value="3" />
                                    <Item label="Opened" value="4" />
                                    <Item label="Unknown" value="5" />
                            </Value>

This causes it not to work in HA and this is as far as I’ve be able to get so far.

Out of curiosity, since 0.46 and above are using their own OpenZwave files, is it possible to just replace a few config files to make this work?

I’m not sure, I used information from this thread as well:

I actually just updated/added the files (4 in total) following Josh’s post and compiled/installed OZW again. I’m still haven’t issues with HA not showing the cover control, but everything is working like it should under OZWCP.

Does your OZW_Log.txt say Openzwave 1.4xxxxxxxxxx or 1.5xxxxxx ?

It says 1.4xxxxxxxxxxx, but I only patched the files to the AIO release, I don’t assumed the version number would change.

1.5 is the Dev version that has Barrier support.

So is it possible to install the 1.5 dev version to get this working without a bunch of patches?

No it is not

I’ve got my NGDZ00-4 working now with the dev version of openzwave lib now. For anyone interested here’s the modified zwave.py file to allow it to work once you’ve compiled the dev version.

https://raw.githubusercontent.com/firstof9/home-assistant/dev/homeassistant/components/cover/zwave.py

Place it in your /srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/cover/ directory.

@firstof9 I am assuming you have to add it securely for it to work, right?

Correct, you can do that from Home Assistant’s Zwave menu.

This works and currently only reports the door as “Opened” or “Closed”, I haven’t gotten around to modifying the code to show the fulls statuses reported by the library such as “Opening” and “Closing”.

1 Like

Can you tell me how to compile the dev version? I have only ever used the AIO installer and the Hassbian script when I moved over to it.

Thanks.