ZWave stick + NUC +Ubuntu 17.10

Hi All,

Need a desperate help with deploying HA through docker on Ubuntu (NUC). I have followed the installation guide and when I try to configure ZWave, I get below error. My Zwave stick is on /dev/ttyACM0 but looking at the log file, it seems HA is looking at /dev/ttyAMA0.

I did some search and troubleshooting but can’t figure out what’s wrong.

PS: New to Linux/Ubuntu OS. Zwave was connected to RPi using HASSIO and was slow so moving to NUC.

2018-03-02 12:54:01 WARNING (Recorder) [homeassistant.components.recorder] Ended unfinished session (id=2 from 2018-03-02 01:31:14.145481) 2018-03-02 12:54:04 ERROR (MainThread) [homeassistant.setup] Error during setup of component zwave Traceback (most recent call last): File "/usr/local/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/ttyAMA0 : ['NoneType: None\\n']" During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/src/app/homeassistant/setup.py", line 148, in _async_setup_component component.setup, hass, processed_config) File "/usr/local/lib/python3.6/asyncio/futures.py", line 327, in __iter__ yield self # This tells Task to wait for completion. File "/usr/local/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup future.result() File "/usr/local/lib/python3.6/asyncio/futures.py", line 243, in result raise self._exception File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run result = self.fn(*self.args, **self.kwargs) File "/usr/src/app/homeassistant/components/zwave/__init__.py", line 275, in setup config_path=config[DOMAIN].get(CONF_CONFIG_PATH)) File "/usr/local/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/ttyAMA0 : [\'Traceback (most recent call last):\\n\', \' File "/usr/local/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/ttyAMA0 : [\\\'NoneType: None\\\\\\\\n\\\']"\\n\']'

######-PC:/home/ayx# ls /dev/ttyACM*
/dev/ttyACM0

Confiuration.yaml output is as per below

homeassistant:
  # Name of the location where Home Assistant is running
  name: Home
  # Location required to calculate the time the sun rises and sets
  latitude: -37.8667
  longitude: 145.2833
  # Impacts weather/sunrise data (altitude above sea level in meters)
  elevation: 0
  # metric for Metric, imperial for Imperial
  unit_system: metric
  # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  time_zone: Australia/Melbourne
  # Customization file
  customize: !include customize.yaml

# Show links to resources in log and frontend
introduction:

# Enables the frontend
frontend:

# Enables configuration UI
config:

http:
  # Secrets are defined in the file secrets.yaml
  # api_password: !secret http_password
  # Uncomment this if you are using SSL/TLS, running in Docker container, etc.
  # base_url: example.duckdns.org:8123

# Checks for available updates
# Note: This component will send some information about your system to
# the developers to assist with development of Home Assistant.
# For more information, please see:
# https://home-assistant.io/blog/2016/10/25/explaining-the-updater/
updater:
  # Optional, allows Home Assistant developers to focus on popular components.
  # include_used_components: true

# Discover some devices automatically
discovery:

# Allows you to issue voice commands from the frontend in enabled browsers
conversation:

# Enables support for tracking state changes over time
history:

# View all events in a logbook
logbook:

# Enables a map showing the location of tracked devices
map:

# Track the sun
sun:

# Weather prediction
sensor:
  - platform: yr

# Text to speech
tts:
  - platform: google

# Cloud
cloud:

#Zwave
zwave:
  usb_path: /dev/ttyAMA0

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml

and Docker-compose.yaml

  version: '3'
  services:
    web:
      image: homeassistant/home-assistant
      volumes:
        - /home/rahul/Documents/HA:/config
        - /etc/localtime:/etc/localtime:ro
      devices:
        - /dev/ttyACM0:/dev/ttyACM0
      restart: always
      network_mode: host

I’m on Ubuntu 17.10 in virtual environment.
In the Zwave confíg I also added the config_path.

Thanks, juan11perez.

I check my directory but can’t find the path to openzwave/config. All I have in the directory listing is as per below. I have to manually install openzwave. I thought it’s automatically installed once you plug-in the Zwave stick.

It thinks it is at that path because in your config you literally told it it was at that path…

You don’t need a config path

Hi flamingm0e,

Thanks for picking that up. I have since changed the configuration but still get similar error this time for ACM0. I have restarted the HA from Docker using"docker restart home-assistant" but still same error log. Below is the updated configuration file output.

homeassistant:
  # Name of the location where Home Assistant is running
  name: Home
  # Location required to calculate the time the sun rises and sets
  latitude: -37.8667
  longitude: 145.2833
  # Impacts weather/sunrise data (altitude above sea level in meters)
  elevation: 0
  # metric for Metric, imperial for Imperial
  unit_system: metric
  # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  time_zone: Australia/Melbourne
  # Customization file
  customize: !include customize.yaml

# Show links to resources in log and frontend
introduction:

# Enables the frontend
frontend:

# Enables configuration UI
config:

http:
  # Secrets are defined in the file secrets.yaml
  # api_password: !secret http_password
  # Uncomment this if you are using SSL/TLS, running in Docker container, etc.
  # base_url: example.duckdns.org:8123

# Checks for available updates
# Note: This component will send some information about your system to
# the developers to assist with development of Home Assistant.
# For more information, please see:
# https://home-assistant.io/blog/2016/10/25/explaining-the-updater/
updater:
  # Optional, allows Home Assistant developers to focus on popular components.
  # include_used_components: true

# Discover some devices automatically
discovery:

# Allows you to issue voice commands from the frontend in enabled browsers
conversation:

# Enables support for tracking state changes over time
history:

# View all events in a logbook
logbook:

# Enables a map showing the location of tracked devices
map:

# Track the sun
sun:

# Weather prediction
sensor:
  - platform: yr

# Text to speech
tts:
  - platform: google

# Cloud
cloud:

#Zwave
zwave:
  usb_path: /dev/ttyACM0

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml

Error log

2018-03-02 15:59:09 ERROR (MainThread) [homeassistant.setup] Error during setup of component zwave Traceback (most recent call last): File "/usr/local/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']" During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/src/app/homeassistant/setup.py", line 148, in _async_setup_component component.setup, hass, processed_config) File "/usr/local/lib/python3.6/asyncio/futures.py", line 327, in __iter__ yield self # This tells Task to wait for completion. File "/usr/local/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup future.result() File "/usr/local/lib/python3.6/asyncio/futures.py", line 243, in result raise self._exception File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run result = self.fn(*self.args, **self.kwargs) File "/usr/src/app/homeassistant/components/zwave/__init__.py", line 275, in setup config_path=config[DOMAIN].get(CONF_CONFIG_PATH)) File "/usr/local/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/ttyACM0 : [\'Traceback (most recent call last):\\n\', \' File "/usr/local/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/ttyACM0 : [\\\'NoneType: None\\\\\\\\n\\\']"\\n\']'

what user are you running docker as? have you tried to docker-compose down sudo docker-compose up -d?

Hi flamingm0e

Thanks for quick reply. When I run above command, I get error as shown below.

rahul@RahulThakkar-PC:~$ sudo docker-compose down
ERROR: 
        Can't find a suitable configuration file in this directory or any
        parent. Are you in the right directory?

        Supported filenames: docker-compose.yml, docker-compose.yaml
        
rahul@RahulThakkar-PC:~$ sudo su
root@RahulThakkar-PC:/home/rahul# docker-compose down
ERROR: 
        Can't find a suitable configuration file in this directory or any
        parent. Are you in the right directory?

        Supported filenames: docker-compose.yml, docker-compose.yaml
        
root@RahulThakkar-PC:/home/rahul#

but you said you had a docker compose yaml? where is it located? you have to run the docker-compose command in the same directory as that.

Hi Flamingm0e,

It’s in the same directory as HA configuration file. I will try to run it in same folder and update the post.

Thanks,
Rahul

I’m confused.

You say you are using docker, but your screenshot above shows you browsing /usr/local/lib/…?

How are you starting / stopping your docker container if you are not using the docker-compose?

HI Flamingm0e,

I was showing the python-openzwave folder for reference. I have installed Docker and Docker-compose as recommended by HA. I then installed HA based on the procedure define on HA. I did docker-compose down and up as recommended.

I get the same error but HA still says invalid

Sat Mar 03 2018 10:22:04 GMT+1100 (AEDT)

Error during setup of component zwave

Traceback (most recent call last):
  File "/usr/local/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']"

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/app/homeassistant/setup.py", line 148, in _async_setup_component
    component.setup, hass, processed_config)
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 327, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup
    future.result()
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 243, in result
    raise self._exception
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/app/homeassistant/components/zwave/__init__.py", line 275, in setup
    config_path=config[DOMAIN].get(CONF_CONFIG_PATH))
  File "/usr/local/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/ttyACM0 : [\'Traceback (most recent call last):\\n\', \'  File "/usr/local/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/ttyACM0 : [\\\'NoneType: None\\\\\\\\n\\\']"\\n\']'

Service media_player/media_play_pause called.

Also, get this in error log.

Traceback (most recent call last): File "/usr/src/app/homeassistant/core.py", line 1010, in _event_to_service_call yield from service_handler.func(service_call) File "/usr/src/app/homeassistant/components/media_player/__init__.py", line 402, in async_service_handler yield from getattr(player, method['method'])(**params) File "/usr/local/lib/python3.6/asyncio/futures.py", line 327, in __iter__ yield self # This tells Task to wait for completion. File "/usr/local/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup future.result() File "/usr/local/lib/python3.6/asyncio/futures.py", line 243, in result raise self._exception File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run result = self.fn(*self.args, **self.kwargs) File "/usr/src/app/homeassistant/components/media_player/cast.py", line 367, in turn_on CAST_SPLASH, pychromecast.STREAM_TYPE_BUFFERED) File "/usr/local/lib/python3.6/site-packages/pychromecast/controllers/media.py", line 464, in play_media receiver_ctrl = self._socket_client.receiver_controller AttributeError: 'NoneType' object has no attribute 'receiver_controller' 2018-03-03 03:53:23 WARNING (Thread-3) [pychromecast.socket_client] Heartbeat timeout, resetting connection 2018-03-03 03:53:38 ERROR (Thread-3) [pychromecast.socket_client] Failed to connect, retrying in 5.0s 2018-03-03 09:17:01 WARNING (MainThread) [homeassistant.components.media_player.cast] Can't set up chromecast on 192.168.15.204: Could not connect to 192.168.15.204:8009 2018-03-03 09:17:01 WARNING (MainThread) [homeassistant.components.media_player] Platform cast not ready yet. Retrying in 30 seconds.

Thanks for all your help and support. I need to get it working, I am also thinking if I should move to HASSIO but I want HAdashboard which has more support on docker than HASSIO.

Thanks again.

Where are you seeing these errors? What logs are you viewing?

could be that he needs to set the dialout group for the stick?

1 Like

Hi @flamingm0e,

This is on HA log page.

@dshokouhi, I have dialout group set as shown below unless I am looking at wrong thing.

rahul@RahulThakkar-PC:~/Documents/HA$ ls -l /dev/ttyACM*
crw-rw---- 1 root dialout 166, 0 Mar 2 15:29 /dev/ttyACM0
rahul@RahulThakkar-PC:~/Documents/HA$

but is the user ‘rahul’ a member of dialout?

@flamingm0e, How do I find that out? Sorry new to Ubuntu.

Found it and added user too.

rahul@RahulThakkar-PC:~/Documents/HA$ ls -l /dev/ttyACM0
crw-rw---- 1 root rahul 166, 0 Mar 2 15:29 /dev/ttyACM0

If you didn’t add yourself to the group, then you aren’t in it.

NOOOOOO!!!

That is not how you do it. You changed the GROUP on the device to your own group…you need to ADD YOUR USER TO THE GROUP

Awesome. You are a legend. Just added myself to the group. Now restarting HA to see the difference.

Still the same. Restarted HA from docker using command “docker restart home-assistant” that didn’t work so used sudo docker-compose down and up but still same error. :frowning: