@artmg wrote:
Every time I restart the my Home Assistant instance, it takes nearly two minutes to come back up. Most people in the house don’t care, but it annoys me when developing new features. Although there has been a slight improvement since the introduction of v0.104’s Improved entity handling on startup, this is still dogging my configuration.
Time elapsed between the container starting and the HA frontend refreshing…
without ZHA : 5s with ZHA 0.102.3: 123s with ZHA 0.104.3: 112s
I used to think, “Two minute startup? That’s just the way it is” on my Raspberry Pi, so I put up with it. My move to a NUC oddly made little difference, but I was busy at the time with the migration. Now the delay to my testing cycles whilst I am developing features made it worth the investigation. By a process of elimination I determined that removing the
zha:
section from my configuration.yaml made a magic difference to startup times.Version: 0.104.3 Install type: Docker Venv (official image) OS: Ubuntu Server 18.04.3 Platform h/w: NUC (Beebox N3000) Device H/w: HUSBZB-1 #ZHA devices: 50
Putting logger into the mode
homeassistant.components.zha: debug
shows the following section repeated for each of my 50 devices - sometimes taking a fraction of a second, sometimes over five seconds.# truncated from the fron of each line: YYYY-MM-DD HH:MM:SS DEBUG (MainThread) [homeassistant.components. zha.core.device] [0x4246](LTW013): started initialization zha.core.channels] [0x4246:ZDO](LTW013): entry loaded from storage: ZhaDeviceEntry(name='Philips LTW013', ieee='00:12:34:56:54:32:10:ff', last_seen=1580059597.3349948) zha.core.channels] [0x4246:ZDO](LTW013): channel: 'async_initialize' stage succeeded zha.core.channels] [0x4246:11:0x0300]: initializing channel: from_cache: True zha.entity] None: polling current state zha.core.channels] [0x118c:15:0x0006]: attempting to update onoff state - from cache: False zha.core.channels] [0x4246:11:0x0008]: received attribute: 0 update with value: 143 zha.core.channels] [0x4246:11:0x0008]: initializing channel: from_cache: False zha.core.channels] [0x4246:11:0x0008]: channel: 'async_initialize' stage succeeded zha.core.channels] [0x4246:11:0x0006]: initializing channel: from_cache: False zha.core.channels] [0x4246:11:0x0006]: channel: 'async_initialize' stage succeeded zha.core.channels] [0x4246:11:0x1000]: initializing channel: from_cache: False zha.core.channels] [0x4246:11:0x1000]: channel: 'async_initialize' stage succeeded zha.core.channels] [0x4246:11:0x0000]: initializing channel: from_cache: False zha.core.channels] [0x4246:11:0x0000]: channel: 'async_initialize' stage succeeded zha.core.channels] [0xff05:1:0x0000]: initializing channel: from_cache: False zha.core.channels] [0xff05:1:0x0000]: channel: 'async_initialize' stage succeeded zha.core.channels] [0x4246:11:0x0300]: channel: 'async_initialize' stage succeeded zha.core.device] [0x4246](LTW013): power source: Mains zha.core.device] [0x4246](LTW013): completed initialization zha.entity] None: polling current state zha.core.channels] [0x58aa:1:0x0006]: attempting to update onoff state - from cache: False
I guess my hope in raising this is to understand whether the zha component could make use of the new method of initialising. Is it possible for it to step out of the way and let http start up, so the other devices and features are active, whilst it takes the time to peruse its own mesh of devices to find our their status.
Or is there something different that is causing my issue? Full logs (for both versions) and other test reports available upon request. Thanks.
Posts: 1
Participants: 1