Need help getting ZWave GPIO on raspberry-pi3 to work

I have just installed Hass.io and are trying to get my onboard zwave controlller to work.
In the installation instructions it says: If you need GPIO on raspberry-pi3 for you Z-Wave module add follow line into config.txt:
“dtoverlay=pi3-miniuart-bt”

Anyone that can explane to me where I can find the config.txt file?

1 Like

@ashalph: Its has already been added in the image.
I had several issues regarding this myself and the thing that solved it for me was to save the configfiles and reflash the memorycard and started all over and boom the z-wave controller came to life.

Before I did this i dedicated approx 2-3 hours of googling, asking and testing without any results…
Beats me why it didnt work out of the box.

I seem to have the same issue. Cant get my Razberry zwave module working
I have added

zwave:
     usb_path: /dev/ttyACM0

to the configuration.yaml file but get a zwave error.

From the log:

2017-07-31 11:57:54 ERROR (MainThread) [homeassistant.setup] Error during setup of component zwave
Traceback (most recent call last):
File “/usr/lib/python3.6/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())))
openzwave.object.ZWaveException: “Zwave Generic Exception : Can’t find device /dev/ttyACM0 : [‘NoneType: None\n’]”

Update:
I took the memory card out and pluged it into my computer.
the file config.txt is in the root and added the line

dtoverlay=pi3-miniuart-bt

into it

Update 2:
After changing the configuration.yaml file to

zwave:
usb_path: /dev/ttyS0

zwave turns up in HASS.IO interface.
But it is still not working

Update 3:
Changed to:

zwave:
usb_path: /dev/ttyAMA0

Now it works

2 Likes

I have the following in my configuration file: and it works as intended.
zwave:
usb_path: /dev/ttyAMA0
new_entity_ids: true

Also with a razberry zwave module?

What does this line do?
new_entity_ids: true

/Henrik

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.