Yoda-x/ha-zha-new

zha_new does not run under hassbian+home assistant 0.89.2

Closed this issue · 8 comments

Hello.
Tried to start from scratch and installed fresh hassbian + latest ver. of HA.
zha_new shows following error in log:
Error during setup of component zha_new
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/setup.py", line 151, in async_setup_component
hass, processed_config)
File "/home/homeassistant/.homeassistant/custom_components/zha_new/init.py", line 272, in async_setup
APPLICATION_CONTROLLER = ControllerApplication(ezsp
, 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 24, in init
self._dblistener = zigpy.appdb.PersistingListener(database_file, self)
File "/srv/homeassistant/lib/python3.5/site-packages/zigpy/appdb.py", line 29, in init
detect_types=sqlite3.PARSE_DECLTYPES)
sqlite3.OperationalError: unable to open database file

I cannot see any downloaded files in DEPS folder, so probably dependencies are not downloading.

looks more like issues where it can not open or create the zigbee db.
can you please check file permissions

@Yoda-x I've tested few times even without zigbee.db at all. No difference. Previously I remember zha_new downloaded all dependencies before system run. Not this time. Believe that built- in bellows and zigpy do not accept downloading of your versions.

Hi
The log you showed is about opening the zigbee.db.
Can you provide a full log with debug enabled?

PS: your log messages match my zigbee versions. The original zigbee has the function calls slightly shifted.
But a full log wod be helpful

019-03-17 19:00:35 INFO (Thread-8) [homeassistant.util.package] Attempting install of https://github.com/Yoda-x/bellows/archive/master.zip#bellows==100.7.4.8
2019-03-17 19:00:35 INFO (MainThread) [homeassistant.loader] Loaded sensor.yr from homeassistant.components.sensor.yr
2019-03-17 19:00:35 INFO (MainThread) [homeassistant.setup] Setting up sensor
2019-03-17 19:00:35 INFO (MainThread) [homeassistant.setup] Setting up zone
2019-03-17 19:00:35 INFO (MainThread) [homeassistant.setup] Setup of domain zone took 0.0 seconds.
2019-03-17 19:00:35 INFO (MainThread) [homeassistant.setup] Setting up map
2019-03-17 19:00:35 INFO (MainThread) [homeassistant.setup] Setup of domain map took 0.0 seconds.
2019-03-17 19:00:35 INFO (MainThread) [homeassistant.setup] Setting up group
2019-03-17 19:00:35 INFO (MainThread) [homeassistant.setup] Setup of domain group took 0.0 seconds.
2019-03-17 19:00:35 INFO (MainThread) [homeassistant.loader] Loaded google from homeassistant.components.google
2019-03-17 19:00:35 INFO (MainThread) [homeassistant.loader] Loaded google.tts from homeassistant.components.google.tts
2019-03-17 19:00:35 INFO (MainThread) [homeassistant.setup] Setting up person
2019-03-17 19:00:35 INFO (MainThread) [homeassistant.setup] Setting up sun
2019-03-17 19:00:35 INFO (MainThread) [homeassistant.setup] Setup of domain sun took 0.1 seconds.
2019-03-17 19:00:35 INFO (MainThread) [homeassistant.setup] Setting up device_tracker
2019-03-17 19:00:35 INFO (MainThread) [homeassistant.setup] Setting up conversation
2019-03-17 19:00:35 INFO (MainThread) [homeassistant.setup] Setup of domain conversation took 0.0 seconds.
2019-03-17 19:00:35 INFO (MainThread) [homeassistant.setup] Setting up script
2019-03-17 19:00:35 INFO (MainThread) [homeassistant.setup] Setup of domain script took 0.0 seconds.
2019-03-17 19:00:35 INFO (MainThread) [homeassistant.setup] Setting up webhook
2019-03-17 19:00:35 INFO (MainThread) [homeassistant.setup] Setup of domain webhook took 0.0 seconds.
2019-03-17 19:00:35 INFO (MainThread) [homeassistant.setup] Setting up config
2019-03-17 19:00:35 INFO (MainThread) [homeassistant.setup] Setting up automation
2019-03-17 19:00:35 INFO (MainThread) [homeassistant.setup] Setup of domain automation took 0.0 seconds.
2019-03-17 19:00:35 INFO (MainThread) [homeassistant.setup] Setting up logbook
2019-03-17 19:00:35 INFO (MainThread) [homeassistant.setup] Setup of domain logbook took 0.0 seconds.
2019-03-17 19:00:35 INFO (MainThread) [homeassistant.setup] Setting up system_health
2019-03-17 19:00:35 INFO (MainThread) [homeassistant.setup] Setup of domain system_health took 0.0 seconds.
2019-03-17 19:00:35 INFO (MainThread) [homeassistant.loader] Loaded config.auth_provider_homeassistant from homeassistant.components.config.auth_provider_homeassistant
2019-03-17 19:00:35 INFO (MainThread) [homeassistant.loader] Loaded config.core from homeassistant.components.config.core
2019-03-17 19:00:35 INFO (MainThread) [homeassistant.loader] Loaded config.customize from homeassistant.components.config.customize
2019-03-17 19:00:35 INFO (MainThread) [homeassistant.loader] Loaded config.automation from homeassistant.components.config.automation
2019-03-17 19:00:35 INFO (MainThread) [homeassistant.loader] Loaded config.device_registry from homeassistant.components.config.device_registry
2019-03-17 19:00:35 INFO (MainThread) [homeassistant.loader] Loaded config.auth from homeassistant.components.config.auth
2019-03-17 19:00:35 INFO (MainThread) [homeassistant.loader] Loaded config.entity_registry from homeassistant.components.config.entity_registry
2019-03-17 19:00:35 INFO (MainThread) [homeassistant.loader] Loaded config.config_entries from homeassistant.components.config.config_entries
2019-03-17 19:00:35 INFO (MainThread) [homeassistant.loader] Loaded config.area_registry from homeassistant.components.config.area_registry
2019-03-17 19:00:35 INFO (MainThread) [homeassistant.loader] Loaded config.group from homeassistant.components.config.group
2019-03-17 19:00:35 INFO (MainThread) [homeassistant.loader] Loaded config.hassbian from homeassistant.components.config.hassbian
2019-03-17 19:00:35 INFO (MainThread) [homeassistant.loader] Loaded config.script from homeassistant.components.config.script
2019-03-17 19:00:35 ERROR (MainThread) [homeassistant.components.device_tracker] Unable to load /home/homeassistant/.homeassistant/known_devices.yaml: Config file not found: /home/homeassistant/.homeassistant/known_devices.yaml
2019-03-17 19:00:35 INFO (MainThread) [homeassistant.setup] Setup of domain device_tracker took 0.3 seconds.
2019-03-17 19:00:35 INFO (MainThread) [homeassistant.setup] Setup of domain config took 0.2 seconds.
2019-03-17 19:00:36 INFO (MainThread) [homeassistant.setup] Setup of domain person took 0.4 seconds.
2019-03-17 19:00:55 INFO (Thread-21) [homeassistant.util.package] Attempting install of https://github.com/Yoda-x/zigpy/archive/master.zip#zigpy==100.1.4.6
2019-03-17 19:01:12 INFO (MainThread) [homeassistant.setup] Setting up zha_new
2019-03-17 19:01:13 INFO (MainThread) [homeassistant.setup] Setting up updater
2019-03-17 19:01:13 INFO (MainThread) [homeassistant.setup] Setup of domain updater took 0.0 seconds.
2019-03-17 19:01:13 INFO (MainThread) [homeassistant.setup] Setting up discovery
2019-03-17 19:01:13 INFO (MainThread) [homeassistant.setup] Setup of domain discovery took 0.1 seconds.
2019-03-17 19:01:13 ERROR (MainThread) [homeassistant.setup] Error during setup of component zha_new
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/setup.py", line 151, in async_setup_component
hass, processed_config)
File "/home/homeassistant/.homeassistant/custom_components/zha_new/init.py", line 272, in async_setup
APPLICATION_CONTROLLER = ControllerApplication(ezsp
, 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 24, in init
self._dblistener = zigpy.appdb.PersistingListener(database_file, self)
File "/srv/homeassistant/lib/python3.5/site-packages/zigpy/appdb.py", line 29, in init
detect_types=sqlite3.PARSE_DECLTYPES)
sqlite3.OperationalError: unable to open database file
2019-03-17 19:01:13 DEBUG (MainThread) [bellows.uart] Start sendq loop
2019-03-17 19:01:13 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.yr
2019-03-17 19:01:13 INFO (MainThread) [homeassistant.setup] Setting up tts
2019-03-17 19:01:14 INFO (MainThread) [homeassistant.setup] Setting up cloud
2019-03-17 19:01:14 INFO (MainThread) [homeassistant.setup] Setup of domain cloud took 0.0 seconds.
2019-03-17 19:01:14 INFO (MainThread) [homeassistant.setup] Setting up mobile_app
2019-03-17 19:01:14 INFO (MainThread) [homeassistant.setup] Setup of domain mobile_app took 0.0 seconds.
2019-03-17 19:01:14 INFO (MainThread) [homeassistant.setup] Setting up default_config
2019-03-17 19:01:14 INFO (MainThread) [homeassistant.setup] Setup of domain default_config took 0.0 seconds.
2019-03-17 19:01:14 INFO (MainThread) [homeassistant.setup] Setup of domain tts took 0.2 seconds.
2019-03-17 19:01:14 INFO (MainThread) [homeassistant.setup] Setup of domain sensor took 38.9 seconds.
2019-03-17 19:01:14 INFO (MainThread) [homeassistant.bootstrap] Home Assistant initialized in 42.80s
2019-03-17 19:01:14 INFO (MainThread) [homeassistant.core] Starting Home Assistant
2019-03-17 19:01:1
......
019-03-17 19:01:32 INFO (MainThread) [homeassistant.loader] Loaded upnp from homeassistant.components.upnp
2019-03-17 19:02:12 INFO (MainThread) [homeassistant.components.http.view] Serving /api/websocket to 10.0.0.27 (auth: False)
2019-03-17 19:02:12 INFO (MainThread) [homeassistant.loader] Loaded nest from homeassistant.components.nest
2019-03-17 19:02:13 INFO (MainThread) [homeassistant.loader] Loaded zha from homeassistant.components.zha
2019-03-17 19:02:13 INFO (MainThread) [homeassistant.loader] Loaded ps4 from homeassistant.components.ps4
2019-03-17 19:02:13 INFO (MainThread) [homeassistant.loader] Loaded lifx from homeassistant.components.lifx
2019-03-17 19:02:13 INFO (MainThread) [homeassistant.loader] Loaded luftdaten from homeassistant.components.luftdaten
2019-03-17 19:02:13 INFO (MainThread) [homeassistant.loader] Loaded gpslogger from homeassistant.components.gpslogger
2019-03-17 19:02:13 INFO (MainThread) [homeassistant.loader] Loaded rainmachine from homeassistant.components.rainmachine
2019-03-17 19:02:13 INFO (MainThread) [homeassistant.loader] Loaded homematicip_cloud from homeassistant.components.homematicip_cloud
.......
I have a feeling that this " File "/srv/homeassistant/lib/python3.5/site-packages/zigpy/appdb.py", line 29, in init
detect_types=sqlite3.PARSE_DECLTYPES)""
means that zigpy trying to call some zigpy database file which is occupied by another component - original ZHA maybe??
this is just guess .... don't laugh :)

right, either some other app uses it, or file permissions are wrong.
Did you just updated versions or do you started new with hassbian?

I've tried with a new hassbian installation. Tried with both old and new zigbee.db. I feel that zha from HA is starting even if you never configured it in integrations. That's why db proabably is occupied. As a workaround I am using now zha integrated in HA.
Waiting for a workaround for ZHA_new.

Not sure if I can help here. I don't run hassbian myself. But I will try the 0.89.2 and see if shows up there also...

please try under recent hassbian