Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HomeAssistant: Stream domain is failing to initialize at start #5849

Open
1 task done
jcastang opened this issue Aug 22, 2023 · 7 comments · May be fixed by #6453
Open
1 task done

HomeAssistant: Stream domain is failing to initialize at start #5849

jcastang opened this issue Aug 22, 2023 · 7 comments · May be fixed by #6453
Labels

Comments

@jcastang
Copy link

Is this a new Bug?

  • 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

  1. Install HA package
  2. Display logs in homeassitant.log
  3. 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

@jcastang jcastang added the bug label Aug 22, 2023
@hgy59
Copy link
Contributor

hgy59 commented Aug 22, 2023

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?

@hgy59
Copy link
Contributor

hgy59 commented Aug 22, 2023

@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?

@th0ma7
Copy link
Contributor

th0ma7 commented Aug 22, 2023

@hgy59 as mentioned on discord, I'll be AFK for two weeks.

@jcastang
Copy link
Author

jcastang commented Aug 23, 2023

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 ?

@th0ma7
Copy link
Contributor

th0ma7 commented Aug 23, 2023

@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.

@hgy59
Copy link
Contributor

hgy59 commented Sep 3, 2023

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

@vvvlad
Copy link

vvvlad commented Nov 19, 2023

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?

@hgy59 hgy59 changed the title Stream domain is failing to initialize at start HomeAssistant: Stream domain is failing to initialize at start Nov 19, 2023
@hgy59 hgy59 linked a pull request Feb 15, 2025 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants