Quickfix: Zigbee/Z-Wave USB on QNAP

I am running Home Assistant as a docker installation on my QNAP TS-251+ NAS and wanted to add Z-Wave/ZigBee capabilities to my home automation using the HUSBZB-1 USB Stick, a combined Z-Wave/ZigBee controller. Got mine for ~45EUR incl. shipping and import tax from amazon.com.

Stick arrived today – plugged into the NAS – checked if detected as USB-Serial – NOPE 🙁

A quick “lsusb” dump told me that the device has been detected, but the drivers where not loaded, so no /dev/ttyUSBx – QNAP is not loading the modules by default.

FIX:

Login to your QNAP via SSH an run the following commands:

Re-plug the stick and you (should) have two new devices: /dev/ttyUSB0 and /dev/ttyUSB1 🙂

And if you want to use a Aeotec AEOEZW090-C Z-Wave controller, log in to your QNAP and run

 

  • mixar

    I’ve done this but still unable to get the usb stick working in home assistant on qnap. This is the section of the configuration.yaml. Not sure if it’s right or wrong.

    zwave:
    usb_path: /dev/ttyUSB0

    zha:
    usb_path: /dev/ttyUSB1
    database_path: /share/Container/hass-config/zigbee.db

    • Frederik Granna

      – Did you re-plug the stick?
      – Is the command “ls -al /dev/ttyUSB*” showing anything?

      • mixar

        This is what “ls -al /dev/ttyUSB*” returns

        crw——- 1 admin administ 188, 0 Nov 6 23:05 /dev/ttyUSB0
        crw——- 1 admin administ 188, 1 Nov 6 23:05 /dev/ttyUSB1

        • Frederik Granna

          Ok, looks good. What errors are you seeing?

          • mixar

            This is from the home-assistant.log file.

            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/ttyUSB0 : [‘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 194, in _async_setup_component
            component.setup, hass, processed_config)
            File “/usr/local/lib/python3.6/asyncio/futures.py”, line 332, 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 245, 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 269, 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/ttyUSB0 : [‘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/ttyUSB0 : [\’NoneType: None\\\\n\’]”\n’]’

          • Frederik Granna

            Are you using HA in Docker?

          • mixar

            Yes, this is HA in docker

          • Frederik Granna

            Did you enable “privileged” mode or map the /dev/tty* devices into the container?

            For example “docker run –device=/dev/ttyUSB0:/dev/ttyUSB0 … … …”

            Because of you don’t enable this, your container is not able to access host devices

          • mixar

            No, what would I type? Do I key it into the terminal or SSH and use Putty?