Help! - Setup Aeotec Z-Wave USB Stick

All -

First, thanks in advance for the help. I have a feeling that I am going to be sufficiently embarrassed when someone points out what I’m doing wrong here, but I’ve been futzing with this thing off and on for a few days now and still can’t seem to get it to work.

I have Hassio up and running on my RPI3, have SSH, DuckDNS, Samba, and all that good stuff set up and working correctly.

I have followed a few different tutorials for adding the Aeotec stick to HA, with no success.

Long story short, when I execute:

ls -ltr /dev/tty*|tail -n 1

the result I get back is:

crw-rw-rw- 1 root root 5, 0 Dec 27 08:31 /dev/tty

Now, my understanding is that I should get something along the lines of a /dev/ttyACM0 at the end, which tells me where my stick is connected and what to actually add to my configuration.yaml file to activate the Z-Wave component.

So, what am I missing here? Something simple, undoubtedly, but I’ve tried a variety of different things and can’t get it to work.

Any help is appreciated – thank you all!

Hass.io is different from other installs, and you need to follow these steps.

Hi @Tinkerer - Thank you for the response.

Please excuse my ignorance, but I don’t see a specific section for Hass.io at that link. Is the section that I need to complete the one with “curl -d”… etc, or is there something else I’m missing?

Per the docs:

For some devices the /dev/ttyAMA0 device is not detected by udev and is therefore not mapped by Docker. To explicitly set this device for mapping to Home-Assistant, execute the following command using the ssh add-on:

$ curl -d '{"devices": ["ttyAMA0"]}' http://hassio/homeassistant/options
After that, you need to change usb_path to /dev/ttyAMA0 in your configuration.yaml.

zwave:
  usb_path: /dev/ttyAMA0

follow those steps and it should start working for you.

I think you’re on the right track - first off, piping your ls command into tail with the -n 1 option is only going to return you one result… so we still don’t know definitively if the Aeotec is recognized on your Pi or not.

Ssh into the Pi and type hassio host hardware. That will return you a list of the hardware attached to the Pi and recognized by Hassio. In the serial section at the top your should see /dev/ttyUSB0 or something similar if the Aeotec is recognized.

Also, the Aeotec is almost certainly going to be recognized as a USB serial device and not AMA, which on the Pi is generally reserved for the hardware UART that hat devices like the Razberry board attach to.

@firstof9 -

I followed those instructions exactly, changed my config file to reflect AMA0, and…nothing.

I still don’t see anything referring to Z-Wave anywhere in my sidebar or submenus.

Do I need to restart HA? Is there some way for me to force these changes into HA, or do I just have to sit and wait for it to update?

@marthocoo -

First, thanks for the help.

Entering hassio host hardware returns:

  "serial": [
    "/dev/ttyAMA0",
    "/dev/ttyACM0"
  ],
  "input": [],
  "disk": [],
  "gpio": [
    "gpiochip100",
    "gpiochip0"
  ],
  "audio": {
    "0": {
      "name": "bcm2835 - bcm2835 ALSA",
      "type": "ALSA",
      "devices": {
        "0": "digital audio playback",
        "1": "digital audio playback"
      }
    }
  }
}

That’s obviously a little confusing to me because I have both ACM0 and AMA0. I have used AMA0 in my config file, but perhaps it should be changed to ACM0?

Try /dev/ttyACM0

Add this to your configuration.yaml:

zwave:
  usb_path: /dev/ttyACM0

Then in the sidebar under Configuration you should have “Z-Wave”

Is there a particular amount of time that has to elapse before it shows up?

I completed this roughly 35 minutes ago (almost immediately after both you and marthocoo posted), and I still see nothing.

I have checked and my config is valid as well, so it’s not that.

Is there a way to force an update to the system to try and get it to show up?

Did you restart homeassistant? Once you do, either the Zwave entry will show up under the configuration menu or you will have an error entry in your log telling us why it isn’t showing up.

@marthocoo - I did not. I didn’t realize that I had to restart it. My apologies.

I’m a bit nervous because the last time I restarted HA, I ended up having to power down the RPI altogether to get it to come back – I lost the ability to access the front end. We’ll see what happens this time.

I will update shortly – thanks again for all of your help. Frustrating to know that this all might have been solved by a restart…

Generally speaking, you always have to restart HA after a configuration.yaml update. There are exceptions but most things require a restart.

OK, so I now have an “Invalid Config” error that comes up.

"The following components and platforms could not be set up:

  • zwave

Please check your config.

So, does this mean that perhaps I should change back to /dev/ttyAMA0 instead of /dev/ttyACM0?

Probably, but the logs (hassio homeassistant logs when your SSHd on) will tell you more. The first 20 lines of the OZW_Log.txt file (in the same directory as configuration.yaml will also be useful)

Yes we need to know what the logs are to diagnose the specific error.

I believe this is the section of the logs that is most relevant. Please note that this is AFTER I changed from ACM0 to AMA0, but it should be noted that I got the exact same error (only with ACM0 instead of AMA0) previously…

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/tty/AMA0 : ['NoneType: None\\n']"
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/setup.py", line 193, in _async_setup_component
    component.setup, hass, processed_config)
  File "/usr/lib/python3.6/asyncio/futures.py", line 332, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup
    future.result()
  File "/usr/lib/python3.6/asyncio/futures.py", line 245, in result
    raise self._exception
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/zwave/__init__.py", line 280, in setup
    config_path=config[DOMAIN].get(CONF_CONFIG_PATH))
  File "/usr/lib/python3.6/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 /dev/tty/AMA0 : [\'Traceback (most recent call last):\\n\', \'  File "/usr/lib/python3.6/site-packages/openzwave/option.py", line 78, in __init__\\n    raise ZWaveException(u"Can\\\'t find device %s : %s" % (device, traceback.format_exception(*sys.exc_info())))\\n\', \'openzwave.object.ZWaveException: "Zwave Generic Exception : Can\\\'t find device /dev/tty/AMA0 : [\\\'NoneType: None\\\\\\\\n\\\']"\\n\']'

Not /dev/tty/ACM0, there’s an extra slash in there that shouldn’t be. It should be: /dev/ttyACM0

2 Likes

Sigh…

deleting my account now, and never coming back…

Thank you, @marthocoo – I think my frustrations were getting the best of me, as I looked over that 100 times. In reality, I just checked back in my Putty logs and I didn’t have the \ in there when I was using ACM0, but I must have added it when I changed it to AMA0.

I now have the Z-Wave menu in my Configuration tab. Now to start actually adding devices…

Thank you all – much, much appreciated.

Typos happen to the best of us.
Enjoy!