Need help getting ZWave GPIO on raspberry-pi3 to work

Just took a closer look at my image…
I have added “dtoverlay=pi3-miniuart-bt” to the file. Completely forgot that.

new_entity_ids forces it to use the new entity_ids. default is true but I had som issues and added that in searching for the issues.
Some of my Telldus Z-wave units cant be removed from Hassio even if they are marked as dead.

you can ignore that setting.

1 Like

I update the guide: https://github.com/home-assistant/home-assistant.github.io/blob/current/source/hassio/zwave.markdown

2 Likes

Just updated my previous reply. forgot that I also changed the usbpath.
Now the razberry module is recognized and the zwave page is added to the menu. on the left of the interface screen.

And the sensor reading from the node is displayed in the top next to weather data on the interface state screen

Thanks.
changing to

usb_path: /dev/ttyAMA0

got it working

I have tried

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

But I stil need to set

usb_path: /dev/ttyAMA0

Not

After that you need change usb_path to /dev/ttyACM0.

Did you make a typing mistake or am I doing something wrong?

Hey!

I’ve struggled with this yesterday and now I was able to work out what’s wrong.
I have the Razberry add-on board from ZWave.me on the Raspberry pi 3.

The process is:

  1. remove the SD Card from the pi and connect it to your PC (in windows a drive will show up, in linux you have to mount one of the partitions)
  2. open config.txt and paste dtoverlay=pi3-miniuart-bt to the end of it, save the file and put the card back to the pi
  3. after the pi boots up open Home Assistant and install the SSH Server add-on from the Hass.io button on the left as described here: https://www.youtube.com/watch?v=L7PCPQYwspo
  4. open ssh and run curl -d ‘{“devices”: [“ttyAMA0”]}’ http://172.17.0.2/homeassistant/options
  5. into your configuration.yaml enter
    zwave:
    usb_path: /dev/ttyAMA0 #make sure you indent this line

The issue with the method described here: https://home-assistant.io/hassio/zwave/ is that you “tell” hass.io that there is a device accessible at /dev/ttyAMA0 on step 4 from above, however if you follow the instructions you already added /dev/ttyACM0 to your configuration.yaml
With using the right device address in both the command and the configuration.yaml you should have a working Z-wave connection.

I hope this summary helps a bit!
Regards:
Botond

4 Likes

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