Hello, I got a Linear husbzb-1 for my fresh installed Home assistant on a Raspberry Pi 3 with Stretch.
I managed somehow to have the Zwave started (or at least I think, as I see this https://imgur.com/BC0yDQz)
for some reason I am getting an error with the Zigbee component, here is the log error:
Log Details (ERROR)
Fri Jul 20 2018 13:24:14 GMT-0400 (Eastern Daylight Time)
Error during setup of component zha
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/setup.py", line 143, in _async_setup_component
hass, processed_config)
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/zha/__init__.py", line 104, in async_setup
APPLICATION_CONTROLLER = ControllerApplication(radio, database)
File "/srv/homeassistant/lib/python3.5/site-packages/bellows/zigbee/application.py", line 21, in __init__
super().__init__(database_file=database_file)
File "/srv/homeassistant/lib/python3.5/site-packages/zigpy/application.py", line 23, in __init__
self._dblistener = zigpy.appdb.PersistingListener(database_file, self)
File "/srv/homeassistant/lib/python3.5/site-packages/zigpy/appdb.py", line 30, in __init__
detect_types=sqlite3.PARSE_DECLTYPES)
sqlite3.OperationalError: unable to open database file
what is going on? Here is what I have in my configuration.yaml :
Because the error log has unable to open database, you might try removing /config/ from the configuration. Alternatively, specify the full path and make sure that HA has permission to write there.
@cinghialino I apologize I steered you wrong. The minimum Python version is 3.5.3, not 3.6. There were lots of discussions a while back about updating Python when 3.4 was deprecated and how to update to Python 3.6. I was just hoping my comments would get someone else to chime in.
are you running homeassistant in a docker container or in a python venv?
try deleting zigbee.db or renaming it and restart hass. It should create a new, empty database.
Also, unless you copied zigbee.db from an older installation, it looks like the database was created successfully by hass, so that shouldn’t be a permission issue, unless you are trying to start hass under as a different user.
it was a fresh installation of Raspbian Stretch, installed Home Assistant based on the instruction I followed here.
I deleted the zigbee.db, and after the restart, the file is back there with a size of 45056.
I’m about to give up. This is clearly not ready for prime time, and apparently there aren’t many users able to solve this problem. I’ll try to use hass.io but documentation on this is severely lacking.
That seem to indicate an installation in a python virtual environment. If that’s the case, the path definitely shouldn’t start with /config.
And do you still get “cannot open database”? if it created database, than you do have correct permissions. Use just database_path: zigbee.db so it looks for the file in the same directory as hass configuration. As it is very likely that regular user won’t have write permissions for /config/zigbee.db file. /config/zigbee.db is used for docker installations.
using database_path: zigbee.db or database_path: /home/homeassistant/.homeassistant/zigbee.db
makes the web interface not loading anymore. (ERR_CONNECTION_REFUSED)
database_path: zigbee.db or database_path: /home/homeassistant/.homeassistant/zigbee.db is the correct configuration
it loads the zigbee.db successfully and as tries to finish initializing the stick and hangs in there, thus delaying http component initialization, so you get connection refused.
bump logging to debug, leave database_path: zigbee.db, make sure your user (user which start hass) is member of the "dialout’ group, start hass, wait for a few minutes and post logs here.
there is a progress: if I use just database_path: zigbee.db after removing the file zigbee.db from /home/homeassistant/.homeassistant/. The file zigbee.db only gets recreated when I use /home/homeassistant/.homeassistant/ as a database_path
which logs you want me to post? my /home/homeassistant/.homeassistant/home-assistant.log is empty
user homeassistant is part of the dialout group (I checked it with getent group dialout command)