HA Core & default_config problem from the start

Haven’t found a solution elsewhere and loosing my mind already, so let’s try to get help here :slight_smile:

I installed Home Assistant Core to my Synology DS215j.

Version:
Home Assistant 2023.7.3
Frontend 20230705.1 - latest

Did the initial configuration (wizzard process) and after the web-login, everything looks ok.

I edited the configuration.yaml with VI editor. I added one commented line starting with # character & saved the file.
If I try to reload configuration, it does not succeed.

Notifications give these warnings:

Invalid config
The following integrations and platforms could not be set up:

stream (Show logs)
default_config (Show logs)
Please check your config and logs.

Log details:

Logger: homeassistant.setup
Source: setup.py:209
First occurred: 23:15:31 (2 occurrences)
Last logged: 23:15:32

Setup failed for stream: Requirements for stream not found: ['ha-av==10.1.0'].
Setup failed for default_config: (DependencyError(...), 'Could not setup dependencies: stream')

Logger: homeassistant.setup
Source: setup.py:207
First occurred: 23:15:32 (1 occurrences)
Last logged: 23:15:32

Unable to set up dependencies of default_config. Setup failed for dependencies: stream

Detailed investigation shows these errors were produced right after the installation (before editing configuration.yaml).

If I’m having problems with default/empty configuration, what awaits me when I start adding new integrations?
What can I do to resolve those initial errors?

That’s your problem, probably related to an outdated or missing OS package.

Try manually installing that inside the venv (as the right user) and see what errors you get - or switch to using Docker where you won’t have that problem.

Thanks for the direction. Through the weekend I did many things:

  • installed ccache
  • installed FFMPEG5 and FFMPEG6
  • installed missing librarires
  • created missing links
  • etc.

I have a feeling I’m really close to solution. Now, when I run following command:

python3.10 -m pip install ha-av

or

python3.11 -m pip install ha-av

… I get the following result:

python3.10 -m pip install ha-av
Collecting ha-av
  Downloading ha-av-10.1.1.tar.gz (3.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.6/3.6 MB 1.5 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: ha-av
  Building wheel for ha-av (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for ha-av (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [97 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-armv7l-cpython-310
      creating build/lib.linux-armv7l-cpython-310/av
      copying av/deprecation.py -> build/lib.linux-armv7l-cpython-310/av
      copying av/datasets.py -> build/lib.linux-armv7l-cpython-310/av
      copying av/about.py -> build/lib.linux-armv7l-cpython-310/av
      copying av/__main__.py -> build/lib.linux-armv7l-cpython-310/av
      copying av/__init__.py -> build/lib.linux-armv7l-cpython-310/av
      creating build/lib.linux-armv7l-cpython-310/av/video
      copying av/video/__init__.py -> build/lib.linux-armv7l-cpython-310/av/video
      creating build/lib.linux-armv7l-cpython-310/av/subtitles
      copying av/subtitles/__init__.py -> build/lib.linux-armv7l-cpython-310/av/subtitles
      creating build/lib.linux-armv7l-cpython-310/av/sidedata
      copying av/sidedata/__init__.py -> build/lib.linux-armv7l-cpython-310/av/sidedata
      creating build/lib.linux-armv7l-cpython-310/av/filter
      copying av/filter/__init__.py -> build/lib.linux-armv7l-cpython-310/av/filter
      creating build/lib.linux-armv7l-cpython-310/av/data
      copying av/data/__init__.py -> build/lib.linux-armv7l-cpython-310/av/data
      creating build/lib.linux-armv7l-cpython-310/av/container
      copying av/container/__init__.py -> build/lib.linux-armv7l-cpython-310/av/container
      creating build/lib.linux-armv7l-cpython-310/av/codec
      copying av/codec/__init__.py -> build/lib.linux-armv7l-cpython-310/av/codec
      creating build/lib.linux-armv7l-cpython-310/av/bitstream
      copying av/bitstream/__init__.py -> build/lib.linux-armv7l-cpython-310/av/bitstream
      creating build/lib.linux-armv7l-cpython-310/av/audio
      copying av/audio/__init__.py -> build/lib.linux-armv7l-cpython-310/av/audio
      copying av/utils.pxd -> build/lib.linux-armv7l-cpython-310/av
      copying av/stream.pxd -> build/lib.linux-armv7l-cpython-310/av
      copying av/plane.pxd -> build/lib.linux-armv7l-cpython-310/av
      copying av/packet.pxd -> build/lib.linux-armv7l-cpython-310/av
      copying av/option.pxd -> build/lib.linux-armv7l-cpython-310/av
      copying av/logging.pxd -> build/lib.linux-armv7l-cpython-310/av
      copying av/frame.pxd -> build/lib.linux-armv7l-cpython-310/av
      copying av/format.pxd -> build/lib.linux-armv7l-cpython-310/av
      copying av/error.pxd -> build/lib.linux-armv7l-cpython-310/av
      copying av/enum.pxd -> build/lib.linux-armv7l-cpython-310/av
      copying av/dictionary.pxd -> build/lib.linux-armv7l-cpython-310/av
      copying av/descriptor.pxd -> build/lib.linux-armv7l-cpython-310/av
      copying av/bytesource.pxd -> build/lib.linux-armv7l-cpython-310/av
      copying av/buffer.pxd -> build/lib.linux-armv7l-cpython-310/av
      copying av/__init__.pxd -> build/lib.linux-armv7l-cpython-310/av
      copying av/video/stream.pxd -> build/lib.linux-armv7l-cpython-310/av/video
      copying av/video/reformatter.pxd -> build/lib.linux-armv7l-cpython-310/av/video
      copying av/video/plane.pxd -> build/lib.linux-armv7l-cpython-310/av/video
      copying av/video/frame.pxd -> build/lib.linux-armv7l-cpython-310/av/video
      copying av/video/format.pxd -> build/lib.linux-armv7l-cpython-310/av/video
      copying av/video/codeccontext.pxd -> build/lib.linux-armv7l-cpython-310/av/video
      copying av/video/__init__.pxd -> build/lib.linux-armv7l-cpython-310/av/video
      copying av/subtitles/subtitle.pxd -> build/lib.linux-armv7l-cpython-310/av/subtitles
      copying av/subtitles/stream.pxd -> build/lib.linux-armv7l-cpython-310/av/subtitles
      copying av/subtitles/codeccontext.pxd -> build/lib.linux-armv7l-cpython-310/av/subtitles
      copying av/subtitles/__init__.pxd -> build/lib.linux-armv7l-cpython-310/av/subtitles
      copying av/sidedata/sidedata.pxd -> build/lib.linux-armv7l-cpython-310/av/sidedata
      copying av/sidedata/motionvectors.pxd -> build/lib.linux-armv7l-cpython-310/av/sidedata
      copying av/sidedata/__init__.pxd -> build/lib.linux-armv7l-cpython-310/av/sidedata
      copying av/filter/pad.pxd -> build/lib.linux-armv7l-cpython-310/av/filter
      copying av/filter/link.pxd -> build/lib.linux-armv7l-cpython-310/av/filter
      copying av/filter/graph.pxd -> build/lib.linux-armv7l-cpython-310/av/filter
      copying av/filter/filter.pxd -> build/lib.linux-armv7l-cpython-310/av/filter
      copying av/filter/context.pxd -> build/lib.linux-armv7l-cpython-310/av/filter
      copying av/filter/__init__.pxd -> build/lib.linux-armv7l-cpython-310/av/filter
      copying av/data/stream.pxd -> build/lib.linux-armv7l-cpython-310/av/data
      copying av/data/__init__.pxd -> build/lib.linux-armv7l-cpython-310/av/data
      copying av/container/streams.pxd -> build/lib.linux-armv7l-cpython-310/av/container
      copying av/container/pyio.pxd -> build/lib.linux-armv7l-cpython-310/av/container
      copying av/container/output.pxd -> build/lib.linux-armv7l-cpython-310/av/container
      copying av/container/input.pxd -> build/lib.linux-armv7l-cpython-310/av/container
      copying av/container/core.pxd -> build/lib.linux-armv7l-cpython-310/av/container
      copying av/container/__init__.pxd -> build/lib.linux-armv7l-cpython-310/av/container
      copying av/codec/context.pxd -> build/lib.linux-armv7l-cpython-310/av/codec
      copying av/codec/codec.pxd -> build/lib.linux-armv7l-cpython-310/av/codec
      copying av/codec/__init__.pxd -> build/lib.linux-armv7l-cpython-310/av/codec
      copying av/bitstream/filter.pxd -> build/lib.linux-armv7l-cpython-310/av/bitstream
      copying av/bitstream/context.pxd -> build/lib.linux-armv7l-cpython-310/av/bitstream
      copying av/audio/stream.pxd -> build/lib.linux-armv7l-cpython-310/av/audio
      copying av/audio/resampler.pxd -> build/lib.linux-armv7l-cpython-310/av/audio
      copying av/audio/plane.pxd -> build/lib.linux-armv7l-cpython-310/av/audio
      copying av/audio/layout.pxd -> build/lib.linux-armv7l-cpython-310/av/audio
      copying av/audio/frame.pxd -> build/lib.linux-armv7l-cpython-310/av/audio
      copying av/audio/format.pxd -> build/lib.linux-armv7l-cpython-310/av/audio
      copying av/audio/fifo.pxd -> build/lib.linux-armv7l-cpython-310/av/audio
      copying av/audio/codeccontext.pxd -> build/lib.linux-armv7l-cpython-310/av/audio
      copying av/audio/__init__.pxd -> build/lib.linux-armv7l-cpython-310/av/audio
      running build_ext
      building 'av.utils' extension
      creating build/temp.linux-armv7l-cpython-310
      creating build/temp.linux-armv7l-cpython-310/src
      creating build/temp.linux-armv7l-cpython-310/src/av
      /github/workspace/toolchain/syno-armv7-6.2.4/work/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -I/github/workspace/toolchain/syno-armv7-6.2.4/work/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/sysroot/usr/include -D__ARM_PCS_VFP=1 -I/github/workspace/spk/python310/work-armv7-6.2.4/install/var/packages/python310/target/include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -L /github/workspace/spk/python310/work-armv7-6.2.4/install/var/packages/python310/target/lib -I /github/workspace/spk/python310/work-armv7-6.2.4/install/var/packages/python310/target/include -I/github/workspace/toolchain/syno-armv7-6.2.4/work/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/sysroot/usr/include -D__ARM_PCS_VFP=1 -I/github/workspace/spk/python310/work-armv7-6.2.4/install/var/packages/python310/target/include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -L /github/workspace/spk/python310/work-armv7-6.2.4/install/var/packages/python310/target/lib -I /github/workspace/spk/python310/work-armv7-6.2.4/install/var/packages/python310/target/include -fPIC -I/app/vendor/ffmpeg/include -I/var/packages/python310/target/include/python3.10 -c src/av/utils.c -o build/temp.linux-armv7l-cpython-310/src/av/utils.o
      src/av/utils.c:44:10: fatal error: Python.h: No such file or directory
       #include "Python.h"
                ^~~~~~~~~~
      compilation terminated.
      error: command '/github/workspace/toolchain/syno-armv7-6.2.4/work/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for ha-av
Failed to build ha-av
ERROR: Could not build wheels for ha-av, which is required to install pyproject.toml-based projects

It looks file src/av/utils.c is missing. Where to search for it? How to resolve this error?

You need Python 3.11 (3.11.6 really). Python 3.10 will only give you an outdated HA version.

Well, you’re missing the Python headers.

You did activate the venv before trying to install?

(or switch to Docker)

Docker is unfortunately not available for my NAS :frowning:

I forgot to say that I installed Home Assistant through GUI NAS Package Manager (web admin). HAAS I installed is available at SynoCommunity repository.

When I logged to Home Assistant, I got errors I described in post #1. Then I continued with activities described in post #3.
I didn’t activate the venv. I believe I don’t need it with HAAS deployment as in my case?

Anyway, I created venv, activated it, tried to install ha-av, and… I get the same error (missing utils.c).

Python used is 3.11.5. I can’t install 3.11.6 version, I get errors.

Loosing my patience and thinking about renewing my NAS… :-/

Unfortunately I have no idea about what Synology is doing under the hood. You are supposed to create a venv and install HA there, but maybe Synology is doing something else - wouldn’t be the first time.

You should keep you NAS and find a small used PC like a nuc. It will cost less and will be more powerful and futur proof

1 Like

Ok, I messed up my Synology NAS installation and performed new installation of DSM (higher version) and again new installation of HAAS from SynoCommunity. HAAS didn’t work.
And then something struck me! I tried installing one version older. It works!
It would probably work with my old NAS installation (DSM 6.x).
I’m proud and mad at myself at the same time - how could not I remember something like that in the beginning!?

So, I’m running HAAS 2023.7.1 at the moment and probably will stick with it for some time now (don’t want to go all over again) :slight_smile:

Thank you both: tinkerer and makai, for your help.

A post was split to a new topic: Synology NAS install problem