No Zigbee "zha" service

I have my zigbee stick connected at /dev/ttyUSB1

In my configuration.yaml:

zigbee:
  device: /dev/ttyUSB1

I see no errors in my log files, but I also have no “zha” service in the developer tab.

Can anyone guide me with troubleshooting this? I am guessing there is a problem with the dependencies, but I am not seeing any errors to go on.

You you to add database_path to your zha config, this is what I have:

zha:
  usb_path: /dev/ttyUSB1
  database_path: /home/homeassistant/.homeassistant/zigbee.db

You know what I was looking at the DIY Zigbee component and not the ZHA one. Thank you for pointing that out.

However now HA is hanging when I restart it. I can see in the logs that the dependencies installed correctly, my zigbee.db gets created, but HA hangs at “Setup of zha is taking over 10 seconds”

If I comment out the zha: section it starts up immediately

It appears the problem is with the underlying bellows package

bellows -d /dev/ttyUSB1 devices
Traceback (most recent call last):
  File "/srv/homeassistant/bin/bellows", line 9, in <module>
    load_entry_point('bellows==0.2.7', 'console_scripts', 'bellows')()
  File "/srv/homeassistant/lib/python3.4/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/srv/homeassistant/lib/python3.4/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/srv/homeassistant/lib/python3.4/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/srv/homeassistant/lib/python3.4/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/srv/homeassistant/lib/python3.4/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/srv/homeassistant/lib/python3.4/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/srv/homeassistant/lib/python3.4/site-packages/bellows/cli/application.py", line 56, in devices
    app = bellows.zigbee.application.ControllerApplication(ezsp, database)
  File "/srv/homeassistant/lib/python3.4/site-packages/bellows/zigbee/application.py", line 28, in __init__
    self._dblistener = bellows.zigbee.appdb.PersistingListener(database_file, self)
  File "/srv/homeassistant/lib/python3.4/site-packages/bellows/zigbee/appdb.py", line 29, in __init__
    detect_types=sqlite3.PARSE_DECLTYPES)
sqlite3.OperationalError: unable to open database file

Can you check owner of the database file? It should belong to “homeassisant”

(homeassistant) homeassistant@hassbian:~/.homeassistant $ ls -l zigbee.db 
-rw-r--r-- 1 homeassistant homeassistant 22528 Jul  4 02:18 zigbee.db

Yes it belongs to homeassistant

I had an issue when initially setting up ZHA where I needed to provide the full path to the database file, it wouldn’t accept a relative path or using ~ to specify the home directory.

I have the full path in the config

zha:
  usb_path: /dev/ttyUSB1
  database_path: /home/homeassistant/.homeassistant/zigbee.db

And the zigbee.db file does get created.

how did you run bellows like this?