Z-wave setup issues

I’m running home assistant 0.61.1 install with Hass.io on a Rapsberry Pi 3. Recently I decided to add some a Z-Wave dimmer. But for some reason I can’t get it working.

So I installed a Aeotec Z-stick 5 and added it to the config.yaml

zwave:
  usb_path: /dev/ttyAMA0

After a reboot of home assistant I can see the Z-wave config panel. So I tried to add the node but without any success. Also I tried to add it manually with the button on the stick, in that case I see the stick has detected the dimmer but in home assistant I don’t see it popping up (even not after a reboot).

In the logs I see a lot of errors, but not really sure what’s going on.

In the OZW log:

2018-01-19 16:11:00.189 Always, OpenZwave Version 1.4.2586 Starting Up
2018-01-19 16:11:02.240 Info, Setting Up Provided Network Key for Secure Communications
2018-01-19 16:11:02.240 Warning, Failed - Network Key Not Set
2018-01-19 16:11:02.240 Info, mgr,     Added driver for controller /dev/ttyAMA0
2018-01-19 16:11:02.240 Info,   Opening controller /dev/ttyAMA0
2018-01-19 16:11:02.240 Info, Trying to open serial port /dev/ttyAMA0 (attempt 1)
2018-01-19 16:11:02.241 Info, Serial port /dev/ttyAMA0 opened (attempt 1)
2018-01-19 16:11:02.246 Detail, contrlr, Queuing (Command) FUNC_ID_ZW_GET_VERSION: 0x01, 0x03, 0x00, 0x15, 0xe9
2018-01-19 16:11:02.246 Detail, contrlr, Queuing (Command) FUNC_ID_ZW_MEMORY_GET_ID: 0x01, 0x03, 0x00, 0x20, 0xdc
2018-01-19 16:11:02.246 Detail, contrlr, Queuing (Command) FUNC_ID_ZW_GET_CONTROLLER_CAPABILITIES: 0x01, 0x03, 0x00, 0x05, 0xf9
2018-01-19 16:11:02.246 Detail, contrlr, Queuing (Command) FUNC_ID_SERIAL_API_GET_CAPABILITIES: 0x01, 0x03, 0x00, 0x07, 0xfb
2018-01-19 16:11:02.246 Detail, contrlr, Queuing (Command) FUNC_ID_ZW_GET_SUC_NODE_ID: 0x01, 0x03, 0x00, 0x56, 0xaa
2018-01-19 16:11:02.247 Detail,
2018-01-19 16:11:02.247 Info, contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x15) - FUNC_ID_ZW_GET_VERSION: 0x01, 0x03, 0x00, 0x15, 0xe9
2018-01-19 16:11:03.247 Error, contrlr, ERROR: Dropping command, expected response not received after 1 attempt(s)
2018-01-19 16:11:03.247 Detail, contrlr, Removing current message
2018-01-19 16:11:03.247 Detail, contrlr, Notification: Notification - TimeOut
2018-01-19 16:11:03.248 Detail,
2018-01-19 16:11:03.248 Info, contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x20) - FUNC_ID_ZW_MEMORY_GET_ID: 0x01, 0x03, 0x00, 0x20, 0xdc
2018-01-19 16:11:04.248 Error, contrlr, ERROR: Dropping command, expected response not received after 1 attempt(s)
2018-01-19 16:11:04.249 Detail, contrlr, Removing current message
2018-01-19 16:11:04.249 Detail, contrlr, Notification: Notification - TimeOut
2018-01-19 16:11:04.249 Detail,
2018-01-19 16:11:04.250 Info, contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x05) - FUNC_ID_ZW_GET_CONTROLLER_CAPABILITIES: 0x01, 0x03, 0x00, 0x05, 0xf9
2018-01-19 16:11:05.250 Error, contrlr, ERROR: Dropping command, expected response not received after 1 attempt(s)
2018-01-19 16:11:05.250 Detail, contrlr, Removing current message
2018-01-19 16:11:05.250 Detail, contrlr, Notification: Notification - TimeOut
2018-01-19 16:11:05.251 Detail,
2018-01-19 16:11:05.251 Info, contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x07) - FUNC_ID_SERIAL_API_GET_CAPABILITIES: 0x01, 0x03, 0x00, 0x07, 0xfb
2018-01-19 16:11:06.251 Error, contrlr, ERROR: Dropping command, expected response not received after 1 attempt(s)
2018-01-19 16:11:06.252 Detail, contrlr, Removing current message
2018-01-19 16:11:06.252 Detail, contrlr, Notification: Notification - TimeOut
2018-01-19 16:11:06.254 Detail,
2018-01-19 16:11:06.254 Info, contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x56) - FUNC_ID_ZW_GET_SUC_NODE_ID: 0x01, 0x03, 0x00, 0x56, 0xaa
2018-01-19 16:11:07.254 Error, contrlr, ERROR: Dropping command, expected response not received after 1 attempt(s)
2018-01-19 16:11:07.254 Detail, contrlr, Removing current message
2018-01-19 16:11:07.254 Detail, contrlr, Notification: Notification - TimeOut
2018-01-19 16:20:41.739 Error, mgr,     Manager::GetDriver failed - Home ID 0x00000000 is unknown
2018-01-19 16:20:41.739 Warning, Exception: Manager.cpp:373 - 100 - Invalid HomeId passed to GetDriver
2018-01-19 16:20:41.739 Info, mgr,     Manager::WriteConfig failed - _homeId 0 not found

In the home assitant log:

Error executing service <ServiceCall zwave.remove_node>
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/core.py", line 1018, in _event_to_service_call
    yield from self._hass.async_add_job(execute_service)
  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/core.py", line 1015, in execute_service
    service_handler.func(service_call)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/zwave/__init__.py", line 380, in remove_node
    network.controller.remove_node()
  File "/usr/lib/python3.6/site-packages/openzwave/controller.py", line 679, in remove_node
    return self._network.manager.removeNode(self.home_id)
  File "src-lib/libopenzwave/libopenzwave.pyx", line 4292, in libopenzwave.PyManager.removeNode (openzwave-embed/open-zwave-master/python-openzwave/src-lib/libopenzwave/libopenzwave.cpp:31713)
TypeError: an integer is required

And

zwave not ready after 30 seconds, continuing anyway

try /dev/ttyUSB0

Thanks for the suggestion, but that doesn’t seems to fix it. When I set it to USB0 the device cannot be found:

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/ttyUSB0 : ['NoneType: None\\n']"

This works for me:

zwave:
  usb_path: /dev/ttyACM0
  polling_interval: 3000

awesome, that works!
Thank you so much!