Installing HACS on Home Assistant

My YunoHost server

**Hardware:**Virtual Box on ARM64…
YunoHost version: 11.2.15
I have access to my server : Through SSH | through the webadmin | direct access via keyboard / screen | …
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

my request is related to an app: Home Assistant 2024.6.3~ynh1

Description of my issue

I installed HACS using the installation script: wget -q -O - https://install.hacs.xyz | bash -
Installation is OK. When I try to install the integration HACS I get this following error msg: Error Config flow could not be loaded: {"message":"Invalid handler specified"}

**The logs are the following:

19:03:49 - (ERREUR) config_entries.py - message survenu pour la première fois à 18:55:36 et apparu 3 fois.
Unexpected exception importing platform custom_components.hacs.config_flow
19:03:49 - (ERREUR) loader.py - message survenu pour la première fois à 18:55:36 et apparu 6 fois.
Detected blocking call to import_module inside the event loop by integration ‘config' at homeassistant/components/config/config_entries.py, line 179: return await super()._post_impl(request, data) (offender: /var/www/homeassistant/lib/python3.12/...
19:03:49 — (AVERTISSEMENT) util/loop.py - message survenu pour la première fois à 18:55:36 et apparu 3 fois.
Cannot watch for dhcp packets without a functional packet filter: libpcap is not available. Cannot compile filter !
18:48:57 - (ERREUR) /var/www/homeassistant/lib/python3.12/site-packages/aiodhcpwatcher/__init__py
zlib_ng and isal are not available, falling back to zlib, performance will be degraded.
18:48:55 - (AVERTISSEMENT) components/http/_init__py```

Any Idea ?
Réponse en français possible

Thank you

hi!

unfortunately, you can’t install HACS on the Home Assistant YunoHost package

Home Assistant is available in 4 versions, HA OS (the default one, recommanded by HA itself), Container, Core and Supervised

see: Installation - Home Assistant

Container and Core versions can’t install addons, because a specific architecture and docker are required

the YunoHost package uses the Core version

if you really want to use the full Home Assistant version, i advise you tu install it on a raspberry pi (or a virtual machine if you have an hypervisor like proxmox) then use the Redirect YunoHost package to reverse proxy it on a domain name handled by YunoHost
that’s what i am doing for years and that’s really stable and handy

i give you the correct settings for the redirect package:

don’t forget to put the real IP of your Home Assistant machine instead of my example

cheers

1 Like

Hi,

that’s not right i have it myself.

@fifoude1 you can’t use that auto install script with the ynh package as the data & system paths are not the default one.
Try something like that :

mkdir -p /home/yunohost.app/homeassistant/custom_components
cd /home/yunohost.app/homeassistant/custom_components
wget "https://github.com/hacs/integration/releases/latest/download/hacs.zip"
unzip hacs.zip -d "/home/yunohost.app/homeassistant/custom_components/hacs"
rm -f hacs.zip
chown -R homeassistant:  /home/yunohost.app/homeassistant/custom_components

Restart homeassistant and follow Initial Configuration | HACS

Hi @ewilly,
I agree with you that it is possible to install HACS on a “Core” production of HA.
I get my error message between the “Add the integration” message and the “Accept Usage” message that I never get obviously !
I wonder if you are using a VM such as Virtual Box or you have a dedicated H/W ?

Hi @OniriCorpe,
If you have a look to @ewilly message it should be possible to install HACS on a “Core” production of HA and I agree with him. HACS doesn’t contain addons (at least they are not considered as addons…).
If I can’t find a solution to properly use HA/Core on Yunohost, I will install another VM dedicated to HA/OS supervised only. Your solution using Redirect is a good idea. Thank you for your help.
Cheers

Hi @fifoude1 don’t give up, I currently use HACS with my Yunohost Home-assistant package.

I guess what @OniriCorpe wanted to tell is that you can’t use adds-on with the Yunohost package (based on core), which is true. However, you definitely can use HACS which has nothing to do with adds-on and which is basically only an executable.

I have completely forgotten how I did though, so I let you try @ewilly 's lines. If they don’t work I could try to have a look on my history on how I did it… (Yes, I definitely need to document what I’m doing along the way…)

I began to do it a year ago using joplin, creating a notebook for every aspect of life :grin:. I have it on my phone, pc Linux and Windows, syncing using minio (I’m the only user).
Don’t say I will do it, do it now :crossed_fingers:.
Sorry for the off topic

Hi @fifoude1,

when i say i have it it is on my ynh instance itself (i am the packager of the homeassistant app). According to teh log lines your shares i didn’t find the culprit but not having the “Accept Usage” message is not normal.
Did you install it as i wrote ? Folders, permissions are right ?

oh sorry, I was sure HACS was an addon, my bad!

1 Like

Hi @ewilly,
I did what you wrote:


and unfortunately I still have the same error msg and same logs:

I would suspect that HACS on a VM/Yunohost/HA-core (Virtual Box VM) configuration is not adapted (at least for my case).
Meanwhile I created a dedicated VM/HA-OS (Virtual Box as well) and I encountered any problem to install HACS! It is a good alternative so far even if I couldn’t make the Redirect app working as suggested by @OniriCorpe.
If you want me to investigate further the VM/Yunohost/HA-core/HACS installation under your instructions I am happy to help.
I take advantage that you are the packager to thank you warmly for the great job you and all Yunohosters are doing. It is a great solution.
Cheers

Could you check if zlib1g-dev and libpcap0.8 are installed on your system.
The fact that you are on a VM is certainly not the problem.

zlib1g-dev = yes
libpcap0.8 = no
installed_programs.odt (62.9 KB)

@fifoude1 came across this from a google search, was having the same issue on a Raspberry PI 5 running Arch Linux with Home Assistant installed in Docker.

The issue is with the python module pydantic version < 1.10.15. Enter a shell with

docker exec -it container_name sh

and then update pydantic with pip

pip install --force-reinstall -v “pydantic==1.10.16”

Should work after a cointainer restart

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.