Linear NGDZ00-4 Garage Door

In particular, following the last way I tried, it all worked but OZWCP cannot compile because the Makefile you wget fails compilation. and ify ou try to use the original it fails too.

You still aren’t posting what broke. Look through the old posts. People are posting log snippets of the failure. No one can see your screen, only you.

When I do this again I’ll post.

Howdy. I tried to follow the instructions found here, and have the cover device in HA. I can successfully open/close my garage door using HA (thank you!).

My problem is that I can no longer restart HA from the web interface; it hangs/crashes, and requires an SSH session to restart the homeassistant.service.

I’m running Hassbian on a RP3. Here are the major players:

  • python_openzwave-0.4.0.35.egg-info
  • openzwave-0.4.0.35-py3.4.egg
  • python3.4
  • HA 0.50.2

The steps I took to get myself into this mess (but with a working garage door opener!) are:

  1. Uninstalled OpenZwave, and ran the following:
    pip3 install 'python_openzwave==0.4.0.35' --install-option="--flavor=ozwdev"
  2. Modified the __init__.py file
  3. Lost all the Z-Wave device names, and when re-added them, more than 90% were “unknown” (no big deal, just strange…)
  4. Noticed that Home Assistant would hang/crash/not complete the restart when clicking the “Restart” button in the web interface (Configuration).
  5. Tried Chrome and Firefox, for giggles, with the same result.

Here’s the relevant portion of home-assistant.log:

2017-08-09 16:26:13 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1688467696: Received {‘type’: ‘call_service’, ‘id’: 11, ‘service’: ‘restart’, ‘domain’: ‘homeassistant’, ‘service_data’: {}}
2017-08-09 16:26:13 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: service_call_id=1974161552-9, service=restart, domain=homeassistant, service_data=>
2017-08-09 16:26:20 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_executed[L]: service_call_id=1974161552-9>
2017-08-09 16:26:20 INFO (MainThread) [homeassistant.core] Bus:Handling <Event homeassistant_stop[L]>
2017-08-09 16:26:20 INFO (Thread-11) [homeassistant.components.zwave] Stopping Z-Wave network
2017-08-09 16:26:20 INFO (Thread-11) [openzwave] Stop Openzwave network.
2017-08-09 16:26:20 DEBUG (MainThread) [homeassistant.components.websocket_api] WS 1688467696: Connection cancelled by server
2017-08-09 16:26:20 DEBUG (Thread-11) [openzwave] Wait for empty send_queue during 0 second(s).
2017-08-09 16:26:20 INFO (Thread-11) [openzwave] ZWave configuration written to user directory.

Here’s the OZW_Log.txt:

2017-08-09 16:23:39.847 Always, OpenZwave Version 1.5.0 Starting Up
2017-08-09 16:23:40.853 Info, Setting Up Provided Network Key for Secure Communications
2017-08-09 16:23:40.877 Info, Manufacturer_Specific.xml file Revision is 7
2017-08-09 16:23:41.709 Info, Queuing Lookup on mfs.db.openzwave.co_m for Node 0
2017-08-09 16:23:41.709 Info, Opening controller /dev/ttyACM0
2017-08-09 16:23:41.709 Info, Trying to open serial port /dev/ttyACM0 (attempt 1)
2017-08-09 16:23:41.709 Info, mgr, Added driver for controller /dev/ttyACM0
2017-08-09 16:23:41.709 Info, Starting DNSThread
2017-08-09 16:23:41.709 Info, LookupTxT Checking mfs.db.openzwave.co_m
2017-08-09 16:23:41.710 Info, Serial port /dev/ttyACM0 opened (attempt 1)
2017-08-09 16:23:41.710 Detail, contrlr, Queuing (Command) FUNC_ID_ZW_GET_VERSION: 0x01, 0x03, 0x00, 0x15, 0xe9
2017-08-09 16:23:41.711 Detail, contrlr, Queuing (Command) FUNC_ID_ZW_MEMORY_GET_ID: 0x01, 0x03, 0x00, 0x20, 0xdc
2017-08-09 16:23:41.711 Detail, contrlr, Queuing (Command) FUNC_ID_ZW_GET_CONTROLLER_CAPABILITIES: 0x01, 0x03, 0x00, 0x05, 0xf9
2017-08-09 16:23:41.711 Detail, contrlr, Queuing (Command) FUNC_ID_SERIAL_API_GET_CAPABILITIES: 0x01, 0x03, 0x00, 0x07, 0xfb
2017-08-09 16:23:41.711 Detail, contrlr, Queuing (Command) FUNC_ID_ZW_GET_SUC_NODE_ID: 0x01, 0x03, 0x00, 0x56, 0xaa
2017-08-09 16:23:41.725 Info, Lookup for mfs.db.openzwave.co_m returned 7
2017-08-09 16:23:41.735 Info, ManufacturerSpecificDB Initialized
2017-08-09 16:23:41.735 Detail, Notification: ManufacturerSpecificDB Ready
2017-08-09 16:26:20.526 Info, mgr, Manager::WriteConfig completed for driver with home ID of 0xd1bbdbd7
2017-08-09 16:26:21.532 Info, mgr, Driver for controller /dev/ttyACM0 pending removal
2017-08-09 16:26:21.532 Detail, Notification: DriverRemoved
2017-08-09 16:26:21.532 Always, ***************************************************************************
2017-08-09 16:26:21.532 Always, ********************* Cumulative Network Statistics *********************
2017-08-09 16:26:21.532 Always, *** General
2017-08-09 16:26:21.532 Always, Driver run time: . . . 0 days, 0 hours, 2 minutes
2017-08-09 16:26:21.533 Always, Frames processed: . . . . . . . . . . . . . . . . . . . . 180
2017-08-09 16:26:21.533 Always, Total messages successfully received: . . . . . . . . . . 180
2017-08-09 16:26:21.533 Always, Total Messages successfully sent: . . . . . . . . . . . . 65
2017-08-09 16:26:21.533 Always, ACKs received from controller: . . . . . . . . . . . . . 72
2017-08-09 16:26:21.533 Always, *** Errors
2017-08-09 16:26:21.533 Always, Unsolicited messages received while waiting for ACK: . . 1
2017-08-09 16:26:21.533 Always, Reads aborted due to timeouts: . . . . . . . . . . . . . 0
2017-08-09 16:26:21.533 Always, Bad checksum errors: . . . . . . . . . . . . . . . . . . 0
2017-08-09 16:26:21.533 Always, CANs received from controller: . . . . . . . . . . . . . 1
2017-08-09 16:26:21.533 Always, NAKs received from controller: . . . . . . . . . . . . . 0
2017-08-09 16:26:21.534 Always, Out of frame data flow errors: . . . . . . . . . . . . . 0
2017-08-09 16:26:21.534 Always, Messages retransmitted: . . . . . . . . . . . . . . . . . 1
2017-08-09 16:26:21.534 Always, Messages dropped and not delivered: . . . . . . . . . . . 3
2017-08-09 16:26:21.534 Always, ***************************************************************************
2017-08-09 16:26:21.632 Info, Stopping DNSThread
2017-08-09 16:26:23.637 Info, mgr, Driver for controller /dev/ttyACM0 removed
2017-08-09 16:26:24.638 Error, mgr, Manager::GetDriver failed - Home ID 0xd1bbdbd7 is unknown
2017-08-09 16:26:24.638 Warning, Exception: Manager.cpp:376 - 100 - Invalid HomeId passed to GetDriver

Any help would be greatly appreciated. Thank you in advance!

so lets assume I have everything installed, can I just reinstally the cython version and recompile the openzwave +CP with the dev portions, and then update my init.py and be good?

Working on a revised bash script for those who used the AIO install method.
Keep an eye on this post as I’ll edit it with the script.

@elmetal give this a shot:

#!/bin/bash

echo
echo "Dev Open Z-Wave Installer for AIO installed Home Assistant"
echo "Modified by Landrash for use with Hassbian."
echo "Remodified by unt1tled for use with Linear NGDZ00-4  (barrier_operator)."
echo "Remodified again by firstof9 for use with the dev branch of the OpenZwave Library."
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 "Removing old python-openzwave"
pip3 uninstall -y python-openzwave

echo "Installing dev python-openzwave"
pip3 install 'python_openzwave==0.4.0.35' --install-option="--flavor=ozwdev"

echo "Deactivating virtualenv"
deactivate
EOF

echo
echo "Installation done!"
echo
echo "Please modify your __init__.py file before (re)starting Home Assistant."
cd /srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/zwave/
1 Like

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.