spksrc
spksrc copied to clipboard
HomeAssistant: Stream domain is failing to initialize at start
Is this a new Bug?
- [X] I checked that the bug hasn't been reported before
Package Name
home assistant
Package Version
2023.7.3
Device Model
DJ213J
Device Architecture
ARMv7
Firmware Version
7.1
What happened?
At start HA tries to setup Stream domain wich relies on PyAV. PyAV fails to build at HA start with this message:
2023-08-22 09:55:08.999 ERROR (SyncWorker_2)
[homeassistant.util.package] Unable to install package ha-av==10.1.0: error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [1 lines of output]
pkg-config is required for building PyAV
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
2023-08-22 09:55:09.031 INFO (SyncWorker_2) [homeassistant.util.package] Attempting install of ha-av==10.1.0
It make HA extremely slow to start as it will try to setup PyAV multiple times.
Reproduction steps
- Install HA package
- Display logs in homeassitant.log
- See this
error
...
Install Log
cat /var/log/packages/homeassistant.log
2023/08/21 15:37:28 stop homeassistant 2023.7.3-21 Begin start-stop-status stop
2023/08/21 15:37:38 stop homeassistant 2023.7.3-21 End start-stop-status stop ret=[0]
2023/08/21 15:38:08 start homeassistant 2023.7.3-21 Begin start-stop-status start
2023/08/21 15:38:08 start homeassistant 2023.7.3-21 End start-stop-status start ret=[0]
2023/08/21 15:58:44 stop homeassistant 2023.7.3-21 Begin start-stop-status stop
2023/08/21 15:59:04 stop homeassistant 2023.7.3-21 End start-stop-status stop ret=[0]
2023/08/21 15:59:25 start homeassistant 2023.7.3-21 Begin start-stop-status start
2023/08/21 15:59:26 start homeassistant 2023.7.3-21 End start-stop-status start ret=[0]
2023/08/21 17:12:04 stop homeassistant 2023.7.3-21 Begin start-stop-status stop
2023/08/21 17:12:22 stop homeassistant 2023.7.3-21 End start-stop-status stop ret=[0]
2023/08/21 17:12:45 start homeassistant 2023.7.3-21 Begin start-stop-status start
2023/08/21 17:12:45 start homeassistant 2023.7.3-21 End start-stop-status start ret=[0]
2023/08/21 17:24:02 stop homeassistant 2023.7.3-21 Begin start-stop-status stop
2023/08/21 17:24:20 stop homeassistant 2023.7.3-21 End start-stop-status stop ret=[0]
2023/08/21 17:24:42 start homeassistant 2023.7.3-21 Begin start-stop-status start
2023/08/21 17:24:42 start homeassistant 2023.7.3-21 End start-stop-status start ret=[0]
2023/08/22 09:49:32 stop homeassistant 2023.7.3-21 Begin start-stop-status stop
2023/08/22 09:49:52 stop homeassistant 2023.7.3-21 End start-stop-status stop ret=[0]
2023/08/22 09:50:36 start homeassistant 2023.7.3-21 Begin start-stop-status start
2023/08/22 09:50:36 start homeassistant 2023.7.3-21 End start-stop-status start ret=[0]
Service Log
No response
Other Logs
No response
This is a known issue for the 32-bit ARM archs,.
I have added a warning in the wiki page that ha_av
module is not available for those archs and that only x64 and aarch64 are tested (see https://github.com/SynoCommunity/spksrc/wiki/FAQ-HomeAssistant)
This is due to the voice assistance introduced in 2023. on https://pypi.org/project/ha-av/#files you can see that no armv7 (or armhf) wheel for cp311 is available for download. The only option I have is to remove ARMv7 packages at all. but I thought that it is better to have a limited package then none
@jcastang what do you think?
@th0ma7 is there any chance to build the ha_av
wheel (an ffmpeg wrapper) without including the ffmpeg library in the wheel, but depending on one of our ffmpeg packages?
@hgy59 as mentioned on discord, I'll be AFK for two weeks.
This is a known issue for the 32-bit ARM archs,.
I have added a warning in the wiki page that
ha_av
module is not available for those archs and that only x64 and aarch64 are tested (see https://github.com/SynoCommunity/spksrc/wiki/FAQ-HomeAssistant)This is due to the voice assistance introduced in 2023. on https://pypi.org/project/ha-av/#files you can see that no armv7 (or armhf) wheel for cp311 is available for download. The only option I have is to remove ARMv7 packages at all. but I thought that it is better to have a limited package then none
@jcastang what do you think?
It's an extreme solution and my point was not to remove package :D
Stream is loaded as a domain included in manifest for "default_config:" As a solution, can we put a specific manifest for these arch, removing streams that finaly won't work ? Or have a part in documentation on how to remove "stream" domain from default config ?
@hgy59 re-reading your post, yes that is feasible assuming both ffmpeg and py311 are already built, and using spksrc.python.mk ...
You would then need to check if ffmpeg lib really is available then += the associated rpath like what's being done in chromaprint, tvh or comskip to the additional-ldflags... And also symlink a few things i to lib/pkgconfig
In effect, re-using what's done in tvh would probably work. Then of course add ffmpeg as spk depend.
This is an issue for 32 Raspberry Pi too and has some discussions in HA community: https://community.home-assistant.io/t/unable-to-install-package-ha-av/466286
I'm having the same issue. Any chance there was a workaround found for this issue? Assuming I'm not using stream, is there a way to configure default_config to exclude this domain?