Need help getting ZWave GPIO on raspberry-pi3 to work

Hi,

now it has been a couple of frustrated days because I tried everything to make my installation work…
Without any success. hopefully somebody can help me?

I am running homeassistant on a rpi3 and in addition i have a Razberry Z-Wave module installed at the same pi (on GPIOs).

I followed the complete thread and all links, but I cannot solve the problem.
My config yaml looks like that:

#Z-wave integration
zwave:
usb_path: /dev/ttyACM0

But the HA Ui is tlling me that the zwave configuration is not ok.

Here is the result: (not sure if it helps)

2017-08-02 22:29:05 ERROR (MainThread) [homeassistant.setup] Error during setup of component zwave
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.4/site-packages/openzwave/option.py”, line 78, in init
raise ZWaveException(u"Can’t find device %s : %s" % (device, traceback.format_exception(*sys.exc_info())))
File “/usr/lib/python3.4/traceback.py”, line 181, in format_exception
return list(_format_exception_iter(etype, value, tb, limit, chain))
File “/usr/lib/python3.4/traceback.py”, line 146, in _format_exception_iter
for value, tb in values:
File “/usr/lib/python3.4/traceback.py”, line 125, in _iter_chain
context = exc.context
AttributeError: ‘NoneType’ object has no attribute ‘context

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/setup.py”, line 194, in _async_setup_component
component.setup, hass, processed_config)
File “/usr/lib/python3.4/asyncio/futures.py”, line 388, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.4/asyncio/tasks.py”, line 286, in _wakeup
value = future.result()
File “/usr/lib/python3.4/asyncio/futures.py”, line 277, in result
raise self._exception
File “/usr/lib/python3.4/concurrent/futures/thread.py”, line 54, in run
result = self.fn(*self.args, **self.kwargs)
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/zwave/init.py”, line 268, in setup
config_path=config[DOMAIN].get(CONF_CONFIG_PATH))
File “/srv/homeassistant/lib/python3.4/site-packages/openzwave/option.py”, line 81, in init
raise ZWaveException(u"Error when retrieving device %s : %s" % (device, traceback.format_exception(*sys.exc_info())))
openzwave.object.ZWaveException: 'Zwave Generic Exception : Error when retrieving device /zwaveusbstick : ['Traceback (most recent call las
\'t find device %s : %s" % (device, traceback.format_exception(*sys.exc_info())))\n', ' File “/usr/lib/python3.4/traceback.py”, line 1
.py", line 146, in _format_exception_iter\n for value, tb in values:\n', ' File “/usr/lib/python3.4/traceback.py”, line 125, in _ite

What is surprising me is that the action:

$ ls /dev/ttyACM*

or

$ ls /dev/ttyUSB*

is not giving me any result.
It is reporting:

ls: cannot access /dev/ttyACM*: No such file or directory

Running HA via http://myip:8123 is fine. And also the Zwave via http://myip:8083 is working fine.
But the integration of zwave inside HA is Not working

I fix the doc. @Pankoke you can make a PR to documentation if you see a wrong stuff :slight_smile:

Great.
What does PR mean?

Did you execute the SSH command from step 4 above. It has to be identical, don’t change the ip address :slight_smile:

You can’t use these commands as the HA run in a virtual machine inside docker (or something like that)
in the terminal try the command
Hassio help

HI, and thanks for your reply.
Unfortunately I am still stuck - and could not go any further.

When following step 4, and entering in the terminal:

curl -d ‘{“devices”: [“ttyAMA0”]}’ http://172.17.0.2/homeassistant/options

I receive the following answer from my Pi:

pi@hassbian:~ $ curl -d ‘{“devices”: [“ttyAMA0”]}’ http://172.17.0.2/homeassistant/options
curl: (3) [globbing] bad range specification in column 2
curl: (7) Failed to connect to 172.17.0.2 port 80: No route to host
pi@hassbian:~ $

Please be patient with me since I am absolutely new to RPi and HA - I simply would be happy if I could make HA and z-wave Integration running soon.

Regards,
Sebastian

1 Like

I followed the same approach to get my Raspberry PI 3 with Zwave GPIO daughter board up and running with HASS.IO or Home Assistant 0.50.2:

Config.txt contains the following line:

dtoverlay=pi3-miniuart-bt

configuration.yaml contains the following section:

zwave:
  usb_path: /dev/ttyAMA0

I was able to add one Zwave switch successfully which is Zwave-Plus based. This is working perfectly and I can operate it via the GUI.

While adding now a second switch which is Zwave only the action does not succeed. The only error message I see is in home-assistant.log:

2017-08-09 17:02:05 WARNING (SyncWorker_18) [openzwave] Can't lock controller for command : add_node

I get the same error as well when I want to remove the existing one with remove_node

Any ideas what could be wrong? Thanks!

iseb, were you ever able to get this to work? I’m getting the exact same error and can’t find any additional documentation on it.

I’m running the cURL-command, but it just sits there forever and doesn’t complete.

curl -d '{"devices": ["ttyAMA0"]}' http://172.17.0.2/homeassistant/options

Any ideas why? I’m also receiving a bunch of errors when I try to manage the z-wave stick:

2017-09-08 23:15:36.839 Always, OpenZwave Version 1.4.2508 Starting Up
2017-09-08 23:15:36.880 Info, Setting Up Provided Network Key for Secure Communications
2017-09-08 23:15:36.880 Warning, Failed - Network Key Not Set
2017-09-08 23:15:36.880 Info, mgr, Added driver for controller /dev/ttyAMA0
2017-09-08 23:15:36.880 Info, Opening controller /dev/ttyAMA0
2017-09-08 23:15:36.880 Info, Trying to open serial port /dev/ttyAMA0 (attempt 1)
2017-09-08 23:15:36.881 Info, Serial port /dev/ttyAMA0 opened (attempt 1)
2017-09-08 23:15:36.882 Detail, contrlr, Queuing (Command) FUNC_ID_ZW_GET_VERSION: 0x01, 0x03, 0x00, 0x15, 0xe9
2017-09-08 23:15:36.882 Detail, contrlr, Queuing (Command) FUNC_ID_ZW_MEMORY_GET_ID: 0x01, 0x03, 0x00, 0x20, 0xdc
2017-09-08 23:15:36.882 Detail, contrlr, Queuing (Command) FUNC_ID_ZW_GET_CONTROLLER_CAPABILITIES: 0x01, 0x03, 0x00, 0x05, 0xf9
2017-09-08 23:15:36.882 Detail, contrlr, Queuing (Command) FUNC_ID_SERIAL_API_GET_CAPABILITIES: 0x01, 0x03, 0x00, 0x07, 0xfb
2017-09-08 23:15:36.882 Detail, contrlr, Queuing (Command) FUNC_ID_ZW_GET_SUC_NODE_ID: 0x01, 0x03, 0x00, 0x56, 0xaa
2017-09-08 23:15:36.882 Detail,
2017-09-08 23:15:36.882 Info, contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x15) - FUNC_ID_ZW_GET_VERSION: 0x01, 0x03, 0x00, 0x15, 0xe9
2017-09-08 23:15:37.882 Error, contrlr, ERROR: Dropping command, expected response not received after 1 attempt(s)
2017-09-08 23:15:37.883 Detail, contrlr, Removing current message
2017-09-08 23:15:37.883 Detail, contrlr, Notification: Notification - TimeOut

Hi,

in the end I was fed up and could not make it work properly.
Now I quit with the idea to run HA and the Zwave GPIO board all installed on 1 RPi.
I am now using the RPI where HA is installed, and a separate Gateway.
(VERA Plus controller because it is compatible with HA )

hey,
after iseb’s somewhat frustrated reply - which I completely understand - I just wanted to make sure you are aware that this thread did help me to understand what is going on an to help me, get my Z-Wave module to work on my new hass.io raspberry-pi3.
After all I did exactly what was documented here: Z-Wave - Home Assistant including the curl command.
My personal opinion - remove the sentence: “For some exceptional devices, the /dev/ttyAMA0 will not be detected by udev and are therefor not mapped with docker. So you need explicit set this device for mapping to Home-Assistant.” from the homepage. It might confuse some people. But after all my technical experience is certainly not good enough to judge if that could cause trouble for some configurations ?!??


To enable Z-Wave, plug your Z-Wave USB stick into your Raspberry Pi 3 and add the following to your configuration.yaml:

zwave:
usb_path: /dev/ttyACM0

If you need GPIO on raspberry-pi3 for you Z-Wave module add follow line into config.txt:

dtoverlay=pi3-miniuart-bt

For some exceptional devices, the /dev/ttyAMA0 will not be detected by udev and are therefor not mapped with docker. So you need explicit set this device for mapping to Home-Assistant. Execute this command on ssh add-on:

$ curl -d ‘{“devices”: [“ttyAMA0”]}’ http://hassio/homeassistant/options

After that, you need change usb_path to /dev/ttyAMA0.

1 Like

Hey gerds423

That may be fine for you but I have the exact same problem as iseb. I too, am thinking of giving up on this and searching for other alternatives.
I followed the instructions from the link you mention and get the following result:
core-ssh:~# curl -d ‘{“devices”: [“ttyAMA0”]}’ http://hassio/homeassistant/options
{“result”: “ok”, “data”: {}}core-ssh:~#
However, this does nothing and does not create the tty device.

Lucky you.

hey dwdion,
really sorry to hear about your trouble. Unfortunately I also gave up now as well, as I could not get the RFLink to work on hass.io, in a way due to a similar problem. If I am not all wrong hass.io and therefore docker are closer to the hardware and therefore need to provide the access to the actual home assistant installation and that appears to cause the trouble.
Until that is fixed, I also went back to hassbian.
Back to your problem - the output you get looks right to me - any log errors that we could look at?

Hi Gerd and thanks for the reply.

The Razberry is now working. I guess I was too impatient. However, I do not like it that you cannot see a lot of things on the hass.io. The devices created, for example are not visible over the ssh connection. This is most likely a separate instance than that being used for the home assistant. It makes troubleshooting very difficult.
I did think about hassbian and might give it a look at. I would like a solution that supports both z-wave and a Hue bridge as I have already bought some of these items.

Thanks again.

Cheers

Denis

How do you modify config.txt on Pi 3, I cant find this file

from a different thread:

looks to me that something went wrong on the copy and past. Try to copy and paste and the remove the
'
and retype them in. Somehow the copy and past result is not the same

Have put a few days now to get a Razberry card to work with Hass.io.

Can I make the conclution that it will NEVER work propperly?
If thats the case can someone please make an official statement that this combination never will work.

Just don’t claim it will work.
The docks information seems faulty as is, according to this thread.

I got as far as I have some z-wave control page, can’t add devices thou.
In the log there is a driver failure!

So hass.io might have to go!

Hey!
It works for me.
The thread is one year old, I’m not sure that’s the most up to date information.

Can you please confirm that you are running the latest version of HassOS? HassOS 1.13 is my version right now.

Have you added

dtoverlay=pi3-miniuart-bt
into your config.txt?

What do you mean by this:

The docks information seems faulty as is, according to this thread.

B

its been a while since I had my pi up. I am struggling having the Zwave module to work ,as I want to add my sensor again. tried to restart the zwave on the gui with no luck… Anybody can remind me what could be the issue :slight_smile:

   pi@raspberrypi:/srv/homeassistant/lib/python3.5/site-packages/python_openzwave/ozw_config$ ls -ltr /dev/tty*|tail -n 1
crw-rw---- 1 root dialout 204, 64 Dec  9 11:45 /dev/ttyAMA0
pi@raspberrypi:/srv/homeassistant/lib/python3.5/site-packages/python_openzwave/ozw_config$ ls -l /dev/ttyAMA0
crw-rw---- 1 root dialout 204, 64 Dec  9 11:45 /dev/ttyAMA0
pi@raspberrypi:/srv/homeassistant/lib/python3.5/site-packages/python_openzwave/ozw_config$ 
pi@raspberrypi:/srv/homeassistant/lib/python3.5/site-packages/python_openzwave/ozw_config$ 
pi@raspberrypi:/srv/homeassistant/lib/python3.5/site-packages/python_openzwave/ozw_config$ tail -f /home/homeassistant/.homeassistant/OZW_Log.txt 
2018-12-09 11:45:54.522 Detail, 
2018-12-09 11:45:54.522 Info, contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x07) - FUNC_ID_SERIAL_API_GET_CAPABILITIES: 0x01, 0x03, 0x00, 0x07, 0xfb
2018-12-09 11:45:55.523 Error, contrlr, ERROR: Dropping command, expected response not received after 1 attempt(s)
2018-12-09 11:45:55.523 Detail, contrlr, Removing current message
2018-12-09 11:45:55.523 Detail, contrlr, Notification: Notification - TimeOut
2018-12-09 11:45:55.534 Detail, 
2018-12-09 11:45:55.534 Info, contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x56) - FUNC_ID_ZW_GET_SUC_NODE_ID: 0x01, 0x03, 0x00, 0x56, 0xaa
2018-12-09 11:45:56.534 Error, contrlr, ERROR: Dropping command, expected response not received after 1 attempt(s)
2018-12-09 11:45:56.535 Detail, contrlr, Removing current message
2018-12-09 11:45:56.535 Detail, contrlr, Notification: Notification - TimeOut
2018-12-09 11:55:11.637 Error, mgr,     Manager::GetDriver failed - Home ID 0x00000000 is unknown
2018-12-09 11:55:11.637 Warning, Exception: Manager.cpp:373 - 100 - Invalid HomeId passed to GetDriver
2018-12-09 11:55:11.637 Info, mgr,     Manager::WriteConfig failed - _homeId 0 not found
2018-12-09 11:55:12.640 Detail, Notification: DriverRemoved
2018-12-09 11:55:12.640 Always, ***************************************************************************
2018-12-09 11:55:12.640 Always, *********************  Cumulative Network Statistics  *********************
2018-12-09 11:55:12.640 Always, *** General
2018-12-09 11:55:12.640 Always, Driver run time: . .  . 0 days, 0 hours, 9 minutes
2018-12-09 11:55:12.640 Always, Frames processed: . . . . . . . . . . . . . . . . . . . . 0
2018-12-09 11:55:12.641 Always, Total messages successfully received: . . . . . . . . . . 0
2018-12-09 11:55:12.641 Always, Total Messages successfully sent: . . . . . . . . . . . . 5
2018-12-09 11:55:12.641 Always, ACKs received from controller:  . . . . . . . . . . . . . 0
2018-12-09 11:55:12.641 Always, *** Errors
2018-12-09 11:55:12.641 Always, Unsolicited messages received while waiting for ACK:  . . 0
2018-12-09 11:55:12.641 Always, Reads aborted due to timeouts:  . . . . . . . . . . . . . 0
2018-12-09 11:55:12.641 Always, Bad checksum errors:  . . . . . . . . . . . . . . . . . . 0
2018-12-09 11:55:12.641 Always, CANs received from controller:  . . . . . . . . . . . . . 0
2018-12-09 11:55:12.641 Always, NAKs received from controller:  . . . . . . . . . . . . . 0
2018-12-09 11:55:12.641 Always, Out of frame data flow errors:  . . . . . . . . . . . . . 0
2018-12-09 11:55:12.641 Always, Messages retransmitted: . . . . . . . . . . . . . . . . . 0
2018-12-09 11:55:12.642 Always, Messages dropped and not delivered: . . . . . . . . . . . 5
2018-12-09 11:55:12.642 Always, ***************************************************************************
2018-12-09 11:55:12.642 Warning, WARNING: Tried to write driver config with no home ID set
2018-12-09 11:55:14.644 Info, mgr,     Driver for controller /dev/ttyAMA0 removed
2018-12-09 11:55:20.489 Info, Setting Up Provided Network Key for Secure Communications
2018-12-09 11:55:20.489 Info, mgr,     Added driver for controller /dev/ttyAMA0
2018-12-09 11:55:20.490 Info,   Opening controller /dev/ttyAMA0
2018-12-09 11:55:20.490 Info, Trying to open serial port /dev/ttyAMA0 (attempt 1)
2018-12-09 11:55:20.490 Info, Serial port /dev/ttyAMA0 opened (attempt 1)
2018-12-09 11:55:20.491 Detail, contrlr, Queuing (Command) FUNC_ID_ZW_GET_VERSION: 0x01, 0x03, 0x00, 0x15, 0xe9
2018-12-09 11:55:20.491 Detail, contrlr, Queuing (Command) FUNC_ID_ZW_MEMORY_GET_ID: 0x01, 0x03, 0x00, 0x20, 0xdc
2018-12-09 11:55:20.491 Detail, contrlr, Queuing (Command) FUNC_ID_ZW_GET_CONTROLLER_CAPABILITIES: 0x01, 0x03, 0x00, 0x05, 0xf9
2018-12-09 11:55:20.491 Detail, contrlr, Queuing (Command) FUNC_ID_SERIAL_API_GET_CAPABILITIES: 0x01, 0x03, 0x00, 0x07, 0xfb
2018-12-09 11:55:20.491 Detail, contrlr, Queuing (Command) FUNC_ID_ZW_GET_SUC_NODE_ID: 0x01, 0x03, 0x00, 0x56, 0xaa
2018-12-09 11:55:20.491 Detail, 
2018-12-09 11:55:20.491 Info, contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x15) - FUNC_ID_ZW_GET_VERSION: 0x01, 0x03, 0x00, 0x15, 0xe9
2018-12-09 11:55:21.492 Error, contrlr, ERROR: Dropping command, expected response not received after 1 attempt(s)
2018-12-09 11:55:21.492 Detail, contrlr, Removing current message
2018-12-09 11:55:21.492 Detail, contrlr, Notification: Notification - TimeOut
2018-12-09 11:55:21.500 Detail, 
2018-12-09 11:55:21.501 Info, contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x20) - FUNC_ID_ZW_MEMORY_GET_ID: 0x01, 0x03, 0x00, 0x20, 0xdc
2018-12-09 11:55:22.501 Error, contrlr, ERROR: Dropping command, expected response not received after 1 attempt(s)
2018-12-09 11:55:22.501 Detail, contrlr, Removing current message
2018-12-09 11:55:22.501 Detail, contrlr, Notification: Notification - TimeOut
2018-12-09 11:55:22.511 Detail, 
2018-12-09 11:55:22.511 Info, contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x05) - FUNC_ID_ZW_GET_CONTROLLER_CAPABILITIES: 0x01, 0x03, 0x00, 0x05, 0xf9
2018-12-09 11:55:23.511 Error, contrlr, ERROR: Dropping command, expected response not received after 1 attempt(s)
2018-12-09 11:55:23.511 Detail, contrlr, Removing current message
2018-12-09 11:55:23.512 Detail, contrlr, Notification: Notification - TimeOut
2018-12-09 11:55:23.522 Detail, 
2018-12-09 11:55:23.522 Info, contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x07) - FUNC_ID_SERIAL_API_GET_CAPABILITIES: 0x01, 0x03, 0x00, 0x07, 0xfb
2018-12-09 11:55:24.523 Error, contrlr, ERROR: Dropping command, expected response not received after 1 attempt(s)
2018-12-09 11:55:24.523 Detail, contrlr, Removing current message
2018-12-09 11:55:24.524 Detail, contrlr, Notification: Notification - TimeOut
2018-12-09 11:55:24.532 Detail, 
2018-12-09 11:55:24.533 Info, contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x56) - FUNC_ID_ZW_GET_SUC_NODE_ID: 0x01, 0x03, 0x00, 0x56, 0xaa
2018-12-09 11:55:25.533 Error, contrlr, ERROR: Dropping command, expected response not received after 1 attempt(s)
2018-12-09 11:55:25.534 Detail, contrlr, Removing current message
2018-12-09 11:55:25.534 Detail, contrlr, Notification: Notification - TimeOut[quote="bboti86, post:32, topic:23142, full:true"]
Hey! 
It works for me. 
The thread is one year old, I'm not sure that's the most up to date information. 

Can you please confirm that you are running the latest version of HassOS? HassOS 1.13 is my version right now. 

Have you added 
> dtoverlay=pi3-miniuart-bt 
into your config.txt? 

What do you mean by this:

> The docks information seems faulty as is, according to this thread.

B
[/quote]