Linear NGDZ00-4 Garage Door

installing now. I did get a “openzwave not installed” message after the uninstall line.

What should I see on OZWCP as the garage door sensor to see if I succeeded? or what line should I see in the log?

Just launch HA after you mod the __init__.py file

launched it. so far everything seems ok except I lost the names to all my zwave stuff which doesn’t really matter to me it’s fine.

the Garage door opener shows up like this: zwave.unknown_id014f_unknown_type4744_id3530

I have this in my config
zwave:
usb_path: /dev/ACM0

cover:
platform: zwave

but no good?

just to clarify I have the spaces needed but they don’t show up here for some reason

When you upgrade to open-zwave 1.5.0, you lose your device names unless you copy over your original ozw cache file.

Before 1.5.0 -> zwcfg_0xXXXXXXXX.xml
1.5.0 and later -> ozwcache_0xXXXXXXX.xml

Copying the old zwcfg file to ozwcache should preserve those names. Here’s the change in code that caused this: https://github.com/OpenZWave/open-zwave/commit/996373e6d0003c618fcbe21e467c3a6ca6ad89a3

If you downgrade back to ozw 1.4 (HASS packaged version) it will again use the zwcfg file.

I can also confirm that ozw 1.5.0 a) has an exception when you startup and b) crashes when the zwave network is stopped or restarted. The latter occurs whenever you stop/start the zwave network manually in the HASS UI, or if you restart HASS itself (which in-turn stops the zwave network). Without more knowledge I would say it’s just a bug in open-zwave. Despite the exceptions and crashes, my garage door seems to be functioning properly now.

I’ve also noticed my ozw cache file will sometimes change in the same way as in post 275.

2 Likes

Check for a cover.XXXXX entity in the <> menu on the left side of Home Assistant, if you see it, you’re all set and just rename your devices via the Zwave menu un HA.

Has anyone generated a device xml config file for the NGDZ00?

Not yet, feel free to.

Chris Jackson has a zwave database that is worth keeping in your list of bookmarks.
http://www.cd-jackson.com
Here are the xml for the GD
Open Z-Wave product file for Linear Corp NGD00Z-4

<ManufacturerSpecificData>
  <Manufacturer id="014f" name="Linear Corp">
    <Product type="4744" id="3030" name="NGD00Z-4" config="xxxxxxx"/>
    <Product type="4744" id="3530" name="NGD00Z-4" config="xxxxxxx"/>
  </Manufacturer>
</ManufacturerSpecificData> 
Open Z-Wave database file for Linear Corp NGD00Z-4

<?xml version="1.0" encoding="utf-8"?>
<Product xmlns="http://code.google.com/p/open-zwave/">

  <!-- Association Groups -->
  <CommandClass id="133">
    <Associations num_groups="1">
      <Group index="1" label="Group 1" max_associations="1" auto="true" />
    </Associations>
  </CommandClass>

</Product>

Seems incomplete.

It likely is incomplete. I am still searching for some reference to the device being included in OpenHAB and perhaps a better file. The zwave database on his website is still a worthwhile resource.

I used the latest version of python_openzwave (0.4.0.35) and it seems to be working fine:

pip3 install python_openzwave --install-option="--flavor=ozwdev"
2 Likes

New update. Some things maybe not relevant, just documenting for other’s benefit. Summarizing some steps for the sake of typing…

Running a fresh install of Hassbian 1.23. Z wave installed via the Hassbian PIP script. No issues. Backed up my config and SD card prior to doing this.

Stopped HASS. Ran the following commands:

sudo -u homeassistant -H /bin/bash
source /srv/homeassistant/bin/activate
pip3 uninstall python_openzwave
pip3 install python_openzwave --install-option="--flavor=ozwdev"
deactivate
exit

Copied my options.xml into the /srv/homeassistant/lib/python3.4/site-packages/python_openzwave/ozw_config
I dont know if that step is necessary any more or not, but wanted to make sure my security key was included.

Modified the init.py file to get rid of the z wave requirement

Started Hass. Started OK with the exception of this error in the home-assistant.log
2017-08-10 16:36:38 ERROR (Dummy-21) [libopenzwave] notif_callback exception
Traceback (most recent call last):
File “src-lib/libopenzwave/libopenzwave.pyx”, line 494, in libopenzwave.notif_callback
IndexError: list index out of range

Once the front end loaded, I noticed I lost names on all of my 30+ z wave devices, but I did have a cover component.
NOTE: I had done a secure add of the Linear device previously.

I saw how the new Z wave version uses ozwcache_deviceid.xml vs zwcfg_deviceid.xml so I thought I would test out what would happen if I renamed my old zwcfg to ozwcache. So I stopped HASS, did the rename and started up. Hass loaded the front end then promptly crashed with no errors. Front end just wouldnt load.

Ran the restart command and Hass loaded and my device names were back! But…no cover any more! Same traceback error in my log.

In the Z wave configuration page, I now had two components with the same node (the Linear device). One was:
zwave.unknown_id014f_unknown_type4744_id3030

The other was just
zwave._

Then Hass crashed again. No errors. No nothing.

Restarted HASS. Traceback error in log again. Thought I would try and remove and re add the Linear device. So I removed it (after z wave said it was ready), then ran a secure add. Then Hass crashed again.

Log did show this error:
2017-08-10 16:52:52 WARNING (Thread-12) [openzwave] Can't lock controller for command : add_node

So, too unstable. Flashing my backup image back. Progress, but no stability.

EDIT: Hass MIGHT run stable if I would have left the ozwcache file as is, but losing names on 30+ devices would be 2 days of making everything run again.

Copy your zwcfg over the ozwcache, but try removing the linear device from the XML first.

I already rolled back to my working image. Wouldn’t feel good about running that kind of setup 24/7 right now. Will wait for the official version.

Yes, the latest python_openzwave will work, the problem is when you do this:

pip3 install python_openzwave --install-option="--flavor=ozwdev"

Then you have to make sure you edit:

homeassistant/components/zwave/__init__.py

and edit:

REQUIREMENTS = ['pydispatcher==2.0.5', 'python_openzwave==0.4.0.31']

line so the version matches. I am pretty sure if you don’t do this, when HA starts it will stick the version of python_openzwave from REQUIREMENTS in the ./deps directory because it wants the exact version. ( == vs >= )

2 Likes

I did update homeassistant/components/zwave/__init__.py, but I completely removed the python_openzwave requirement. That entry now looks like this for me:

REQUIREMENTS = ['pydispatcher==2.0.5', ]

I used this sed command in my Dockerfile:

sed -i "s/'python_openzwave==.*'//" /usr/local/lib/python3.5/dist-packages/homeassistant/components/zwave/__init__.py

I’m not using the Dockerfile provided by the project, I wrote my own because I’m not using all the features in the project’s Dockefile.

I had to remove the Linear GDO and re-add it after switching to the Dev branch. It’s working great now. I had to do the same with my Zooz multisensor. It is working great now too.

1 Like

@firstof9 This morning my garage door was at the 66 error. So I go and check, low and behold there is an update. So I make a copy of my SD card and upgrade. Run the script. The first time it bombed somewhere (did not get a snapshot) and now when I run it I get this …

pi@hassbian:~ $ hassctl stop
pi@hassbian:~ $ sudo -u homeassistant -H /bin/bash
homeassistant@hassbian:/home/pi $ source /srv/homeassistant/bin/activate
(homeassistant) homeassistant@hassbian:/home/pi $ pip3 uninstall python_openzwave
Cannot uninstall requirement python-openzwave, not installed
(homeassistant) homeassistant@hassbian:/home/pi $ pip3 install python_openzwave --install-option="--flavor=ozwdev"
/srv/homeassistant/lib/python3.4/site-packages/pip/commands/install.py:194: UserWarning: Disabling all use of wheels due to the use of --build-options / --global-options / --install-options.
  cmdoptions.check_install_build_global(options)
Collecting python_openzwave
  Using cached python_openzwave-0.4.0.35.zip
Requirement already satisfied: six in /srv/homeassistant/lib/python3.4/site-packages (from python_openzwave)
Requirement already satisfied: PyDispatcher>=2.0.5 in /srv/homeassistant/lib/python3.4/site-packages (from python_openzwave)
Installing collected packages: python-openzwave
  Running setup.py install for python-openzwave ... error
    Complete output from command /srv/homeassistant/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-b4k0vaq3/python-openzwave/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-jilemwhl-record/install-record.txt --single-version-externally-managed --compile --install-headers /srv/homeassistant/include/site/python3.4/python-openzwave --flavor=ozwdev:
    ImportError in : from wheel.bdist_wheel import bdist_wheel as _bdist_wheel
    NameError in : class bdist_wheel(_bdist_wheel) - Use bdist_egg instead
    <pyozw_setup.OzwdevTemplate object at 0x762c5af0>
    Requirement already satisfied: Cython in /srv/homeassistant/lib/python3.4/site-packages
    {'include_dirs': ['openzwave-git/open-zwave-Dev/cpp/src', 'openzwave-git/open-zwave-Dev/cpp/src/value_classes', 'openzwave-git/open-zwave-Dev/cpp/src/platform', 'openzwave-git/open-zwave-Dev/cpp/build/linux'], 'extra_objects': ['openzwave-git/open-zwave-Dev/libopenzwave.a'], 'name': 'libopenzwave', 'extra_link_args': [], 'define_macros': [('PY_LIB_VERSION', '0.4.0.35'), ('PY_SSIZE_T_CLEAN', 1), ('PY_LIB_FLAVOR', 'ozwdev'), ('PY_LIB_BACKEND', 'cython')], 'extra_compile_args': [], 'language': 'c++', 'libraries': ['udev', 'stdc++', 'resolv'], 'sources': ['src-lib/libopenzwave/libopenzwave.pyx']}
    ['six', 'PyDispatcher>=2.0.5', 'Cython']
    Requirement already satisfied: Cython in /srv/homeassistant/lib/python3.4/site-packages
    running install
    flavor --flavor=ozwdev
    running build_openzwave
    Found g++ : /usr/bin/g++
    Found gcc : /usr/bin/gcc
    Found make : /usr/bin/make
    Found gmake : None
    Found pkg-config : /usr/bin/pkg-config
    Found library udev : True
    Found library stdc++ : False
    Found library resolv : False
    Found library yaml-0.1 : True
    Found library libopenzwave : False
    Found library python : True
    Found library python2 : True
    Found library python3 : True
    fetching https://codeload.github.com/OpenZWave/open-zwave/zip/Dev into openzwave-git/open-zwave.zip for version 0.4.0.35
    Build openzwave ... be patient ...
    running openzwave_config
    copying openzwave-git/open-zwave-Dev/config/fakro/zws230.xml -> /srv/homeassistant/lib/python3.4/site-packages/python_openzwave/ozw_config/fakro
    copying openzwave-git/open-zwave-Dev/config/fakro/zwrs.xml -> /srv/homeassistant/lib/python3.4/site-packages/python_openzwave/ozw_config/fakro
    copying openzwave-git/open-zwave-Dev/config/fakro/zws12.xml -> /srv/homeassistant/lib/python3.4/site-packages/python_openzwave/ozw_config/fakro
    copying openzwave-git/open-zwave-Dev/config/fakro/zwp10.xml -> /srv/homeassistant/lib/python3.4/site-packages/python_openzwave/ozw_config/fakro
    copying openzwave-git/open-zwave-Dev/config/nodon/crc360xSofremote.xml -> /srv/homeassistant/lib/python3.4/site-packages/python_openzwave/ozw_config/nodon
    copying openzwave-git/open-zwave-Dev/config/nodon/cws3101wallswitch.xml -> /srv/homeassistant/lib/python3.4/site-packages/python_openzwave/ozw_config/nodon
    copying openzwave-git/open-zwave-Dev/config/nodon/msp31xxMicroSmartPlug.xml -> /srv/homeassistant/lib/python3.4/site-packages/python_openzwave/ozw_config/nodon
    copying openzwave-git/open-zwave-Dev/config/nodon/crc3100OctanRemote.xml -> /srv/homeassistant/lib/python3.4/site-packages/python_openzwave/ozw_config/nodon
    copying openzwave-git/open-zwave-Dev/config/nodon/asp3100SmartPlug.xml -> /srv/homeassistant/lib/python3.4/site-packages/python_openzwave/ozw_config/nodon
    copying openzwave-git/open-zwave-Dev/config/nexia/db100z.xml -> /srv/homeassistant/lib/python3.4/site-packages/python_openzwave/ozw_config/nexia
    copying openzwave-git/open-zwave-Dev/config/zipato/RGBBulb2.xml -> /srv/homeassistant/lib/python3.4/site-packages/python_openzwave/ozw_config/zipato
    copying openzwave-git/open-zwave-Dev/config/zipato/zp3102.xml -> /srv/homeassistant/lib/python3.4/site-packages/python_openzwave/ozw_config/zipato
    copying openzwave-git/open-zwave-Dev/config/zipato/vszd2102.xml -> /srv/homeassistant/lib/python3.4/site-packages/python_openzwave/ozw_config/zipato
    copying openzwave-git/open-zwave-Dev/config/zipato/RGBBulb.xml -> /srv/homeassistant/lib/python3.4/site-packages/python_openzwave/ozw_config/zipato
    copying openzwave-git/open-zwave-Dev/config/zipato/MiniKeypad.xml -> /srv/homeassistant/lib/python3.4/site-packages/python_openzwave/ozw_config/zipato
    copying openzwave-git/open-zwave-Dev/config/everspringct/hsm02.xml -> /srv/homeassistant/lib/python3.4/site-packages/python_openzwave/ozw_config/everspringct
    copying openzwave-git/open-zwave-Dev/config/greenwave/powernode6.xml -> /srv/homeassistant/lib/python3.4/site-packages/python_openzwave/ozw_config/greenwave
    copying openzwave-git/open-zwave-Dev/config/greenwave/powernode1.xml -> /srv/homeassistant/lib/python3.4/site-packages/python_openzwave/ozw_config/greenwave
    copying openzwave-git/open-zwave-Dev/config/leviton/vrf01.xml -> /srv/homeassistant/lib/python3.4/site-packages/python_openzwave/ozw_config/leviton
    copying openzwave-git/open-zwave-Dev/config/leviton/rzi10.xml -> /srv/homeassistant/lib/python3.4/site-packages/python_openzwave/ozw_config/leviton
    copying openzwave-git/open-zwave-Dev/config/leviton/vri10.xml -> /srv/homeassistant/lib/python3.4/site-packages/python_openzwave/ozw_config/leviton
    copying openzwave-git/open-zwave-Dev/config/leviton/vrcpg.xml -> /srv/homeassistant/lib/python3.4/site-packages/python_openzwave/ozw_config/leviton
    copying openzwave-git/open-zwave-Dev/config/leviton/vri06.xml -> /srv/homeassistant/lib/python3.4/site-packages/python_openzwave/ozw_config/leviton
    copying openzwave-git/open-zwave-Dev/config/leviton/dzpd3.xml -> /srv/homeassistant/lib/python3.4/site-packages/python_openzwave/ozw_config/leviton
    copying openzwave-git/open-zwave-Dev/config/leviton/dz6hd.xml -> /srv/homeassistant/lib/python3.4/site-packages/python_openzwave/ozw_config/leviton
    copying openzwave-git/open-zwave-Dev/config/leviton/dz15s.xml -> /srv/homeassistant/lib/python3.4/site-packages/python_openzwave/ozw_config/leviton
    copying openzwave-git/open-zwave-Dev/config/heiman/HS1WL-Z.xml -> /srv/homeassistant/lib/python3.4/site-packages/python_openzwave/ozw_config/heiman
    error: could not delete '/srv/homeassistant/lib/python3.4/site-packages/python_openzwave/ozw_config/heiman/HS1WL-Z.xml': Permission denied

    ----------------------------------------
Command "/srv/homeassistant/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-b4k0vaq3/python-openzwave/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-jilemwhl-record/install-record.txt --single-version-externally-managed --compile --install-headers /srv/homeassistant/include/site/python3.4/python-openzwave --flavor=ozwdev" failed with error code 1 in /tmp/pip-build-b4k0vaq3/python-openzwave/
(homeassistant) homeassistant@hassbian:/home/pi $ deactivate
homeassistant@hassbian:/home/pi $ exit

@penright
Issue this command sudo chown -R homeassistant:homeassistant /srv/homeassistant/lib/python3.4/site-packages/python_openzwave/

Then try again.