Linear NGDZ00-4 Garage Door

Check your venv location:

49.  homeassistant@hassbian:/home/pi $ source /srv/homeassistant/homeassistant_venv/bin/activate
50.  bash: /srv/homeassistant/homeassistant_venv/bin/activate: No such file or directory

Was that in the first log?
The second one did not show it.
Sorry, have to ask, check it how?

Yes, it was in the first log. You need to track down where bin/activate lives. In my case it is: /srv/homeassistant/bin/activate

What is the bin active? What am I looking for?

Since it was not in the other logs, would that mean it is ok?

Just to be clear :slight_smile: I had all working with 48.1, it is only trying to go to 50.2.
I may just restore me 48.1 and wait till the next release. The only thing in this release for me was the barrier fix.

Example:

sudo su -s /bin/bash homeassistant
source /srv/homeassistant//bin/activate
cd /srv/homeassistant/src/python-openzwave
make install

I am only making guesses here as youā€™re running Hasbian and Iā€™ve done my install via the AIO script.
@gentoosu I would assume is running hasbian like you are.

We have a winner !!!
Here is a complet log of my expericane. There were some errors, but if it passes perreview then we have a hassbian cheetsheet. :smile: https://hastebin.com/savisatuso.lua

@gentoosu I am sooooo sorry, I was not following, I thought it was something to do with booting.
You both get brownie points.

Ah the permission denied errors, thatā€™s just because the directory needs to be chowned to homeassistant.

Command:

chown -R homeassistant:homeassistant /srv/homeassistant/lib/python3.4/site-packages/openzwave-0.4.0.35-py3.4.egg

should fix it up for the future.

So I have a brand new RPi Iā€™ve been wrestling with. I have figured out how to do it via AIO, Hassbian as well as HASSIO.

What I have not figured out is how to get this to work. Iā€™ve tried all the scripts in all different fresh installs. I just canā€™t figure it out. I donā€™t know C/C++ so that doesnā€™t help.

Do we have some fresh up to date instructions on a fresh install of either AIO or Hassbian? Either is fine for me.

I have no other devices right now besides some window sensors. I have that all good in a yaml with HA. Just need to figure out the garage door opener. Thatā€™s supposed to be my first automation item!

You might want to look 2 posts up from yours

I tried it. It didnā€™t work

Patch for those running docker images. Adding these lines:

> RUN pip3 uninstall -y python-openzwave && \
>     pip3 install 'python_openzwave==0.4.0.31' --install-option="--flavor=ozwdev"
> RUN mv /usr/local/lib/python3.6/site-packages/python_openzwave/ozw_config/options.xml  /usr/local/lib/python3.6/site-packages/python_openzwave/ozw_config/options.xml.orig
> RUN ln -s /config/options.xml /usr/local/lib/python3.6/site-packages/python_openzwave/ozw_config/options.xml

before the copy source line and the docker image will install the dev version of ozw and work with the opener.

Just need to make sure that the 0.4.0.31 matches what ever is in requirements_all.txt for python-openzwave.

how would one go about installing the docker images vs AIO etc

If you have read through this thread you will know it hasnā€™t been easy for anyone. You will also note that people have posted what they did and indications of what failed. ā€œIt didnā€™t workā€ isnā€™t a complete response.

I read every single post. I have tried every single script with every single variation of reply.

Closest I got was Hassbian using post 125, but I cannot get OZWCP to compile

There are plenty of posts that claim ā€œoh do this and this script and it worksā€ and maybe it did when they wrote the script, but now it just doesnā€™t.

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