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.
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?
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.
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?
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…
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)
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\']'
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…